⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 m3ganimationtrack.c

📁 java 1.1 gemini 08_16
💻 C
字号:
/*******************************************************************************
 *  Modification Notice:
 *  --------------------------
 *  This software is modified by MediaTek Inc. and the information contained
 *  herein is confidential. The software may not be copied and the information
 *  contained herein may not be used or disclosed except with the written
 *  permission of MediaTek Inc. (C) 2001
 *
 *******************************************************************************/

/*****************************************************************************
 *
 * Filename:
 * ---------
 *  AnimationTrack.c
 *
 * Project:
 * --------
 *   Maui_Software
 *
 * Description:
 * ------------
 *   
 *
 * Author:
 * -------
 * -------
 *
 *============================================================================
 *             HISTORY
 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
 *------------------------------------------------------------------------------
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *------------------------------------------------------------------------------
 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
 *============================================================================
 ****************************************************************************/
 
/*************************************************************************
 * Include Header Files
 *************************************************************************/
#include "m3g.h"

#ifdef SUPPORT_JSR_184
/*************************************************************************
 * Function Definition
 *************************************************************************/

KNIEXPORT KNI_RETURNTYPE_INT
Java_javax_microedition_m3g_AnimationTrack_create()
{
	st_m3g_animationtrack* handle = NULL;
	st_m3g_keyframesequence* keyframe_seq = (st_m3g_keyframesequence*)KNI_GetParameterAsInt(1);
	jint property = KNI_GetParameterAsInt(2);
	
	if (property < M3G_ANIMATIONTRACK_ALPHA || property>M3G_ANIMATIONTRACK_VISIBILITY) {
		KNI_ThrowNew("java/lang/IllegalArgumentException", "invalid property");			
	} else {
		if (M3G_AnimationTrack_check(keyframe_seq, property) == 0) {
			KNI_ThrowNew("java/lang/IllegalArgumentException", "invalid property");						
		} else {
			ENTER_M3D_CS;
			handle = M3G_AnimationTrack_new(keyframe_seq, property);
			LEAVE_M3D_CS;
	
			if (handle == NULL) KNI_ThrowNew("java/lang/NullPointerException", "null handle");
		}
	}
	
	KNI_ReturnInt((jint)handle);	
}

KNIEXPORT KNI_RETURNTYPE_INT
Java_javax_microedition_m3g_AnimationTrack_getControllerImpl()
{
	st_m3g_animationtrack* handle = (st_m3g_animationtrack*)KNI_GetParameterAsInt(1);		
	//KNI_ReturnInt((jint)handle->animation_controller);
	KNI_ReturnInt((jint)M3G_AnimationTrack_getController(handle));
}
	
KNIEXPORT KNI_RETURNTYPE_INT
Java_javax_microedition_m3g_AnimationTrack_getKeyframeSequenceImpl()
{
	st_m3g_animationtrack* handle = (st_m3g_animationtrack*)KNI_GetParameterAsInt(1);		
	//KNI_ReturnInt((jint)handle->keyframe_sequence);
	KNI_ReturnInt((jint)M3G_AnimationTrack_getKeyframeSequence(handle));
}
	
KNIEXPORT KNI_RETURNTYPE_INT
Java_javax_microedition_m3g_AnimationTrack_getTargetPropertyImpl()
{
	st_m3g_animationtrack* handle = (st_m3g_animationtrack*)KNI_GetParameterAsInt(1);		
	//KNI_ReturnInt((jint)handle->property_id);
	KNI_ReturnInt((jint)M3G_AnimationTrack_getTargetProperty(handle));
}
	
KNIEXPORT KNI_RETURNTYPE_VOID
Java_javax_microedition_m3g_AnimationTrack_setControllerImpl()
{
	st_m3g_animationtrack* handle = (st_m3g_animationtrack*)KNI_GetParameterAsInt(1);		
	st_m3g_animationcontroller* controller = (st_m3g_animationcontroller*)KNI_GetParameterAsInt(2);
	
	kal_trace(TRACE_GROUP_6, FUNC_J2ME_M3G_SETCONTROLLER, handle, controller);

	if (M3G_AnimationTrack_setController(handle, controller) != M3G_SUCCESS) {
		KNI_ThrowNew("java/lang/IllegalArgumentException", "invalid controller");		
	}
	
	KNI_ReturnVoid();		
}	
#endif /* #ifdef SUPPORT_JSR_184 */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -