geode/loader/include/Geode/cocos/platform/android/CCApplication.h

58 lines
1.2 KiB
C
Raw Normal View History

2022-07-30 12:24:03 -04:00
#ifndef __CC_APPLICATION_ANDROID_H__
#define __CC_APPLICATION_ANDROID_H__
#include "../CCCommon.h"
#include "../CCApplicationProtocol.h"
2022-07-30 12:24:03 -04:00
NS_CC_BEGIN
class CCRect;
class CC_DLL CCApplication : public CCApplicationProtocol
{
GEODE_FRIEND_MODIFY
public:
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCApplication)
2022-07-30 12:24:03 -04:00
CCApplication();
virtual ~CCApplication();
/**
@brief Callback by CCDirector to limit FPS.
@interval The time, expressed in seconds, between current frame and next.
*/
void setAnimationInterval(double interval);
/**
@brief Run the message loop.
*/
int run();
/**
@brief Get current application instance.
@return Current application instance pointer.
*/
static CCApplication* sharedApplication();
static GEODE_DLL CCApplication* get();
2022-07-30 12:24:03 -04:00
/**
@brief Get current language config
@return Current language config
*/
virtual ccLanguageType getCurrentLanguage();
/**
@brief Get target platform
*/
virtual TargetPlatform getTargetPlatform();
virtual void openURL(char const* url) override;
2022-07-30 12:24:03 -04:00
protected:
static CCApplication * sm_pSharedApplication;
};
NS_CC_END
#endif // __CC_APPLICATION_ANDROID_H__