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:
Chris Michael 2015-10-06 10:19:05 -04:00
parent 0b8d2f1f24
commit 25505626ad
2 changed files with 21 additions and 0 deletions

View File

@ -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 */

View File

@ -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;
}