forked from enlightenment/efl
ecore-wl2: Add API function to get the position of a subsurface
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
0b8d2f1f24
commit
25505626ad
|
@ -623,6 +623,18 @@ EAPI struct wl_surface *ecore_wl2_subsurface_surface_get(Ecore_Wl2_Subsurface *s
|
|||
*/
|
||||
EAPI void ecore_wl2_subsurface_position_set(Ecore_Wl2_Subsurface *subsurface, int x, int y);
|
||||
|
||||
/**
|
||||
* Get the position of this subsurface, relative to its parent surface.
|
||||
* Coordinates will be returned in x and y if non-NULL.
|
||||
*
|
||||
* @param subsurface the subsurface
|
||||
* @param x coordinate in the parent surface, or NULL to ignore
|
||||
* @param y coordinate in the parent surface, or NULL to ignore
|
||||
*
|
||||
* @ingroup Ecore_Wl2_Subsurface_Group
|
||||
*/
|
||||
EAPI void ecore_wl2_subsurface_position_get(Ecore_Wl2_Subsurface *subsurface, int *x, int *y);
|
||||
|
||||
/* # ifdef __cplusplus */
|
||||
/* } */
|
||||
/* # endif */
|
||||
|
|
|
@ -99,3 +99,12 @@ ecore_wl2_subsurface_position_set(Ecore_Wl2_Subsurface *subsurface, int x, int y
|
|||
|
||||
wl_subsurface_set_position(subsurface->wl.subsurface, x, y);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_wl2_subsurface_position_get(Ecore_Wl2_Subsurface *subsurface, int *x, int *y)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN(subsurface);
|
||||
|
||||
if (x) *x = subsurface->x;
|
||||
if (y) *y = subsurface->y;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue