MapListModel.setMapFunc

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.

class MapListModel
void
setMapFunc

Parameters

mapFunc GtkMapListModelMapFunc

map function or %NULL to not map items

userData void*

user data passed to @map_func

userDestroy GDestroyNotify

destroy notifier for @user_data

Meta