Classes | Enumerations | Enumerator
clanDisplay Input

## Classes
class | clan::InputContext
| InputContext. More...
class | clan::InputDevice
| InputDevice. More...
class | clan::InputDeviceProvider
| Interface for implementing a InputDevice source. More...
class | clan::InputEvent
| Input event class. More...
class | clan::OcclusionQueryProvider
| Occlusion query provider. More...

## Enumerations
enum | clan::InputCode { clan::mouse_left =0, clan::mouse_right =1, clan::mouse_middle =2, clan::mouse_wheel_up =3, clan::mouse_wheel_down =4, clan::mouse_xbutton1 =5, clan::mouse_xbutton2 =6, clan::mouse_count =7, clan::tablet_x_axis = 0x10000, clan::tablet_y_axis, clan::tablet_z_axis, clan::tablet_tilt_x, clan::tablet_tilt_y, clan::tablet_rotation_pitch, clan::tablet_rotation_roll, clan::tablet_rotation_yaw, clan::tablet_proximity_enter, clan::tablet_proximity_exit, clan::tablet_key, clan::joystick_x = 0, clan::joystick_y, clan::joystick_z, clan::joystick_rx, clan::joystick_ry, clan::joystick_rz, clan::joystick_slider, clan::joystick_dial, clan::joystick_wheel, clan::joystick_vx, clan::joystick_vy, clan::joystick_vz, clan::joystick_vrx, clan::joystick_vry, clan::joystick_vrz, clan::joystick_vslider0, clan::joystick_vslider1, clan::joystick_ax, clan::joystick_ay, clan::joystick_az, clan::joystick_arx, clan::joystick_ary, clan::joystick_arz, clan::joystick_aslider0, clan::joystick_aslider1, clan::joystick_fx, clan::joystick_fy, clan::joystick_fz, clan::joystick_frx, clan::joystick_fry, clan::joystick_frz, clan::joystick_fslider0, clan::joystick_fslider1, clan::joystick_button = 0, clan::joystick_hat = 0, clan::keycode_backspace =XK_BackSpace, clan::keycode_tab =XK_Tab, clan::keycode_clear =XK_Clear, clan::keycode_return =XK_Return, clan::keycode_shift =XK_Shift_L, clan::keycode_control =XK_Control_L, clan::keycode_menu =XK_Menu, clan::keycode_pause =XK_Pause, clan::keycode_kanji =XK_Kanji, clan::keycode_escape =XK_Escape, clan::keycode_convert =XK_Henkan_Mode, clan::keycode_nonconvert =XK_Muhenkan, clan::keycode_space =XK_space, clan::keycode_prior =XK_Prior, clan::keycode_next =XK_Next, clan::keycode_end =XK_End, clan::keycode_home =XK_Home, clan::keycode_left =XK_Left, clan::keycode_up =XK_Up, clan::keycode_right =XK_Right, clan::keycode_down =XK_Down, clan::keycode_select =XK_Select, clan::keycode_print =XK_Print, clan::keycode_execute =XK_Execute, clan::keycode_insert =XK_Insert, clan::keycode_delete =XK_Delete, clan::keycode_help =XK_Help, clan::keycode_0 =XK_0, clan::keycode_1 =XK_1, clan::keycode_2 =XK_2, clan::keycode_3 =XK_3, clan::keycode_4 =XK_4, clan::keycode_5 =XK_5, clan::keycode_6 =XK_6, clan::keycode_7 =XK_7, clan::keycode_8 =XK_8, clan::keycode_9 =XK_9, clan::keycode_a =XK_a, clan::keycode_b =XK_b, clan::keycode_c =XK_c, clan::keycode_d =XK_d, clan::keycode_e =XK_e, clan::keycode_f =XK_f, clan::keycode_g =XK_g, clan::keycode_h =XK_h, clan::keycode_i =XK_i, clan::keycode_j =XK_j, clan::keycode_k =XK_k, clan::keycode_l =XK_l, clan::keycode_m =XK_m, clan::keycode_n =XK_n, clan::keycode_o =XK_o, clan::keycode_p =XK_p, clan::keycode_q =XK_q, clan::keycode_r =XK_r, clan::keycode_s =XK_s, clan::keycode_t =XK_t, clan::keycode_u =XK_u, clan::keycode_v =XK_v, clan::keycode_w =XK_w, clan::keycode_x =XK_x, clan::keycode_y =XK_y, clan::keycode_z =XK_z, clan::keycode_lwin =XK_Super_L, clan::keycode_rwin =XK_Multi_key, clan::keycode_apps =XK_Menu, clan::keycode_numpad0 =XK_KP_0, clan::keycode_numpad1 =XK_KP_1, clan::keycode_numpad2 =XK_KP_2, clan::keycode_numpad3 =XK_KP_3, clan::keycode_numpad4 =XK_KP_4, clan::keycode_numpad5 =XK_KP_5, clan::keycode_numpad6 =XK_KP_6, clan::keycode_numpad7 =XK_KP_7, clan::keycode_numpad8 =XK_KP_8, clan::keycode_numpad9 =XK_KP_9, clan::keycode_numpad_enter =XK_KP_Enter, clan::keycode_multiply =XK_KP_Multiply, clan::keycode_add =XK_KP_Add, clan::keycode_separator =XK_KP_Separator, clan::keycode_subtract =XK_KP_Subtract, clan::keycode_decimal =XK_KP_Decimal, clan::keycode_divide =XK_KP_Divide, clan::keycode_f1 =XK_F1, clan::keycode_f2 =XK_F2, clan::keycode_f3 =XK_F3, clan::keycode_f4 =XK_F4, clan::keycode_f5 =XK_F5, clan::keycode_f6 =XK_F6, clan::keycode_f7 =XK_F7, clan::keycode_f8 =XK_F8, clan::keycode_f9 =XK_F9, clan::keycode_f10 =XK_F10, clan::keycode_f11 =XK_F11, clan::keycode_f12 =XK_F12, clan::keycode_f13 =XK_F13, clan::keycode_f14 =XK_F14, clan::keycode_f15 =XK_F15, clan::keycode_f16 =XK_F16, clan::keycode_f17 =XK_F17, clan::keycode_f18 =XK_F18, clan::keycode_f19 =XK_F19, clan::keycode_f20 =XK_F20, clan::keycode_f21 =XK_F21, clan::keycode_f22 =XK_F22, clan::keycode_f23 =XK_F23, clan::keycode_f24 =XK_F24, clan::keycode_numlock =XK_Num_Lock, clan::keycode_scroll =XK_Scroll_Lock, clan::keycode_lshift =XK_Shift_L, clan::keycode_rshift =XK_Shift_R, clan::keycode_lcontrol =XK_Control_L, clan::keycode_rcontrol =XK_Control_R, clan::keycode_lmenu =XK_Meta_L, clan::keycode_rmenu =XK_Meta_R, clan::keycode_enter =keycode_return, clan::keycode_lapple =keycode_lwin, clan::keycode_rapple =keycode_rwin, clan::keycode_unknown =-1 }
enum | clan::InputEvent::Type { clan::InputEvent::no_key = 0, clan::InputEvent::pressed = 1, clan::InputEvent::released = 2, clan::InputEvent::doubleclick = 3, clan::InputEvent::pointer_moved = 4, clan::InputEvent::axis_moved = 5, clan::InputEvent::proximity_change = 6 }
| Event types. More...
enum | clan::InputDevice::Type { clan::InputDevice::keyboard, clan::InputDevice::pointer, clan::InputDevice::joystick, clan::InputDevice::tablet, clan::InputDevice::unknown }
| Input device types. More...

