2022-07-30 12:24:03 -04:00
|
|
|
#ifndef __CC_APPLICATION_ANDROID_H__
|
|
|
|
#define __CC_APPLICATION_ANDROID_H__
|
|
|
|
|
2022-10-17 08:46:36 -04:00
|
|
|
#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:
|
2023-06-04 20:46:48 -04:00
|
|
|
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.
|
|
|
|
*/
|
2023-06-05 20:42:22 -04:00
|
|
|
virtual void setAnimationInterval(double interval) override;
|
2022-07-30 12:24:03 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Run the message loop.
|
|
|
|
*/
|
|
|
|
int run();
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Get current application instance.
|
|
|
|
@return Current application instance pointer.
|
|
|
|
*/
|
|
|
|
static CCApplication* sharedApplication();
|
|
|
|
|
2023-02-01 17:03:01 -05:00
|
|
|
static GEODE_DLL CCApplication* get();
|
2022-10-06 15:37:54 -04:00
|
|
|
|
2022-07-30 12:24:03 -04:00
|
|
|
/**
|
|
|
|
@brief Get current language config
|
|
|
|
@return Current language config
|
|
|
|
*/
|
2023-06-05 20:42:22 -04:00
|
|
|
virtual ccLanguageType getCurrentLanguage() override;
|
2022-07-30 12:24:03 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Get target platform
|
|
|
|
*/
|
2023-06-05 20:42:22 -04:00
|
|
|
virtual TargetPlatform getTargetPlatform() override;
|
2022-07-30 12:24:03 -04:00
|
|
|
|
2023-06-04 20:46:48 -04:00
|
|
|
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__
|