gdk.device

Module for [Device] class

Types 3

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
GType _gType() @property
Device self()Returns `this`, for use in `with` statements.
DeviceGidBuilder builder()Get builder for [gdk.device.Device] Returns: New builder object
bool capsLockState() @propertyGet `capsLockState` property. Returns: Whether Caps Lock is on.
pango.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 nAxes() @propertyGet `nAxes` property. Returns: Number of axes in the device.
string name() @propertyGet `name` property. Returns: The device name.
bool numLockState() @propertyGet `numLockState` property. Returns: Whether Num Lock is on.
uint numTouches() @propertyGet `numTouches` property. Returns: The maximal number of concurrent touches on a touch device.
string productId() @propertyGet `productId` property. Returns: Product ID of this device.
bool scrollLockState() @propertyGet `scrollLockState` property. Returns: Whether Scroll Lock is on.
gdk.seat.Seat seat() @propertyGet `seat` property. Returns: [gdk.seat.Seat] of this device.
void seat(gdk.seat.Seat propval) @propertySet `seat` property. Params: propval = [gdk.seat.Seat] of this device.
gdk.types.InputSource source() @propertyGet `source` property. Returns: Source type for the device.
gdk.device_tool.DeviceTool tool() @propertyGet `tool` property. Returns: The [gdk.device_tool.DeviceTool] that is currently used with this device.
string vendorId() @propertyGet `vendorId` property. Returns: Vendor ID of 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 name
bool 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 points
string 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.
Constructors
this(void * ptr, Flag!"Take" take)
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 chaining
T hasCursor(bool propval)Set `hasCursor` property. Params: propval = Whether the device is represented by a cursor on the screen. Returns: Builder instance for fluent chaining
T name(string propval)Set `name` property. Params: propval = The device name. Returns: Builder instance for fluent chaining
T 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 chaining
T source(gdk.types.InputSource propval)Set `source` property. Params: propval = Source type for the device. Returns: Builder instance for fluent chaining
T vendorId(string propval)Set `vendorId` property. Params: propval = Vendor ID of this device.

Fluent builder for [gdk.device.Device]

Methods