## Construction
virtual | clan::InputDeviceProvider::~InputDeviceProvider ()

## Attributes
virtual std::string | clan::InputDeviceProvider::get_name () const =0
| Returns the human readable name of the device (i.e. 'Microsoft Sidewinder 3D'). More...
virtual std::string | clan::InputDeviceProvider::get_device_name () const =0
| Return the hardware id/device for this device (i.e. /dev/input/js0) More...
virtual InputDevice::Type | clan::InputDeviceProvider::get_type () const =0
| Returns the input device type. More...
virtual std::string | clan::InputDeviceProvider::get_key_name (int id) const =0
| Retrieves the localized friendly key name for specified identifier (i.e. A, B, Leertaste, Backspace, Mouse Left, ...). More...
virtual bool | clan::InputDeviceProvider::supports_keyid_mapping () const
| Returns true if this provider implements keyid to/from string mapping. More...
virtual std::string | clan::InputDeviceProvider::keyid_to_string (int) const
| Returns a generic string name for the specified key code. More...
virtual int | clan::InputDeviceProvider::string_to_keyid (const std::string &) const
| Returns the key code for the specified generic string key name. More...
virtual bool | clan::InputDeviceProvider::get_keycode (int keycode) const =0
| Returns true if the passed key code is down for this device. See `keys.h` for list of key codes. More...
virtual Pointf | clan::InputDeviceProvider::get_position () const
| Returns the current device-independent x and y position (DIP) of the device. (Pointing devices only) The returned positional value is scaled to the pixel ratio of the display. More...
virtual Point | clan::InputDeviceProvider::get_device_position () const
| Returns the current device-supplied x and y position of the device. (Pointing devices only) The returned positional value is in the scale of the physical pixel on the screen. More...
virtual float | clan::InputDeviceProvider::get_axis (int index) const
| Returns the the current position of a joystick axis. (Joysticks only) More...
virtual std::vector< int > | clan::InputDeviceProvider::get_axis_ids () const
| Returns the number of axes available on this device. (Joysticks only) More...
virtual int | clan::InputDeviceProvider::get_hat (int) const
| Returns the current position of a joystick hat. (Joysticks only) More...
virtual int | clan::InputDeviceProvider::get_button_count () const =0
| Returns the number of buttons available on this device. If used on a keyboard or mouse, this function returns -1. More...
virtual bool | clan::InputDeviceProvider::in_proximity () const
| Returns true if the input device is in proximity mode. (Tablets only) More...

