Add gtk_multi_selection_get_model

This getter was missing.
This commit is contained in:
Matthias Clasen 2020-06-30 19:44:17 -04:00
parent f0ea0be15d
commit d0068a036f
3 changed files with 19 additions and 0 deletions

View File

@ -446,6 +446,7 @@ gtk_single_selection_get_type
<TITLE>GtkMultiSeledction</TITLE>
GtkMultiSelection
gtk_multi_selection_new
gtk_multi_selection_get_model
<SUBSECTION Private>
gtk_multi_selection_get_type
</SECTION>

View File

@ -386,3 +386,19 @@ gtk_multi_selection_new (GListModel *model)
"model", model,
NULL);
}
/**
* gtk_multi_selection_get_model:
* @self: a #GtkMultiSelection
*
* Returns the underlying model of @self.
*
* Returns: (transfer none): the underlying model
*/
GListModel *
gtk_multi_selection_get_model (GtkMultiSelection *self)
{
g_return_val_if_fail (GTK_IS_MULTI_SELECTION (self), NULL);
return self->model;
}

View File

@ -33,6 +33,8 @@ G_DECLARE_FINAL_TYPE (GtkMultiSelection, gtk_multi_selection, GTK, MULTI_SELECTI
GDK_AVAILABLE_IN_ALL
GListModel * gtk_multi_selection_new (GListModel *model);
GDK_AVAILABLE_IN_ALL
GListModel * gtk_multi_selection_get_model (GtkMultiSelection *self);
G_END_DECLS