CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

csJoystickDriver Class Reference

Generic Joystick driver. More...

#include <csutil/csinput.h>

Inheritance diagram for csJoystickDriver:

csInputDriver iJoystickDriver iBase List of all members.

Public Member Functions

 csJoystickDriver (iObjectRegistry *)
 Initialize joystick interface.
virtual ~csJoystickDriver ()
 Destructor.
virtual void Reset ()
 Call to release all joystick buttons.
virtual int GetLastX (int number)
 Query last joystick X position.
virtual int GetLastY (int number)
 Query last joystick Y position.
virtual bool GetLastButton (int number, int button)
 Query the last known joystick button state.
virtual void DoButton (int number, int button, bool down, int x, int y)
 Call this to add a 'joystick button down/up' event to queue.
virtual void DoMotion (int number, int x, int y)
 Call this to add a 'joystick moved' event to queue.
virtual void LostFocus ()
 Application lost focus.

Public Attributes

csJoystickDriver::eiEventHandler scfiEventHandler
 iEventHandler implementation

Protected Member Functions

iKeyboardDriverGetKeyboardDriver ()
 Get the generic keyboard driver (for checking modifier states).

Protected Attributes

bool Button [CS_MAX_JOYSTICK_COUNT][CS_MAX_JOYSTICK_BUTTONS]
 Joystick button states.
int LastX [CS_MAX_JOYSTICK_COUNT]
 Joystick axis positions.
int LastY [CS_MAX_JOYSTICK_COUNT]
 Joystick axis positions.

Detailed Description

Generic Joystick driver.

The joystick driver is responsible for tracking current joystick state and also for generating joystick events. Joystick numbers and button numbers are 1-based.

Definition at line 270 of file csinput.h.


Constructor & Destructor Documentation

csJoystickDriver::csJoystickDriver iObjectRegistry  ) 
 

Initialize joystick interface.

virtual csJoystickDriver::~csJoystickDriver  )  [virtual]
 

Destructor.


Member Function Documentation

virtual void csJoystickDriver::DoButton int  number,
int  button,
bool  down,
int  x,
int  y
[virtual]
 

Call this to add a 'joystick button down/up' event to queue.

Implements iJoystickDriver.

virtual void csJoystickDriver::DoMotion int  number,
int  x,
int  y
[virtual]
 

Call this to add a 'joystick moved' event to queue.

Implements iJoystickDriver.

iKeyboardDriver* csJoystickDriver::GetKeyboardDriver  )  [protected]
 

Get the generic keyboard driver (for checking modifier states).

virtual bool csJoystickDriver::GetLastButton int  number,
int  button
[inline, virtual]
 

Query the last known joystick button state.

Implements iJoystickDriver.

Definition at line 300 of file csinput.h.

References CS_MAX_JOYSTICK_COUNT.

virtual int csJoystickDriver::GetLastX int  number  )  [inline, virtual]
 

Query last joystick X position.

Implements iJoystickDriver.

Definition at line 296 of file csinput.h.

virtual int csJoystickDriver::GetLastY int  number  )  [inline, virtual]
 

Query last joystick Y position.

Implements iJoystickDriver.

Definition at line 298 of file csinput.h.

virtual void csJoystickDriver::LostFocus  )  [inline, virtual]
 

Application lost focus.

Implements csInputDriver.

Definition at line 313 of file csinput.h.

References iJoystickDriver::Reset().

virtual void csJoystickDriver::Reset  )  [virtual]
 

Call to release all joystick buttons.

Implements iJoystickDriver.


Member Data Documentation

bool csJoystickDriver::Button[CS_MAX_JOYSTICK_COUNT][CS_MAX_JOYSTICK_BUTTONS] [protected]
 

Joystick button states.

Definition at line 278 of file csinput.h.

int csJoystickDriver::LastX[CS_MAX_JOYSTICK_COUNT] [protected]
 

Joystick axis positions.

Definition at line 280 of file csinput.h.

int csJoystickDriver::LastY[CS_MAX_JOYSTICK_COUNT] [protected]
 

Joystick axis positions.

Definition at line 280 of file csinput.h.

csJoystickDriver::eiEventHandler csJoystickDriver::scfiEventHandler
 

iEventHandler implementation


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.3.9.1