2012-04-19 14:35:52 +08:00
|
|
|
#ifndef __CC_APPLICATION_ANDROID_H__
|
|
|
|
#define __CC_APPLICATION_ANDROID_H__
|
|
|
|
|
2012-06-19 16:20:46 +08:00
|
|
|
#include "platform/CCCommon.h"
|
|
|
|
#include "platform/CCApplicationProtocol.h"
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
NS_CC_BEGIN
|
|
|
|
|
|
|
|
class CCRect;
|
|
|
|
|
2012-04-24 17:35:36 +08:00
|
|
|
class CC_DLL CCApplication : public CCApplicationProtocol
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
CCApplication();
|
|
|
|
virtual ~CCApplication();
|
|
|
|
|
|
|
|
/**
|
2012-09-16 05:19:14 +08:00
|
|
|
@brief Callback by CCDirector to limit FPS.
|
|
|
|
@interval The time, expressed in seconds, between current frame and next.
|
2012-04-19 14:35:52 +08:00
|
|
|
*/
|
|
|
|
void setAnimationInterval(double interval);
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Run the message loop.
|
|
|
|
*/
|
|
|
|
int run();
|
|
|
|
|
|
|
|
/**
|
2012-09-16 05:19:14 +08:00
|
|
|
@brief Get current application instance.
|
2012-04-19 14:35:52 +08:00
|
|
|
@return Current application instance pointer.
|
|
|
|
*/
|
2012-08-21 15:28:43 +08:00
|
|
|
static CCApplication* sharedApplication();
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Get current language config
|
|
|
|
@return Current language config
|
|
|
|
*/
|
2012-04-24 17:35:36 +08:00
|
|
|
virtual ccLanguageType getCurrentLanguage();
|
2012-08-16 10:21:15 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Get target platform
|
|
|
|
*/
|
|
|
|
virtual TargetPlatform getTargetPlatform();
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
protected:
|
|
|
|
static CCApplication * sm_pSharedApplication;
|
|
|
|
};
|
|
|
|
|
|
|
|
NS_CC_END
|
|
|
|
|
2012-04-24 17:35:36 +08:00
|
|
|
#endif // __CC_APPLICATION_ANDROID_H__
|