forked from enlightenment/efl
ecore-wl2: Add API function to return surface id of a window
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
3fe735f0c1
commit
dfffabb224
|
@ -338,6 +338,9 @@ EAPI int ecore_wl2_window_id_get(Ecore_Wl2_Window *window);
|
|||
*/
|
||||
EAPI struct wl_surface *ecore_wl2_window_surface_get(Ecore_Wl2_Window *window);
|
||||
|
||||
/* TODO: doxy */
|
||||
EAPI int ecore_wl2_window_surface_id_get(Ecore_Wl2_Window *window);
|
||||
|
||||
/**
|
||||
* Show a given Ecore_Wl2_Window
|
||||
*
|
||||
|
@ -470,6 +473,7 @@ EAPI void ecore_wl2_window_pointer_set(Ecore_Wl2_Window *window, struct wl_surfa
|
|||
/* TODO: doxy */
|
||||
EAPI void ecore_wl2_window_cursor_from_name_set(Ecore_Wl2_Window *window, const char *cursor);
|
||||
|
||||
|
||||
/* # ifdef __cplusplus */
|
||||
/* } */
|
||||
/* # endif */
|
||||
|
|
|
@ -78,7 +78,7 @@ struct _Ecore_Wl2_Window
|
|||
|
||||
Ecore_Wl2_Window *parent;
|
||||
|
||||
int id, rotation;
|
||||
int id, rotation, surface_id;
|
||||
const char *title;
|
||||
const char *class;
|
||||
const char *cursor;
|
||||
|
|
|
@ -297,11 +297,21 @@ ecore_wl2_window_surface_get(Ecore_Wl2_Window *window)
|
|||
{
|
||||
window->surface =
|
||||
wl_compositor_create_surface(window->display->wl.compositor);
|
||||
|
||||
window->surface_id =
|
||||
wl_proxy_get_id((struct wl_proxy *)window->surface);
|
||||
}
|
||||
|
||||
return window->surface;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
ecore_wl2_window_surface_id_get(Ecore_Wl2_Window *window)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(window, -1);
|
||||
return window->surface_id;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_wl2_window_show(Ecore_Wl2_Window *window)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue