Constructor

Gtk.GridView.new

Declaration [src]

GtkWidget*
gtk_grid_view_new (
  GtkSelectionModel* model,
  GtkListItemFactory* factory
)

Description [src]

Creates a new GtkGridView that uses the given factory for mapping items to widgets.

The function takes ownership of the arguments, so you can write code like

grid_view = gtk_grid_view_new (create_model (),
  gtk_builder_list_item_factory_new_from_resource ("/resource.ui"));

Parameters

model GtkSelectionModel
 

the model to use, or NULL

 Can be NULL
 The called function takes ownership of the data, and is responsible for freeing it
factory GtkListItemFactory
 

The factory to populate items with, or NULL

 Can be NULL
 The called function takes ownership of the data, and is responsible for freeing it

Return value

Returns: GtkWidget

a new GtkGridView using the given model and factory

The data is owned by the called function