Basics
Guides
API Reference
Basics
Guides
API Reference
[211:14] static extends: object
Generated metadata helpers for MapListModel class surfaces.
properties ()
Returns property metadata for
MapListModel.
A list.[22:7] extends: object
A list model that maps the items in another model to different items.
GtkMapListModel uses a [callback@Gtk.MapListModelMapFunc]. Example: Create
a list of GtkEventControllers c static gpointer map_to_controllers (gpointer widget, gpointer data) { gpointer result = gtk_widget_observe_controllers (widget); g_object_unref (widget); return result; } widgets = gtk_widget_observe_children (widget); controllers = gtk_map_list_model_new (widgets, map_to_controllers, NULL, NULL); model = gtk_flatten_list_model_new (GTK_TYPE_EVENT_CONTROLLER, controllers);
GtkMapListModel will attempt to discard the mapped objects as soon as they
are no longer needed and recreate them if necessary. GtkMapListModel passes
through sections from the underlying model.
MapListModel (Handle = null)
Creates a new
MapListModelby 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.asListModel ()
Wraps this handle as
ListModel.
A ListModel object.asSectionModel ()
Wraps this handle as
SectionModel.
A SectionModel object.getProperty (string Name)
Reads one generated property by name.
setProperty (string Name, Value)
Writes one generated property by name.
setModel (object Value)
The model being mapped.
Value is the new property value.None.get_model ()
Gets the model that is currently being mapped or %NULL if none.
has_map ()
Checks if a map function is currently set on @self.
set_model (object model)
Sets the model to be mapped. GTK makes no effort to ensure that @model conforms to the item type expected by the map function. It assumes that the caller knows what they are doing and have set up an appropriate map function.
model is The model to be mapped.None.model ()
Returns
get_modelas an Aussom list of wrapper objects. This companion method materializes the full collection up front; useget_model()when lazy or change-notify access is required.
An Aussom list of elements.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.