#include <application.h>
Public Types | |
typedef std::map< std::string, Debug::Mask > | DebugMap |
Public Member Functions | |
Application (int &argc, char **&argv, const DebugMap &other_flags=DebugMap(), Uint32 update=50) | |
Constructor. | |
~Application () | |
Default destructor. | |
int | exec () |
run mainloop | |
virtual void | quit (int exitcode=0) |
Halt execution and close window. | |
SigC::Slot0< void > | quitSlot (int exitcode=0) |
Return a slot which binds in the appropriate exit code. | |
void | abort () |
Halt execution and close window, bypassing quit handler. | |
bool | running () |
true during normal application processing | |
bool | keepAlive () |
handle all events | |
void | waitFor (bool &var, bool wait_val=true) |
runs until var == wait_val | |
void | waitFor (SigC::Slot0< bool > func, bool wait_val=true) |
runs until func returns wait_val | |
void | handleEvent (bool can_block=false) |
handle the next event in the queue | |
void | setIdleTime (Uint32 n) |
Set mainloop delay time. | |
void | pushEvent (Event *event) |
Takes an Event which it deletes after handling. | |
Static Public Member Functions | |
Application * | instance () |
If Application::instance() is non-null, SDL is guaranteed to have been initialized. | |
Public Attributes | |
SigC::Signal0< void > | update |
emitted after events are handled, but before drawing | |
SigC::Signal0< void > | draw |
signal to tell RootWindow to draw, nothing else should connect to this | |
SigC::Signal0< void > | destroyed |
emitted in destructor before SDL shutdown |
Extend this class to create your application.
|
If Application::instance() is non-null, SDL is guaranteed to have been initialized. You still have to check particular subsystems with SDL_WasInit(). |
|
Set mainloop delay time.
|
This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.