## Operations
virtual void | clan::InputDeviceProvider::init (Signal< void(const InputEvent &)> *sig_provider_event)=0
| Initialize input device provider. The device field of InputEvent should not be set when emitting events. Invoking sig_provider_event is thread safe. More...
virtual void | clan::InputDeviceProvider::set_position (float x, float y)
| Sets the display-independent position of the device. (Pointing devices only) More...
virtual void | clan::InputDeviceProvider::set_device_position (int x, int y)
| Sets the actual position of the device. (Pointing devices only) More...

## Construction
virtual | clan::OcclusionQueryProvider::~OcclusionQueryProvider ()

## Attributes
virtual bool | clan::OcclusionQueryProvider::is_result_ready () const =0
| Returns true if the GPU is ready to return the result. More...
virtual int | clan::OcclusionQueryProvider::get_result () const =0
| Returns the result of the occlusion query. More...

## Operations
virtual void | clan::OcclusionQueryProvider::begin ()=0
| Start occlusion query. More...
virtual void | clan::OcclusionQueryProvider::end ()=0
| Finish occlusion query. More...
virtual void | clan::OcclusionQueryProvider::create ()=0
| Create occlusion query object. More...

## Construction
| clan::InputContext::InputContext ()
| Constructs an input context. More...
| clan::InputContext::~InputContext ()

## Attributes
int | clan::InputContext::get_keyboard_count () const
| Returns the number of keyboards available. More...
int | clan::InputContext::get_mouse_count () const
| Returns the number of mice available. More...
int | clan::InputContext::get_joystick_count () const
| Returns the number of joysticks available. More...
int | clan::InputContext::get_tablet_count () const
| Returns the number of tablets available. More...
InputDevice & | clan::InputContext::get_keyboard (int keyboard=0)
| Returns the input device for the specified keyboard. More...
InputDevice & | clan::InputContext::get_mouse (int mouse=0)
| Returns the input device for the specified mouse. More...
InputDevice & | clan::InputContext::get_joystick (int joystick=0)
| Returns the input device for the specified joystick. More...
InputDevice & | clan::InputContext::get_tablet (int tablet=0)
| Returns the input device for the specified tablet. More...
InputDevice & | clan::InputContext::get_device (const std::string &device_name)
| Returns the input device with the given devicename. More...

## Operations
void | clan::InputContext::clear ()
| Removes all devices from this input context. More...
void | clan::InputContext::add_keyboard (const InputDevice keyboard)
| Adds a new keyboard to the input context. More...
void | clan::InputContext::add_mouse (const InputDevice mouse)
| Adds a new mouse to the input context. More...
void | clan::InputContext::add_joystick (const InputDevice joystick)
| Adds a new joystick to the input context. More...
void | clan::InputContext::add_tablet (const InputDevice tablet)
| Adds a new tablet to the input context. More...
void | clan::InputContext::process_messages ()
| Process and dispatch messages to signals. More...
void | clan::InputContext::dispose ()
| Stop anyone accessing this input context. More...
bool | clan::InputContext::is_disposed () const
| Has dispose() been called on this input context. More...

## Construction
| clan::InputDevice::InputDevice ()
| Constructs a null instance. More...
| clan::InputDevice::InputDevice (InputDeviceProvider *provider)
| Constructs a InputDevice. More...
| clan::InputDevice::InputDevice (std::weak_ptr< InputDevice_Impl > impl)
| Constructs a InputDevice. More...
| clan::InputDevice::~InputDevice ()

## Attributes
bool | clan::InputDevice::is_null () const
| Returns true if this object is invalid. More...
void | clan::InputDevice::throw_if_null () const
| Throw an exception if this object is invalid. More...
InputDeviceProvider * | clan::InputDevice::get_provider () const
| Returns the provider for this input device. More...
std::string | clan::InputDevice::get_name () const
| Returns the human readable name of the device (i.e. 'Microsoft Sidewinder 3D'). More...
std::string | clan::InputDevice::get_device_name () const
| Return the hardware id/device for this device (i.e. /dev/input/js0) More...
Type | clan::InputDevice::get_type () const
| Returns the input device type. More...
std::string | clan::InputDevice::get_key_name (int id) const
| Retrieves the localized friendly key name for specified identifier (i.e. A, B, Leertaste, Backspace, Mouse Left, ...). More...
std::string | clan::InputDevice::keyid_to_string (int keycode) const
| Returns a generic string name for the specified key code. More...
int | clan::InputDevice::string_to_keyid (const std::string &str) const
| Returns the key code for the specified generic string key name. More...
bool | clan::InputDevice::get_keycode (int keycode) const
| Returns true if the passed key code is down for this device. See `keys.h` for list of key codes. More...
Pointf | clan::InputDevice::get_position () const
| Returns the current device-independent x and y position (DIP) of the device. (Pointing devices only) The returned positional value is scaled to the pixel ratio of the display. More...
Point | clan::InputDevice::get_device_position () const
| Returns the current devicesice-supplied x and y position of the device. (Pointing devices only) The returned positional value is in the scale of the physical pixel on the screen. More...
float | clan::InputDevice::get_axis (int axisid) const
| Returns the the current position of a joystick axis. (Joysticks only) More...
std::vector< int > | clan::InputDevice::get_axis_ids () const
| Returns the number of axes available on this device. (Joysticks only) More...
int | clan::InputDevice::get_hat (int index) const
| Returns the current position of a joystick hat. (Joysticks only) More...
int | clan::InputDevice::get_button_count () const
| Returns the number of buttons available on this device. If used on a keyboard or mouse, this function returns -1. More...
bool | clan::InputDevice::in_proximity () const
| Returns true if the input device is in proximity mode. (Tablets only) More...

## Operations
InputDevice & | clan::InputDevice::operator= (const InputDevice &copy)
void | clan::InputDevice::set_position (float x, float y)
| Sets the display-independent position of the device. (Pointing devices only) More...
void | clan::InputDevice::set_device_position (int x, int y)
| Sets the actual position of the device. (Pointing devices only) More...

## Signals
Signal< void(const InputEvent &)> & | clan::InputDevice::sig_key_down ()
| Signal emitted when key is pressed. More...
Signal< void(const InputEvent &)> & | clan::InputDevice::sig_key_up ()
| Signal emitted when key is released. More...
Signal< void(const InputEvent &)> & | clan::InputDevice::sig_pointer_move ()
| Signal emitted when pointer is moved (absolute movement). More...
Signal< void(const InputEvent &)> & | clan::InputDevice::sig_axis_move ()
| Signal emitted when axis is moved. More...
Signal< void(const InputEvent &)> & | clan::InputDevice::sig_key_dblclk ()
| Signal emitted when the mouse is double-clicked. More...
Signal< void(const InputEvent &)> & | clan::InputDevice::sig_proximity_change ()
| Signal emitted when proximity is entered or exited. More...

## Implementation
class | clan::InputDevice::InputContext_Impl

## Construction
| clan::InputEvent::InputEvent ()
| Constructs a 'NoKey' key. More...
| clan::InputEvent::~InputEvent ()

## Operations
InputCode | clan::InputEvent::id
| The exact input. More...
int | clan::InputEvent::id_offset
| Contains the value (0 to x) for certains InputCode types that have a variable output identifier (for example, joystick button identifers, or joystick axis...) More...
std::string | clan::InputEvent::str
| Character sequence generated by event. A key press can generate one, none or multiple characters. The reason for this are deadkeys, i.e. press ^ + a and get ^; the first press would generate no key and the second one, in case that the second key being pressed doesn't support the ^ it would generate two characters (i.e. ^ + 5 => "", "^5") More...
Type | clan::InputEvent::type
| Event type. More...
InputDevice | clan::InputEvent::device
| Device that event originates from. More...
Pointf | clan::InputEvent::mouse_pos
| Mouse position at event time. More...
Point | clan::InputEvent::mouse_device_pos
| Mouse actual position at event time. More...
double | clan::InputEvent::axis_pos
| Axis position. More...
int | clan::InputEvent::repeat_count
| The repeat count for this event. Contains the number of times the keystroke has auto-repeated as a result of the user holding down the key. More...
bool | clan::InputEvent::alt
| State of modifier keys. More...
bool | clan::InputEvent::shift
bool | clan::InputEvent::ctrl

## Detailed Description

## Enumeration Type Documentation

enum clan::InputCode

Enumerator
mouse_left |
mouse_right |
mouse_middle |
mouse_wheel_up |
mouse_wheel_down |
mouse_xbutton1 |
mouse_xbutton2 |
mouse_count |
tablet_x_axis |
tablet_y_axis |
tablet_z_axis |
tablet_tilt_x |
tablet_tilt_y |
tablet_rotation_pitch |
tablet_rotation_roll |
tablet_rotation_yaw |
tablet_proximity_enter |
tablet_proximity_exit |
tablet_key |
joystick_x |
joystick_y |
joystick_z |
joystick_rx |
joystick_ry |
joystick_rz |
joystick_slider |
joystick_dial |
joystick_wheel |
joystick_vx |
joystick_vy |
joystick_vz |
joystick_vrx |
joystick_vry |
joystick_vrz |
joystick_vslider0 |
joystick_vslider1 |
joystick_ax |
joystick_ay |
joystick_az |
joystick_arx |
joystick_ary |
joystick_arz |
joystick_aslider0 |
joystick_aslider1 |
joystick_fx |
joystick_fy |
joystick_fz |
joystick_frx |
joystick_fry |
joystick_frz |
joystick_fslider0 |
joystick_fslider1 |
joystick_button |
joystick_hat |
keycode_backspace |
keycode_tab |
keycode_clear |
keycode_return |
keycode_shift |
keycode_control |
keycode_menu |
keycode_pause |
keycode_kanji |
keycode_escape |
keycode_convert |
keycode_nonconvert |
keycode_space |
keycode_prior |
keycode_next |
keycode_end |
keycode_home |
keycode_left |
keycode_up |
keycode_right |
keycode_down |
keycode_select |
keycode_print |
keycode_execute |
keycode_insert |
keycode_delete |
keycode_help |
keycode_0 |
keycode_1 |
keycode_2 |
keycode_3 |
keycode_4 |
keycode_5 |
keycode_6 |
keycode_7 |
keycode_8 |
keycode_9 |
keycode_a |
keycode_b |
keycode_c |
keycode_d |
keycode_e |
keycode_f |
keycode_g |
keycode_h |
keycode_i |
keycode_j |
keycode_k |
keycode_l |
keycode_m |
keycode_n |
keycode_o |
keycode_p |
keycode_q |
keycode_r |
keycode_s |
keycode_t |
keycode_u |
keycode_v |
keycode_w |
keycode_x |
keycode_y |
keycode_z |
keycode_lwin |
keycode_rwin |
keycode_apps |
keycode_numpad0 |
keycode_numpad1 |
keycode_numpad2 |
keycode_numpad3 |
keycode_numpad4 |
keycode_numpad5 |
keycode_numpad6 |
keycode_numpad7 |
keycode_numpad8 |
keycode_numpad9 |
keycode_numpad_enter |
keycode_multiply |
keycode_add |
keycode_separator |
keycode_subtract |
keycode_decimal |
keycode_divide |
keycode_f1 |
keycode_f2 |
keycode_f3 |
keycode_f4 |
keycode_f5 |
keycode_f6 |
keycode_f7 |
keycode_f8 |
keycode_f9 |
keycode_f10 |
keycode_f11 |
keycode_f12 |
keycode_f13 |
keycode_f14 |
keycode_f15 |
keycode_f16 |
keycode_f17 |
keycode_f18 |
keycode_f19 |
keycode_f20 |
keycode_f21 |
keycode_f22 |
keycode_f23 |
keycode_f24 |
keycode_numlock |
keycode_scroll |
keycode_lshift |
keycode_rshift |
keycode_lcontrol |
keycode_rcontrol |
keycode_lmenu |
keycode_rmenu |
keycode_enter |
keycode_lapple |
keycode_rapple |
keycode_unknown |

