Basics
Guides
API Reference
Basics
Guides
API Reference
[311:7] extends: object
Generated low-level callback wrapper for GIR callback close.
ShortcutsWindowCloseCallback (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.
[48:7] extends: object
A GtkShortcutsWindow shows information about the keyboard shortcuts and
gestures of an application. The shortcuts can be grouped, and you can have
multiple sections in this window, corresponding to the major modes of your
application. Additionally, the shortcuts can be filtered by the current view,
to avoid showing information that is not relevant in the current application
context. The recommended way to construct a GtkShortcutsWindow is with
[class@Gtk.Builder], by using the <child> tag to populate a
GtkShortcutsWindow with one or more [class@Gtk.ShortcutsSection] objects,
which contain one or more [class@Gtk.ShortcutsGroup] instances, which, in
turn, contain [class@Gtk.ShortcutsShortcut] instances. If you need to add a
section programmatically, use [method@Gtk.ShortcutsWindow.add_section]
instead of [method@Gtk.Window.set_child], as the shortcuts window manages its
children directly. # A simple example:
srcset="clocks-shortcuts-dark.png" media="(prefers-color-scheme: dark)">
This example shows a GtkShortcutsWindow that has been configured to show
only the shortcuts relevant to the “Stopwatch” view. The .ui file for this
example can be found
here.
srcset="builder-shortcuts-dark.png" media="(prefers-color-scheme: dark)">
This example shows a GtkShortcutsWindow with two sections,
“Editor Shortcuts” and “Terminal Shortcuts”. The .ui file for this example
can be found
here.
[signal@Gtk.ShortcutsWindow::close] - [signal@Gtk.ShortcutsWindow::search] #
CSS nodes GtkShortcutsWindow has a single CSS node with the name window
and style class .shortcuts.
ShortcutsWindow (Handle = null)
Creates a new
ShortcutsWindowby 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.asWindow ()
Wraps this handle as
Window.
A Window object.asAccessible ()
Wraps this handle as
Accessible.
A Accessible object.asBuildable ()
Wraps this handle as
Buildable.
A Buildable object.asConstraintTarget ()
Wraps this handle as
ConstraintTarget.
A ConstraintTarget object.asNative ()
Wraps this handle as
Native.
A Native object.asRoot ()
Wraps this handle as
Root.
A Root object.asShortcutManager ()
Wraps this handle as
ShortcutManager.
A ShortcutManager 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.setOnClose (callback Fn, UserData = null)
Emitted when the user uses a keybinding to close the window. This is a keybinding signal. The default binding for this signal is the Escape key.
Fn is the Aussom callback.Fn is called with (ShortcutsWindow Self).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnSearch (callback Fn, UserData = null)
Emitted when the user uses a keybinding to start a search. This is a keybinding signal. The default binding for this signal is Control+F.
Fn is the Aussom callback.Fn is called with (ShortcutsWindow Self).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.
setSectionname (string Value)
The name of the section to show. This should be the section-name of one of the
GtkShortcutsSectionobjects that are in this shortcuts window.
Value is the new property value.None.setViewname (string Value)
The view name by which to filter the contents. This should correspond to the [property@Gtk.ShortcutsGroup:view] property of some of the [class@Gtk.ShortcutsGroup] objects that are inside this shortcuts window. Set this to %NULL to show all groups.
Value is the new property value.None.add_section (object section)
Adds a section to the shortcuts window. This is the programmatic equivalent to using [class@Gtk.Builder] and a
<child>tag to add the child. Using [method@Gtk.Window.set_child] is not appropriate as the shortcuts window manages its children internally.
section is the GtkShortcutsSection to add.None.[381:7] extends: object
Generated low-level callback wrapper for GIR callback search.
ShortcutsWindowSearchCallback (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.
[451:14] static extends: object
Generated metadata helpers for ShortcutsWindow class surfaces.
properties ()
Returns property metadata for
ShortcutsWindow.
A list.signals ()
Returns signal metadata for
ShortcutsWindow.
A list.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.