diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 73ff8b000e..fe49269131 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -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 */ diff --git a/src/lib/ecore_wl2/ecore_wl2_subsurf.c b/src/lib/ecore_wl2/ecore_wl2_subsurf.c index ac8d1830bf..eab1ec630c 100644 --- a/src/lib/ecore_wl2/ecore_wl2_subsurf.c +++ b/src/lib/ecore_wl2/ecore_wl2_subsurf.c @@ -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; +}