当前位置: 首页>>代码示例>>C++>>正文


C++ getStaticMethodInfo函数代码示例

本文整理汇总了C++中getStaticMethodInfo函数的典型用法代码示例。如果您正苦于以下问题:C++ getStaticMethodInfo函数的具体用法?C++ getStaticMethodInfo怎么用?C++ getStaticMethodInfo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getStaticMethodInfo函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: setBackgroundMusicVolumeJNI

void setBackgroundMusicVolumeJNI(float volume)
{
	// void setBackgroundMusicVolume()

#if 0
JniMethodInfo methodInfo;

	if (! getStaticMethodInfo(methodInfo, "setBackgroundMusicVolume", "(F)V"))
	{
		return ;
	}

    methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, volume);
	methodInfo.env->DeleteLocalRef(methodInfo.classID);
#endif
}
开发者ID:FlyingTarrasque,项目名称:lotus2d-engine,代码行数:16,代码来源:AudioEngineJni.c

示例2: getStaticMethodInfo

bool DeviceUtils::isWifiEnabled()
{
    JniMethodInfo minfo;
    bool isHave = getStaticMethodInfo(minfo, JAVA_CLS_DEVICE, "isWifiEnabled", "()Z");
    if(!isHave){
        return false;
    }
    jboolean ret = minfo.env->CallStaticBooleanMethod(minfo.classID, minfo.methodID);
    
    CCLog("wifiEnabled: %d", ret);
    minfo.env->DeleteLocalRef(minfo.classID);
    if(ret){
        return true;
    }
    return false;
}
开发者ID:qingzhizhu,项目名称:QingLibCocos2dx,代码行数:16,代码来源:DeviceUtils.cpp

示例3: preloadEffectJNI

void preloadEffectJNI( const char *path )
{
	// void preloadEffect(String)

	JniMethodInfo methodInfo;

	if( !getStaticMethodInfo( methodInfo, "preloadEffect", "(Ljava/lang/String;)V" ) ) {
		LOGE( "error01:%s", __FUNCTION__ );
		return;
	}

	jstring stringArg = methodInfo.env->NewStringUTF( path );
	methodInfo.env->CallStaticVoidMethod( methodInfo.classID, methodInfo.methodID, stringArg );
	methodInfo.env->DeleteLocalRef( stringArg );
	methodInfo.env->DeleteLocalRef( methodInfo.classID );
}
开发者ID:xahgo,项目名称:tama,代码行数:16,代码来源:SimpleAudioEngineJni.cpp

示例4: playBackgroundMusicJNI

 void playBackgroundMusicJNI(const char *path, bool isLoop)
 {
     // void playBackgroundMusic(String,boolean)
     
     JniMethodInfo methodInfo;
     
     if (! getStaticMethodInfo(methodInfo, "playBackgroundMusic", "(Ljava/lang/String;Z)V"))
     {
         return;
     }
     
     jstring stringArg = methodInfo.env->NewStringUTF(path);
     methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, stringArg, isLoop);
     methodInfo.env->DeleteLocalRef(stringArg);
     methodInfo.env->DeleteLocalRef(methodInfo.classID);
 }
开发者ID:korman,项目名称:Temp,代码行数:16,代码来源:SimpleAudioEngineJni.cpp

示例5: compareDateJNI

 long compareDateJNI(const char* startDate)
 {
     JniMethodInfo methodInfo;
     jlong ret = 0;
     
     if (! getStaticMethodInfo(methodInfo, "compareDate", "(Ljava/lang/String;)J"))
     {
         return ret;
     }
     
     jstring stringArg = methodInfo.env->NewStringUTF(startDate);
     ret = methodInfo.env->CallStaticLongMethod(methodInfo.classID, methodInfo.methodID, stringArg);
     methodInfo.env->DeleteLocalRef(methodInfo.classID);
     
     return ret;
 }
开发者ID:JeonJonguk,项目名称:e002_c010,代码行数:16,代码来源:CJLMSExtensionJni.cpp

示例6: resumeBackgroundMusicJNI

void resumeBackgroundMusicJNI()
{
	// void resumeBackgroundMusic()

#if 0
JniMethodInfo methodInfo;

	if (! getStaticMethodInfo(methodInfo, "resumeBackgroundMusic", "()V"))
	{
		return;
	}

	methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID);
	methodInfo.env->DeleteLocalRef(methodInfo.classID);
#endif
}
开发者ID:FlyingTarrasque,项目名称:lotus2d-engine,代码行数:16,代码来源:AudioEngineJni.c

示例7: playFrameVideoJNI

 void playFrameVideoJNI(const char* frameImgPath, const char* contentPath, int x, int y, int width, int height)
 {
     JniMethodInfo methodInfo;
     
     if (! getStaticMethodInfo(methodInfo, "playFrameVideo", "(Ljava/lang/String;Ljava/lang/String;IIII)V"))
     {
         return ;
     }
     
     jstring stringArg1 = methodInfo.env->NewStringUTF(frameImgPath);
     jstring stringArg2 = methodInfo.env->NewStringUTF(contentPath);
     methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, stringArg1, stringArg2, x, y, width, height);
     methodInfo.env->DeleteLocalRef(stringArg1);
     methodInfo.env->DeleteLocalRef(stringArg2);
     methodInfo.env->DeleteLocalRef(methodInfo.classID);
 }
