Device
Object Hierarchy:
Description:
public class Device :
Object
Represents an input device, such as a keyboard, mouse or touchpad.
See the [class@Gdk.Seat] documentation for more information about the various kinds of devices, and their relationships.
Content:
Static methods:
Creation methods:
Methods:
- public bool get_axis (double[] axes, AxisUse use, out double value)
Interprets an array of double as axis values for a given device, and
locates the value in the array for a given axis use.
- public AxisUse get_axis_use (uint index)
Returns the axis use for index_.
- public bool get_has_cursor ()
Determines whether the pointer follows device motion.
- public bool get_history (Window window, uint32 start, uint32 stop, out TimeCoord[] events)
Obtains the motion history for a pointer device; given a starting and
ending timestamp, return all events in the motion history for the device in the given range of time.
- public void get_key (uint index, out uint keyval, out ModifierType modifiers)
If index_ has a valid keyval, this function will return
true and fill in keyval and modifiers with the keyval settings.
- public InputMode get_mode ()
Determines the mode of the device.
- public int get_n_axes ()
Returns the number of axes the device currently has.
- public int get_n_keys ()
Returns the number of keys the device currently has.
- public unowned string get_name ()
The name of the device, suitable for showing in a user interface.
- public InputSource get_source ()
Determines the type of the device.
- public void get_state (Window window, double[] axes, out ModifierType mask)
Gets the current state of a pointer device relative to window
.
- public void set_axis_use (uint index_, AxisUse use)
Specifies how an axis of a device is used.
- public void set_key (uint index_, uint keyval, ModifierType modifiers)
Specifies the X key event to generate when a macro button of a device
is pressed.
- public bool set_mode (InputMode mode)
Sets a the mode of an input device.
- public void set_source (InputSource source)
Fields:
Inherited Members:
All known members inherited from class GLib.Object