axmol/cocos2dx/platform/linux/CCApplication.h

73 lines
1.6 KiB
C
Raw Normal View History

2012-08-02 13:02:59 +08:00
/*
* Aplication.h
2012-08-02 13:02:59 +08:00
*
* Created on: Aug 8, 2011
* Author: laschweinski
*/
#ifndef CCAPLICATION_H_
#define CCAPLICATION_H_
#include "platform/CCCommon.h"
2012-08-02 13:02:59 +08:00
#include "platform/CCApplicationProtocol.h"
#include <string>
2012-08-02 13:02:59 +08:00
NS_CC_BEGIN
class Rect;
2012-08-02 13:02:59 +08:00
class Application : public ApplicationProtocol
2012-08-02 13:02:59 +08:00
{
public:
Application();
virtual ~Application();
2012-08-02 13:02:59 +08:00
/**
@brief Callback by Director for limit FPS.
2012-08-02 13:02:59 +08:00
@interval The time, which expressed in second in second, between current frame and next.
*/
void setAnimationInterval(double interval);
/**
@brief Run the message loop.
*/
int run();
/**
@brief Get current applicaiton instance.
@return Current application instance pointer.
*/
static Application* getInstance();
2012-08-02 13:02:59 +08:00
/** @deprecated Use getInstance() instead */
CC_DEPRECATED_ATTRIBUTE static Application* sharedApplication();
/* override functions */
virtual LanguageType getCurrentLanguage();
/**
* Sets the Resource root path.
* @deprecated Please use FileUtils::getInstance()->setSearchPaths() instead.
*/
CC_DEPRECATED_ATTRIBUTE void setResourceRootPath(const std::string& rootResDir);
/**
* Gets the Resource root path.
* @deprecated Please use FileUtils::getInstance()->getSearchPaths() instead.
*/
CC_DEPRECATED_ATTRIBUTE const std::string& getResourceRootPath(void);
/**
@brief Get target platform
*/
virtual Platform getTargetPlatform();
2012-08-02 13:02:59 +08:00
protected:
long _animationInterval; //micro second
std::string _resourceRootPath;
static Application * sm_pSharedApplication;
2012-08-02 13:02:59 +08:00
};
NS_CC_END
#endif /* CCAPLICATION_H_ */