Method

GtkMapListModelset_map_func

Declaration [src]

void
gtk_map_list_model_set_map_func (
  GtkMapListModel* self,
  GtkMapListModelMapFunc map_func,
  gpointer user_data,
  GDestroyNotify user_destroy
)

Description [src]

Sets the function used to map items.

The function will be called whenever an item needs to be mapped and must return the item to use for the given input item.

Note that GtkMapListModel may call this function multiple times on the same item, because it may delete items it doesn’t need anymore.

GTK makes no effort to ensure that map_func conforms to the item type of self. It assumes that the caller knows what they are doing and the map function returns items of the appropriate type.

Parameters

map_func

Type: GtkMapListModelMapFunc

Map function.

The argument can be NULL.
user_data

Type: gpointer

User data passed to map_func.

The argument can be NULL.
The data is owned by the caller of the method.
user_destroy

Type: GDestroyNotify

Destroy notifier for user_data.