Public Types

deInputEvent Class Reference

Stores informations about an input event. More...

#include <deInputEvent.h>

List of all members.

Public Types

enum  eEvents {
  eeKeyPress, eeKeyRelease, eeKeyType, eeMousePress,
  eeMouseRelease, eeMouseMove, eeDevAxis, eeDevBtnPress,
  eeDevBtnRelease
}
 

Event Codes.

More...

Public Member Functions

Constructors and Destructors
 deInputEvent ()
 Creates a new event object.
 ~deInputEvent ()
 Cleans up the event object.
Management
int GetType () const
 Retrieves the event type.
void SetType (int type)
 Sets the event type.
int GetDevice () const
 Retrieves the event device.
void SetDevice (int device)
 Sets the event device.
int GetCode () const
 Retrieves event code.
void SetCode (int code)
 Sets the event code.
int GetState () const
 Retrieves event state.
void SetState (int state)
 Sets the event state.
int GetKeyChar () const
 Retrieves the key character if a keyboard event.
void SetKeyChar (int keyChar)
 Sets the key character if a keyboard event.
int GetX () const
 Retrieves the X position if a mouse event.
void SetX (int x)
 Sets the X position if a mouse event.
int GetY () const
 Retrieves the Y position if a mouse event.
void SetY (int y)
 Sets the Y position if a mouse event.
const timeval & GetTime () const
 Retrieves the time the event occured.
void SetTime (const timeval &eventTime)
 Sets the time the event occured.
void SetFrom (deInputEvent *event)
 Copies properties of another event to this event.

Detailed Description

Stores informations about an input event.

Input event objects contain the informations of one event received by the application. Event objects are generated by the Input Module and placed in the game engine event queue. The Script Module can then read those events and process them.

Author:
Plüss Roland
Version:
1.0
Date:
2008

Member Enumeration Documentation

Event Codes.

Enumerator:
eeKeyPress 

A key on the keyboard has been pressed.

eeKeyRelease 

A key on the keyboard has been released.

eeKeyType 

A key on the keyboard has been pressed and released.

This is used for key repetion in which case only the key type event is send multiple times but the key press and key release only once.

Note:
This is depracted as key repetition is not allowed by the input module anymore. Repetition is provided on the game script level as otherwise it is very tricky to work with those input events generated.
eeMousePress 

A mouse button has been pressed.

eeMouseRelease 

A mouse button has been released.

eeMouseMove 

The mouse has been moved to a new location.

eeDevAxis 

Some device axis moved.

eeDevBtnPress 

Some device button pressed.

eeDevBtnRelease 

Some device button released.


Constructor & Destructor Documentation

deInputEvent::deInputEvent (  )

Creates a new event object.

deInputEvent::~deInputEvent (  )

Cleans up the event object.


Member Function Documentation

int deInputEvent::GetCode (  ) const [inline]

Retrieves event code.

This is either a key code or a mouse or gamepay axis or button.

int deInputEvent::GetDevice (  ) const [inline]

Retrieves the event device.

int deInputEvent::GetKeyChar (  ) const [inline]

Retrieves the key character if a keyboard event.

int deInputEvent::GetState (  ) const [inline]

Retrieves event state.

const timeval& deInputEvent::GetTime (  ) const [inline]

Retrieves the time the event occured.

int deInputEvent::GetType (  ) const [inline]

Retrieves the event type.

int deInputEvent::GetX (  ) const [inline]

Retrieves the X position if a mouse event.

int deInputEvent::GetY (  ) const [inline]

Retrieves the Y position if a mouse event.

void deInputEvent::SetCode ( int  code )

Sets the event code.

This is either a key code or a mouse or gamepay axis or button.

void deInputEvent::SetDevice ( int  device )

Sets the event device.

void deInputEvent::SetFrom ( deInputEvent event )

Copies properties of another event to this event.

void deInputEvent::SetKeyChar ( int  keyChar )

Sets the key character if a keyboard event.

void deInputEvent::SetState ( int  state )

Sets the event state.

void deInputEvent::SetTime ( const timeval &  eventTime )

Sets the time the event occured.

void deInputEvent::SetType ( int  type )

Sets the event type.

void deInputEvent::SetX ( int  x )

Sets the X position if a mouse event.

void deInputEvent::SetY ( int  y )

Sets the Y position if a mouse event.


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