The main application class. You can only initialize one instance. Typically, you instanciate it in main() and then call run()
More...
#include <Application.h>
The main application class. You can only initialize one instance. Typically, you instanciate it in main() and then call run()
◆ Application() [1/2]
| Application::Application |
( |
int |
width, |
|
|
int |
height, |
|
|
SDL_Color |
bgColor, |
|
|
std::string |
touchInputDevice, |
|
|
std::string |
ttyDevice, |
|
|
int |
FPS_LIMIT |
|
) |
| |
Create an application.
- Parameters
-
| width | The window width |
| height | The window height |
| bgColor | The background color |
| touchInputDevice | The path to the touch device (e.g. /dev/input/event0) |
| ttyDevice | The path to the console UART device bound to the screen (e.g. /dev/tty0) to disable the blinking cursor |
| FPS_LIMIT | The framerate limit, to avoid stressing the CPU for low Hz displays |
◆ ~Application()
| Application::~Application |
( |
| ) |
|
◆ Application() [2/2]
◆ exit()
| void Application::exit |
( |
| ) |
|
◆ getCurrent()
Get the currently running application, or null if none is available.
- Returns
- The application
◆ getCurrentRenderer()
| SDL_Renderer * Application::getCurrentRenderer |
( |
| ) |
|
|
static |
Get the SDL renderer object (static shortcut)
- Returns
- The SDL renderer object
◆ getCurrentSceneManager()
Get the scene manager, needed to change the currently displayed scene (static shortcut)
- Returns
- The scene manager
◆ getCurrentWindow()
| SDL_Window * Application::getCurrentWindow |
( |
| ) |
|
|
static |
Get the SDL window object (static shortcut)
- Returns
- The SDL window object
◆ getRenderer()
| SDL_Renderer * Application::getRenderer |
( |
| ) |
|
Get the SDL renderer object.
- Returns
- The SDL renderer object
◆ getSceneManager()
Get the scene manager, needed to change the currently displayed scene.
- Returns
- The scene manager
◆ getWindow()
| SDL_Window * Application::getWindow |
( |
| ) |
|
Get the SDL window object.
- Returns
- The SDL window object
◆ isRunning()
| bool Application::isRunning |
( |
| ) |
|
◆ operator=()
◆ run()
| void Application::run |
( |
| ) |
|
◆ runOnCurrentMainThread()
| void Application::runOnCurrentMainThread |
( |
Task * |
task | ) |
|
|
static |
Runs the given task on the main thread. It will be deleted when done (static shortcut)
- Parameters
-
◆ runOnCurrentWorkerThread()
| void Application::runOnCurrentWorkerThread |
( |
Task * |
task | ) |
|
|
static |
Runs the given task on the worker thread. It will be deleted when done (static shortcut)
- Parameters
-
◆ runOnMainThread()
| void Application::runOnMainThread |
( |
Task * |
task | ) |
|
Runs the given task on the main thread. It will be deleted when done.
- Parameters
-
◆ runOnWorkerThread()
| void Application::runOnWorkerThread |
( |
Task * |
task | ) |
|
Runs the given task on the worker thread. It will be deleted when done.
- Parameters
-
The documentation for this class was generated from the following files: