summaryrefslogtreecommitdiff
path: root/src/bin/elementary
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-12-11 13:16:47 -0800
committerCedric BAIL <cedric@osg.samsung.com>2017-12-11 14:04:09 -0800
commit15daf4b3e4370c124b73db5f3c2bd623bc6d3606 (patch)
treed5a2ee418f6c082821490f5dd4202bcba26fa315 /src/bin/elementary
parent0cb8bde34a4b657edba42d23a9aefa9491b4ad1e (diff)
elementary: use the Eina_Future based job.
Diffstat (limited to 'src/bin/elementary')
-rw-r--r--src/bin/elementary/test_gfx_filters.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/bin/elementary/test_gfx_filters.c b/src/bin/elementary/test_gfx_filters.c
index 7ba101da8a..02de4268d9 100644
--- a/src/bin/elementary/test_gfx_filters.c
+++ b/src/bin/elementary/test_gfx_filters.c
@@ -199,8 +199,9 @@ _spinner_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUS
199 } 199 }
200} 200}
201 201
202static void 202static Eina_Value
203_code_changed(void *data, const Efl_Event *ev EINA_UNUSED) 203_code_changed(void *data, const Eina_Value v,
204 const Eina_Future *dead EINA_UNUSED)
204{ 205{
205 Eo *win = data; 206 Eo *win = data;
206 Eo *code, *spinner; 207 Eo *code, *spinner;
@@ -227,13 +228,18 @@ _code_changed(void *data, const Efl_Event *ev EINA_UNUSED)
227 elm_spinner_value_set(spinner, 0); 228 elm_spinner_value_set(spinner, 0);
228 _filter_apply(win, source, elm_spinner_special_value_get(spinner, 0)); 229 _filter_apply(win, source, elm_spinner_special_value_get(spinner, 0));
229 eina_strbuf_free(buf); 230 eina_strbuf_free(buf);
231
232 return v;
230} 233}
231 234
232static void 235static void
233_code_changed_hack(void *data, const Efl_Event *ev EINA_UNUSED) 236_code_changed_hack(void *data, const Efl_Event *ev EINA_UNUSED)
234{ 237{
235 Efl_Future *p = efl_loop_job(efl_loop_get(data), NULL); 238 Eina_Future *f;
236 efl_future_then(p, _code_changed, NULL, NULL, data); 239
240 f = eina_future_then(efl_loop_Eina_FutureXXX_job(efl_loop_get(data)),
241 _code_changed, data);
242 efl_future_Eina_FutureXXX_then(data, f);
237} 243}
238 244
239static void 245static void
@@ -510,7 +516,7 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
510 o = code = efl_add(EFL_UI_TEXT_EDITABLE_CLASS, win, 516 o = code = efl_add(EFL_UI_TEXT_EDITABLE_CLASS, win,
511 efl_ui_text_scrollable_set(efl_added, 1), 517 efl_ui_text_scrollable_set(efl_added, 1),
512 efl_text_multiline_set(efl_added, 1)); 518 efl_text_multiline_set(efl_added, 1));
513 efl_event_callback_add(o, EFL_UI_TEXT_EVENT_CHANGED_USER, _code_changed, win); 519 efl_event_callback_add(o, EFL_UI_TEXT_EVENT_CHANGED_USER, _code_changed_hack, win);
514 520
515 // Insert filter code inside style string: DEFAULT='blah blah <here>' 521 // Insert filter code inside style string: DEFAULT='blah blah <here>'
516 efl_gfx_filter_program_set(o, code_filter, "code"); 522 efl_gfx_filter_program_set(o, code_filter, "code");