summaryrefslogtreecommitdiff
path: root/gtk/gtkicontheme.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-10-03 11:25:35 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-10-03 13:11:20 -0400
commit9fdb71cbd212cf126384d0e6c6f3af66586663e3 (patch)
tree1f3d0dd707a8ca1d9f4a78ab70d3b3cecdae6f89 /gtk/gtkicontheme.c
parentff7bcf738c32b50dfa8f33b61fe48a54350aa610 (diff)
downloadgtk+-9fdb71cbd212cf126384d0e6c6f3af66586663e3.tar.gz
icontheme: Add a missing getter
We want to have a get_display() method on every object that is tied to the display, so add one here.
Diffstat (limited to 'gtk/gtkicontheme.c')
-rw-r--r--gtk/gtkicontheme.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index 49d16d5ca5..cc0cfaa2c5 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -4136,3 +4136,21 @@ gtk_icon_theme_lookup_by_gicon (GtkIconTheme *self,
return icon;
}
+
+/**
+ * gtk_icon_theme_get_display:
+ * @self: a #GtkIconTheme
+ *
+ * Returns the display that the GtkIconTheme object was
+ * created for.
+ *
+ * Returns: (nullable) (transfer none): the display of @icon_theme
+ */
+GdkDisplay *
+gtk_icon_theme_get_display (GtkIconTheme *self)
+{
+ g_return_val_if_fail (GTK_IS_ICON_THEME (self), NULL);
+
+ return self->display;
+}
+