summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorCedric Bail <cedric@osg.samsung.com>2017-11-30 09:41:27 -0800
committerCedric Bail <cedric@osg.samsung.com>2017-12-01 00:38:42 -0800
commit2e9e751638b44095f036aace86518f8b185fe29f (patch)
tree33809a5db3e40931432be31cafaedb459c531b1d /src/bin
parent9fac52134c532440a120b512dff1d5bea0a21ddb (diff)
elementary: move to use Eina_Future based timeout.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/elementary/test_events.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/bin/elementary/test_events.c b/src/bin/elementary/test_events.c
index 30831e8329..68477221b0 100644
--- a/src/bin/elementary/test_events.c
+++ b/src/bin/elementary/test_events.c
@@ -13,7 +13,7 @@ typedef struct {
13 Eo *evdown, *evup, *evmove, *evkeydown, *evkeyup; 13 Eo *evdown, *evup, *evmove, *evkeydown, *evkeyup;
14 Eo *win, *button, *text; 14 Eo *win, *button, *text;
15 int id; 15 int id;
16 Efl_Future *f; 16 Eina_Future *f;
17} testdata; 17} testdata;
18 18
19static void 19static void
@@ -68,12 +68,17 @@ _key_down(void *data, const Efl_Event *ev)
68 } 68 }
69} 69}
70 70
71static void 71static Eina_Value
72_ecore_timeout_cb(void *data, const Efl_Event *ev EINA_UNUSED) 72_ecore_timeout_cb(void *data,
73 const Eina_Value t,
74 const Eina_Future *dead EINA_UNUSED)
73{ 75{
74 testdata *td = data; 76 testdata *td = data;
75 77
76 elm_object_text_set(td->text, DEFAULT_TEXT); 78 elm_object_text_set(td->text, DEFAULT_TEXT);
79 td->f = NULL;
80
81 return t;
77} 82}
78 83
79static void 84static void
@@ -87,9 +92,9 @@ _key_up(void *data, const Efl_Event *ev)
87 td->evkeyup = efl_dup(ev->info); 92 td->evkeyup = efl_dup(ev->info);
88 } 93 }
89 94
90 if (td->f) efl_future_cancel(td->f); 95 if (td->f) eina_future_cancel(td->f);
91 efl_future_use(&td->f, efl_loop_timeout(efl_provider_find(ev->object, EFL_LOOP_CLASS), 0.5, NULL)); 96 td->f = efl_loop_Eina_FutureXXX_timeout(efl_provider_find(ev->object, EFL_LOOP_CLASS), 0.5);
92 efl_future_then(td->f, _ecore_timeout_cb, NULL, NULL, td); 97 eina_future_then(td->f, _ecore_timeout_cb, td);
93} 98}
94 99
95static void 100static void