ecore-wl2: Add API function to return the wl_surface of a subsurface

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-10-06 10:14:06 -04:00
parent ed8287bdba
commit 32bb1237c6
2 changed files with 20 additions and 1 deletions

View File

@ -593,12 +593,23 @@ EAPI Ecore_Wl2_Subsurface *ecore_wl2_subsurface_new(Ecore_Wl2_Window *window);
/**
* Destroy the given subsurface, as well as the surface associated with it.
*
* @param ess the subsurface
* @param subsurface the subsurface
*
* @ingroup Ecore_Wl2_Subsurface_Group
*/
EAPI void ecore_wl2_subsurface_del(Ecore_Wl2_Subsurface *subsurface);
/**
* Get the wl_surface for this subsurface
*
* @param subsurface the subsurface
*
* @return the wl_surface associated with this subsurface, or NULL on failure
*
* @ingroup Ecore_Wl2_Subsurface_Group
*/
EAPI struct wl_surface *ecore_wl2_subsurface_surface_get(Ecore_Wl2_Subsurface *subsurface);
/* # ifdef __cplusplus */
/* } */
/* # endif */

View File

@ -77,3 +77,11 @@ ecore_wl2_subsurface_del(Ecore_Wl2_Subsurface *subsurface)
_ecore_wl2_subsurf_free(subsurface);
}
EAPI struct wl_surface *
ecore_wl2_subsurface_surface_get(Ecore_Wl2_Subsurface *subsurface)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(subsurface, NULL);
return subsurface->wl.surface;
}