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
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
class Rect;
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL Application : public ApplicationProtocol
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
|
|
|
public:
|
2013-06-20 14:13:12 +08:00
|
|
|
Application();
|
|
|
|
virtual ~Application();
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
/**
|
2013-06-20 14:13:12 +08:00
|
|
|
@brief Callback by Director to limit FPS.
|
2012-09-16 05:19:14 +08:00
|
|
|
@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.
|
|
|
|
*/
|
2013-07-15 16:24:42 +08:00
|
|
|
static Application* getInstance();
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-07-15 16:37:38 +08:00
|
|
|
/** @deprecated Use getInstance() instead */
|
|
|
|
CC_DEPRECATED_ATTRIBUTE static Application* 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:
|
2013-06-20 14:13:12 +08:00
|
|
|
static Application * sm_pSharedApplication;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
NS_CC_END
|
|
|
|
|
2012-04-24 17:35:36 +08:00
|
|
|
#endif // __CC_APPLICATION_ANDROID_H__
|