Add gdk_surface_get_mapped

Returns the value of the ::mapped property. This is
a direct replacement for gtk_surface_is_visible.
This commit is contained in:
Matthias Clasen 2020-02-24 17:59:12 -05:00
parent 90fb0caf28
commit 96b7c5f575
3 changed files with 21 additions and 0 deletions

View File

@ -187,6 +187,7 @@ gdk_surface_hide
gdk_surface_is_destroyed gdk_surface_is_destroyed
gdk_surface_is_visible gdk_surface_is_visible
gdk_surface_is_viewable gdk_surface_is_viewable
gdk_surface_get_mapped
gdk_surface_get_state gdk_surface_get_state
gdk_surface_get_autohide gdk_surface_get_autohide
gdk_surface_minimize gdk_surface_minimize

View File

@ -1023,6 +1023,23 @@ gdk_surface_get_position (GdkSurface *surface,
} }
} }
/**
* gdk_surface_get_mapped:
* @surface: a #GdkSurface
*
* Checks whether the surface has been mapped (with gdk_surface_show() or
* gdk_surface_show_unraised()).
*
* Returns: %TRUE if the surface is mapped
**/
gboolean
gdk_surface_get_mapped (GdkSurface *surface)
{
g_return_val_if_fail (GDK_IS_SURFACE (surface), FALSE);
return GDK_SURFACE_IS_MAPPED (surface);
}
/** /**
* gdk_surface_is_visible: * gdk_surface_is_visible:
* @surface: a #GdkSurface * @surface: a #GdkSurface

View File

@ -408,6 +408,9 @@ gboolean gdk_surface_is_visible (GdkSurface *surface);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
gboolean gdk_surface_is_viewable (GdkSurface *surface); gboolean gdk_surface_is_viewable (GdkSurface *surface);
GDK_AVAILABLE_IN_ALL
gboolean gdk_surface_get_mapped (GdkSurface *surface);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
gboolean gdk_surface_get_autohide (GdkSurface *surface); gboolean gdk_surface_get_autohide (GdkSurface *surface);