Basics
Guides
API Reference
Basics
Guides
API Reference
[252:14] static extends: object
Generated metadata helpers for SectionModel interface surfaces.
signals ()
Returns signal metadata for
SectionModel.
A list.[182:7] extends: object
Generated low-level callback wrapper for GIR callback sections-changed.
SectionModelSectionschangedCallback (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, position, n_items, 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.
[22:7] extends: object
An interface that adds support for sections to list models. A
GtkSectionModel groups successive items into so-called sections. List
widgets like GtkListView and GtkGridView then allow displaying section
headers for these sections by installing a header factory. Many GTK list
models support sections inherently, or they pass through the sections of a
model they are wrapping. When the section groupings of a model change, the
model will emit the [signal@Gtk.SectionModel::sections-changed] signal by
calling the [method@Gtk.SectionModel.sections_changed] function. All sections
in the given range then need to be queried again. The
[signal@Gio.ListModel::items-changed] signal has the same effect, all
sections in that range are invalidated, too.
SectionModel (Handle = null)
Creates a new
SectionModelby 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.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.setOnSectionschanged (callback Fn, UserData = null)
Emitted when the start-of-section state of some of the items in @model changes. Note that this signal does not specify the new section state of the items, they need to be queried manually. It is also not necessary for a model to change the section state of any of the items in the section model, though it would be rather useless to emit such a signal. The [signal@Gio.ListModel::items-changed] implies the effect of the [signal@Gtk.SectionModel::sections-changed] signal for all the items it covers.
Fn is the Aussom callback.Fn is called with (SectionModel Self, int Position, int N_items).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.sections_changed (int position, int n_items)
This function emits the [signal@Gtk.SectionModel::sections-changed] signal to notify about changes to sections. It must cover all positions that used to be a section start or that are now a section start. It does not have to cover all positions for which the section has changed. The [signal@Gio.ListModel::items-changed] implies the effect of the [signal@Gtk.SectionModel::sections-changed] signal for all the items it covers. It is recommended that when changes to the items cause section changes in a larger range, that the larger range is included in the emission of the [signal@Gio.ListModel::items-changed] instead of emitting two signals.
position is the first changed item.n_items is the number of changed items.None.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.