Basics
Guides
API Reference
Basics
Guides
API Reference
[14:7] extends: object
A physical tool associated to a GdkDevice.
GdkDeviceTool (Handle = null)
Creates a new
DeviceToolby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asObject ()
Wraps this handle as
GObject.
A GObject object.get_axes ()
Gets the axes of the tool.
the axes of @tool.get_hardware_id ()
Gets the hardware ID of this tool, or 0 if it's not known. When non-zero, the identifier is unique for the given tool model, meaning that two identical tools will share the same @hardware_id, but will have different serial numbers (see [method@Gdk.DeviceTool.get_serial]). This is a more concrete (and device specific) method to identify a
GdkDeviceToolthan [method@Gdk.DeviceTool.get_tool_type], as a tablet may support multiple devices with the sameGdkDeviceToolType, but different hardware identifiers.
The hardware identifier of this tool..get_serial ()
Gets the serial number of this tool. This value can be used to identify a physical tool (eg. a tablet pen) across program executions.
The serial ID for this tool.get_tool_type ()
Gets the
GdkDeviceToolTypeof the tool.
The physical type for this tool. This can be used to figure out what sort of pen is being used, such as an airbrush or a pencil..[153:14] static extends: object
Generated metadata helpers for DeviceTool class surfaces.
properties ()
Returns property metadata for
DeviceTool.
A list.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.