enum clan::InputEvent::Type

Event types.

Enumerator
no_key |
pressed |
released |
doubleclick |
pointer_moved |
axis_moved |
proximity_change |

enum clan::InputDevice::Type

Input device types.

Enumerator
keyboard |
pointer |
joystick |
tablet |
unknown |

## Function Documentation

clan::InputContext::InputContext | ( |  | ) |

Constructs an input context.

clan::InputDevice::InputDevice | ( |  | ) |

Constructs a null instance.

clan::InputDevice::InputDevice | ( | InputDeviceProvider * | provider | ) |

Constructs a InputDevice.

Parameters

  provider | = Input Device Provider

clan::InputDevice::InputDevice | ( | std::weak_ptr< InputDevice_Impl > | impl | ) |

Constructs a InputDevice.

Parameters

  impl | = Weak Ptr

clan::InputEvent::InputEvent | ( |  | ) |

Constructs a 'NoKey' key.

clan::InputContext::~InputContext | ( |  | ) |

clan::InputDevice::~InputDevice | ( |  | ) |

virtual clan::InputDeviceProvider::~InputDeviceProvider | ( |  | ) |
| inline virtual

clan::InputEvent::~InputEvent | ( |  | ) |

virtual clan::OcclusionQueryProvider::~OcclusionQueryProvider | ( |  | ) |
| inline virtual

void clan::InputContext::add_joystick | ( | const InputDevice | joystick | ) |

Adds a new joystick to the input context.

void clan::InputContext::add_keyboard | ( | const InputDevice | keyboard | ) |

Adds a new keyboard to the input context.

void clan::InputContext::add_mouse | ( | const InputDevice | mouse | ) |

Adds a new mouse to the input context.

void clan::InputContext::add_tablet | ( | const InputDevice | tablet | ) |

Adds a new tablet to the input context.

virtual void clan::OcclusionQueryProvider::begin | ( |  | ) |
| pure virtual

Start occlusion query.

void clan::InputContext::clear | ( |  | ) |

Removes all devices from this input context.

virtual void clan::OcclusionQueryProvider::create | ( |  | ) |
| pure virtual

Create occlusion query object.

void clan::InputContext::dispose | ( |  | ) |

Stop anyone accessing this input context.

This should is only called internally by the display window destructor

virtual void clan::OcclusionQueryProvider::end | ( |  | ) |
| pure virtual

Finish occlusion query.

virtual float clan::InputDeviceProvider::get_axis | ( | int | index | ) | const
| inline virtual

Returns the the current position of a joystick axis. (Joysticks only)

float clan::InputDevice::get_axis | ( | int | axisid | ) | const

Returns the the current position of a joystick axis. (Joysticks only)

virtual std::vector<int> clan::InputDeviceProvider::get_axis_ids | ( |  | ) | const
| inline virtual

Returns the number of axes available on this device. (Joysticks only)

std::vector<int> clan::InputDevice::get_axis_ids | ( |  | ) | const

Returns the number of axes available on this device. (Joysticks only)

virtual int clan::InputDeviceProvider::get_button_count | ( |  | ) | const
| pure virtual

Returns the number of buttons available on this device. If used on a keyboard or mouse, this function returns -1.

int clan::InputDevice::get_button_count | ( |  | ) | const

Returns the number of buttons available on this device. If used on a keyboard or mouse, this function returns -1.

InputDevice& clan::InputContext::get_device | ( | const std::string & | device_name | ) |

Returns the input device with the given devicename.

virtual std::string clan::InputDeviceProvider::get_device_name | ( |  | ) | const
| pure virtual

Return the hardware id/device for this device (i.e. /dev/input/js0)

