ScummVM API documentation
DefaultEventManager Class Reference
Inheritance diagram for DefaultEventManager:
Common::EventManager Common::EventObserver Common::NonCopyable

Public Member Functions

 DefaultEventManager (Common::EventSource *boss)
 
void init () override
 
bool pollEvent (Common::Event &event) override
 
void pushEvent (const Common::Event &event) override
 
void purgeMouseEvents () override
 
void purgeKeyboardEvents () override
 
Common::Point getMousePos () const override
 
int getButtonState () const override
 
int getModifierState () const override
 
int shouldQuit () const override
 
int shouldReturnToLauncher () const override
 
void resetReturnToLauncher () override
 
void resetQuit () override
 
Common::KeymappergetKeymapper () override
 
Common::KeymapgetGlobalKeymap () override
 
- Public Member Functions inherited from Common::EventManager
EventDispatchergetEventDispatcher ()
 

Additional Inherited Members

- Public Types inherited from Common::EventManager
enum  { LBUTTON = 1 << MOUSE_BUTTON_LEFT, RBUTTON = 1 << MOUSE_BUTTON_RIGHT }
 
enum  { kEventManPriority = 0, kEventRecorderPriority = 1, kEventRemapperPriority = 999 }
 
- Protected Attributes inherited from Common::EventManager
EventDispatcher _dispatcher
 

Member Function Documentation

◆ init()

void DefaultEventManager::init ( )
overridevirtual

Initialize the event manager.

Note
Called after graphics system has been set up.

Reimplemented from Common::EventManager.

◆ pollEvent()

bool DefaultEventManager::pollEvent ( Common::Event event)
overridevirtual

Get the next event in the event queue.

Parameters
eventPoint to an Event struct, which will be filled with the event data.
Return values
trueIf an event was retrieved.

Implements Common::EventManager.

◆ pushEvent()

void DefaultEventManager::pushEvent ( const Common::Event event)
overridevirtual

Push a "fake" event into the event queue.

Implements Common::EventManager.

◆ purgeMouseEvents()

void DefaultEventManager::purgeMouseEvents ( )
overridevirtual

Purge all unprocessed mouse events already in the event queue.

Implements Common::EventManager.

◆ purgeKeyboardEvents()

void DefaultEventManager::purgeKeyboardEvents ( )
overridevirtual

Purge all unprocessed keyboard events already in the event queue.

Implements Common::EventManager.

◆ getMousePos()

Common::Point DefaultEventManager::getMousePos ( ) const
inlineoverridevirtual

Return the current mouse position.

Implements Common::EventManager.

◆ getButtonState()

int DefaultEventManager::getButtonState ( ) const
inlineoverridevirtual

Return a bitmask with the button states:

  • bit 0: left button up=0, down=1
  • bit 1: right button up=0, down=1

Implements Common::EventManager.

◆ getModifierState()

int DefaultEventManager::getModifierState ( ) const
inlineoverridevirtual

Get a bitmask with the current modifier state.

Implements Common::EventManager.

◆ shouldQuit()

int DefaultEventManager::shouldQuit ( ) const
inlineoverridevirtual

Whether the application should terminate. Set to true if EVENT_QUIT was received.

Implements Common::EventManager.

◆ shouldReturnToLauncher()

int DefaultEventManager::shouldReturnToLauncher ( ) const
inlineoverridevirtual

Whether to return to the launcher.

Implements Common::EventManager.

◆ resetReturnToLauncher()

void DefaultEventManager::resetReturnToLauncher ( )
inlineoverridevirtual

Reset the "return to launcher" flag (as returned shouldReturnToLauncher()) to false. Used when we have returned to the launcher.

Implements Common::EventManager.

◆ getKeymapper()

Common::Keymapper* DefaultEventManager::getKeymapper ( )
inlineoverridevirtual

Return the Keymapper object.

Implements Common::EventManager.

◆ getGlobalKeymap()

Common::Keymap* DefaultEventManager::getGlobalKeymap ( )
overridevirtual

Return the global Keymap object.

Implements Common::EventManager.


The documentation for this class was generated from the following file: