blip  0.1
InputEvent Class Referenceabstract

An abstract base class for user input events. More...

#include <InputEvent.hpp>

Inheritance diagram for InputEvent:

Public Types

enum  Source {
  Source_Unknown = -1, Source_Keyboard = 1, Source_DPad = 2, Source_GamePad = 3,
  Source_TouchScreen = 4, Source_Mouse = 5, Source_Stylus = 6, Source_Trackball = 7,
  Source_TouchPad = 8, Source_TouchNavigation = 9, Source_Joystick = 10, Source_Any = 0
}
 User input event sources. More...
 
enum  Class {
  Class_Unknown = - 1, Class_None = 0, Class_Button = 1, Class_Pointer = 2,
  Class_Navigation = 3, Class_Position = 4, Class_Joystick = 5
}
 Input event classes. More...
 
enum  Type { Type_Key, Type_Motion, Type_Sensor, Type_Timer }
 Event types. More...
 

Public Member Functions

virtual ~InputEvent ()
 Destructor. More...
 
int32_t getDeviceID () const
 Get the ID of the input device which is the source of this event. More...
 
virtual Source getSource () const
 Get the source of this event. More...
 
Class getClass () const
 Get the class of this event. More...
 
virtual time_ms_t getEventTime () const =0
 Get the time at which this event occurred. More...
 
Type getType () const
 Get the event type. More...
 

Detailed Description

An abstract base class for user input events.

Author
Mark Lindner

Member Enumeration Documentation

◆ Class

enum Class

Input event classes.

Enumerator
Class_Unknown 
Class_None 
Class_Button 
Class_Pointer 
Class_Navigation 
Class_Position 
Class_Joystick 

◆ Source

enum Source

User input event sources.

Enumerator
Source_Unknown 
Source_Keyboard 
Source_DPad 
Source_GamePad 
Source_TouchScreen 
Source_Mouse 
Source_Stylus 
Source_Trackball 
Source_TouchPad 
Source_TouchNavigation 
Source_Joystick 
Source_Any 

◆ Type

enum Type
inherited

Event types.

Enumerator
Type_Key 

Key input events.

Type_Motion 

Motion input events.

Type_Sensor 

Sensor events.

Type_Timer 

Timer events.

Constructor & Destructor Documentation

◆ ~InputEvent()

~InputEvent ( )
virtual

Destructor.

Member Function Documentation

◆ getClass()

InputEvent::Class getClass ( ) const

Get the class of this event.

◆ getDeviceID()

int32_t getDeviceID ( ) const

Get the ID of the input device which is the source of this event.

◆ getEventTime()

virtual time_ms_t getEventTime ( ) const
pure virtual

Get the time at which this event occurred.

Implements Event.

Implemented in MotionEvent, and KeyEvent.

◆ getSource()

InputEvent::Source getSource ( ) const
virtual

Get the source of this event.

◆ getType()

Type getType ( ) const
inlineinherited

Get the event type.


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