ScummVM API documentation
Common::EventSource Class Referenceabstract

#include <events.h>

Inheritance diagram for Common::EventSource:
AtariEventSource Cloud::CloudManager Common::ArtificialEventSource Common::DelayedEventSource Common::OSDMessageQueue Common::VirtualMouse DS::Keyboard DSEventSource EventsBaseBackend SdlEventSource

Public Member Functions

virtual bool pollEvent (Event &event)=0
 
virtual bool allowMapping () const
 

Detailed Description

A source of Events.

An example for this is OSystem, which provides events created by the system and/or user.

Member Function Documentation

◆ pollEvent()

virtual bool Common::EventSource::pollEvent ( Event event)
pure virtual

Query an event from the source.

Parameters
eventReference to the event struct where the event should be stored.
Return values
trueIf an event was polled, false otherwise.

Implemented in Common::ArtificialEventSource, Common::DelayedEventSource, OSystem_Wii, OSystem_N64, OSystem_Dreamcast, OSystem_iOS7, OSystem_PSP, N3DS::OSystem_3DS, OSystem_libretro, Common::OSDMessageQueue, SdlEventSource, Common::VirtualMouse, DS::Keyboard, AtariEventSource, DSEventSource, SwitchEventSource, PSP2EventSource, and LegacySdlEventSource.

◆ allowMapping()

virtual bool Common::EventSource::allowMapping ( ) const
inlinevirtual

Check whether events from this source are allowed to be mapped.

Possible event sources not allowing mapping are: the event recorder/player and/or the EventManager, which allows user events to be pushed.

By default, mapping is allowed for every event source.

Reimplemented in Common::ArtificialEventSource, and Common::DelayedEventSource.


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