16PROMEKI_NAMESPACE_BEGIN
126 EventLoop *_eventLoop =
nullptr;
128 Widget *_focusedWidget =
nullptr;
136 int _sdlSourceHandle = -1;
148 int _pumpTimerId = -1;
150 static bool sdlEventWatch(
void *userdata, SDL_Event *event);
Pumps SDL events into the promeki event system.
Definition sdleventpump.h:37
SDL subsystem installed alongside an Application.
Definition sdlsubsystem.h:55
SdlSubsystem()
Initialises SDL and installs the event-loop bridge.
void setFocusedWidget(Widget *widget)
Sets the widget that receives keyboard input.
Definition sdlsubsystem.h:121
SDLEventPump & eventPump()
Returns the subsystem's SDLEventPump.
Definition sdlsubsystem.h:86
Widget * focusedWidget() const
Returns the widget that currently receives keyboard input, or nullptr if none is set.
Definition sdlsubsystem.h:103
~SdlSubsystem()
Destructor. Removes I/O source, closes pipe, calls SDL_Quit.
EventLoop * eventLoop()
Returns the main EventLoop the subsystem is bound to.
Definition sdlsubsystem.h:97
static SdlSubsystem * instance()
Returns the active SdlSubsystem instance.
Definition sdlsubsystem.h:78