[gtk/matthiasc/for-master: 7/7] Add gtk_multi_selection_get_model
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 7/7] Add gtk_multi_selection_get_model
- Date: Wed, 1 Jul 2020 00:47:52 +0000 (UTC)
commit d0068a036f454b5d890efbca92345d38af678d6e
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jun 30 19:44:17 2020 -0400
Add gtk_multi_selection_get_model
This getter was missing.
docs/reference/gtk/gtk4-sections.txt | 1 +
gtk/gtkmultiselection.c | 16 ++++++++++++++++
gtk/gtkmultiselection.h | 2 ++
3 files changed, 19 insertions(+)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index c61d9903d3..5fefc4d1da 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -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>
diff --git a/gtk/gtkmultiselection.c b/gtk/gtkmultiselection.c
index 2610de03c7..e8bd0759ef 100644
--- a/gtk/gtkmultiselection.c
+++ b/gtk/gtkmultiselection.c
@@ -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;
+}
diff --git a/gtk/gtkmultiselection.h b/gtk/gtkmultiselection.h
index 2045e858ed..92074683c0 100644
--- a/gtk/gtkmultiselection.h
+++ b/gtk/gtkmultiselection.h
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]