nCine::MainApplication class

Main entry point and event loop driver for standard (desktop) applications.

Concrete Application subclass that initializes the engine, runs the game loop and processes platform events on desktop backends (GLFW/SDL/Qt5).

Base classes

class Application
Base class for the main entry point of an nCine application.

Public static functions

static auto Run(CreateAppEventHandlerDelegate createAppEventHandler, int argc, NativeArgument* argv) -> int
Entry point to be called from the main()/wWinMain() function; returns the process exit code.

Public functions

void Quit() override
Raises the quit flag.
auto EnablePlayStationExtendedSupport(bool enable) -> bool override
Switches PS4 and PS5 controllers to use extended protocol which enables rumble and other features.
auto GetUserName() -> String override
Returns the username of the logged-in user.
auto OpenUrl(StringView url) -> bool override
Opens the specified URL in a default web browser.
auto CanShowScreenKeyboard() -> bool override
Returns true if screen (software) keyboard is supported and ShowScreenKeyboard() should succeed.
auto ToggleScreenKeyboard() -> bool override
Toggles the screen (software) keyboard.
auto ShowScreenKeyboard() -> bool override
Shows the screen (software) keyboard.
auto HideScreenKeyboard() -> bool override
Hides the screen (software) keyboard.

Friends

auto theApplication() -> Application&
Returns the application instance.

Function documentation

Application& theApplication()

Returns the application instance.

Returns the singleton application instance.