cocos2d-x  3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ApplicationProtocol Class Referenceabstract

#include <CCApplicationProtocol.h>

Inheritance diagram for ApplicationProtocol:
Application Application Application Application Application Application

Public Types

enum  Platform {
  OS_WINDOWS, OS_LINUX, OS_MAC, OS_ANDROID,
  OS_IPHONE, OS_IPAD, OS_BLACKBERRY, OS_NACL,
  OS_EMSCRIPTEN, OS_TIZEN, OS_WINRT, OS_WP8
}
 

Public Member Functions

virtual ~ApplicationProtocol ()
virtual bool applicationDidFinishLaunching ()=0
 Implement Director and Scene init code here. More...
 
virtual void applicationDidEnterBackground ()=0
 This function will be called when the application enters background. More...
 
virtual void applicationWillEnterForeground ()=0
 This function will be called when the application enters foreground. More...
 
virtual void setAnimationInterval (double interval)=0
 Callback by Director for limit FPS. More...
 
virtual void initGLContextAttrs ()
virtual LanguageType getCurrentLanguage ()=0
 Get current language config. More...
 
virtual const char * getCurrentLanguageCode ()=0
 Get current language iso 639-1 code. More...
 
virtual Platform getTargetPlatform ()=0
 Get target platform. More...
 
virtual bool openURL (const std::string &url)=0
 Open url in default browser. More...
 

Constructor & Destructor Documentation

virtual ~ApplicationProtocol ( )
inlinevirtual

Member Function Documentation

virtual void
applicationDidEnterBackground
( )
pure virtual

This function will be called when the application enters background.

virtual bool
applicationDidFinishLaunching
( )
pure virtual

Implement Director and Scene init code here.

Returns
true Initialize success, app continue.
false Initialize failed, app terminate.
virtual void
applicationWillEnterForeground
( )
pure virtual

This function will be called when the application enters foreground.

virtual LanguageType
getCurrentLanguage
( )
pure virtual

Get current language config.

Returns
Current language config

Implemented in Application, Application, Application, Application, Application, and Application.

virtual const char*
getCurrentLanguageCode
( )
pure virtual

Get current language iso 639-1 code.

Returns
Current language iso 639-1 code

Implemented in Application, Application, Application, Application, Application, and Application.

virtual Platform getTargetPlatform ( )
pure virtual

Get target platform.

Implemented in Application, Application, Application, Application, Application, and Application.

virtual void initGLContextAttrs ( )
inlinevirtual
var initGLContextAttrs ( )
inlinevirtual
local initGLContextAttrs ( )
inlinevirtual
virtual bool openURL ( const std::string &  url)
pure virtual

Open url in default browser.

Parameters
Stringwith url to open.
Returns
true if the resource located by the URL was successfully opened; otherwise false.

Implemented in Application, Application, Application, Application, Application, and Application.

virtual void setAnimationInterval ( double  interval)
pure virtual

Callback by Director for limit FPS.

Parameters
intervalThe time, expressed in seconds, between current frame and next.

Implemented in Application, Application, Application, Application, Application, and Application.


The documentation for this class was generated from the following file: