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 _getGType() static nothrow
GType _gType() @property nothrow
Device self() nothrowReturns `this`, for use in `with` statements.
DeviceGidBuilder builder() static nothrowGet builder for [gdk.device.Device] Returns: New builder object
bool capsLockState() @property nothrowGet `capsLockState` property. Returns: Whether Caps Lock is on.
pango.types.Direction direction() @property nothrowGet `direction` property. Returns: The direction of the current layout.
gdk.display.Display display() @property nothrowGet `display` property. Returns: The [gdk.display.Display] the [gdk.device.Device] pertains to.
bool hasCursor() @property nothrowGet `hasCursor` property. Returns: Whether the device is represented by a cursor on the screen.
gdk.types.ModifierType modifierState() @property nothrowGet `modifierState` property. Returns: The current modifier state of the device.
uint nAxes() @property nothrowGet `nAxes` property. Returns: Number of axes in the device.
string name() @property nothrowGet `name` property. Returns: The device name.
bool numLockState() @property nothrowGet `numLockState` property. Returns: Whether Num Lock is on.
uint numTouches() @property nothrowGet `numTouches` property. Returns: The maximal number of concurrent touches on a touch device.
string productId() @property nothrowGet `productId` property. Returns: Product ID of this device.
bool scrollLockState() @property nothrowGet `scrollLockState` property. Returns: Whether Scroll Lock is on.
gdk.seat.Seat seat() @property nothrowGet `seat` property. Returns: [gdk.seat.Seat] of this device.
void seat(gdk.seat.Seat propval) @property nothrowSet `seat` property. Params: propval = [gdk.seat.Seat] of this device.
gdk.types.InputSource source() @property nothrowGet `source` property. Returns: Source type for the device.
gdk.device_tool.DeviceTool tool() @property nothrowGet `tool` property. Returns: The [gdk.device_tool.DeviceTool] that is currently used with this device.
string vendorId() @property nothrowGet `vendorId` property. Returns: Vendor ID of this device.
bool getCapsLockState() nothrowRetrieves whether the Caps Lock modifier of the keyboard is locked.
gdk.device_tool.DeviceTool getDeviceTool() nothrowRetrieves the current tool for device. Returns: the [gdk.device_tool.DeviceTool]
pango.types.Direction getDirection() nothrowReturns the direction of effective layout of the keyboard.
gdk.display.Display getDisplay() nothrowReturns the [gdk.display.Display] to which device pertains. Returns: a [gdk.display.Display]
bool getHasCursor() nothrowDetermines whether the pointer follows device motion.
gdk.types.ModifierType getModifierState() nothrowRetrieves the current modifier state of the keyboard.
string getName() nothrowThe name of the device, suitable for showing in a user interface. Returns: a name
bool getNumLockState() nothrowRetrieves whether the Num Lock modifier of the keyboard is locked.
uint getNumTouches() nothrowRetrieves the number of touch points associated to device. Returns: the number of touch points
string getProductId() nothrowReturns the product ID of this device.
bool getScrollLockState() nothrowRetrieves whether the Scroll Lock modifier of the keyboard is locked.
gdk.seat.Seat getSeat() nothrowReturns the [gdk.seat.Seat] the device belongs to. Returns: a [gdk.seat.Seat]
gdk.types.InputSource getSource() nothrowDetermines the type of the device. Returns: a [gdk.types.InputSource]
gdk.surface.Surface getSurfaceAtPosition(out double winX, out double winY) nothrowObtains the surface underneath device, returning the location of the device in win_x and win_y.
uint getTimestamp() nothrowReturns the timestamp of the last activity for this device.
string getVendorId() nothrowReturns the vendor ID of this device.
bool hasBidiLayouts() nothrowDetermines 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) nothrowConnect 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) nothrowConnect to `ToolChanged` signal.
Constructors
this(void * ptr, Flag!"Take" take)

Fluent builder implementation template for gdk.device.Device

Methods
T display(gdk.display.Display propval) nothrowSet `display` property. Params: propval = The [gdk.display.Display] the [gdk.device.Device] pertains to. Returns: Builder instance for fluent chaining
T hasCursor(bool propval) nothrowSet `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) nothrowSet `name` property. Params: propval = The device name. Returns: Builder instance for fluent chaining
T numTouches(uint propval) nothrowSet `numTouches` property. Params: propval = The maximal number of concurrent touches on a touch device.
T productId(string propval) nothrowSet `productId` property. Params: propval = Product ID of this device.
T seat(gdk.seat.Seat propval) nothrowSet `seat` property. Params: propval = [gdk.seat.Seat] of this device. Returns: Builder instance for fluent chaining
T source(gdk.types.InputSource propval) nothrowSet `source` property. Params: propval = Source type for the device. Returns: Builder instance for fluent chaining
T vendorId(string propval) nothrowSet `vendorId` property. Params: propval = Vendor ID of this device.

Fluent builder for gdk.device.Device

Methods
Device build() nothrowCreate object from builder. Returns: New object