summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRafael Antognolli <rafael.antognolli@intel.com>2013-11-04 14:18:39 -0200
committerRafael Antognolli <rafael.antognolli@intel.com>2013-11-04 14:18:39 -0200
commitd1a9314cddfb21763ca2d8a66a5ad7b12f82cd6e (patch)
treef56b3efe127387c639e87c998f95eb52a45a622e /src
parent18ef47c173205e24a076e2d78ff3ade0efe6a5de (diff)
ecore/wayland: Use eina_inlist instead of wl_list for outputs too.
Diffstat (limited to 'src')
-rw-r--r--src/lib/ecore_wayland/Ecore_Wayland.h2
-rw-r--r--src/lib/ecore_wayland/ecore_wl.c5
-rw-r--r--src/lib/ecore_wayland/ecore_wl_output.c9
-rw-r--r--src/lib/ecore_wayland/ecore_wl_private.h4
4 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/ecore_wayland/Ecore_Wayland.h b/src/lib/ecore_wayland/Ecore_Wayland.h
index 9c371a0b2a..f0bdf880db 100644
--- a/src/lib/ecore_wayland/Ecore_Wayland.h
+++ b/src/lib/ecore_wayland/Ecore_Wayland.h
@@ -403,7 +403,7 @@ EAPI void ecore_wl_input_cursor_from_name_set(Ecore_Wl_Input *input, const char
403EAPI void ecore_wl_input_cursor_default_restore(Ecore_Wl_Input *input); 403EAPI void ecore_wl_input_cursor_default_restore(Ecore_Wl_Input *input);
404EAPI struct wl_seat *ecore_wl_input_seat_get(Ecore_Wl_Input *input); 404EAPI struct wl_seat *ecore_wl_input_seat_get(Ecore_Wl_Input *input);
405 405
406EAPI struct wl_list *ecore_wl_outputs_get(void); 406EAPI Eina_Inlist *ecore_wl_outputs_get(void);
407 407
408/** 408/**
409 * Retrieves the Wayland Globals Interface list used for the current Wayland connection. 409 * Retrieves the Wayland Globals Interface list used for the current Wayland connection.
diff --git a/src/lib/ecore_wayland/ecore_wl.c b/src/lib/ecore_wayland/ecore_wl.c
index 2d5593ccb3..bd68d4ed76 100644
--- a/src/lib/ecore_wayland/ecore_wl.c
+++ b/src/lib/ecore_wayland/ecore_wl.c
@@ -181,7 +181,6 @@ ecore_wl_init(const char *name)
181 ecore_idle_enterer_add(_ecore_wl_cb_idle_enterer, _ecore_wl_disp); 181 ecore_idle_enterer_add(_ecore_wl_cb_idle_enterer, _ecore_wl_disp);
182 182
183 wl_list_init(&_ecore_wl_disp->inputs); 183 wl_list_init(&_ecore_wl_disp->inputs);
184 wl_list_init(&_ecore_wl_disp->outputs);
185 184
186 _ecore_wl_disp->wl.registry = 185 _ecore_wl_disp->wl.registry =
187 wl_display_get_registry(_ecore_wl_disp->wl.display); 186 wl_display_get_registry(_ecore_wl_disp->wl.display);
@@ -426,12 +425,12 @@ _ecore_wl_shutdown(Eina_Bool close)
426 425
427 if ((close) && (!_ecore_wl_fatal_error)) 426 if ((close) && (!_ecore_wl_fatal_error))
428 { 427 {
429 Ecore_Wl_Output *out, *tout; 428 Ecore_Wl_Output *out;
430 Ecore_Wl_Input *in, *tin; 429 Ecore_Wl_Input *in, *tin;
431 Ecore_Wl_Global *global; 430 Ecore_Wl_Global *global;
432 Eina_Inlist *tmp; 431 Eina_Inlist *tmp;
433 432
434 wl_list_for_each_safe(out, tout, &_ecore_wl_disp->outputs, link) 433 EINA_INLIST_FOREACH_SAFE(_ecore_wl_disp->outputs, tmp, out)
435 _ecore_wl_output_del(out); 434 _ecore_wl_output_del(out);
436 435
437 wl_list_for_each_safe(in, tin, &_ecore_wl_disp->inputs, link) 436 wl_list_for_each_safe(in, tin, &_ecore_wl_disp->inputs, link)
diff --git a/src/lib/ecore_wayland/ecore_wl_output.c b/src/lib/ecore_wayland/ecore_wl_output.c
index c10383ec5e..b5a75b73c7 100644
--- a/src/lib/ecore_wayland/ecore_wl_output.c
+++ b/src/lib/ecore_wayland/ecore_wl_output.c
@@ -20,10 +20,10 @@ static const struct wl_output_listener _ecore_wl_output_listener =
20}; 20};
21 21
22/* @since 1.2 */ 22/* @since 1.2 */
23EAPI struct wl_list * 23EAPI Eina_Inlist *
24ecore_wl_outputs_get(void) 24ecore_wl_outputs_get(void)
25{ 25{
26 return &(_ecore_wl_disp->outputs); 26 return _ecore_wl_disp->outputs;
27} 27}
28 28
29void 29void
@@ -42,7 +42,7 @@ _ecore_wl_output_add(Ecore_Wl_Display *ewd, unsigned int id)
42 output->output = 42 output->output =
43 wl_registry_bind(ewd->wl.registry, id, &wl_output_interface, 2); 43 wl_registry_bind(ewd->wl.registry, id, &wl_output_interface, 2);
44 44
45 wl_list_insert(ewd->outputs.prev, &output->link); 45 ewd->outputs = eina_inlist_append(ewd->outputs, EINA_INLIST_GET(output));
46 wl_output_add_listener(output->output, &_ecore_wl_output_listener, output); 46 wl_output_add_listener(output->output, &_ecore_wl_output_listener, output);
47} 47}
48 48
@@ -52,7 +52,8 @@ _ecore_wl_output_del(Ecore_Wl_Output *output)
52 if (!output) return; 52 if (!output) return;
53 if (output->destroy) (*output->destroy)(output, output->data); 53 if (output->destroy) (*output->destroy)(output, output->data);
54 if (output->output) wl_output_destroy(output->output); 54 if (output->output) wl_output_destroy(output->output);
55 wl_list_remove(&output->link); 55 _ecore_wl_disp->outputs = eina_inlist_remove
56 (_ecore_wl_disp->outputs, EINA_INLIST_GET(output));
56 free(output); 57 free(output);
57} 58}
58 59
diff --git a/src/lib/ecore_wayland/ecore_wl_private.h b/src/lib/ecore_wayland/ecore_wl_private.h
index 0127b448f8..e1ac6126bd 100644
--- a/src/lib/ecore_wayland/ecore_wl_private.h
+++ b/src/lib/ecore_wayland/ecore_wl_private.h
@@ -73,7 +73,7 @@ struct _Ecore_Wl_Display
73 Ecore_Idle_Enterer *idle_enterer; 73 Ecore_Idle_Enterer *idle_enterer;
74 74
75 struct wl_list inputs; 75 struct wl_list inputs;
76 struct wl_list outputs; 76 Eina_Inlist *outputs;
77 Eina_Inlist *globals; /** @since 1.7.6 */ 77 Eina_Inlist *globals; /** @since 1.7.6 */
78 78
79 Eina_Bool init_done; 79 Eina_Bool init_done;
@@ -204,12 +204,12 @@ struct _Ecore_Wl_Input
204 204
205struct _Ecore_Wl_Output 205struct _Ecore_Wl_Output
206{ 206{
207 EINA_INLIST;
207 Ecore_Wl_Display *display; 208 Ecore_Wl_Display *display;
208 struct wl_output *output; 209 struct wl_output *output;
209 Eina_Rectangle allocation; 210 Eina_Rectangle allocation;
210 int mw, mh; 211 int mw, mh;
211 int transform; 212 int transform;
212 struct wl_list link;
213 213
214 void (*destroy) (Ecore_Wl_Output *output, void *data); 214 void (*destroy) (Ecore_Wl_Output *output, void *data);
215 void *data; 215 void *data;