Entire Class Index | Main Class Index | Cross Index | Global Index

# Class CL_InputDevice

Input device interface.
Contained in: global
Derived from: none
Derived by: CL_Keyboard CL_Mouse
Group: Display (Input)

#include <ClanLib/display.h>

### public function member index:

### Construction:

``virtual`` | `~CL_InputDevice` | `()`;

### Attributes:

``virtual` `char`*` | `get_name` | `() `const``;
``virtual` `InputDeviceType`` | `get_type` | `() `const``;
``virtual` `int`` | `get_num_buttons` | `() `const``;
``virtual` `CL_InputButton`*` | `get_button` | `(`int` `button_num`)`;
``virtual` `int`` | `get_num_axes` | `() `const``;
``virtual` `CL_InputAxis`*` | `get_axis` | `(`int` `axis_num`)`;
``virtual` `int`` | `get_num_hats` | `() `const``;
``virtual` `CL_InputHat`*` | `get_hat` | `(`int` `hat_num`)`;
``virtual` `int`` | `get_num_cursors` | `() `const``;
``virtual` `CL_InputCursor`*` | `get_cursor` | `(`int` `cursor_num`)`;

## Description:

Class interface representing an input device, such as a keyboard, mouse, joystick, gamepad or digitizer.

## Function Member Descriptions:

CL_InputDevice::get_axis - Returns a input axis interface used to access the specified axis number.
NULL is returned if axis doesn't exist.
``virtual` `CL_InputAxis`*` `get_axis` `(`int` `axis_num`)`;

> axis_num - Number of the axis to be returned.
> Returns - Pointer to axis requested (or NULL if none).

CL_InputDevice::get_button - Returns a input button interface used to access the specified button number.
NULL is returned if button doesn't exist.
``virtual` `CL_InputButton`*` `get_button` `(`int` `button_num`)`;

> button_num - Number of the button to be returned.
> Returns - Pointer to the button requested (or NULL if none).

CL_InputDevice::get_cursor - Returns a input cursor interface used to access the specified cursor number. NULL is returned if the cursor doesn't exist.
``virtual` `CL_InputCursor`*` `get_cursor` `(`int` `cursor_num`)`;

> cursor_num - Number of the cursor to be returned.
> Returns - Pointer to cursor requested (or NULL if none).

CL_InputDevice::get_hat - Returns a input hat interface used to access the specified hat number.
NULL is returned if the hat doesn't exist.
``virtual` `CL_InputHat`*` `get_hat` `(`int` `hat_num`)`;

> hat_num - Number of the hat to be returned.
> Returns - Pointer to input hat requested (or NULL if none).

CL_InputDevice::get_name - Returns the name of the input device.
``virtual` `char`*` `get_name` `() `const``;

> Returns - Name of the device.

CL_InputDevice::get_num_axes - Returns the number of axes on this device.
``virtual` `int`` `get_num_axes` `() `const``;

> Returns - Number of axes available.

CL_InputDevice::get_num_buttons - Returns the number of buttons on this device.
``virtual` `int`` `get_num_buttons` `() `const``;

> Returns - Return the number of buttons available.

CL_InputDevice::get_num_cursors - Returns the number of input cursors available on this device.
``virtual` `int`` `get_num_cursors` `() `const``;

> Returns - Number of cursors available.

CL_InputDevice::get_num_hats - Returns the number of hats available on this device.
``virtual` `int`` `get_num_hats` `() `const``;

> Returns - Number of input hats available.

CL_InputDevice::get_type - Return the type of the inputdevice.
``virtual` `InputDeviceType`` `get_type` `() `const``;

CL_InputDevice::~CL_InputDevice - Input Device Destructor
``virtual`` `~CL_InputDevice` `()`;