Interface for implementing a CL_InputDevice source.
More...
#include <input_device_provider.h>
Interface for implementing a CL_InputDevice source.
virtual CL_InputDeviceProvider::~CL_InputDeviceProvider |
( |
) | |
|
|
inlinevirtual |
virtual void CL_InputDeviceProvider::destroy |
( |
) | |
|
|
pure virtual |
Destroys the input device provider.
void CL_DisposableObject::dispose |
( |
) | |
|
|
inherited |
virtual float CL_InputDeviceProvider::get_axis |
( |
int |
index) | |
const |
|
pure virtual |
Returns the the current position of a joystick axis.
virtual int CL_InputDeviceProvider::get_axis_count |
( |
) | |
const |
|
pure virtual |
Returns the number of axes available on this device.
virtual int CL_InputDeviceProvider::get_button_count |
( |
) | |
const |
|
pure virtual |
Returns the number of buttons available on this device.
If used on a keyboard, this function returns -1.
virtual CL_String CL_InputDeviceProvider::get_device_name |
( |
) | |
const |
|
pure virtual |
Return the hardware id/device for this device (i.e. /dev/input/js0)
virtual CL_String CL_InputDeviceProvider::get_key_name |
( |
int |
id) | |
const |
|
pure virtual |
Friendly key name for specified identifier (A, B, Leertaste, Backspace, Mouse Left, ...).
Note that this key name is localized, meaning it should only be used for menus where the user view key bindings, and not configuration files and such.
virtual bool CL_InputDeviceProvider::get_keycode |
( |
int |
keycode) | |
const |
|
pure virtual |
Returns true if the passed key code is down for this device.
See keys.h for list of key codes.
virtual CL_String CL_InputDeviceProvider::get_name |
( |
) | |
const |
|
pure virtual |
Returns the human readable name of the device (i.e. 'Microsoft Sidewinder 3D').
Returns the input device type.
virtual int CL_InputDeviceProvider::get_x |
( |
) | |
const |
|
pure virtual |
Returns the x position of the device.
Only valid for mouse.
virtual int CL_InputDeviceProvider::get_y |
( |
) | |
const |
|
pure virtual |
Returns the y position of the device.
Only valid for mouse.
virtual bool CL_InputDeviceProvider::in_proximity |
( |
) | |
const |
|
pure virtual |
Returns the input device is in proximity mode. (Atm applicapble only to tablet.)
If used on other devices than tablet, returns false.
Initialize input device provider.
The device field of CL_InputEvent should not be set when emitting events.
Invoking sig_provider_event is thread safe.
bool CL_DisposableObject::is_disposed |
( |
) | |
const |
|
inherited |
virtual CL_String CL_InputDeviceProvider::keyid_to_string |
( |
int |
keycode) | |
const |
|
inlinevirtual |
Returns a generic string name for the specified key code.
virtual void CL_DisposableObject::on_dispose |
( |
) | |
|
|
protectedpure virtualinherited |
virtual bool CL_InputDeviceProvider::poll |
( |
bool |
peek_only) | |
|
|
pure virtual |
Update device.
- Parameters
-
peek_only | Treat as a request to see if an event would occur |
- Returns
- true when the device event has occurred
virtual void CL_InputDeviceProvider::set_position |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
pure virtual |
Sets the position of the device.
virtual int CL_InputDeviceProvider::string_to_keyid |
( |
const CL_String & |
str) | |
const |
|
inlinevirtual |
Returns the key code for the specified generic string key name.
virtual bool CL_InputDeviceProvider::supports_keyid_mapping |
( |
) | |
const |
|
inlinevirtual |
Returns true if this provider implements keyid to/from string mapping.
void CL_DisposableObject::throw_if_disposed |
( |
) | |
const |
|
inherited |
The documentation for this class was generated from the following file: