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... | |
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. \warn 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. \warn 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 ©) |
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 |
enum clan::InputCode |
clan::InputContext::InputContext | ( | ) |
Constructs an input context.
clan::InputDevice::InputDevice | ( | ) |
Constructs a null instance.
clan::InputDevice::InputDevice | ( | InputDeviceProvider * | provider | ) |
Constructs a InputDevice.
provider | = Input Device Provider |
clan::InputDevice::InputDevice | ( | std::weak_ptr< InputDevice_Impl > | impl | ) |
Constructs a InputDevice.
impl | = Weak Ptr |
clan::InputEvent::InputEvent | ( | ) |
Constructs a 'NoKey' key.
clan::InputContext::~InputContext | ( | ) |
clan::InputDevice::~InputDevice | ( | ) |
|
inlinevirtual |
clan::InputEvent::~InputEvent | ( | ) |
|
inlinevirtual |
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.
|
pure virtual |
Start occlusion query.
void clan::InputContext::clear | ( | ) |
Removes all devices from this input context.
|
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
|
pure virtual |
Finish occlusion query.
float clan::InputDevice::get_axis | ( | int | axisid | ) | const |
Returns the the current position of a joystick axis. (Joysticks only)
|
inlinevirtual |
Returns the the current position of a joystick axis. (Joysticks only)
|
inlinevirtual |
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)
int clan::InputDevice::get_button_count | ( | ) | const |
Returns the number of buttons available on this device. \warn If used on a keyboard or mouse, this function returns -1.
|
pure virtual |
Returns the number of buttons available on this device. \warn 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.
std::string clan::InputDevice::get_device_name | ( | ) | const |
Return the hardware id/device for this device (i.e. /dev/input/js0)
|
pure virtual |
Return the hardware id/device for this device (i.e. /dev/input/js0)
|
inlinevirtual |
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.
int clan::InputDevice::get_hat | ( | int | index | ) | const |
Returns the current position of a joystick hat. (Joysticks only)
|
inlinevirtual |
Returns the current position of a joystick hat. (Joysticks only)
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.
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, ...).
|
pure virtual |
Retrieves the localized friendly key name for specified identifier (i.e. A, B, Leertaste, Backspace, Mouse Left, ...).
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.
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.
|
pure virtual |
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.
std::string clan::InputDevice::get_name | ( | ) | const |
Returns the human readable name of the device (i.e. 'Microsoft Sidewinder 3D').
|
pure virtual |
Returns the human readable name of the device (i.e. 'Microsoft Sidewinder 3D').
|
inlinevirtual |
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.
|
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.
Type clan::InputDevice::get_type | ( | ) | const |
Returns the input device type.
|
pure virtual |
Returns the input device type.
|
inlinevirtual |
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)
|
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.
|
inline |
Returns true if this object is invalid.
|
pure virtual |
Returns true if the GPU is ready to return the result.
std::string clan::InputDevice::keyid_to_string | ( | int | keycode | ) | const |
Returns a generic string name for the specified key code.
|
inlinevirtual |
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.
|
inlinevirtual |
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)
|
inlinevirtual |
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.
|
inlinevirtual |
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.
|
inlinevirtual |
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.
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.
|
friend |