mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 18:30:08 +00:00
subsurface: Add gdk_subsurface_get_sibling
This was just a missing getter. The backend implementation will use this information to determine whether stacking changes.
This commit is contained in:
parent
5c892fa4ea
commit
d563d158c0
@ -286,6 +286,28 @@ gdk_subsurface_is_above_parent (GdkSubsurface *subsurface)
|
||||
return subsurface->above_parent;
|
||||
}
|
||||
|
||||
/*< private>
|
||||
* gdk_subsurface_get_sibling:
|
||||
* @subsurface: the `GdkSubsurface`
|
||||
* @above: whether to get the subsurface above
|
||||
*
|
||||
* Returns the subsurface above (or below) @subsurface in
|
||||
* the stacking order.
|
||||
*
|
||||
* Returns: the sibling, or `NULL` if there is none.
|
||||
*/
|
||||
GdkSubsurface *
|
||||
gdk_subsurface_get_sibling (GdkSubsurface *subsurface,
|
||||
gboolean above)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_SUBSURFACE (subsurface), NULL);
|
||||
|
||||
if (above)
|
||||
return subsurface->sibling_above;
|
||||
else
|
||||
return subsurface->sibling_below;
|
||||
}
|
||||
|
||||
/*< private >
|
||||
* gdk_subsurface_get_transform:
|
||||
* @subsurface: a `GdkSubsurface`
|
||||
|
@ -101,6 +101,8 @@ void gdk_subsurface_get_source_rect (GdkSubsurface *subsu
|
||||
void gdk_subsurface_get_texture_rect (GdkSubsurface *subsurface,
|
||||
graphene_rect_t *rect);
|
||||
gboolean gdk_subsurface_is_above_parent (GdkSubsurface *subsurface);
|
||||
GdkSubsurface * gdk_subsurface_get_sibling (GdkSubsurface *subsurface,
|
||||
gboolean above);
|
||||
GdkTextureTransform
|
||||
gdk_subsurface_get_transform (GdkSubsurface *subsurface);
|
||||
gboolean gdk_subsurface_get_background_rect (GdkSubsurface *subsurface,
|
||||
@ -108,6 +110,5 @@ gboolean gdk_subsurface_get_background_rect (GdkSubsurface *subsu
|
||||
void gdk_subsurface_get_bounds (GdkSubsurface *subsurface,
|
||||
graphene_rect_t *bounds);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user