Method

GioListModelget_object

since: 2.44

Declaration

GObject*
g_list_model_get_object (
  GListModel* list,
  guint position
)

Description

Get the item at position.

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

NULL is never returned for an index that is smaller than the length of the list.

This function is meant to be used by language bindings in place of g_list_model_get_item().

See also: g_list_model_get_n_items()

Available since: 2.44

This method is renamed to g_list_model_get_item() in language bindings

Parameters

position

Type: guint

The position of the item to fetch.

Return value

Type: GObject

The object at position.

The caller of the method takes ownership of the data, and is responsible for freeing it.
The return value can be NULL.