### Function

# Gtk TreeListModelCreateModelFunc

#### Declaration

    GListModel*
    TreeListModelCreateModelFunc (
      GObject* item,
      gpointer user_data
    )

#### Description [src]

Prototype of the function called to create new child models when gtk_tree_list_row_set_expanded() is called.

This function can return `NULL` to indicate that `item` is guaranteed to be a leaf node and will never have children. If it does not have children but may get children later, it should return an empty model that is filled once children arrive.

#### Parameters

`item` | `GObject*`
| The item that is being expanded.
| The data is owned by the caller of the function.
`user_data` | `gpointer`
| User data passed when registering the function.

#### Return value

Returns: | `GListModel*`
| The model tracking the children of `item` or `NULL` if `item` can never have children.
| The caller of the function takes ownership of the data, and is responsible for freeing it.
| The return value can be `NULL`.