开发者ID:JeonJonguk,项目名称:e002_c010,代码行数:16,代码来源:CJVideoInterfaceJNI.cpp

示例8: stopAllEffectsJNI

void stopAllEffectsJNI()
{
#if 0
// void stopAllEffects()

	JniMethodInfo methodInfo;

	if (! getStaticMethodInfo(methodInfo, "stopAllEffects", "()V"))
	{
		return ;
	}

	methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID);
	methodInfo.env->DeleteLocalRef(methodInfo.classID);
#endif
}
开发者ID:FlyingTarrasque,项目名称:lotus2d-engine,代码行数:16,代码来源:AudioEngineJni.c

示例9: resumeEffectJNI

void resumeEffectJNI(unsigned int nSoundId)
{
	// void resumeEffect(int)

	#if 0
JniMethodInfo methodInfo;

	if (! getStaticMethodInfo(methodInfo, "resumeEffect", "(I)V"))
	{
		return ;
	}

	methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, (int)nSoundId);
	methodInfo.env->DeleteLocalRef(methodInfo.classID);
#endif
}
开发者ID:FlyingTarrasque,项目名称:lotus2d-engine,代码行数:16,代码来源:AudioEngineJni.c

示例10: endJNI

void endJNI()
{
	// void end()

#if 0
JniMethodInfo methodInfo;

	if (! getStaticMethodInfo(methodInfo, "end", "()V"))
	{
		return ;
	}

	methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID);
	methodInfo.env->DeleteLocalRef(methodInfo.classID);
#endif
}
开发者ID:FlyingTarrasque,项目名称:lotus2d-engine,代码行数:16,代码来源:AudioEngineJni.c

示例11: preloadBackgroundMusicJNI

void preloadBackgroundMusicJNI( const char *path )
{
	LOGD( "%s:%s", __FUNCTION__, path );
	// void playBackgroundMusic(String,boolean)
	JniMethodInfo methodInfo;

	if( !getStaticMethodInfo( methodInfo, "preloadBackgroundMusic", "(Ljava/lang/String;)V" ) ) {
		LOGE( "error01:%s", __FUNCTION__ );
		return;
	}

	jstring stringArg = methodInfo.env->NewStringUTF( path );
	methodInfo.env->CallStaticVoidMethod( methodInfo.classID, methodInfo.methodID, stringArg );
	methodInfo.env->DeleteLocalRef( stringArg );
	methodInfo.env->DeleteLocalRef( methodInfo.classID );
}
开发者ID:xahgo,项目名称:tama,代码行数:16,代码来源:SimpleAudioEngineJni.cpp

示例12: unloadEffectJNI

 void unloadEffectJNI(const char* path)
 {
     // void unloadEffect(String)
     
     JniMethodInfo methodInfo;
     
     if (! getStaticMethodInfo(methodInfo, "unloadEffect", "(Ljava/lang/String;)V"))
     {
         return ;
     }
     
     jstring stringArg = methodInfo.env->NewStringUTF(path);
     methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, stringArg);
     methodInfo.env->DeleteLocalRef(stringArg);
     methodInfo.env->DeleteLocalRef(methodInfo.classID);
 }
开发者ID:korman,项目名称:Temp,代码行数:16,代码来源:SimpleAudioEngineJni.cpp

示例13: getFreeSpaceJNI

 long long getFreeSpaceJNI()
 {
     // int getFreeSpace()
     
     JniMethodInfo methodInfo;
     jlong ret = 0;
     
     if (! getStaticMethodInfo(methodInfo, "getFreeSpace", "()J"))
     {
         return ret;
     }
     
     ret = methodInfo.env->CallStaticLongMethod(methodInfo.classID, methodInfo.methodID);
     methodInfo.env->DeleteLocalRef(methodInfo.classID);
     
     return ret;
 }
开发者ID:JeonJonguk,项目名称:e002_c010,代码行数:17,代码来源:CJLMSExtensionJni.cpp

示例14: getNetworkStateJNI

 bool getNetworkStateJNI()
 {
     // boolean getNetworkState()
     
     JniMethodInfo methodInfo;
     jboolean ret = false;
     
     if (! getStaticMethodInfo(methodInfo, "getNetworkState", "()Z"))
     {
         return ret;
     }
     
     ret = methodInfo.env->CallStaticBooleanMethod(methodInfo.classID, methodInfo.methodID);
     methodInfo.env->DeleteLocalRef(methodInfo.classID);
     
     return ret;
 }
开发者ID:JeonJonguk,项目名称:e002_c010,代码行数:17,代码来源:CJLMSExtensionJni.cpp

示例15: sendLMSCenterJNI

 unsigned int sendLMSCenterJNI()
 {
     // int sendLMSCenter()
     
     JniMethodInfo methodInfo;
     int ret = 0;
     
     if (! getStaticMethodInfo(methodInfo, "sendLMSCenter", "()I"))
     {
         return ret;
     }
     
     ret = methodInfo.env->CallStaticIntMethod(methodInfo.classID, methodInfo.methodID);
     methodInfo.env->DeleteLocalRef(methodInfo.classID);
     
     return (unsigned int)ret;
 }
开发者ID:JeonJonguk,项目名称:e002_c010,代码行数:17,代码来源:CJLMSExtensionJni.cpp


注:本文中的getStaticMethodInfo函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。