[gtk/getters-and-setters: 2/3] surface: Add a getter for autohide



commit 27b08252aedf7d13f1108d346b09cb288de41273
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Feb 24 08:01:19 2020 -0500

    surface: Add a getter for autohide

 docs/reference/gdk/gdk4-sections.txt |  1 +
 gdk/gdksurface.c                     | 17 +++++++++++++++++
 gdk/gdksurface.h                     |  3 +++
 3 files changed, 21 insertions(+)
---
diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt
index 5aa4e0deed..1a7e81db96 100644
--- a/docs/reference/gdk/gdk4-sections.txt
+++ b/docs/reference/gdk/gdk4-sections.txt
@@ -188,6 +188,7 @@ gdk_surface_is_destroyed
 gdk_surface_is_visible
 gdk_surface_is_viewable
 gdk_surface_get_state
+gdk_surface_get_autohide
 gdk_surface_minimize
 gdk_surface_unminimize
 gdk_surface_stick
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index a9ea5bcffa..480a2ff9c3 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -4183,3 +4183,20 @@ gdk_surface_translate_coordinates (GdkSurface *from,
 
   return TRUE;
 }
+
+/**
+ * gdk_surface_get_autohide:
+ * @surface: a #GdkSurface
+ *
+ * Returns whether this surface is set to hide on outside clicks.
+ *
+ * Returns: %TRUE if @surface will autohide
+ */
+gboolean
+gdk_surface_get_autohide (GdkSurface *surface)
+{
+  g_return_val_if_fail (GDK_IS_SURFACE (surface), FALSE);
+
+  return surface->autohide;
+}
+
diff --git a/gdk/gdksurface.h b/gdk/gdksurface.h
index 52141b1c26..623be33c0d 100644
--- a/gdk/gdksurface.h
+++ b/gdk/gdksurface.h
@@ -408,6 +408,9 @@ gboolean gdk_surface_is_visible     (GdkSurface *surface);
 GDK_AVAILABLE_IN_ALL
 gboolean gdk_surface_is_viewable    (GdkSurface *surface);
 
+GDK_AVAILABLE_IN_ALL
+gboolean      gdk_surface_get_autohide (GdkSurface *surface);
+
 GDK_AVAILABLE_IN_ALL
 GdkSurfaceState gdk_surface_get_state (GdkSurface *surface);
 


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