Device
Object Hierarchy:
Description:
[ CCode ( type_id = "gdk_device_get_type ()" ) ]
public abstract class Device : Object
The `GdkDevice` object represents an input device, such as a keyboard, a mouse, or a touchpad.
See the [[email protected]] documentation for more information about the various kinds of devices, and their relationships.
Content:
Properties:
- public bool caps_lock_state { get; }
Whether Caps Lock is on.
- public Direction direction { get; }
The direction of the current layout.
- public Display display { get; construct; }
The `GdkDisplay` the `GdkDevice` pertains to.
- public bool has_bidi_layouts { get; }
Whether the device has both right-to-left and left-to-right layouts.
- public bool has_cursor { get; construct; }
Whether the device is represented by a cursor on the screen.
- public ModifierType modifier_state { get; }
The current modifier state of the device.
- public uint n_axes { get; }
Number of axes in the device.
- public string? name { get; construct; }
The device name.
- public bool num_lock_state { get; }
Whether Num Lock is on.
- public uint num_touches { get; construct; }
The maximal number of concurrent touches on a touch device.
- public string product_id { get; construct; }
Product ID of this device.
- public bool scroll_lock_state { get; }
Whether Scroll Lock is on.
- public Seat seat { owned get; set; }
`GdkSeat` of this device.
- public InputSource source { get; construct; }
Source type for the device.
- public DeviceTool tool { owned get; }
The `GdkDeviceTool` that is currently used with this device.
- public string vendor_id { get; construct; }
Vendor ID of this device.
Creation methods:
Methods:
- public bool get_caps_lock_state ()
Retrieves whether the Caps Lock modifier of the keyboard is locked.
- public unowned DeviceTool? get_device_tool ()
Retrieves the current tool for this.
- public Direction get_direction ()
Returns the direction of effective layout of the keyboard.
- public unowned Display get_display ()
Returns the `GdkDisplay` to which this
pertains.
- public bool get_has_cursor ()
Determines whether the pointer follows device motion.
- public ModifierType get_modifier_state ()
Retrieves the current modifier state of the keyboard.
- public unowned string get_name ()
The name of the device, suitable for showing in a user interface.
- public bool get_num_lock_state ()
Retrieves whether the Num Lock modifier of the keyboard is locked.
- public uint get_num_touches ()
Retrieves the number of touch points associated to
this.
- public unowned string? get_product_id ()
Returns the product ID of this device.
- public bool get_scroll_lock_state ()
Retrieves whether the Scroll Lock modifier of the keyboard is locked.
- public unowned Seat get_seat ()
Returns the `GdkSeat` the device belongs to.
- public InputSource get_source ()
Determines the type of the device.
- public unowned Surface? get_surface_at_position (out double win_x, out double win_y)
Obtains the surface underneath this,
returning the location of the device in win_x
and win_y
.
- public uint32 get_timestamp ()
Returns the timestamp of the last activity for this device.
- public unowned string? get_vendor_id ()
Returns the vendor ID of this device.
Signals:
Inherited Members:
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref