devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7fe8a28aca6aebaa038134baa7ea6904c364ada3
commit 7fe8a28aca6aebaa038134baa7ea6904c364ada3 Author: Chris Michael <cp.mich...@samsung.com> Date: Thu Aug 20 14:12:18 2015 -0400 ecore-wl2: Add function to create/get a wl_surface for a window Signed-off-by: Chris Michael <cp.mich...@samsung.com> --- src/lib/ecore_wl2/Ecore_Wl2.h | 13 +++++++++++++ src/lib/ecore_wl2/ecore_wl2_window.c | 16 +++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index c337b0c..0ac9c7f 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -240,9 +240,22 @@ EAPI Ecore_Wl2_Window *ecore_wl2_window_new(Ecore_Wl2_Display *display, Ecore_Wl * @param window The Ecore_Wl2_Window of which to retrieve the window id * * @return The id associated with this window + * + * @ingroup Ecore_Wl2_Window_Group */ EAPI int ecore_wl2_window_id_get(Ecore_Wl2_Window *window); +/** + * Get the wl_surface which belongs to this window + * + * @param window The Ecore_Wl2_Window to get the surface of + * + * @return The wl_surface associated with this window. + * + * @ingroup Ecore_Wl2_Window_Group + */ +EAPI struct wl_surface *ecore_wl2_window_surface_get(Ecore_Wl2_Window *window); + /* # ifdef __cplusplus */ /* } */ /* # endif */ diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 7bd7255..f0b96f7 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -34,5 +34,19 @@ EAPI int ecore_wl2_window_id_get(Ecore_Wl2_Window *window) { EINA_SAFETY_ON_NULL_RETURN_VAL(window, -1); - return win->id; + return window->id; +} + +EAPI struct wl_surface * +ecore_wl2_window_surface_get(Ecore_Wl2_Window *window) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(window, NULL); + + if (!window->surface) + { + window->surface = + wl_compositor_create_surface(window->display->wl.compositor); + } + + return window->surface; } --