Class: Gdk::Device
- Inherits:
-
Object
- Object
- Gdk::Device
- Defined in:
- (unknown)
Overview
The GdkDevice object represents an input device, such
as a keyboard, a mouse, or a touchpad.
See the [classGdk.Seat] documentation for more information about the various kinds of devices, and their relationships.
Instance Method Summary collapse
-
#caps_lock_state ⇒ Boolean
Retrieves whether the Caps Lock modifier of the keyboard is locked.
-
#caps_lock_state=(caps_lock_state) ⇒ Boolean
Whether Caps Lock is on.
-
#caps_lock_state? ⇒ Boolean
Whether Caps Lock is on.
-
#device_tool ⇒ Gdk::DeviceTool
Retrieves the current tool for device.
-
#direction ⇒ Pango::Direction
The direction of the current layout.
-
#direction=(direction) ⇒ Pango::Direction
The direction of the current layout.
-
#display ⇒ Gdk::Display
The
GdkDisplaytheGdkDevicepertains to. -
#display=(display) ⇒ Gdk::Display
The
GdkDisplaytheGdkDevicepertains to. -
#get_surface_at_position(win_x, win_y) ⇒ Gdk::Surface
Obtains the surface underneath device, returning the location of the device in win_x and win_y.
-
#has_bidi_layouts ⇒ Boolean
Determines if layouts for both right-to-left and left-to-right languages are in use on the keyboard.
-
#has_bidi_layouts=(has_bidi_layouts) ⇒ Boolean
Whether the device has both right-to-left and left-to-right layouts.
-
#has_bidi_layouts? ⇒ Boolean
Whether the device has both right-to-left and left-to-right layouts.
-
#has_cursor ⇒ Boolean
Determines whether the pointer follows device motion.
-
#has_cursor=(has_cursor) ⇒ Boolean
Whether the device is represented by a cursor on the screen.
-
#has_cursor? ⇒ Boolean
Whether the device is represented by a cursor on the screen.
-
#modifier_state ⇒ Gdk::ModifierType
The current modifier state of the device.
-
#modifier_state=(modifier_state) ⇒ Gdk::ModifierType
The current modifier state of the device.
-
#n_axes ⇒ Integer
Number of axes in the device.
-
#n_axes=(n_axes) ⇒ Integer
Number of axes in the device.
-
#name ⇒ String
The device name.
-
#name=(name) ⇒ String
The device name.
-
#num_lock_state ⇒ Boolean
Retrieves whether the Num Lock modifier of the keyboard is locked.
-
#num_lock_state=(num_lock_state) ⇒ Boolean
Whether Num Lock is on.
-
#num_lock_state? ⇒ Boolean
Whether Num Lock is on.
-
#num_touches ⇒ Integer
The maximal number of concurrent touches on a touch device.
-
#num_touches=(num_touches) ⇒ Integer
The maximal number of concurrent touches on a touch device.
-
#product_id ⇒ String
Product ID of this device.
-
#product_id=(product_id) ⇒ String
Product ID of this device.
-
#scroll_lock_state ⇒ Boolean
Retrieves whether the Scroll Lock modifier of the keyboard is locked.
-
#scroll_lock_state=(scroll_lock_state) ⇒ Boolean
Whether Scroll Lock is on.
-
#scroll_lock_state? ⇒ Boolean
Whether Scroll Lock is on.
-
#seat ⇒ Gdk::Seat
GdkSeatof this device. -
#seat=(seat) ⇒ Gdk::Seat
GdkSeatof this device. -
#source ⇒ Gdk::InputSource
Source type for the device.
-
#source=(source) ⇒ Gdk::InputSource
Source type for the device.
-
#timestamp ⇒ Integer
Returns the timestamp of the last activity for this device.
-
#tool ⇒ Gdk::DeviceTool
The
GdkDeviceToolthat is currently used with this device. -
#tool=(tool) ⇒ Gdk::DeviceTool
The
GdkDeviceToolthat is currently used with this device. -
#vendor_id ⇒ String
Vendor ID of this device.
-
#vendor_id=(vendor_id) ⇒ String
Vendor ID of this device.
Instance Method Details
#caps_lock_state ⇒ Boolean
Retrieves whether the Caps Lock modifier of the keyboard is locked.
This is only relevant for keyboard devices.
#caps_lock_state=(caps_lock_state) ⇒ Boolean
Whether Caps Lock is on.
This is only relevant for keyboard devices.
#caps_lock_state? ⇒ Boolean
Whether Caps Lock is on.
This is only relevant for keyboard devices.
#device_tool ⇒ Gdk::DeviceTool
Retrieves the current tool for device.
#direction ⇒ Pango::Direction
The direction of the current layout.
This is only relevant for keyboard devices.
#direction=(direction) ⇒ Pango::Direction
The direction of the current layout.
This is only relevant for keyboard devices.
#display ⇒ Gdk::Display
The GdkDisplay the GdkDevice pertains to.
#display=(display) ⇒ Gdk::Display
The GdkDisplay the GdkDevice pertains to.
#get_surface_at_position(win_x, win_y) ⇒ Gdk::Surface
Obtains the surface underneath device, returning the location of the device in win_x and win_y.
Returns nil if the surface tree under device is not known to GDK (for example, belongs to another application).
#has_bidi_layouts ⇒ Boolean
Determines if layouts for both right-to-left and left-to-right languages are in use on the keyboard.
This is only relevant for keyboard devices.
#has_bidi_layouts=(has_bidi_layouts) ⇒ Boolean
Whether the device has both right-to-left and left-to-right layouts.
This is only relevant for keyboard devices.
#has_bidi_layouts? ⇒ Boolean
Whether the device has both right-to-left and left-to-right layouts.
This is only relevant for keyboard devices.
#has_cursor ⇒ Boolean
Determines whether the pointer follows device motion.
This is not meaningful for keyboard devices, which don't have a pointer.
#has_cursor=(has_cursor) ⇒ Boolean
Whether the device is represented by a cursor on the screen.
#has_cursor? ⇒ Boolean
Whether the device is represented by a cursor on the screen.
#modifier_state ⇒ Gdk::ModifierType
The current modifier state of the device.
This is only relevant for keyboard devices.
#modifier_state=(modifier_state) ⇒ Gdk::ModifierType
The current modifier state of the device.
This is only relevant for keyboard devices.
#n_axes ⇒ Integer
Number of axes in the device.
#n_axes=(n_axes) ⇒ Integer
Number of axes in the device.
#name ⇒ String
The device name.
#name=(name) ⇒ String
The device name.
#num_lock_state ⇒ Boolean
Retrieves whether the Num Lock modifier of the keyboard is locked.
This is only relevant for keyboard devices.
#num_lock_state=(num_lock_state) ⇒ Boolean
Whether Num Lock is on.
This is only relevant for keyboard devices.
#num_lock_state? ⇒ Boolean
Whether Num Lock is on.
This is only relevant for keyboard devices.
#num_touches ⇒ Integer
The maximal number of concurrent touches on a touch device.
Will be 0 if the device is not a touch device or if the number of touches is unknown.
#num_touches=(num_touches) ⇒ Integer
The maximal number of concurrent touches on a touch device.
Will be 0 if the device is not a touch device or if the number of touches is unknown.
#product_id ⇒ String
Product ID of this device.
See [methodGdk.Device.get_product_id].
#product_id=(product_id) ⇒ String
Product ID of this device.
See [methodGdk.Device.get_product_id].
#scroll_lock_state ⇒ Boolean
Retrieves whether the Scroll Lock modifier of the keyboard is locked.
This is only relevant for keyboard devices.
#scroll_lock_state=(scroll_lock_state) ⇒ Boolean
Whether Scroll Lock is on.
This is only relevant for keyboard devices.
#scroll_lock_state? ⇒ Boolean
Whether Scroll Lock is on.
This is only relevant for keyboard devices.
#seat ⇒ Gdk::Seat
GdkSeat of this device.
#seat=(seat) ⇒ Gdk::Seat
GdkSeat of this device.
#source ⇒ Gdk::InputSource
Source type for the device.
#source=(source) ⇒ Gdk::InputSource
Source type for the device.
#timestamp ⇒ Integer
Returns the timestamp of the last activity for this device.
In practice, this means the timestamp of the last event that was received from the OS for this device. (GTK may occasionally produce events for a device that are not received from the OS, and will not update the timestamp).
#tool ⇒ Gdk::DeviceTool
The GdkDeviceTool that is currently used with this device.
#tool=(tool) ⇒ Gdk::DeviceTool
The GdkDeviceTool that is currently used with this device.
#vendor_id ⇒ String
Vendor ID of this device.
See [methodGdk.Device.get_vendor_id].
#vendor_id=(vendor_id) ⇒ String
Vendor ID of this device.
See [methodGdk.Device.get_vendor_id].