#include <events.h>
Public Types | |
| enum | { LBUTTON = 1 << MOUSE_BUTTON_LEFT, RBUTTON = 1 << MOUSE_BUTTON_RIGHT } |
| enum | { kEventManPriority = 0, kEventRecorderPriority = 1, kEventRemapperPriority = 999 } |
Public Member Functions | |
| virtual void | init () |
| virtual bool | pollEvent (Event &event)=0 |
| virtual void | pushEvent (const Event &event)=0 |
| virtual void | purgeMouseEvents ()=0 |
| virtual void | purgeKeyboardEvents ()=0 |
| virtual Point | getMousePos () const =0 |
| virtual int | getButtonState () const =0 |
| virtual int | getModifierState () const =0 |
| virtual int | shouldQuit () const =0 |
| virtual int | shouldReturnToLauncher () const =0 |
| virtual void | resetReturnToLauncher ()=0 |
| virtual void | resetQuit ()=0 |
| virtual Keymapper * | getKeymapper ()=0 |
| virtual Keymap * | getGlobalKeymap ()=0 |
| EventDispatcher * | getEventDispatcher () |
Protected Attributes | |
| EventDispatcher | _dispatcher |
The EventManager provides user input events to the client code. In addition, it keeps track of the state of various input devices, like keys, mouse position, and buttons.
| anonymous enum |
|
inlinevirtual |
Initialize the event manager.
Reimplemented in DefaultEventManager.
|
pure virtual |
Get the next event in the event queue.
| true | If an event was retrieved. |
Implemented in DefaultEventManager, and DSEventManager.
|
pure virtual |
Push a "fake" event into the event queue.
Implemented in DefaultEventManager.
|
pure virtual |
Purge all unprocessed mouse events already in the event queue.
Implemented in DefaultEventManager.
|
pure virtual |
Purge all unprocessed keyboard events already in the event queue.
Implemented in DefaultEventManager.
|
pure virtual |
Return the current mouse position.
Implemented in DefaultEventManager.
|
pure virtual |
Return a bitmask with the button states:
Implemented in DefaultEventManager.
|
pure virtual |
Get a bitmask with the current modifier state.
Implemented in DefaultEventManager.
|
pure virtual |
Whether the application should terminate. Set to true if EVENT_QUIT was received.
Implemented in DefaultEventManager, and DSEventManager.
|
pure virtual |
Whether to return to the launcher.
Implemented in DefaultEventManager.
|
pure virtual |
Reset the "return to launcher" flag (as returned shouldReturnToLauncher()) to false. Used when we have returned to the launcher.
Implemented in DefaultEventManager.
|
pure virtual |
Return the Keymapper object.
Implemented in DefaultEventManager.
|
pure virtual |
Return the global Keymap object.
Implemented in DefaultEventManager.
|
inline |
Return the underlying EventDispatcher.