mirror of https://github.com/axmolengine/axmol.git
81 lines
1.9 KiB
C++
81 lines
1.9 KiB
C++
#ifndef __CC_APPLICATION_WIN32_H__
|
|
#define __CC_APPLICATION_WIN32_H__
|
|
|
|
#include "CCStdC.h"
|
|
#include "platform/CCCommon.h"
|
|
#include "platform/CCApplicationProtocol.h"
|
|
#include <string>
|
|
|
|
NS_CC_BEGIN
|
|
|
|
class Rect;
|
|
|
|
class CC_DLL Application : public ApplicationProtocol
|
|
{
|
|
public:
|
|
/**
|
|
* @js ctor
|
|
*/
|
|
Application();
|
|
/**
|
|
* @js NA
|
|
* @lua NA
|
|
*/
|
|
virtual ~Application();
|
|
|
|
/**
|
|
@brief Run the message loop.
|
|
*/
|
|
int run();
|
|
|
|
/**
|
|
@brief Get current applicaiton instance.
|
|
@return Current application instance pointer.
|
|
*/
|
|
static Application* getInstance();
|
|
|
|
/** @deprecated Use getInstance() instead */
|
|
CC_DEPRECATED_ATTRIBUTE static Application* sharedApplication();
|
|
|
|
/* override functions */
|
|
virtual void setAnimationInterval(double interval);
|
|
virtual LanguageType getCurrentLanguage();
|
|
|
|
/**
|
|
@brief Get target platform
|
|
*/
|
|
virtual Platform getTargetPlatform();
|
|
|
|
/**
|
|
* 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);
|
|
|
|
void setStartupScriptFilename(const std::string& startupScriptFile);
|
|
|
|
const std::string& getStartupScriptFilename(void)
|
|
{
|
|
return _startupScriptFilename;
|
|
}
|
|
|
|
protected:
|
|
HINSTANCE _instance;
|
|
HACCEL _accelTable;
|
|
LARGE_INTEGER _animationInterval;
|
|
std::string _resourceRootPath;
|
|
std::string _startupScriptFilename;
|
|
|
|
static Application * sm_pSharedApplication;
|
|
};
|
|
|
|
NS_CC_END
|
|
|
|
#endif // __CC_APPLICATION_WIN32_H__
|