libAlgAudio
v1.99-440-g08538e5-dirty
The development library for AlgAudio framework.
|
#include <SDLMain.hpp>
Public Types | |
enum | CustomEventCodes { NOTIFY_SUBPROCESS, NOTIFY_OSC, NOTIFY_TIMER } |
Static Public Member Functions | |
static unsigned int | GetWindowNum () |
static void | Init () |
static void | Loop () |
static void | PushNotifyOSCEvent () |
static void | PushNotifySubprocessEvent () |
static void | Quit () |
static void | RegisterWindow (std::shared_ptr< Window >) |
static void | SetTextInput (bool) |
static void | Step () |
static void | UnregisterAll () |
static void | UnregisterWindow (std::shared_ptr< Window >) |
Static Public Attributes | |
static std::atomic< int > | notify_event_id |
static Signal< float > | on_before_frame |
static std::atomic_bool | running |
The static interface implementing the main loop, event processing and window rendering.
|
inlinestatic |
Returns the number of currently registered windows.
|
static |
Init() must be caled before any other calls to this class members.
|
static |
This function enters the main loop, which keeps procesing events and triggering their routines. Note that it's not reentrant.
|
static |
|
static |
|
static |
Stops the main loop.
|
static |
A registered window is managed and rendered as SDLMain sees fit. This is handy it you wish to create a window and forget about it, as SDLMain will then sustain the ownership of the window, and it will keep redrawing it when needed. However, if you wish to redraw a window on your own, you should not register it.
|
static |
|
static |
Executes a single step of the main loop. This call is not blocking.
|
static |
Unregisters all registered windows.
|
static |
Unregisters a window. It will no longer be managed by SDLMain, you will have to render it on your own, and manually process its events.
|
static |
|
static |
Hook your code to this signal if you wish to perform animations. This signal will be triggered every time a fram is drawn, just before rendering happens. The float argument is the time delta (in seconds) from the time where the last frame was drawn.
|
static |