std::string clan::InputDevice::get_device_name | ( |  | ) | const

Return the hardware id/device for this device (i.e. /dev/input/js0)

virtual Point clan::InputDeviceProvider::get_device_position | ( |  | ) | const
| inline virtual

Returns the current device-supplied x and y position of the device. (Pointing devices only) The returned positional value is in the scale of the physical pixel on the screen.

Point clan::InputDevice::get_device_position | ( |  | ) | const

Returns the current devicesice-supplied x and y position of the device. (Pointing devices only) The returned positional value is in the scale of the physical pixel on the screen.

virtual int clan::InputDeviceProvider::get_hat | ( | int |  | ) | const
| inline virtual

Returns the current position of a joystick hat. (Joysticks only)

Returns
  Hat direction in degrees (0-360), or -1 if the hat is centered.

int clan::InputDevice::get_hat | ( | int | index | ) | const

Returns the current position of a joystick hat. (Joysticks only)

Returns
  Hat direction in degrees (0-360), or -1 if the hat is centered.

InputDevice& clan::InputContext::get_joystick | ( | int | joystick = `0` | ) |

Returns the input device for the specified joystick.

int clan::InputContext::get_joystick_count | ( |  | ) | const

Returns the number of joysticks available.

virtual std::string clan::InputDeviceProvider::get_key_name | ( | int | id | ) | const
| pure virtual

Retrieves the localized friendly key name for specified identifier (i.e. A, B, Leertaste, Backspace, Mouse Left, ...).

Note
  The returned name for the key may be localized by the system; it

std::string clan::InputDevice::get_key_name | ( | int | id | ) | const

Retrieves the localized friendly key name for specified identifier (i.e. A, B, Leertaste, Backspace, Mouse Left, ...).

Note
  The returned name for the key may be localized by the system; it

InputDevice& clan::InputContext::get_keyboard | ( | int | keyboard = `0` | ) |

Returns the input device for the specified keyboard.

int clan::InputContext::get_keyboard_count | ( |  | ) | const

Returns the number of keyboards available.

virtual bool clan::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.

bool clan::InputDevice::get_keycode | ( | int | keycode | ) | const

Returns true if the passed key code is down for this device. See `keys.h` for list of key codes.

InputDevice& clan::InputContext::get_mouse | ( | int | mouse = `0` | ) |

Returns the input device for the specified mouse.

int clan::InputContext::get_mouse_count | ( |  | ) | const

Returns the number of mice available.

virtual std::string clan::InputDeviceProvider::get_name | ( |  | ) | const
| pure virtual

Returns the human readable name of the device (i.e. 'Microsoft Sidewinder 3D').

std::string clan::InputDevice::get_name | ( |  | ) | const

Returns the human readable name of the device (i.e. 'Microsoft Sidewinder 3D').

virtual Pointf clan::InputDeviceProvider::get_position | ( |  | ) | const
| inline virtual

Returns the current device-independent x and y position (DIP) of the device. (Pointing devices only) The returned positional value is scaled to the pixel ratio of the display.

References clan::f.

Pointf clan::InputDevice::get_position | ( |  | ) | const

Returns the current device-independent x and y position (DIP) of the device. (Pointing devices only) The returned positional value is scaled to the pixel ratio of the display.

InputDeviceProvider* clan::InputDevice::get_provider | ( |  | ) | const

Returns the provider for this input device.

virtual int clan::OcclusionQueryProvider::get_result | ( |  | ) | const
| pure virtual

Returns the result of the occlusion query.

InputDevice& clan::InputContext::get_tablet | ( | int | tablet = `0` | ) |

Returns the input device for the specified tablet.

int clan::InputContext::get_tablet_count | ( |  | ) | const

Returns the number of tablets available.

virtual InputDevice::Type clan::InputDeviceProvider::get_type | ( |  | ) | const
| pure virtual

Returns the input device type.

Type clan::InputDevice::get_type | ( |  | ) | const

Returns the input device type.

virtual bool clan::InputDeviceProvider::in_proximity | ( |  | ) | const
| inline virtual

Returns true if the input device is in proximity mode. (Tablets only)

bool clan::InputDevice::in_proximity | ( |  | ) | const

Returns true if the input device is in proximity mode. (Tablets only)

virtual void clan::InputDeviceProvider::init | ( | Signal< void(const InputEvent &)> * | sig_provider_event | ) |
| pure virtual

