Function

GtkListBoxCreateWidgetFunc

since: 3.16

Declaration

GtkWidget*
(* GtkListBoxCreateWidgetFunc) (
  GObject* item,
  gpointer user_data
)

Description [src]

Called for list boxes that are bound to a GListModel with gtk_list_box_bind_model() for each item that gets added to the model.

Versions of GTK+ prior to 3.18 called gtk_widget_show_all() on the rows created by the GtkListBoxCreateWidgetFunc, but this forced all widgets inside the row to be shown, and is no longer the case. Applications should be updated to show the desired row widgets.

Available since: 3.16

Parameters

item

Type: GObject

The item from the model for which to create a widget for.

The data is owned by the caller of the function.
user_data

Type: gpointer

User data.

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

Return value

Type: GtkWidget

A GtkWidget that represents item.

The caller of the function takes ownership of the data, and is responsible for freeing it.