25 #ifndef EVENTS_EVENTS_H 26 #define EVENTS_EVENTS_H 210 #define EventMan Events::EventsManager::instance() 212 #endif // EVENTS_EVENTS_H
bool pushEvent(Event &event)
Push an event onto the events queue.
Class and macro for implementing singletons.
bool parseITC(const Event &event)
Look for inter-thread communication.
bool ready() const
Was the events subsystem successfully initialized?
void runMainLoop()
Run the main loop.
A class holding an UTF-8 string.
The request manager, handling all requests.
void requestRebuildGLContainer(Request &request)
Joystick/Gamepad handling.
void init()
Initialize the events subsystem.
void enableTextInput(bool textInput=true)
Enable/Disable the text input.
bool quitRequested() const
Was an engine quit requested?
void requestDestroyGLContainer(Request &request)
bool isQueueFull() const
Is the event queue full?
Common::Mutex _eventQueueMutex
bool _ready
Was the events subsystem successfully initialized?
Common::UString getTextInput(const Event &event)
Return the text that was input with keyboard, in UTF-8 encoding.
uint32 getTimestamp() const
Return the number of milliseconds the application is running.
Generic template base class for implementing the singleton design pattern.
void raiseFatalError()
Raise a fatal engine error.
Common::Condition _queueProcessed
void(EventsManager::* RequestHandler)(Request &)
Joystick * getJoystickByIndex(size_t index) const
Return the joystick with that index.
void requestQuit()
Request an engine quit.
void requestCallInMainThread(Request &request)
void reset()
Completely reset the events manager.
Low-level type definitions to handle fixed width types portably.
static const RequestHandler _requestHandler[kITCEventMAX]
Pointer to the request handler.
void deinitJoysticks()
Deinitialize the available joysticks/gamepads.
A vector storing pointer to objects, with automatic deletion.
void doQuit()
Initiate the actual quitting process.
bool pollEvent(Event &event)
Get an event from the events queue.
void delay(uint32 ms)
Sleep that number of milliseconds.
void initJoysticks()
Initialize the available joysticks/gamepads.
Common::PtrVector< Joystick > Joysticks
void deinit()
Deinitialize the events subsystem.
Joystick * getJoystickByName(const Common::UString &name) const
Return the first joystick with that name.
bool parseEventGraphics(const Event &event)
Look for graphics events.
bool parseEventQuit(const Event &event)
Look for quit events.
size_t getJoystickCount() const
Return the number of available joysticks.
A request, carrying inter-thread communication.
bool _quitRequested
Was an engine quit requested?
bool fatalErrorRaised() const
Was a fatal engine error raised?
bool _doQuit
Are we currently in the process of quitting?
void enableKeyRepeat(bool repeat=true)
Enable/Disable repeated key events.
void flushEvents()
Clear the event queue, ignore all unhandled events.
std::list< Event > EventQueue