ListModel.getItem

T getItem(T)(uint position)

Get the item at position and cast to the template type. NOTE: If type is an interface and no known D object is found that the object conforms to, the interface IfaceProxy object will be used. If position is greater than the number of items in list, %NULL is returned. %NULL may be returned if index is smaller than the length of the list, but the object does not conform to the template type. This function is meant to be used by language bindings in place of [Gio.ListModel.getItem]. See also: [Gio.ListModel.getNItems]

Parameters

Ttype to cast the resulting object to (can be an interface type)
positionthe position of the item to fetch

Returns

the object at position.
gobject.object.ObjectWrap getItem(uint position)

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 [gio.list_model.ListModel.getItem].

See also: [gio.list_model.ListModel.getNItems]

Parameters

positionthe position of the item to fetch

Returns

the object at position.