Basics
Guides
API Reference
Basics
Guides
API Reference
[15:7] extends: object
GListStore is a simple implementation of [iface@Gio.ListModel] that stores
all items in memory. It provides insertions, deletions, and lookups in
logarithmic time with a fast path for the common case of iterating the list
linearly.
ListStore (Handle = null)
Creates a new
ListStoreby 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.append (object item)
Appends @item to @store. @item must be of type #GListStore:item-type. This function takes a ref on @item. Use g_list_store_splice() to append multiple items at the same time efficiently.
item is the new item.None.insert (int position, object item)
Inserts @item into @store at @position. @item must be of type #GListStore:item-type or derived from it. @position must be smaller than the length of the list, or equal to it to append. This function takes a ref on @item. Use g_list_store_splice() to insert multiple items at the same time efficiently.
position is the position at which to insert the new item.item is the new item.None.remove (int position)
Removes the item from @store that is at @position. @position must be smaller than the current length of the list. Use g_list_store_splice() to remove multiple items at the same time efficiently.
position is the position of the item that is to be removed.None.remove_all ()
Removes all items from @store.
None.[161:14] static extends: object
Generated metadata helpers for ListStore class surfaces.
properties ()
Returns property metadata for
ListStore.
A list.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.