Logo Search packages:      
Sourcecode: scummvm version File versions  Download package

Common::Event Struct Reference

#include <events.h>

List of all members.


Detailed Description

Data structure for an event. A pointer to an instance of Event can be passed to pollEvent.
Todo:
Rework/document this structure. It should be made 100% clear which field is valid for which event type. Implementation wise, we might want to use the classic union-of-structs trick. It goes roughly like this: struct BasicEvent { EventType type; }; struct MouseMovedEvent : BasicEvent { Common::Point pos; }; struct MouseButtonEvent : MouseMovedEvent { int button; }; struct KeyEvent : BasicEvent { ... }; ... union Event { EventType type; MouseMovedEvent mouse; MouseButtonEvent button; KeyEvent key; ... };

Definition at line 109 of file events.h.


Public Attributes

KeyState kbd
Common::Point mouse
bool synthetic
EventType type

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

Generated by  Doxygen 1.6.0   Back to index