Home | All Classes | Grouped Classes | Index | Search

# Class CL_InputDevice

General input device. More...

Derived from: none
Derived by: none
Group: Display (Input)

#include <ClanLib/display.h>

Construction:

CL_InputDevice | Constructs an input device.

Attributes:

get_name | Returns the human readable name of the device (i.e. 'Microsoft Sidewinder 3D').
get_device_name | Return the hardware id/device for this device (i.e. /dev/input/js0)
get_id | Returns the input device id.
get_type | Returns the input device type.
get_key_name | Friendly key name for specified identifier (A, B, Leertaste, Backspace, Mouse Left, ...).
keyid_to_string | Returns a generic string name for the specified key code.
string_to_keyid | Returns the key code for the specified generic string key name.
get_keycode | Returns true if the passed key code is down for this device.
get_x | Returns the x position of the device.
get_y | Returns the y position of the device.
get_axis | Returns the the current position of a joystick axis.
get_axis_count | Returns the number of axes available on this device.
get_button_count | Returns the number of buttons available on this device.

Operations:

operator = |
set_position | Sets the position of the device.

Signals:

sig_key_down | Signal emitted when key is pressed.
sig_key_up | Signal emitted when key is released.
sig_key_dblclk | Signal emitted when the mouse is double-clicked.
sig_pointer_move | Signal emitted when pointer is moved (absolute movement).
sig_ball_move | Signal emitted when pointer's ball is moved (relative movement).
sig_axis_move | Signal emitted when axis is moved.
sig_move | Deprecated. Use sig_pointer_move() instead.

Implementation:

impl |

Detailed description:

!group=Display/Input! !header=display.h!
Questions or comments, write to the ClanLib mailing list.