gdk.device
Module for [Device] class
Types 3
classDevice : gobject.object.ObjectWrap
The [gdk.device.Device] object represents an input device, such as a keyboard, a mouse, or a touchpad.
See the [gdk.seat.Seat] documentation for more information about the various kinds of devices, and their relationships.
Methods
DeviceGidBuilder builder()Get builder for [gdk.device.Device] Returns: New builder objectpango.types.Direction direction() @propertyGet `direction` property. Returns: The direction of the current layout.gdk.display.Display display() @propertyGet `display` property. Returns: The [gdk.display.Display] the [gdk.device.Device] pertains to.bool hasCursor() @propertyGet `hasCursor` property. Returns: Whether the device is represented by a cursor on the screen.gdk.types.ModifierType modifierState() @propertyGet `modifierState` property. Returns: The current modifier state of the device.uint numTouches() @propertyGet `numTouches` property. Returns: The maximal number of concurrent touches on a touch device.void seat(gdk.seat.Seat propval) @propertySet `seat` property. Params: propval = [gdk.seat.Seat] of this device.gdk.device_tool.DeviceTool tool() @propertyGet `tool` property. Returns: The [gdk.device_tool.DeviceTool] that is currently used with this device.bool getCapsLockState()Retrieves whether the Caps Lock modifier of the keyboard is locked.gdk.device_tool.DeviceTool getDeviceTool()Retrieves the current tool for device. Returns: the [gdk.device_tool.DeviceTool]pango.types.Direction getDirection()Returns the direction of effective layout of the keyboard.gdk.display.Display getDisplay()Returns the [gdk.display.Display] to which device pertains. Returns: a [gdk.display.Display]bool getHasCursor()Determines whether the pointer follows device motion.gdk.types.ModifierType getModifierState()Retrieves the current modifier state of the keyboard.string getName()The name of the device, suitable for showing in a user interface. Returns: a namebool getNumLockState()Retrieves whether the Num Lock modifier of the keyboard is locked.uint getNumTouches()Retrieves the number of touch points associated to device. Returns: the number of touch pointsstring getProductId()Returns the product ID of this device.bool getScrollLockState()Retrieves whether the Scroll Lock modifier of the keyboard is locked.gdk.seat.Seat getSeat()Returns the [gdk.seat.Seat] the device belongs to. Returns: a [gdk.seat.Seat]gdk.types.InputSource getSource()Determines the type of the device. Returns: a [gdk.types.InputSource]gdk.surface.Surface getSurfaceAtPosition(out double winX, out double winY)Obtains the surface underneath device, returning the location of the device in winx and winy.uint getTimestamp()Returns the timestamp of the last activity for this device.string getVendorId()Returns the vendor ID of this device.bool hasBidiLayouts()Determines if layouts for both right-to-left and left-to-right languages are in use on the keyboard.gulong connectChanged(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gdk.device.Device)))
&& Parameters!T.length < 2)Connect to `Changed` signal.gulong connectToolChanged(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gdk.device_tool.DeviceTool)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gdk.device.Device)))
&& Parameters!T.length < 3)Connect to `ToolChanged` signal.Methods
T display(gdk.display.Display propval)Set `display` property. Params: propval = The [gdk.display.Display] the [gdk.device.Device] pertains to. Returns: Builder instance for fluent chainingT hasCursor(bool propval)Set `hasCursor` property. Params: propval = Whether the device is represented by a cursor on the screen. Returns: Builder instance for fluent chainingT name(string propval)Set `name` property. Params: propval = The device name. Returns: Builder instance for fluent chainingT numTouches(uint propval)Set `numTouches` property. Params: propval = The maximal number of concurrent touches on a touch device.T productId(string propval)Set `productId` property. Params: propval = Product ID of this device.T seat(gdk.seat.Seat propval)Set `seat` property. Params: propval = [gdk.seat.Seat] of this device. Returns: Builder instance for fluent chainingT source(gdk.types.InputSource propval)Set `source` property. Params: propval = Source type for the device. Returns: Builder instance for fluent chainingT vendorId(string propval)Set `vendorId` property. Params: propval = Vendor ID of this device.