|
GlistEngine
|
#include <gAppManager.h>


Public Member Functions | |
| gAppManager (const std::string &appName, gBaseApp *baseApp, int width, int height, int windowMode, int unitWidth, int unitHeight, int screenScaling, bool isResizable, int loopMode) | |
| ~gAppManager () | |
| void | runApp () |
| void | initialize () |
| void | setup () |
| void | loop () |
| void | emscriptenLoop () |
| void | stop () |
| void | submitToMainThread (std::function< void()> fn) |
| std::string | getAppName () |
| gCanvasManager * | getCanvasManager () |
| gGUIManager * | getGUIManager () |
| int | getLoopMode () |
| bool | isWindowFocused () |
| bool | callEvent (gEvent &event) |
| gBaseCanvas * | getCurrentCanvas () |
| void | setTargetFramerate (int framerate) |
| int | getTargetFramerate () |
| int | getFramerate () |
| double | getElapsedTime () |
| gGUIFrame * | getCurrentGUIFrame () |
| void | setClipboardString (const std::string &clipboard) |
| std::string | getClipboardString () |
| int | getWindowMode () const |
| gBaseWindow * | getWindow () const |
| void | setWindowSize (int width, int height) |
| void | setWindowResizable (bool isResizable) |
| void | setWindowSizeLimits (int minWidth, int minHeight, int maxWidth, int maxHeight) |
| void | setScreenSize (int width, int height) |
| void | setCurrentCanvas (gBaseCanvas *canvas) |
| void | enableVsync () |
| void | disableVsync () |
| void | setCurrentGUIFrame (gGUIFrame *guiFrame) |
| gGUIAppThread * | getGUIAppThread () |
| void | setCursor (int cursorId) |
| void | setCursorMode (gCursorMode cursorMode) |
| gCursorMode | getCursorMode () |
| void | setWindowIcon (std::string pngFullpath) |
| void | setWindowIcon (unsigned char *imageData, int w, int h) |
| void | setWindowTitle (const std::string &windowTitle) |
| bool | isJoystickConnected (int joystickId) |
| int | getJoystickAxesCount (int joystickId) |
| const float * | getJoystickAxes (int joystickId) |
| bool | isGamepadEnabled () |
| bool | isGamepadButtonPressed (int joystickId, int buttonId) |
| int | getMaxJoystickNum () |
| int | getMaxJoystickButtonNum () |
| std::string | getANSILocale () |
| DeviceOrientation | getDeviceOrientation () |
| void | setDeviceOrientation (DeviceOrientation orientation) |
| void | iosLoop () |
Public Member Functions inherited from gObject | |
| gObject () | |
| void | logi (std::string message) |
| void | logd (std::string message) |
| void | logw (std::string message) |
| void | loge (std::string message) |
| void | logi (std::string tag, std::string message) |
| void | logd (std::string tag, std::string message) |
| void | logw (std::string tag, std::string message) |
| void | loge (std::string tag, std::string message) |
Additional Inherited Members | |
Static Public Member Functions inherited from gObject | |
| static std::string | gGetAppDir () |
| static std::string | gGetAssetsDir () |
| static void | gSetAssetsDir (std::string assetsDir) |
| static std::string | gGetFilesDir () |
| static std::string | gGetImagesDir () |
| static std::string | gGetFontsDir () |
| static std::string | gGetModelsDir () |
| static std::string | gGetTexturesDir () |
| static std::string | gGetShadersDir () |
| static std::string | gGetSoundsDir () |
| static std::string | gGetDatabasesDir () |
| static std::string | gGetVideosDir () |
| static void | setCurrentResolution (int scalingNo, int currentResolutionNo) |
Static Public Attributes inherited from gObject | |
| static const int | LOGLEVEL_SILENT |
| static const int | LOGLEVEL_DEBUG |
| static const int | LOGLEVEL_INFO |
| static const int | LOGLEVEL_WARNING |
| static const int | LOGLEVEL_ERROR |
Static Protected Attributes inherited from gObject | |
| static int | renderpassnum |
| static int | renderpassno |
| static int | releasescaling |
| static int | releaseresolution |
| gAppManager::gAppManager | ( | const std::string & | appName, |
| gBaseApp * | baseApp, | ||
| int | width, | ||
| int | height, | ||
| int | windowMode, | ||
| int | unitWidth, | ||
| int | unitHeight, | ||
| int | screenScaling, | ||
| bool | isResizable, | ||
| int | loopMode | ||
| ) |
| gAppManager::~gAppManager | ( | ) |
| bool gAppManager::callEvent | ( | gEvent & | event | ) |
Publishes the event to canvas, app and gui manager. Returns if true the event was handled by any of them.
| event | Event to publish |
| void gAppManager::disableVsync | ( | ) |
| void gAppManager::emscriptenLoop | ( | ) |
| void gAppManager::enableVsync | ( | ) |
| std::string gAppManager::getANSILocale | ( | ) |
| std::string gAppManager::getAppName | ( | ) |
Returns app's name
| gCanvasManager * gAppManager::getCanvasManager | ( | ) |
Getter for the Canvas Manager
| std::string gAppManager::getClipboardString | ( | ) |
Reads and returns the string saved to clipboard.
| gBaseCanvas * gAppManager::getCurrentCanvas | ( | ) |
Returns a pointer of the current canvas
| gCursorMode gAppManager::getCursorMode | ( | ) |
|
inline |
| double gAppManager::getElapsedTime | ( | ) |
| int gAppManager::getFramerate | ( | ) |
| gGUIAppThread * gAppManager::getGUIAppThread | ( | ) |
| gGUIManager * gAppManager::getGUIManager | ( | ) |
Getter for the GUI Manager
| const float * gAppManager::getJoystickAxes | ( | int | joystickId | ) |
| int gAppManager::getJoystickAxesCount | ( | int | joystickId | ) |
| int gAppManager::getLoopMode | ( | ) |
Returns the loop mode of the engine. The returning value can be one of G_LOOPMODE_NORMAL(0) or G_LOOPMODE_NONE(1)
|
inline |
|
inline |
| int gAppManager::getTargetFramerate | ( | ) |
|
inline |
|
inline |
Possible values are
| void gAppManager::initialize | ( | ) |
| void gAppManager::iosLoop | ( | ) |
| bool gAppManager::isGamepadButtonPressed | ( | int | joystickId, |
| int | buttonId | ||
| ) |
|
inline |
| bool gAppManager::isJoystickConnected | ( | int | joystickId | ) |
| bool gAppManager::isWindowFocused | ( | ) |
Returns if the current window is focused by operating system
| void gAppManager::loop | ( | ) |
| void gAppManager::runApp | ( | ) |
| void gAppManager::setClipboardString | ( | const std::string & | clipboard | ) |
Function to save a string into the system clipboard. Clipboard string should be arranged by the app developer.
| String | to save |
| void gAppManager::setCurrentCanvas | ( | gBaseCanvas * | canvas | ) |
Completely replace the current gBaseCanvas with the specified gBaseCanvas.
| baseCanvas | new gBaseCanvas to replace. |
| void gAppManager::setCurrentGUIFrame | ( | gGUIFrame * | guiFrame | ) |
| void gAppManager::setCursor | ( | int | cursorId | ) |
| void gAppManager::setCursorMode | ( | gCursorMode | cursorMode | ) |
| void gAppManager::setDeviceOrientation | ( | DeviceOrientation | orientation | ) |
| void gAppManager::setScreenSize | ( | int | width, |
| int | height | ||
| ) |
Sets screen size by given width and height. GlistEngine scales the process.
| width | new width value of screen. |
| height | new height value of screen. |
| void gAppManager::setTargetFramerate | ( | int | framerate | ) |
| framerate | Target frames per second value |
| void gAppManager::setup | ( | ) |
| void gAppManager::setWindowIcon | ( | std::string | pngFullpath | ) |
| void gAppManager::setWindowIcon | ( | unsigned char * | imageData, |
| int | w, | ||
| int | h | ||
| ) |
| void gAppManager::setWindowResizable | ( | bool | isResizable | ) |
| void gAppManager::setWindowSize | ( | int | width, |
| int | height | ||
| ) |
| void gAppManager::setWindowSizeLimits | ( | int | minWidth, |
| int | minHeight, | ||
| int | maxWidth, | ||
| int | maxHeight | ||
| ) |
| void gAppManager::setWindowTitle | ( | const std::string & | windowTitle | ) |
| void gAppManager::stop | ( | ) |
| void gAppManager::submitToMainThread | ( | std::function< void()> | fn | ) |
Submits a function to run on the main loop. Queue is executed after every tick.
| fn | Function to submit |