[gtk/wip/matthiasc/popup5: 101/234] root: Make gtk_root_get_display public



commit 6b5afbaba202b3287be2500a5dbcdf45c2d539dc
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun May 19 20:35:59 2019 +0000

    root: Make gtk_root_get_display public
    
    This is following the precedent of making
    GtkNative getters public.

 docs/reference/gtk/gtk4-sections.txt | 1 +
 gtk/gtkroot.c                        | 8 ++++++++
 gtk/gtkroot.h                        | 3 +++
 gtk/gtkrootprivate.h                 | 2 --
 4 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index e24dfaf575..e74412357c 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -7111,6 +7111,7 @@ gtk_media_stream_get_type
 <FILE>gtkroot</FILE>
 <TITLE>GtkRoot</TITLE>
 GtkRoot
+gtk_root_get_display
 gtk_root_get_for_surface
 gtk_root_get_focus
 gtk_root_set_focus
diff --git a/gtk/gtkroot.c b/gtk/gtkroot.c
index 95e8f69f26..919aa65f94 100644
--- a/gtk/gtkroot.c
+++ b/gtk/gtkroot.c
@@ -63,6 +63,14 @@ gtk_root_default_init (GtkRootInterface *iface)
                            GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
 }
 
+/**
+ * gtk_root_get_display:
+ * @self: a #GtkRoot
+ *
+ * Returns the display that this GtkRoot is on.
+ *
+ * Returns: (transfer none): the display of @root
+ */
 GdkDisplay *
 gtk_root_get_display (GtkRoot *self)
 {
diff --git a/gtk/gtkroot.h b/gtk/gtkroot.h
index 3136a00911..648defa380 100644
--- a/gtk/gtkroot.h
+++ b/gtk/gtkroot.h
@@ -48,6 +48,9 @@ struct _GtkRootInterface
   GdkDisplay * (* get_display)  (GtkRoot *self);
 };
 
+GDK_AVAILABLE_IN_ALL
+GdkDisplay * gtk_root_get_display (GtkRoot *root);
+
 GDK_AVAILABLE_IN_ALL
 void        gtk_root_set_focus (GtkRoot   *self,
                                 GtkWidget *focus);
diff --git a/gtk/gtkrootprivate.h b/gtk/gtkrootprivate.h
index ddf4fb01ef..3afbae712c 100644
--- a/gtk/gtkrootprivate.h
+++ b/gtk/gtkrootprivate.h
@@ -5,8 +5,6 @@
 
 G_BEGIN_DECLS
 
-GdkDisplay * gtk_root_get_display (GtkRoot *root);
-
 enum {
   GTK_ROOT_PROP_FOCUS_WIDGET,
   GTK_ROOT_NUM_PROPERTIES


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]