![]() |
Public API Reference |
![]() |
Generic Joystick driver. More...
#include <csutil/csinput.h>
Public Member Functions | |
csJoystickDriver (iObjectRegistry *) | |
Initialize joystick interface. | |
virtual void | DoButton (uint number, int button, bool down, const int32 *axes, uint numAxes) |
Call this to add a 'joystick button down/up' event to queue. | |
virtual void | DoMotion (uint number, const int32 *axes, uint numAxes) |
Call this to add a 'joystick moved' event to queue. | |
virtual const int32 * | GetLast (uint number) const |
Query last position on all axes of joystick 'number'. | |
virtual int | GetLast (uint number, uint axis) const |
Query last position on 'axis' of joystick 'number'. | |
virtual bool | GetLastButton (uint number, int button) const |
Query the last known joystick button state. | |
virtual void | LostFocus () |
Application lost focus. | |
CS_EVENTHANDLER_NIL_GENERIC_CONSTRAINTS virtual CS_EVENTHANDLER_DEFAULT_INSTANCE_CONSTRAINTS void | Reset () |
Call to release all joystick buttons. | |
virtual | ~csJoystickDriver () |
Destructor. | |
Protected Member Functions | |
iKeyboardDriver * | GetKeyboardDriver () |
Get the generic keyboard driver (for checking modifier states). | |
Protected Attributes | |
bool | Button [CS_MAX_JOYSTICK_COUNT][CS_MAX_JOYSTICK_BUTTONS] |
Joystick button states. | |
int32 | Last [CS_MAX_JOYSTICK_COUNT][CS_MAX_JOYSTICK_AXES] |
Joystick axis positions. |
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 0-based.
Initialize joystick interface.
virtual csJoystickDriver::~csJoystickDriver | ( | ) | [virtual] |
Destructor.
virtual void csJoystickDriver::DoButton | ( | uint | number, |
int | button, | ||
bool | down, | ||
const int32 * | axes, | ||
uint | numAxes | ||
) | [virtual] |
Call this to add a 'joystick button down/up' event to queue.
Implements iJoystickDriver.
virtual void csJoystickDriver::DoMotion | ( | uint | number, |
const int32 * | axes, | ||
uint | numAxes | ||
) | [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 const int32* csJoystickDriver::GetLast | ( | uint | number | ) | const [inline, virtual] |
Query last position on all axes of joystick 'number'.
Implements iJoystickDriver.
virtual int csJoystickDriver::GetLast | ( | uint | number, |
uint | axis | ||
) | const [inline, virtual] |
Query last position on 'axis' of joystick 'number'.
Implements iJoystickDriver.
virtual bool csJoystickDriver::GetLastButton | ( | uint | number, |
int | button | ||
) | const [inline, virtual] |
Query the last known joystick button state.
Implements iJoystickDriver.
virtual void csJoystickDriver::LostFocus | ( | ) | [inline, virtual] |
CS_EVENTHANDLER_NIL_GENERIC_CONSTRAINTS virtual CS_EVENTHANDLER_DEFAULT_INSTANCE_CONSTRAINTS void csJoystickDriver::Reset | ( | ) | [virtual] |
Call to release all joystick buttons.
Implements iJoystickDriver.
bool csJoystickDriver::Button[CS_MAX_JOYSTICK_COUNT][CS_MAX_JOYSTICK_BUTTONS] [protected] |
int32 csJoystickDriver::Last[CS_MAX_JOYSTICK_COUNT][CS_MAX_JOYSTICK_AXES] [protected] |