forked from enlightenment/efl
Add function to get a Ecore_Wl_Window from a wl_surface.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
f13a35909b
commit
d7cbc84aa8
|
@ -652,6 +652,17 @@ EAPI struct wl_surface *ecore_wl_window_surface_create(Ecore_Wl_Window *win);
|
||||||
EAPI void ecore_wl_window_alpha_set(Ecore_Wl_Window *win, Eina_Bool alpha);
|
EAPI void ecore_wl_window_alpha_set(Ecore_Wl_Window *win, Eina_Bool alpha);
|
||||||
EAPI Eina_Bool ecore_wl_window_alpha_get(Ecore_Wl_Window *win);
|
EAPI Eina_Bool ecore_wl_window_alpha_get(Ecore_Wl_Window *win);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the Ecore_Wl_Window from a wl_surface
|
||||||
|
*
|
||||||
|
* @param surface The surface for which to find the Ecore_Wl_Window from
|
||||||
|
* @return the Ecore_Wl_Window associated with this surface
|
||||||
|
*
|
||||||
|
* @ingroup Ecore_Wl_Window_Group
|
||||||
|
* @since 1.8
|
||||||
|
*/
|
||||||
|
EAPI Ecore_Wl_Window *ecore_wl_window_surface_find(struct wl_surface *surface);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -253,7 +253,6 @@ ecore_wl_window_surface_create(Ecore_Wl_Window *win)
|
||||||
if (win->surface) return NULL;
|
if (win->surface) return NULL;
|
||||||
|
|
||||||
win->surface = wl_compositor_create_surface(_ecore_wl_disp->wl.compositor);
|
win->surface = wl_compositor_create_surface(_ecore_wl_disp->wl.compositor);
|
||||||
wl_surface_set_user_data(win->surface, win);
|
|
||||||
return win->surface;
|
return win->surface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -466,6 +465,7 @@ EAPI void
|
||||||
ecore_wl_window_update_size(Ecore_Wl_Window *win, int w, int h)
|
ecore_wl_window_update_size(Ecore_Wl_Window *win, int w, int h)
|
||||||
{
|
{
|
||||||
struct wl_region *opaque = NULL;
|
struct wl_region *opaque = NULL;
|
||||||
|
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
if (!win) return;
|
if (!win) return;
|
||||||
|
@ -581,6 +581,28 @@ ecore_wl_window_parent_set(Ecore_Wl_Window *win, Ecore_Wl_Window *parent)
|
||||||
win->parent = parent;
|
win->parent = parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI Ecore_Wl_Window *
|
||||||
|
ecore_wl_window_surface_find(struct wl_surface *surface)
|
||||||
|
{
|
||||||
|
Eina_Iterator *itr;
|
||||||
|
Ecore_Wl_Window *win = NULL;
|
||||||
|
void *data;
|
||||||
|
|
||||||
|
itr = eina_hash_iterator_data_new(_windows);
|
||||||
|
while (eina_iterator_next(itr, &data))
|
||||||
|
{
|
||||||
|
if (((Ecore_Wl_Window *)data)->surface == surface)
|
||||||
|
{
|
||||||
|
win = data;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
eina_iterator_free(itr);
|
||||||
|
|
||||||
|
return win;
|
||||||
|
}
|
||||||
|
|
||||||
/* local functions */
|
/* local functions */
|
||||||
static void
|
static void
|
||||||
_ecore_wl_window_cb_ping(void *data EINA_UNUSED, struct wl_shell_surface *shell_surface, unsigned int serial)
|
_ecore_wl_window_cb_ping(void *data EINA_UNUSED, struct wl_shell_surface *shell_surface, unsigned int serial)
|
||||||
|
|
Loading…
Reference in New Issue