Initialize input device provider. The device field of InputEvent should not be set when emitting events. Invoking sig_provider_event is thread safe.

bool clan::InputContext::is_disposed | ( |  | ) | const

Has dispose() been called on this input context.

Returns
  true = Has been disposed

bool clan::InputDevice::is_null | ( |  | ) | const
| inline

Returns true if this object is invalid.

virtual bool clan::OcclusionQueryProvider::is_result_ready | ( |  | ) | const
| pure virtual

Returns true if the GPU is ready to return the result.

virtual std::string clan::InputDeviceProvider::keyid_to_string | ( | int |  | ) | const
| inline virtual

Returns a generic string name for the specified key code.

References clan::string.

std::string clan::InputDevice::keyid_to_string | ( | int | keycode | ) | const

Returns a generic string name for the specified key code.

InputDevice& clan::InputDevice::operator= | ( | const InputDevice & | copy | ) |

void clan::InputContext::process_messages | ( |  | ) |

Process and dispatch messages to signals.

virtual void clan::InputDeviceProvider::set_device_position | ( | int | x,
|  | int | y
| ) |  |
| inline virtual

Sets the actual position of the device. (Pointing devices only)

void clan::InputDevice::set_device_position | ( | int | x,
|  | int | y
| ) |  |

Sets the actual position of the device. (Pointing devices only)

virtual void clan::InputDeviceProvider::set_position | ( | float | x,
|  | float | y
| ) |  |
| inline virtual

Sets the display-independent position of the device. (Pointing devices only)

void clan::InputDevice::set_position | ( | float | x,
|  | float | y
| ) |  |

Sets the display-independent position of the device. (Pointing devices only)

Signal<void(const InputEvent &)>& clan::InputDevice::sig_axis_move | ( |  | ) |

Signal emitted when axis is moved.

Signal<void(const InputEvent &)>& clan::InputDevice::sig_key_dblclk | ( |  | ) |

Signal emitted when the mouse is double-clicked.

Signal<void(const InputEvent &)>& clan::InputDevice::sig_key_down | ( |  | ) |

Signal emitted when key is pressed.

Signal<void(const InputEvent &)>& clan::InputDevice::sig_key_up | ( |  | ) |

Signal emitted when key is released.

Signal<void(const InputEvent &)>& clan::InputDevice::sig_pointer_move | ( |  | ) |

Signal emitted when pointer is moved (absolute movement).

Signal<void(const InputEvent &)>& clan::InputDevice::sig_proximity_change | ( |  | ) |

Signal emitted when proximity is entered or exited.

virtual int clan::InputDeviceProvider::string_to_keyid | ( | const std::string & |  | ) | const
| inline virtual

Returns the key code for the specified generic string key name.

int clan::InputDevice::string_to_keyid | ( | const std::string & | str | ) | const

Returns the key code for the specified generic string key name.

virtual bool clan::InputDeviceProvider::supports_keyid_mapping | ( |  | ) | const
| inline virtual

Returns true if this provider implements keyid to/from string mapping.

void clan::InputDevice::throw_if_null | ( |  | ) | const

Throw an exception if this object is invalid.

## Variable Documentation

bool clan::InputEvent::alt

State of modifier keys.

double clan::InputEvent::axis_pos

Axis position.

bool clan::InputEvent::ctrl

InputDevice clan::InputEvent::device

Device that event originates from.

InputCode clan::InputEvent::id

The exact input.

int clan::InputEvent::id_offset

Contains the value (0 to x) for certains InputCode types that have a variable output identifier (for example, joystick button identifers, or joystick axis...)

Point clan::InputEvent::mouse_device_pos

Mouse actual position at event time.

Pointf clan::InputEvent::mouse_pos

Mouse position at event time.

int clan::InputEvent::repeat_count

The repeat count for this event. Contains the number of times the keystroke has auto-repeated as a result of the user holding down the key.

bool clan::InputEvent::shift

std::string clan::InputEvent::str

Character sequence generated by event. A key press can generate one, none or multiple characters. The reason for this are deadkeys, i.e. press ^ + a and get ^; the first press would generate no key and the second one, in case that the second key being pressed doesn't support the ^ it would generate two characters (i.e. ^ + 5 => "", "^5")

Type clan::InputEvent::type

Event type.

## Friends

friend class InputContext_Impl
| friend