eina_hash_free(ewd->globals);
}
+Ecore_Wl2_Window *
+_ecore_wl2_display_window_surface_find(Ecore_Wl2_Display *display, struct wl_surface *wl_surface)
+{
+ Ecore_Wl2_Window *window;
+
+ if ((!display) || (!wl_surface)) return NULL;
+
+ EINA_INLIST_FOREACH(display->windows, window)
+ {
+ if ((window->surface) &&
+ (window->surface == wl_surface))
+ return window;
+ }
+
+ return NULL;
+}
+
EAPI Ecore_Wl2_Display *
ecore_wl2_display_create(const char *name)
{
Eina_Hash *globals;
+ Eina_Inlist *windows;
Eina_Inlist *outputs;
Eina_Inlist *inputs;
struct _Ecore_Wl2_Window
{
+ EINA_INLIST;
+
Ecore_Wl2_Display *display;
Ecore_Wl2_Window *parent;
} repeat;
};
+Ecore_Wl2_Window *_ecore_wl2_display_window_surface_find(Ecore_Wl2_Display *display, struct wl_surface *wl_surface);
+
void _ecore_wl2_output_add(Ecore_Wl2_Display *display, unsigned int id);
void _ecore_wl2_output_del(Ecore_Wl2_Output *output);
win->type = ECORE_WL2_WINDOW_TYPE_TOPLEVEL;
+ display->windows =
+ eina_inlist_append(display->windows, EINA_INLIST_GET(win));
+
return win;
}
EAPI void
ecore_wl2_window_free(Ecore_Wl2_Window *window)
{
+ Ecore_Wl2_Display *display;
+
EINA_SAFETY_ON_NULL_RETURN(window);
+ display = window->display;
+
/* TODO: reset input pointer and keyboard focus */
/* TODO: delete window anim callback */
/* TODO: destroy subsurfaces */
if (window->title) eina_stringshare_del(window->title);
if (window->class) eina_stringshare_del(window->class);
+ display->windows =
+ eina_inlist_remove(display->windows, EINA_INLIST_GET(window));
+
free(window);
}