Pumps SDL events into the promeki event system. More...
#include <sdleventpump.h>
Public Member Functions | |
| SDLEventPump (const SDLEventPump &)=delete | |
| SDLEventPump & | operator= (const SDLEventPump &)=delete |
| void | pumpEvents () |
| Drains all pending SDL events and dispatches them. | |
| void | registerWindow (SDLWindow *window) |
| Registers a window for event routing. | |
| void | unregisterWindow (SDLWindow *window) |
| Unregisters a window from event routing. | |
| SDLWindow * | findWindow (uint32_t id) const |
| Finds a registered window by SDL window ID. | |
Pumps SDL events into the promeki event system.
Translates SDL events into promeki KeyEvent, MouseEvent, and window lifecycle calls on the appropriate SDLWindow. Windows register themselves with the pump so that events can be routed by SDL window ID.
This is not an ObjectBase — it is infrastructure owned by SdlSubsystem (similar to TuiScreen or TuiInputParser).
| SDLWindow * promeki::SDLEventPump::findWindow | ( | uint32_t | id | ) | const |
Finds a registered window by SDL window ID.
| id | The SDL window ID. |
| void promeki::SDLEventPump::pumpEvents | ( | ) |
Drains all pending SDL events and dispatches them.
Non-blocking: calls SDL_PollEvent in a loop until the SDL queue is empty. SdlSubsystem invokes this from the EventLoop IoSource callback that fires when SDL_AddEventWatch signals that new events have arrived.
| void promeki::SDLEventPump::registerWindow | ( | SDLWindow * | window | ) |
Registers a window for event routing.
| window | The SDLWindow to register. |
| void promeki::SDLEventPump::unregisterWindow | ( | SDLWindow * | window | ) |
Unregisters a window from event routing.
| window | The SDLWindow to unregister. |