---
name: "CL_InputDevice"
section: "3"
platform: "linux"
package: "clanlib0-common-dev"
version: "0.4.4-8"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/CL_InputDevice"
---

# CL\_InputDevice(3)

Input device interface.

## NAME

CL\_InputDevice - Input device interface.

## DESCRIPTION

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

## CLASS MEMBERS

- virtual **~CL\_InputDevice**()

  - virtual char \***get\_name**()

  - virtual int **get\_num\_buttons**()

  - virtual CL\_InputButton \***get\_button**(

  ```
  int button_num)
  ```

- virtual int **get\_num\_axes**()

  - virtual CL\_InputAxis \***get\_axis**(

  ```
  int axis_num)
  ```

- virtual int **get\_num\_hats**()

  - virtual CL\_InputHat \***get\_hat**(

  ```
  int hat_num)
  ```

- virtual int **get\_num\_cursors**()

  - virtual CL\_InputCursor \***get\_cursor**(

  ```
  int cursor_num)
  ```

## MEMBERS WITH DESCRIPTIONS

- virtual **~CL\_InputDevice**()

  ```
  Description:
  ```

- virtual char \***get\_name**()

  ```
  Description:
  ```

  Returns the name of the input device.

  ```
  Return value:
  ```

  Name of the device.

- virtual int **get\_num\_buttons**()

  ```
  Description:
  ```

  Returns the number of buttons on this device.

  ```
  Return value:
  ```

  Return the number of buttons available.

- virtual CL\_InputButton \***get\_button**(

  ```
  int button_num)
  ```

  ```
  Parameters:
  button_num - Number of the button to be returned.
  ```

  ```
  Description:
  ```

  Returns a input button interface used to access the specified button number. NULL is returned if button doesn't exist.

  ```
  Return value:
  ```

  Pointer to the button requested (or NULL if none).

- virtual int **get\_num\_axes**()

  ```
  Description:
  ```

  Returns the number of axes on this device.

  ```
  Return value:
  ```

  Number of axes available.

- virtual CL\_InputAxis \***get\_axis**(

  ```
  int axis_num)
  ```

  ```
  Parameters:
  axis_num - Number of the axis to be returned.
  ```

  ```
  Description:
  ```

  Returns a input axis interface used to access the specified axis number. NULL is returned if axis doesn't exist.

  ```
  Return value:
  ```

  Pointer to axis requested (or NULL if none).

- virtual int **get\_num\_hats**()

  ```
  Description:
  ```

  Returns the number of hats available on this device.

  ```
  Return value:
  ```

  Number of input hats available.

- virtual CL\_InputHat \***get\_hat**(

  ```
  int hat_num)
  ```

  ```
  Parameters:
  hat_num - Number of the hat to be returned.
  ```

  ```
  Description:
  ```

  Returns a input hat interface used to access the specified hat number. NULL is returned if the hat doesn't exist.

  ```
  Return value:
  ```

  Pointer to input hat requested (or NULL if none).

- virtual int **get\_num\_cursors**()

  ```
  Description:
  ```

  Returns the number of input cursors available on this device.

  ```
  Return value:
  ```

  Number of cursors available.

- virtual CL\_InputCursor \***get\_cursor**(

  ```
  int cursor_num)
  ```

  ```
  Parameters:
  cursor_num - Number of the cursor to be returned.
  ```

  ```
  Description:
  ```

  Returns a input cursor interface used to access the specified cursor number. NULL is returned if the cursor doesn't exist.

  ```
  Return value:
  ```

  Pointer to cursor requested (or NULL if none).

## SEE ALSO

All ClanLib API classes can be found in **clanlib (3)**.

## AUTHORS

Originally written by Magnus Norddahl \<*mbn@dark.x.dtu.dk*\> and Martin Starch \<*starch@dark.x.dtu.dk*\>. ClanLib is now developed by the ClanLib Development team as an Open Source project.

The ClanLib man pages was created using the Perceps documentation system (another excellent piece of Open Source software, available at **http://somewhere.in.the.world.org**).

See **clanlib (3)** to find out how to get a full list of contributors and details on how to submit bug reports, comments etc.
