Class · aurore
aurore::Platform
#include <aurore/core/platform.hpp>
class aurore::PlatformConstructors 1
Functions 39
virtual void createWindow( std::string title,uint32_t width,uint32_t height,float windowXPos = NAN,float windowYPos = NAN) =0Called on startup, right after instanciation, to create and open a window with the given title and size.
platform.hpp:48This function also restores windows from maximization.
platform.hpp:55Set window size
platform.hpp:62virtual void setWindowSizeLimits( uint32_t windowMinWidth,uint32_t windowMinHeight,uint32_t windowMaxWidth,uint32_t windowMaxHeight)Set window size limits
platform.hpp:69Set window position
platform.hpp:76virtual void setWindowState( uint32_t windowWidth,uint32_t windowHeight,int windowXPos,int windowYPos)1.restoreWindow 2.Set window size 3.Set window position
platform.hpp:85Returns the human-readable name of the platform.
platform.hpp:90virtual const LayoutPreset * getLayoutPreset() The layout this platform's screen asks for (a small console screen: PRESET_SMALL_SCREEN), nullptr for the usual one. Read by Application::init() unless the app chose its own (Application::usePreset).
platform.hpp:97Returns true if device has wireless connection.
platform.hpp:102Returns wireless quality level from 0 to 3.
platform.hpp:107Returns true if device has ethernet connection.
platform.hpp:112Returns ip address.
platform.hpp:117Returns dns server address.
platform.hpp:122Returns if battery level supports.
platform.hpp:127Returns if Wireless level supports.
platform.hpp:132Returns the battery level from 0 to 100.
platform.hpp:137Returns the battery level from 0 to 100.
platform.hpp:142virtual void disableScreenDimming( bool disable,const std::string &reason = "disable dimming",const std::string &app = "aurore") =0Disable screen dimming/saver...
Parameters
disableInhibit or not
reasonIf disable is true, pass Inhibited reason to the system.
appIf disable is true, pass app name to the system.
Returns true if screen dimming is disabled
platform.hpp:156Returns true if the platform can set/get the backlight brightness
platform.hpp:174Set the windows always on top
platform.hpp:179Called at every iteration of the main loop. Must return false if the app should continue running (for example, return false if the X button was pressed on the window).
platform.hpp:186virtual ThemeVariant getThemeVariant() =0 Can be called at anytime to get the current system theme variant.
For now, the variant is assumed to stay the same during the whole time the app is running (no variant hot swap).
As such, the result should be cached by the platform code.
platform.hpp:198virtual void setThemeVariant(ThemeVariant theme) =0 Overwrite current theme settings
platform.hpp:203Can be called at anytime to get the current locale
For now, the locale is assumed to stay the same during the whole time the app is running (no locale hot swap)
As such, the result should be cached by the platform code. The method should return one of the locale constants defined in the i18n header file.
platform.hpp:215virtual AudioPlayer * getAudioPlayer() =0 Returns the AudioPlayer for the platform. Cannot return nullptr.
platform.hpp:221virtual VideoContext * getVideoContext() =0 Returns the VideoContext for the platform. Cannot return nullptr.
platform.hpp:227virtual InputManager * getInputManager() =0 Returns the InputManager for the platform. Cannot return nullptr.
platform.hpp:233virtual ImeManager * getImeManager() =0 Returns the ImeManager for the platform. Cannot return nullptr.
platform.hpp:239virtual FontLoader * getFontLoader() =0 Returns the FontLoader for the platform. Cannot return nullptr.
platform.hpp:245Returns if non applet.
platform.hpp:250When the program exits, exit directly to the home menu
platform.hpp:255When the program exits, exit directly to the home menu
platform.hpp:260Open a link in browser
Parameters
urlthe link which will be opened; one that isBrowserUrl() refuses is not opened
Paste text to clipboard
platform.hpp:283Copy text from clipboard
platform.hpp:288Static functions 3
true if openBrowser() may open this url: it starts with one of BROWSER_URL_SCHEMES followed by "://" and has no control character
platform.hpp:273static Platform * createPlatform() Selects and returns the best platform.
platform.hpp:293static void setFactory(std::function< Platform *()> factory) Has createPlatform() return what factory makes instead of the build's own platform (the test harness' headless one). To call before Application::init(); an empty function goes back to the default.
Static attributes 2
The schemes openBrowser() accepts, in lower case
platform.hpp:278App locale, empty for default
platform.hpp:307Read from Aurore's headers by Doxygen at each build · library/include