Basics
Guides
API Reference
Basics
Guides
API Reference
[28:7] extends: object
A GtkShortcutsSection collects all the keyboard shortcuts and gestures for
a major application mode. If your application needs multiple sections, you
should give each section a unique
[property@Gtk.ShortcutsSection:section-name] and a
[property@Gtk.ShortcutsSection:title] that can be shown in the section
selector of the [class@Gtk.ShortcutsWindow]. The
[property@Gtk.ShortcutsSection:max-height] property can be used to influence
how the groups in the section are distributed over pages and columns. This
widget is only meant to be used with [class@Gtk.ShortcutsWindow]. The
recommended way to construct a GtkShortcutsSection is with
[class@Gtk.Builder], by using the <child> tag to populate a
GtkShortcutsSection with one or more [class@Gtk.ShortcutsGroup] instances,
which in turn contain one or more [class@Gtk.ShortcutsShortcut] objects. If
you need to add a group programmatically, use
[method@Gtk.ShortcutsSection.add_group]. # Shortcuts and Gestures Pan
gestures allow to navigate between sections. The following signals have
default keybindings: - [signal@Gtk.ShortcutsSection::change-current-page]
ShortcutsSection (Handle = null)
Creates a new
ShortcutsSectionby 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.asBox ()
Wraps this handle as
Box.
A Box 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.asOrientable ()
Wraps this handle as
Orientable.
A Orientable 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.setOnChangecurrentpage (callback Fn, UserData = null)
Emitted when we change the current page. The default bindings for this signal are Ctrl+PgUp, PgUp, Ctrl+PgDn, PgDn.
Fn is the Aussom callback.Fn is called with (ShortcutsSection Self, int Offset).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.
setMaxheight (int Value)
The maximum number of lines to allow per column. This property can be used to influence how the groups in this section are distributed across pages and columns. The default value of 15 should work in most cases.
Value is the new property value.None.setSectionname (string Value)
A unique name to identify this section among the sections added to the
GtkShortcutsWindow. Setting the [property@Gtk.ShortcutsWindow:section-name] property to this string will make this section shown in theGtkShortcutsWindow.
Value is the new property value.None.setTitle (string Value)
The string to show in the section selector of the
GtkShortcutsWindowfor this section. If there is only one section, you don't need to set a title, since the section selector will not be shown in this case.
Value is the new property value.None.setViewname (string Value)
A view name to filter the groups in this section by. See [property@Gtk.ShortcutsGroup:view]. Applications are expected to use the [property@Gtk.ShortcutsWindow:view-name] property for this purpose.
Value is the new property value.None.add_group (object group)
Adds a group to the shortcuts section. This is the programmatic equivalent to using [class@Gtk.Builder] and a
<child>tag to add the child. Adding children with theGtkBoxAPI is not appropriate, asGtkShortcutsSectionmanages its children internally.
group is the GtkShortcutsGroup to add.None.[359:14] static extends: object
Generated metadata helpers for ShortcutsSection class surfaces.
properties ()
Returns property metadata for
ShortcutsSection.
A list.signals ()
Returns signal metadata for
ShortcutsSection.
A list.[289:7] extends: object
Generated low-level callback wrapper for GIR callback change-current-page.
ShortcutsSectionChangecurrentpageCallback (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, offset, 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.