forked from enlightenment/efl
ecore-wl2: Add function to create/get a wl_surface for a window
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
167e8d074b
commit
7fe8a28aca
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue