ScummVM API documentation
Common::ArtificialEventSource Class Reference

#include <events.h>

Inheritance diagram for Common::ArtificialEventSource:
Common::EventSource

Public Member Functions

void addEvent (const Event &ev)
 
bool pollEvent (Event &ev) override
 
bool allowMapping () const override
 
virtual bool pollEvent (Event &event)=0
 
virtual bool allowMapping () const
 

Protected Attributes

Queue< Event > _artificialEventQueue
 

Detailed Description

An artificial event source. This class is used as an event source, which is made up by client-specific events.

Example use cases for this are the Keymapper or the DefaultEventManager.

Member Function Documentation

◆ addEvent()

void Common::ArtificialEventSource::addEvent ( const Event &  ev)
inline

Put the specified event into the queue.

◆ pollEvent()

bool Common::ArtificialEventSource::pollEvent ( Event &  event)
inlineoverridevirtual

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.

Implements Common::EventSource.

◆ allowMapping()

bool Common::ArtificialEventSource::allowMapping ( ) const
inlineoverridevirtual

By default, an artificial event source prevents its events from being mapped.

Reimplemented from Common::EventSource.


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