InputDevice
Object Hierarchy:
Description:
public class InputDevice :
Object
Generic representation of an input device.
The actual contents of this structure depend on the backend used.
Content:
Properties:
Static methods:
Creation methods:
Methods:
- public weak InputDevice get_associated_device ()
Retrieves a pointer to the InputDevice that has
been associated to device.
- public InputAxis get_axis (uint index_)
Retrieves the type of axis on device at the given index.
- public bool get_axis_value (double[] axes, InputAxis axis, out double value)
Extracts the value of the given axis of a
InputDevice from an array of axis values.
- public bool get_coords (EventSequence? sequence, out Point point)
Retrieves the latest coordinates of a pointer or touch point of device
.
- public void get_device_coords (out int x, out int y)
Retrieves the latest coordinates of the pointer of device
- public int get_device_id ()
Retrieves the unique identifier of device
- public InputMode get_device_mode ()
- public unowned string get_device_name ()
Retrieves the name of the device
- public InputDeviceType get_device_type ()
Retrieves the type of device
- public bool get_enabled ()
Retrieves whether device is enabled.
- public weak Actor get_grabbed_actor ()
Retrieves a pointer to the
Actor currently grabbing all the events coming from device.
- public bool get_has_cursor ()
Retrieves whether device has a pointer that follows the device
motion.
- public bool get_key (uint index_, out uint keyval, out ModifierType modifiers)
Retrieves the key set using
set_key
- public uint get_n_axes ()
Retrieves the number of axes available on device.
- public uint get_n_keys ()
Retrieves the number of keys registered for device.
- public weak Actor get_pointer_actor ()
Retrieves the Actor
underneath the pointer of device
- public weak Stage get_pointer_stage ()
Retrieves the Stage
underneath the pointer of device
- public List<weak InputDevice> get_slave_devices ()
Retrieves the slave devices attached to device.
- public void grab (Actor actor)
Acquires a grab on actor for the given device.
- public bool keycode_to_evdev (uint hardware_keycode, uint evdev_keycode)
Translates a hardware keycode from a
KeyEvent to the equivalent evdev keycode.
- public weak Actor sequence_get_grabbed_actor (EventSequence sequence)
Retrieves a pointer to the
Actor currently grabbing the touch events coming from device given
the sequence.
- public void sequence_grab (EventSequence sequence, Actor actor)
Acquires a grab on actor for the given device and
the given touch sequence.
- public void sequence_ungrab (EventSequence sequence)
Releases the grab on the device for the given sequence
, if one is in place.
- public void set_enabled (bool enabled)
Enables or disables a InputDevice.
- public void set_key (uint index_, uint keyval, ModifierType modifiers)
Sets the keyval and modifiers at the given index_ for
device.
- public void ungrab ()
Releases the grab on the device, if one is in place.
- public void update_from_event (Event event, bool update_stage)
Forcibly updates the state of the device using a
Event
Inherited Members:
All known members inherited from class GLib.Object