OpenEnroth 73e68f7
|
#include <PlatformEventLoop.h>
Public Member Functions | |
virtual | ~PlatformEventLoop ()=default |
virtual void | exec (PlatformEventHandler *eventHandler)=0 |
virtual void | quit ()=0 |
virtual void | processMessages (PlatformEventHandler *eventHandler, int count=-1)=0 |
virtual void | waitForMessages ()=0 |
Abstraction around a platform-specific event loop.
|
virtualdefault |
|
pure virtual |
Starts this event loop.
This function blocks until either quit
is called from inside the event handler code, or an application is closed by the user (e.g. after the last window is closed, or Command+Q
is pressed on Mac).
eventHandler | Callback for event processing. |
Implemented in EngineControlComponent, NullEventLoop, ProxyEventLoop, and SdlEventLoop.
|
pure virtual |
Processes the messages that are currently in the message queue, and returns. Returns immediately if there are no messages in the message queue.
eventHandler | Callback for event processing. |
count | Maximum number of messages to process, -1 means unlimited. |
Implemented in EngineControlComponent, NullEventLoop, ProxyEventLoop, and SdlEventLoop.
|
pure virtual |
Tells this event loop to exit. Does nothing if the event loop is not running.
Implemented in NullEventLoop, ProxyEventLoop, and SdlEventLoop.
|
pure virtual |
Blocks until at least one message is delivered to the queue, and returns.
Implemented in EngineControlComponent, NullEventLoop, ProxyEventLoop, and SdlEventLoop.