Class

GioListStore

Description [src]

final class Gio.ListStore : GObject.Object {
  /* No available fields */
}

GListStore is a simple implementation of GListModel 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.

Hierarchy

hierarchy this GListStore implements_0 GListModel this--implements_0 ancestor_0 GObject ancestor_0--this

Ancestors

Implements

Constructors

g_list_store_new

Creates a new GListStore with items of type item_type. item_type must be a subclass of GObject.

Available since: 2.44

Instance methods

g_list_store_append

Appends item to store. item must be of type GListStore:item-type.

Available since: 2.44

g_list_store_find

Looks up the given item in the list store by looping over the items until the first occurrence of item. If item was not found, then position will not be set, and this method will return FALSE.

Available since: 2.64

g_list_store_find_with_equal_func

Looks up the given item in the list store by looping over the items and comparing them with compare_func until the first occurrence of item which matches. If item was not found, then position will not be set, and this method will return FALSE.

Available since: 2.64

g_list_store_insert

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.

Available since: 2.44

g_list_store_insert_sorted

Inserts item into store at a position to be determined by the compare_func.

Available since: 2.44

g_list_store_remove

Removes the item from store that is at position. position must be smaller than the current length of the list.

Available since: 2.44

g_list_store_remove_all

Removes all items from store.

Available since: 2.44

g_list_store_sort

Sort the items in store according to compare_func.

Available since: 2.46

g_list_store_splice

Changes store by removing n_removals items and adding n_additions items to it. additions must contain n_additions items of type GListStore:item-type. NULL is not permitted.

Available since: 2.44

Methods inherited from GObject (43)
Methods inherited from GListModel (5)
g_list_model_get_item

Get the item at position. If position is greater than the number of items in list, NULL is returned.

Available since: 2.44

g_list_model_get_item_type

Gets the type of the items in list. All items returned from g_list_model_get_type() are of that type or a subtype, or are an implementation of that interface.

Available since: 2.44

g_list_model_get_n_items

Gets the number of items in list.

Available since: 2.44

g_list_model_get_object

Get the item at position. If position is greater than the number of items in list, NULL is returned.

Available since: 2.44

g_list_model_items_changed

Emits the GListModel::items-changed signal on list.

Available since: 2.44

Properties

Gio.ListStore:item-type

The type of items contained in this list store. Items must be subclasses of GObject.

Available since: 2.44

Signals

Signals inherited from GObject (1)
Signals inherited from GListModel (1)
Gio.ListModel::items-changed

This signal is emitted whenever items were added to or removed from list. At position, removed items were removed and added items were added in their place.

Available since: 2.44

Class structure

struct GioListStoreClass {
  GObjectClass parent_class;
  
}
Class members
parent_class
GObjectClass
  No description available.