struct wl_global *global;
Eina_Hash *viewports;
struct wl_listener display_destroy;
+ struct wl_list link;
} E_Video_Shell;
typedef enum
static const char *e_video_surface_role_name = "wtz_video_surface";
static Eina_Bool border_enabled = EINA_FALSE;
-static Eina_List *shells;
+static struct wl_list shells = {NULL, };
static void _source_viewport_destroyed(E_Video_Viewport_Source *source);
static void _source_viewport_committed(E_Video_Viewport_Source *source);
{
VS_INF("SHELL %p| Free", shell);
- shells = eina_list_remove(shells, shell);
eina_hash_free(shell->viewports);
+ wl_list_remove(&shell->link);
free(shell);
}
shell->display_destroy.notify = _video_shell_cb_display_destroy;
wl_display_add_destroy_listener(display, &shell->display_destroy);
- shells = eina_list_append(shells, shell);
+ if (shells.prev == NULL)
+ wl_list_init(&shells);
+ wl_list_insert(&shells, &shell->link);
VS_INF("SHELL %p| Created", shell);
E_Video_Shell *shell;
E_Video_Viewport *viewport;
Eina_Iterator *itr;
- Eina_List *l;
- EINA_LIST_FOREACH(shells, l, shell)
+ wl_list_for_each(shell, &shells, link)
{
itr = eina_hash_iterator_data_new(shell->viewports);
EINA_ITERATOR_FOREACH(itr, viewport)
{
E_Video_Shell *shell;
E_Video_Viewport *viewport;
- Eina_List *l;
Eina_Iterator *itr;
FILE *fp;
char *ret;
if (!fp)
return NULL;
- EINA_LIST_FOREACH(shells, l, shell)
+ wl_list_for_each(shell, &shells, link)
{
fprintf(fp, "Vidoe shell %d exported viewport list:\n", ++shell_count);