Basics
Guides
API Reference
Basics
Guides
API Reference
[373:7] extends: object
Generated low-level callback wrapper for GIR callback changed.
DeviceChangedCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[15:7] extends: object
Represents an input device, such as a keyboard, mouse or touchpad. See the [class@Gdk.Seat] documentation for more information about the various kinds of devices, and their relationships.
Device (Handle = null)
Creates a new
Deviceby 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
Object.
A Object object.connectSignal (string Name, CallbackObj)
Connects one generated callback wrapper to a named signal.
Name is the signal name.CallbackObj is the generated callback wrapper to connect.The connected handler id.disconnectSignalHandler (int HandlerId)
Disconnects one retained signal handler id.
HandlerId is the signal handler id to disconnect.None.setOnChanged (callback Fn, UserData = null)
Emitted either when the number of either axes or keys changes. On X11 this will normally happen when the physical device routing events through the logical device changes (for example, user switches from the USB mouse to a tablet); in that case the logical device will change to reflect the axes and keys on the new physical device.
Fn is the Aussom callback.Fn is called with (Device Self).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnToolchanged (callback Fn, UserData = null)
Emitted on pen/eraser devices whenever tools enter or leave proximity.
Fn is the Aussom callback.Fn is called with (Device Self, DeviceTool Tool).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.getProperty (string Name)
Reads one generated property by name.
setProperty (string Name, Value)
Writes one generated property by name.
setSeat (object Value)
GdkSeatof this device.
Value is the new property value.None.get_active_layout_index ()
Retrieves the index of the active layout of the keyboard. If there is no valid active layout for the
GdkDevice, this function will return -1; This is only relevant for keyboard devices.
get_caps_lock_state ()
Retrieves whether the Caps Lock modifier of the keyboard is locked. This is only relevant for keyboard devices.
get_device_tool ()
Retrieves the current tool for @device.
get_direction ()
Returns the direction of effective layout of the keyboard. This is only relevant for keyboard devices. The direction of a layout is the direction of the majority of its symbols. See [func@Pango.unichar_direction].
get_display ()
Returns the
GdkDisplayto which @device pertains.
get_has_cursor ()
Determines whether the pointer follows device motion. This is not meaningful for keyboard devices, which don't have a pointer.
get_layout_names ()
Retrieves the names of the layouts of the keyboard. This is only relevant for keyboard devices.
get_modifier_state ()
Retrieves the current modifier state of the keyboard. This is only relevant for keyboard devices.
get_name ()
The name of the device, suitable for showing in a user interface.
get_num_lock_state ()
Retrieves whether the Num Lock modifier of the keyboard is locked. This is only relevant for keyboard devices.
get_num_touches ()
Retrieves the number of touch points associated to @device.
get_product_id ()
Returns the product ID of this device. This ID is retrieved from the device, and does not change. See [method@Gdk.Device.get_vendor_id] for more information.
get_scroll_lock_state ()
Retrieves whether the Scroll Lock modifier of the keyboard is locked. This is only relevant for keyboard devices.
get_seat ()
Returns the
GdkSeatthe device belongs to.
get_source ()
Determines the type of the device.
get_vendor_id ()
Returns the vendor ID of this device. This ID is retrieved from the device, and does not change. This function, together with [method@Gdk.Device.get_product_id], can be used to eg. compose
GSettingspaths to store settings for this device.c static GSettings * get_device_settings (GdkDevice *device) { const char *vendor, *product; GSettings *settings; GdkDevice *device; char *path; vendor = gdk_device_get_vendor_id (device); product = gdk_device_get_product_id (device); path = g_strdup_printf ("/org/example/app/devices/%s:%s/", vendor, product); settings = g_settings_new_with_path (DEVICE_SCHEMA, path); g_free (path); return settings; }
has_bidi_layouts ()
Determines if layouts for both right-to-left and left-to-right languages are in use on the keyboard. This is only relevant for keyboard devices.
[514:14] static extends: object
Generated metadata helpers for Device class surfaces.
properties ()
Returns property metadata for
Device.
A list.signals ()
Returns signal metadata for
Device.
A list.[443:7] extends: object
Generated low-level callback wrapper for GIR callback tool-changed.
DeviceToolchangedCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, tool, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.

Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.