Device

open class Device(pointer: <Error class: unknown class><<Error class: unknown class>>)

The GdkDevice object represents an input device, such as a keyboard, a mouse, or a touchpad.

See the class@Gdk.Seat documentation for more information about the various kinds of devices, and their relationships.

Skipped during bindings generation

  • parameter win_x: win_x: Out parameter is not supported

  • method has-bidi-layouts: Property has no getter nor setter

  • method n-axes: Property has no getter nor setter

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Whether Caps Lock is on.

Link copied to clipboard
open val direction: <Error class: unknown class>

The direction of the current layout.

Link copied to clipboard
open val display: Display

The GdkDisplay the GdkDevice pertains to.

Link copied to clipboard
val gdkDevicePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val hasCursor: Boolean

Whether the device is represented by a cursor on the screen.

Link copied to clipboard

The current modifier state of the device.

Link copied to clipboard
open val name: String

The device name.

Link copied to clipboard

Whether Num Lock is on.

Link copied to clipboard
open val numTouches: <Error class: unknown class>

The maximal number of concurrent touches on a touch device.

Link copied to clipboard
open val productId: String?

Product ID of this device.

Link copied to clipboard

Whether Scroll Lock is on.

Link copied to clipboard
open val seat: Seat

GdkSeat of this device.

Link copied to clipboard

Source type for the device.

Link copied to clipboard
open val tool: DeviceTool?

The GdkDeviceTool that is currently used with this device.

Link copied to clipboard
open val vendorId: String?

Vendor ID of this device.

Functions

Link copied to clipboard
fun connectChanged(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

Emitted either when the number of either axes or keys changes.

Link copied to clipboard
fun connectToolChanged(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (tool: DeviceTool) -> Unit): <Error class: unknown class>

Emitted on pen/eraser devices whenever tools enter or leave proximity.

Link copied to clipboard
open fun getTimestamp(): <Error class: unknown class>

Returns the timestamp of the last activity for this device.

Link copied to clipboard

Determines if layouts for both right-to-left and left-to-right languages are in use on the keyboard.