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)
 
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)
inlinevirtual

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()

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

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: