Basics
Guides
API Reference
Basics
Guides
API Reference
[213:7] extends: object
Generated low-level callback wrapper for GIR callback changed.
SorterChangedCallback (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, change, 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.
[25:7] extends: object
Describes sorting criteria for a [class@Gtk.SortListModel]. Its primary user
is [class@Gtk.SortListModel] The model will use a sorter to determine the
order in which its items should appear by calling [method@Gtk.Sorter.compare]
for pairs of items. Sorters may change their sorting behavior through their
lifetime. In that case, they will emit the [signal@Gtk.Sorter::changed]
signal to notify that the sort order is no longer valid and should be updated
by calling gtk_sorter_compare() again. GTK provides various pre-made sorter
implementations for common sorting operations. [class@Gtk.ColumnView] has
built-in support for sorting lists via the
[property@Gtk.ColumnViewColumn:sorter] property, where the user can change
the sorting by clicking on list headers. Of course, in particular for large
lists, it is also possible to subclass GtkSorter and provide one's own
sorter.
Sorter (Handle = null)
Creates a new
Sorterby 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 whenever the sorter changed. Users of the sorter should then update the sort order again via gtk_sorter_compare(). [class@Gtk.SortListModel] handles this signal automatically. Depending on the @change parameter, it may be possible to update the sort order without a full resorting. Refer to the [enum@Gtk.SorterChange] documentation for details.
Fn is the Aussom callback.Fn is called with (Sorter Self, string Change).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.changed (string change)
Notifies all users of the sorter that it has changed. This emits the [signal@Gtk.Sorter::changed] signal. Users of the sorter should then update the sort order via [method@Gtk.Sorter.compare]. Depending on the
parameter, it may be possible to update the sort order without a full resorting. Refer to the [enum@Gtk.SorterChange] documentation for details. This function is intended for implementers of GtkSorter subclasses and should not be called from other functions.change is How the sorter changed.None.compare (object item1, object item2)
Compares two given items according to the sort order implemented by the sorter. Sorters implement a partial order: * It is reflexive, ie a = a * It is antisymmetric, ie if a < b and b < a, then a = b * It is transitive, ie given any 3 items with a ≤ b and b ≤ c, then a ≤ c The sorter may signal it conforms to additional constraints via the return value of [method@Gtk.Sorter.get_order].
item1 is first item to compare.item2 is second item to compare.get_order ()
Gets the order that @self conforms to. See [enum@Gtk.SorterOrder] for details of the possible return values. This function is intended to allow optimizations.
[284:14] static extends: object
Generated metadata helpers for Sorter class surfaces.
signals ()
Returns signal metadata for
Sorter.
A list.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.