summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2014-03-24 07:47:52 +0200
committerDaniel Zaoui <daniel.zaoui@samsung.com>2014-03-24 08:14:30 +0200
commit260308be68254a3b13ad38246f26d7eed96f576a (patch)
tree52cd0718ccd5fda19a646aceb0b2370f191e4703 /src
parent4092dc6277b3c8b79034d4e80ec35631450d5f3d (diff)
Eolian: Integration of Ecore Timer
Diffstat (limited to 'src')
-rw-r--r--src/Makefile_Ecore.am14
-rw-r--r--src/lib/ecore/Ecore_Eo.h4
-rw-r--r--src/lib/ecore/Ecore_Legacy.h4
-rw-r--r--src/lib/ecore/ecore_anim.c2
-rw-r--r--src/lib/ecore/ecore_private.h2
-rw-r--r--src/lib/ecore/ecore_timer.c293
-rw-r--r--src/lib/ecore/ecore_timer.eo58
7 files changed, 170 insertions, 207 deletions
diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am
index dc2a3ca..df2d49a 100644
--- a/src/Makefile_Ecore.am
+++ b/src/Makefile_Ecore.am
@@ -1,6 +1,17 @@
1 1
2### Library 2### Library
3 3
4BUILT_SOURCES += \
5 lib/ecore/ecore_timer.eo.c \
6 lib/ecore/ecore_timer.eo.h
7
8ecoreeolianfilesdir = $(datadir)/eolian/include/ecore-@VMAJ@
9ecoreeolianfiles_DATA = \
10 lib/ecore/ecore_timer.eo
11
12EXTRA_DIST += \
13 ${ecoreeolianfiles_DATA}
14
4lib_LTLIBRARIES += lib/ecore/libecore.la 15lib_LTLIBRARIES += lib/ecore/libecore.la
5 16
6installed_ecoremainheadersdir = $(includedir)/ecore-@VMAJ@ 17installed_ecoremainheadersdir = $(includedir)/ecore-@VMAJ@
@@ -11,6 +22,9 @@ lib/ecore/Ecore_Legacy.h \
11lib/ecore/Ecore_Eo.h \ 22lib/ecore/Ecore_Eo.h \
12lib/ecore/Ecore_Getopt.h 23lib/ecore/Ecore_Getopt.h
13 24
25nodist_installed_ecoremainheaders_DATA = \
26 lib/ecore/ecore_timer.eo.h
27
14lib_ecore_libecore_la_SOURCES = \ 28lib_ecore_libecore_la_SOURCES = \
15lib/ecore/ecore.c \ 29lib/ecore/ecore.c \
16lib/ecore/ecore_alloc.c \ 30lib/ecore/ecore_alloc.c \
diff --git a/src/lib/ecore/Ecore_Eo.h b/src/lib/ecore/Ecore_Eo.h
index 0daf06a..f12121c 100644
--- a/src/lib/ecore/Ecore_Eo.h
+++ b/src/lib/ecore/Ecore_Eo.h
@@ -121,6 +121,8 @@ enum
121 * 121 *
122 * @{ 122 * @{
123 */ 123 */
124#include "ecore_timer.eo.h"
125#if 0
124 126
125#define ECORE_TIMER_CLASS ecore_timer_class_get() 127#define ECORE_TIMER_CLASS ecore_timer_class_get()
126const Eo_Class *ecore_timer_class_get(void) EINA_CONST; 128const Eo_Class *ecore_timer_class_get(void) EINA_CONST;
@@ -223,7 +225,7 @@ enum
223 * @see ecore_timer_pending_get 225 * @see ecore_timer_pending_get
224 */ 226 */
225#define ecore_obj_timer_pending_get(ret) ECORE_TIMER_ID(ECORE_TIMER_SUB_ID_PENDING_GET), EO_TYPECHECK(double *, ret) 227#define ecore_obj_timer_pending_get(ret) ECORE_TIMER_ID(ECORE_TIMER_SUB_ID_PENDING_GET), EO_TYPECHECK(double *, ret)
226 228#endif
227/** 229/**
228 * @} 230 * @}
229 */ 231 */
diff --git a/src/lib/ecore/Ecore_Legacy.h b/src/lib/ecore/Ecore_Legacy.h
index f1a73c1..c7bbed7 100644
--- a/src/lib/ecore/Ecore_Legacy.h
+++ b/src/lib/ecore/Ecore_Legacy.h
@@ -177,13 +177,13 @@ EAPI Ecore_Timer *ecore_timer_add(double in, Ecore_Task_Cb func, const void *dat
177EAPI Ecore_Timer *ecore_timer_loop_add(double in, Ecore_Task_Cb func, const void *data); 177EAPI Ecore_Timer *ecore_timer_loop_add(double in, Ecore_Task_Cb func, const void *data);
178EAPI void *ecore_timer_del(Ecore_Timer *timer); 178EAPI void *ecore_timer_del(Ecore_Timer *timer);
179EAPI void ecore_timer_interval_set(Ecore_Timer *timer, double in); 179EAPI void ecore_timer_interval_set(Ecore_Timer *timer, double in);
180EAPI double ecore_timer_interval_get(Ecore_Timer *timer); 180EAPI double ecore_timer_interval_get(const Ecore_Timer *timer);
181EAPI void ecore_timer_freeze(Ecore_Timer *timer); 181EAPI void ecore_timer_freeze(Ecore_Timer *timer);
182EAPI Eina_Bool ecore_timer_freeze_get(Ecore_Timer *timer); 182EAPI Eina_Bool ecore_timer_freeze_get(Ecore_Timer *timer);
183EAPI void ecore_timer_thaw(Ecore_Timer *timer); 183EAPI void ecore_timer_thaw(Ecore_Timer *timer);
184EAPI void ecore_timer_delay(Ecore_Timer *timer, double add); 184EAPI void ecore_timer_delay(Ecore_Timer *timer, double add);
185EAPI void ecore_timer_reset(Ecore_Timer *timer); 185EAPI void ecore_timer_reset(Ecore_Timer *timer);
186EAPI double ecore_timer_pending_get(Ecore_Timer *timer); 186EAPI double ecore_timer_pending_get(const Ecore_Timer *timer);
187/** 187/**
188 * @} 188 * @}
189 */ 189 */
diff --git a/src/lib/ecore/ecore_anim.c b/src/lib/ecore/ecore_anim.c
index 2bdd8d1..3a7323c 100644
--- a/src/lib/ecore/ecore_anim.c
+++ b/src/lib/ecore/ecore_anim.c
@@ -71,7 +71,7 @@ _begin_tick(void)
71 71
72 timer = _ecore_timer_loop_add(animators_frametime, 72 timer = _ecore_timer_loop_add(animators_frametime,
73 _ecore_animator, NULL); 73 _ecore_animator, NULL);
74 _ecore_timer_delay(timer, d); 74 _ecore_timer_util_delay(timer, d);
75 } 75 }
76 break; 76 break;
77 77
diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h
index 7be334c..4912d53 100644
--- a/src/lib/ecore/ecore_private.h
+++ b/src/lib/ecore/ecore_private.h
@@ -128,7 +128,7 @@ Ecore_Timer *_ecore_timer_loop_add(double in,
128 Ecore_Task_Cb func, 128 Ecore_Task_Cb func,
129 const void *data); 129 const void *data);
130void *_ecore_timer_del(Ecore_Timer *timer); 130void *_ecore_timer_del(Ecore_Timer *timer);
131void _ecore_timer_delay(Ecore_Timer *timer, 131void _ecore_timer_util_delay(Ecore_Timer *timer,
132 double add); 132 double add);
133void _ecore_timer_shutdown(void); 133void _ecore_timer_shutdown(void);
134void _ecore_timer_cleanup(void); 134void _ecore_timer_cleanup(void);
diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c
index e6e488c..cbd87ea 100644
--- a/src/lib/ecore/ecore_timer.c
+++ b/src/lib/ecore/ecore_timer.c
@@ -10,13 +10,11 @@
10#include "Ecore.h" 10#include "Ecore.h"
11#include "ecore_private.h" 11#include "ecore_private.h"
12 12
13#define MY_CLASS ECORE_TIMER_CLASS 13#define MY_CLASS ECORE_OBJ_TIMER_CLASS
14#define MY_CLASS_NAME "Ecore_Timer" 14#define MY_CLASS_NAME "Ecore_Timer"
15 15
16EAPI Eo_Op ECORE_TIMER_BASE_ID = EO_NOOP;
17
18#define ECORE_TIMER_CHECK(obj) \ 16#define ECORE_TIMER_CHECK(obj) \
19 if (!eo_isa((obj), ECORE_TIMER_CLASS)) \ 17 if (!eo_isa((obj), ECORE_OBJ_TIMER_CLASS)) \
20 return 18 return
21 19
22#ifdef WANT_ECORE_TIMER_DUMP 20#ifdef WANT_ECORE_TIMER_DUMP
@@ -26,7 +24,7 @@ EAPI Eo_Op ECORE_TIMER_BASE_ID = EO_NOOP;
26typedef void (*Ecore_Timer_Bt_Func)(); 24typedef void (*Ecore_Timer_Bt_Func)();
27#endif 25#endif
28 26
29struct _Ecore_Timer_Private_Data 27struct _Ecore_Timer_Data
30{ 28{
31 EINA_INLIST; 29 EINA_INLIST;
32 Ecore_Timer *obj; 30 Ecore_Timer *obj;
@@ -47,7 +45,7 @@ struct _Ecore_Timer_Private_Data
47 unsigned char frozen : 1; 45 unsigned char frozen : 1;
48}; 46};
49 47
50typedef struct _Ecore_Timer_Private_Data Ecore_Timer_Private_Data; 48typedef struct _Ecore_Timer_Data Ecore_Timer_Data;
51 49
52static void _ecore_timer_set(Ecore_Timer *timer, 50static void _ecore_timer_set(Ecore_Timer *timer,
53 double at, 51 double at,
@@ -61,9 +59,9 @@ static int _ecore_timer_cmp(const void *d1,
61 59
62static int timers_added = 0; 60static int timers_added = 0;
63static int timers_delete_me = 0; 61static int timers_delete_me = 0;
64static Ecore_Timer_Private_Data *timers = NULL; 62static Ecore_Timer_Data *timers = NULL;
65static Ecore_Timer_Private_Data *timer_current = NULL; 63static Ecore_Timer_Data *timer_current = NULL;
66static Ecore_Timer_Private_Data *suspended = NULL; 64static Ecore_Timer_Data *suspended = NULL;
67static double last_check = 0.0; 65static double last_check = 0.0;
68static double precision = 10.0 / 1000000.0; 66static double precision = 10.0 / 1000000.0;
69 67
@@ -153,14 +151,14 @@ ecore_timer_add(double in,
153 Ecore_Timer *timer = NULL; 151 Ecore_Timer *timer = NULL;
154 152
155 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL); 153 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
156 timer = eo_add_custom(MY_CLASS, _ecore_parent, ecore_timer_constructor(in, func, data)); 154 timer = eo_add_custom(MY_CLASS, _ecore_parent, ecore_obj_timer_constructor(in, func, data));
157 eo_unref(timer); 155 eo_unref(timer);
158 return timer; 156 return timer;
159} 157}
160 158
161static Eina_Bool 159static Eina_Bool
162_ecore_timer_add(Ecore_Timer *obj, 160_ecore_timer_add(Ecore_Timer *obj,
163 Ecore_Timer_Private_Data *timer, 161 Ecore_Timer_Data *timer,
164 double now, 162 double now,
165 double in, 163 double in,
166 Ecore_Task_Cb func, 164 Ecore_Task_Cb func,
@@ -194,44 +192,35 @@ _ecore_timer_add(Ecore_Timer *obj,
194 return EINA_TRUE; 192 return EINA_TRUE;
195} 193}
196 194
197static void 195EOLIAN static void
198_timer_constructor(Eo *obj, void *_pd, va_list *list) 196_ecore_timer_constructor(Eo *obj, Ecore_Timer_Data *timer, double in, Ecore_Task_Cb func, const void *data)
199{ 197{
200 double in = va_arg(*list, double);
201 Ecore_Task_Cb func = va_arg(*list, Ecore_Task_Cb);
202 const void *data = va_arg(*list, const void *);
203 double now; 198 double now;
204 199
205 _ecore_lock(); 200 _ecore_lock();
206 now = ecore_time_get(); 201 now = ecore_time_get();
207 202
208 Ecore_Timer_Private_Data *timer = _pd;
209 _ecore_timer_add(obj, timer, now, in, func, data); 203 _ecore_timer_add(obj, timer, now, in, func, data);
210 _ecore_unlock(); 204 _ecore_unlock();
211} 205}
212 206
213static void 207EOLIAN static void
214_timer_loop_constructor(Eo *obj, void *_pd, va_list *list) 208_ecore_timer_loop_constructor(Eo *obj, Ecore_Timer_Data *timer, double in, Ecore_Task_Cb func, const void *data)
215{ 209{
216 double in = va_arg(*list, double);
217 Ecore_Task_Cb func = va_arg(*list, Ecore_Task_Cb);
218 const void *data = va_arg(*list, const void *);
219 double now; 210 double now;
220 211
221 now = ecore_loop_time_get(); 212 now = ecore_loop_time_get();
222 213
223 Ecore_Timer_Private_Data *timer = _pd;
224 _ecore_timer_add(obj, timer, now, in, func, data); 214 _ecore_timer_add(obj, timer, now, in, func, data);
225} 215}
226 216
227static void 217EOLIAN static void
228_constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) 218_ecore_timer_eo_base_constructor(Eo *obj, Ecore_Timer_Data *_pd EINA_UNUSED)
229{ 219{
230 eo_error_set(obj); 220 eo_error_set(obj);
231 ERR("only custom constructor can be used with '%s' class", MY_CLASS_NAME); 221 ERR("only custom constructor can be used with '%s' class", MY_CLASS_NAME);
232} 222}
233 223
234
235/** 224/**
236 * Creates a timer to call the given function in the given period of time. 225 * Creates a timer to call the given function in the given period of time.
237 * @param in The interval in seconds from current loop time. 226 * @param in The interval in seconds from current loop time.
@@ -289,21 +278,11 @@ ecore_timer_del(Ecore_Timer *timer)
289 * @param timer The timer to change. 278 * @param timer The timer to change.
290 * @param in The interval in seconds. 279 * @param in The interval in seconds.
291 */ 280 */
292EAPI void 281EOLIAN static void
293ecore_timer_interval_set(Ecore_Timer *timer, 282_ecore_timer_interval_set(Eo *obj EINA_UNUSED, Ecore_Timer_Data *timer, double in)
294 double in)
295{
296 ECORE_TIMER_CHECK(timer);
297 eo_do(timer, ecore_obj_timer_interval_set(in));
298}
299
300static void
301_timer_interval_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
302{ 283{
303 EINA_MAIN_LOOP_CHECK_RETURN; 284 EINA_MAIN_LOOP_CHECK_RETURN;
304 double in = va_arg(*list, double);
305 if (in < 0.0) in = 0.0; 285 if (in < 0.0) in = 0.0;
306 Ecore_Timer_Private_Data *timer = _pd;
307 286
308 _ecore_lock(); 287 _ecore_lock();
309 timer->in = in; 288 timer->in = in;
@@ -316,27 +295,17 @@ _timer_interval_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
316 * @param timer The timer to retrieve the interval from 295 * @param timer The timer to retrieve the interval from
317 * @return The interval on success. -1 on failure. 296 * @return The interval on success. -1 on failure.
318 */ 297 */
319EAPI double 298EOLIAN static double
320ecore_timer_interval_get(Ecore_Timer *timer) 299_ecore_timer_interval_get(Eo *obj EINA_UNUSED, Ecore_Timer_Data *timer)
321{ 300{
322 double interval = -1.0; 301 double ret = -1.0;
323
324 ECORE_TIMER_CHECK(timer) interval;
325 eo_do(timer, ecore_obj_timer_interval_get(&interval));
326 return interval;
327}
328
329static void
330_timer_interval_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
331{
332 double *ret = va_arg(*list, double *);
333 *ret = -1.0;
334 302
335 EINA_MAIN_LOOP_CHECK_RETURN; 303 EINA_MAIN_LOOP_CHECK_RETURN;
336 Ecore_Timer_Private_Data *timer = _pd;
337 _ecore_lock(); 304 _ecore_lock();
338 *ret = timer->in; 305 ret = timer->in;
339 _ecore_unlock(); 306 _ecore_unlock();
307
308 return ret;
340} 309}
341 310
342/** 311/**
@@ -346,22 +315,13 @@ _timer_interval_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
346 * @param timer The timer to change. 315 * @param timer The timer to change.
347 * @param add The delay to add to the next iteration. 316 * @param add The delay to add to the next iteration.
348 */ 317 */
349EAPI void 318EOLIAN static void
350ecore_timer_delay(Ecore_Timer *timer, 319_ecore_timer_delay(Eo *obj, Ecore_Timer_Data *_pd EINA_UNUSED, double add)
351 double add)
352{
353 ECORE_TIMER_CHECK(timer);
354 eo_do(timer, ecore_obj_timer_delay(add));
355}
356
357static void
358_timer_delay(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
359{ 320{
360 double add = va_arg(*list, double);
361 EINA_MAIN_LOOP_CHECK_RETURN; 321 EINA_MAIN_LOOP_CHECK_RETURN;
362 322
363 _ecore_lock(); 323 _ecore_lock();
364 _ecore_timer_delay(obj, add); 324 _ecore_timer_util_delay(obj, add);
365 _ecore_unlock(); 325 _ecore_unlock();
366} 326}
367 327
@@ -375,21 +335,12 @@ _timer_delay(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
375 * ecore_timer_delay(timer, ecore_timer_interval_get(timer) - ecore_timer_pending_get(timer)); 335 * ecore_timer_delay(timer, ecore_timer_interval_get(timer) - ecore_timer_pending_get(timer));
376 * @endcode 336 * @endcode
377 */ 337 */
378EAPI void 338EOLIAN static void
379ecore_timer_reset(Ecore_Timer *timer) 339_ecore_timer_reset(Eo *obj, Ecore_Timer_Data *timer)
380{
381 ECORE_TIMER_CHECK(timer);
382 eo_do(timer, ecore_obj_timer_reset());
383}
384
385static void
386_timer_reset(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
387{ 340{
388 double now, add; 341 double now, add;
389 EINA_MAIN_LOOP_CHECK_RETURN; 342 EINA_MAIN_LOOP_CHECK_RETURN;
390 343
391 Ecore_Timer_Private_Data *timer = _pd;
392
393 _ecore_lock(); 344 _ecore_lock();
394 now = ecore_time_get(); 345 now = ecore_time_get();
395 346
@@ -397,7 +348,7 @@ _timer_reset(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
397 add = timer->pending; 348 add = timer->pending;
398 else 349 else
399 add = timer->at - now; 350 add = timer->at - now;
400 _ecore_timer_delay(obj, timer->in - add); 351 _ecore_timer_util_delay(obj, timer->in - add);
401 _ecore_unlock(); 352 _ecore_unlock();
402} 353}
403 354
@@ -408,36 +359,27 @@ _timer_reset(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
408 * @return The pending time. 359 * @return The pending time.
409 * @ingroup Ecore_Timer_Group 360 * @ingroup Ecore_Timer_Group
410 */ 361 */
411EAPI double 362EOLIAN static double
412ecore_timer_pending_get(Ecore_Timer *timer) 363_ecore_timer_pending_get(Eo *obj EINA_UNUSED, Ecore_Timer_Data *timer)
413{
414 double ret = 0.0;
415
416 ECORE_TIMER_CHECK(timer) ret;
417 eo_do(timer, ecore_obj_timer_pending_get(&ret));
418 return ret;
419}
420
421static void
422_timer_pending_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
423{ 364{
424 double now; 365 double now;
425 double *ret = va_arg(*list, double *); 366 double ret = 0.0;
426 *ret = 0.0;
427 367
428 EINA_MAIN_LOOP_CHECK_RETURN; 368 EINA_MAIN_LOOP_CHECK_RETURN;
429 369
430 _ecore_lock(); 370 _ecore_lock();
431 Ecore_Timer_Private_Data *timer = _pd;
432 371
433 now = ecore_time_get(); 372 now = ecore_time_get();
434 373
435 if (timer->frozen) 374 if (timer->frozen)
436 *ret = timer->pending; 375 ret = timer->pending;
437 else 376 else
438 *ret = timer->at - now; 377 ret = timer->at - now;
439 _ecore_unlock(); 378 _ecore_unlock();
379
380 return ret;
440} 381}
382
441/** 383/**
442 * Pauses a running timer. 384 * Pauses a running timer.
443 * 385 *
@@ -459,22 +401,21 @@ ecore_timer_freeze(Ecore_Timer *timer)
459 eo_do(timer, eo_event_freeze()); 401 eo_do(timer, eo_event_freeze());
460} 402}
461 403
462static void 404EOLIAN static void
463_timer_freeze(Eo *obj EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED) 405_ecore_timer_eo_base_event_freeze(Eo *obj EINA_UNUSED, Ecore_Timer_Data *timer)
464{ 406{
465 double now; 407 double now;
466 408
467 EINA_MAIN_LOOP_CHECK_RETURN; 409 EINA_MAIN_LOOP_CHECK_RETURN;
468 410
469 Ecore_Timer_Private_Data *timer = _pd;
470 _ecore_lock(); 411 _ecore_lock();
471 412
472 /* Timer already frozen */ 413 /* Timer already frozen */
473 if (timer->frozen) 414 if (timer->frozen)
474 goto unlock; 415 goto unlock;
475 416
476 timers = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer)); 417 timers = (Ecore_Timer_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer));
477 suspended = (Ecore_Timer_Private_Data *)eina_inlist_prepend(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer)); 418 suspended = (Ecore_Timer_Data *)eina_inlist_prepend(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer));
478 419
479 now = ecore_time_get(); 420 now = ecore_time_get();
480 421
@@ -494,15 +435,12 @@ ecore_timer_freeze_get(Ecore_Timer *timer)
494 return !!r; 435 return !!r;
495} 436}
496 437
497static void 438EOLIAN static int
498_timer_freeze_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) 439_ecore_timer_eo_base_event_freeze_get(Eo *obj EINA_UNUSED, Ecore_Timer_Data *timer)
499{ 440{
500 EINA_MAIN_LOOP_CHECK_RETURN; 441 EINA_MAIN_LOOP_CHECK_RETURN;
501 442
502 Ecore_Timer_Private_Data *timer = _pd; 443 return timer->frozen;
503 int *r = va_arg(*list, int*);
504
505 if (r) *r = timer->frozen;
506} 444}
507 445
508/** 446/**
@@ -525,13 +463,12 @@ ecore_timer_thaw(Ecore_Timer *timer)
525 eo_do(timer, eo_event_thaw()); 463 eo_do(timer, eo_event_thaw());
526} 464}
527 465
528static void 466EOLIAN static void
529_timer_thaw(Eo *obj, void *_pd, va_list *list EINA_UNUSED) 467_ecore_timer_eo_base_event_thaw(Eo *obj, Ecore_Timer_Data *timer)
530{ 468{
531 double now; 469 double now;
532 470
533 EINA_MAIN_LOOP_CHECK_RETURN; 471 EINA_MAIN_LOOP_CHECK_RETURN;
534 Ecore_Timer_Private_Data *timer = _pd;
535 472
536 _ecore_lock(); 473 _ecore_lock();
537 474
@@ -539,7 +476,7 @@ _timer_thaw(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
539 if (!timer->frozen) 476 if (!timer->frozen)
540 goto unlock; 477 goto unlock;
541 478
542 suspended = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer)); 479 suspended = (Ecore_Timer_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer));
543 now = ecore_time_get(); 480 now = ecore_time_get();
544 481
545 _ecore_timer_set(obj, timer->pending + now, timer->in, timer->func, timer->data); 482 _ecore_timer_set(obj, timer->pending + now, timer->in, timer->func, timer->data);
@@ -553,7 +490,7 @@ ecore_timer_dump(void)
553#ifdef WANT_ECORE_TIMER_DUMP 490#ifdef WANT_ECORE_TIMER_DUMP
554 Eina_Strbuf *result; 491 Eina_Strbuf *result;
555 char *out; 492 char *out;
556 Ecore_Timer_Private_Data *tm; 493 Ecore_Timer_Data *tm;
557 Eina_List *tmp = NULL; 494 Eina_List *tmp = NULL;
558 int living_timer = 0; 495 int living_timer = 0;
559 int unknow_timer = 0; 496 int unknow_timer = 0;
@@ -613,17 +550,17 @@ _ecore_timer_loop_add(double in,
613 const void *data) 550 const void *data)
614{ 551{
615 Ecore_Timer *timer = NULL; 552 Ecore_Timer *timer = NULL;
616 timer = eo_add_custom(MY_CLASS, _ecore_parent, ecore_timer_loop_constructor(in, func, data)); 553 timer = eo_add_custom(MY_CLASS, _ecore_parent, ecore_obj_timer_loop_constructor(in, func, data));
617 eo_unref(timer); 554 eo_unref(timer);
618 555
619 return timer; 556 return timer;
620} 557}
621 558
622EAPI void 559EAPI void
623_ecore_timer_delay(Ecore_Timer *obj, 560_ecore_timer_util_delay(Ecore_Timer *obj,
624 double add) 561 double add)
625{ 562{
626 Ecore_Timer_Private_Data *timer = eo_data_scope_get(obj, MY_CLASS); 563 Ecore_Timer_Data *timer = eo_data_scope_get(obj, MY_CLASS);
627 564
628 if (timer->frozen) 565 if (timer->frozen)
629 { 566 {
@@ -631,7 +568,7 @@ _ecore_timer_delay(Ecore_Timer *obj,
631 } 568 }
632 else 569 else
633 { 570 {
634 timers = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer)); 571 timers = (Ecore_Timer_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer));
635 eo_data_unref(obj, timer); 572 eo_data_unref(obj, timer);
636 _ecore_timer_set(obj, timer->at + add, timer->in, timer->func, timer->data); 573 _ecore_timer_set(obj, timer->at + add, timer->in, timer->func, timer->data);
637 } 574 }
@@ -640,14 +577,14 @@ _ecore_timer_delay(Ecore_Timer *obj,
640void * 577void *
641_ecore_timer_del(Ecore_Timer *obj) 578_ecore_timer_del(Ecore_Timer *obj)
642{ 579{
643 Ecore_Timer_Private_Data *timer = eo_data_scope_get(obj, MY_CLASS); 580 Ecore_Timer_Data *timer = eo_data_scope_get(obj, MY_CLASS);
644 581
645 if (timer->frozen && !timer->references) 582 if (timer->frozen && !timer->references)
646 { 583 {
647 void *data = timer->data; 584 void *data = timer->data;
648 585
649 eo_data_unref(obj, timer); 586 eo_data_unref(obj, timer);
650 suspended = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer)); 587 suspended = (Ecore_Timer_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer));
651 588
652 if (timer->delete_me) 589 if (timer->delete_me)
653 timers_delete_me--; 590 timers_delete_me--;
@@ -667,11 +604,9 @@ _ecore_timer_del(Ecore_Timer *obj)
667 return timer->data; 604 return timer->data;
668} 605}
669 606
670static void 607EOLIAN static void
671_destructor(Eo *obj, void *_pd, va_list *list EINA_UNUSED) 608_ecore_timer_eo_base_destructor(Eo *obj, Ecore_Timer_Data *pd)
672{ 609{
673 Ecore_Timer_Private_Data *pd = _pd;
674
675 if (!pd->delete_me) 610 if (!pd->delete_me)
676 { 611 {
677 pd->delete_me = 1; 612 pd->delete_me = 1;
@@ -684,11 +619,11 @@ _destructor(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
684void 619void
685_ecore_timer_shutdown(void) 620_ecore_timer_shutdown(void)
686{ 621{
687 Ecore_Timer_Private_Data *timer; 622 Ecore_Timer_Data *timer;
688 623
689 while ((timer = timers)) 624 while ((timer = timers))
690 { 625 {
691 timers = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timers)); 626 timers = (Ecore_Timer_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timers));
692 627
693 eo_data_unref(timer->obj, timer); 628 eo_data_unref(timer->obj, timer);
694 eo_do(timer->obj, eo_parent_set(NULL)); 629 eo_do(timer->obj, eo_parent_set(NULL));
@@ -700,7 +635,7 @@ _ecore_timer_shutdown(void)
700 635
701 while ((timer = suspended)) 636 while ((timer = suspended))
702 { 637 {
703 suspended = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(suspended)); 638 suspended = (Ecore_Timer_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(suspended));
704 639
705 eo_data_unref(timer->obj, timer); 640 eo_data_unref(timer->obj, timer);
706 eo_do(timer->obj, eo_parent_set(NULL)); 641 eo_do(timer->obj, eo_parent_set(NULL));
@@ -716,15 +651,15 @@ _ecore_timer_shutdown(void)
716void 651void
717_ecore_timer_cleanup(void) 652_ecore_timer_cleanup(void)
718{ 653{
719 Ecore_Timer_Private_Data *l; 654 Ecore_Timer_Data *l;
720 int in_use = 0, todo = timers_delete_me, done = 0; 655 int in_use = 0, todo = timers_delete_me, done = 0;
721 656
722 if (!timers_delete_me) return; 657 if (!timers_delete_me) return;
723 for (l = timers; l; ) 658 for (l = timers; l; )
724 { 659 {
725 Ecore_Timer_Private_Data *timer = l; 660 Ecore_Timer_Data *timer = l;
726 661
727 l = (Ecore_Timer_Private_Data *)EINA_INLIST_GET(l)->next; 662 l = (Ecore_Timer_Data *)EINA_INLIST_GET(l)->next;
728 if (timer->delete_me) 663 if (timer->delete_me)
729 { 664 {
730 if (timer->references) 665 if (timer->references)
@@ -732,7 +667,7 @@ _ecore_timer_cleanup(void)
732 in_use++; 667 in_use++;
733 continue; 668 continue;
734 } 669 }
735 timers = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer)); 670 timers = (Ecore_Timer_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer));
736 671
737 eo_data_unref(timer->obj, timer); 672 eo_data_unref(timer->obj, timer);
738 eo_do(timer->obj, eo_parent_set(NULL)); 673 eo_do(timer->obj, eo_parent_set(NULL));
@@ -747,9 +682,9 @@ _ecore_timer_cleanup(void)
747 } 682 }
748 for (l = suspended; l; ) 683 for (l = suspended; l; )
749 { 684 {
750 Ecore_Timer_Private_Data *timer = l; 685 Ecore_Timer_Data *timer = l;
751 686
752 l = (Ecore_Timer_Private_Data *)EINA_INLIST_GET(l)->next; 687 l = (Ecore_Timer_Data *)EINA_INLIST_GET(l)->next;
753 if (timer->delete_me) 688 if (timer->delete_me)
754 { 689 {
755 if (timer->references) 690 if (timer->references)
@@ -757,7 +692,7 @@ _ecore_timer_cleanup(void)
757 in_use++; 692 in_use++;
758 continue; 693 continue;
759 } 694 }
760 suspended = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer)); 695 suspended = (Ecore_Timer_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer));
761 696
762 eo_data_unref(timer->obj, timer); 697 eo_data_unref(timer->obj, timer);
763 eo_do(timer->obj, eo_parent_set(NULL)); 698 eo_do(timer->obj, eo_parent_set(NULL));
@@ -784,7 +719,7 @@ _ecore_timer_cleanup(void)
784void 719void
785_ecore_timer_enable_new(void) 720_ecore_timer_enable_new(void)
786{ 721{
787 Ecore_Timer_Private_Data *timer; 722 Ecore_Timer_Data *timer;
788 723
789 if (!timers_added) return; 724 if (!timers_added) return;
790 timers_added = 0; 725 timers_added = 0;
@@ -794,10 +729,10 @@ _ecore_timer_enable_new(void)
794int 729int
795_ecore_timers_exists(void) 730_ecore_timers_exists(void)
796{ 731{
797 Ecore_Timer_Private_Data *timer = timers; 732 Ecore_Timer_Data *timer = timers;
798 733
799 while ((timer) && (timer->delete_me)) 734 while ((timer) && (timer->delete_me))
800 timer = (Ecore_Timer_Private_Data *)EINA_INLIST_GET(timer)->next; 735 timer = (Ecore_Timer_Data *)EINA_INLIST_GET(timer)->next;
801 736
802 return !!timer; 737 return !!timer;
803} 738}
@@ -806,10 +741,10 @@ static inline Ecore_Timer *
806_ecore_timer_first_get(void) 741_ecore_timer_first_get(void)
807{ 742{
808 Ecore_Timer *ret = NULL; 743 Ecore_Timer *ret = NULL;
809 Ecore_Timer_Private_Data *timer = timers; 744 Ecore_Timer_Data *timer = timers;
810 745
811 while ((timer) && ((timer->delete_me) || (timer->just_added))) 746 while ((timer) && ((timer->delete_me) || (timer->just_added)))
812 timer = (Ecore_Timer_Private_Data *)EINA_INLIST_GET(timer)->next; 747 timer = (Ecore_Timer_Data *)EINA_INLIST_GET(timer)->next;
813 748
814 if (timer) 749 if (timer)
815 ret = timer->obj; 750 ret = timer->obj;
@@ -820,17 +755,17 @@ static inline Ecore_Timer *
820_ecore_timer_after_get(Ecore_Timer *obj) 755_ecore_timer_after_get(Ecore_Timer *obj)
821{ 756{
822 Ecore_Timer *ret = NULL; 757 Ecore_Timer *ret = NULL;
823 Ecore_Timer_Private_Data *base = eo_data_scope_get(obj, MY_CLASS); 758 Ecore_Timer_Data *base = eo_data_scope_get(obj, MY_CLASS);
824 759
825 Ecore_Timer_Private_Data *timer = (Ecore_Timer_Private_Data *)EINA_INLIST_GET(base)->next; 760 Ecore_Timer_Data *timer = (Ecore_Timer_Data *)EINA_INLIST_GET(base)->next;
826 Ecore_Timer_Private_Data *valid_timer = NULL; 761 Ecore_Timer_Data *valid_timer = NULL;
827 double maxtime = base->at + precision; 762 double maxtime = base->at + precision;
828 763
829 while ((timer) && (timer->at < maxtime)) 764 while ((timer) && (timer->at < maxtime))
830 { 765 {
831 if (!((timer->delete_me) || (timer->just_added))) 766 if (!((timer->delete_me) || (timer->just_added)))
832 valid_timer = timer; 767 valid_timer = timer;
833 timer = (Ecore_Timer_Private_Data *)EINA_INLIST_GET(timer)->next; 768 timer = (Ecore_Timer_Data *)EINA_INLIST_GET(timer)->next;
834 } 769 }
835 770
836 if (valid_timer) 771 if (valid_timer)
@@ -844,7 +779,7 @@ _ecore_timer_next_get(void)
844 double now; 779 double now;
845 double in; 780 double in;
846 Ecore_Timer *first_obj, *second_obj; 781 Ecore_Timer *first_obj, *second_obj;
847 Ecore_Timer_Private_Data *first; 782 Ecore_Timer_Data *first;
848 783
849 first_obj = _ecore_timer_first_get(); 784 first_obj = _ecore_timer_first_get();
850 if (!first_obj) return -1; 785 if (!first_obj) return -1;
@@ -864,10 +799,10 @@ static inline void
864_ecore_timer_reschedule(Ecore_Timer *obj, 799_ecore_timer_reschedule(Ecore_Timer *obj,
865 double when) 800 double when)
866{ 801{
867 Ecore_Timer_Private_Data *timer = eo_data_scope_get(obj, MY_CLASS); 802 Ecore_Timer_Data *timer = eo_data_scope_get(obj, MY_CLASS);
868 if ((timer->delete_me) || (timer->frozen)) return; 803 if ((timer->delete_me) || (timer->frozen)) return;
869 804
870 timers = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer)); 805 timers = (Ecore_Timer_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer));
871 eo_data_unref(obj, timer); 806 eo_data_unref(obj, timer);
872 807
873 /* if the timer would have gone off more than 15 seconds ago, 808 /* if the timer would have gone off more than 15 seconds ago,
@@ -900,7 +835,7 @@ _ecore_timer_expired_call(double when)
900 if (!timers) return 0; 835 if (!timers) return 0;
901 if (last_check > when) 836 if (last_check > when)
902 { 837 {
903 Ecore_Timer_Private_Data *timer; 838 Ecore_Timer_Data *timer;
904 /* User set time backwards */ 839 /* User set time backwards */
905 EINA_INLIST_FOREACH(timers, timer) timer->at -= (last_check - when); 840 EINA_INLIST_FOREACH(timers, timer) timer->at -= (last_check - when);
906 } 841 }
@@ -914,14 +849,14 @@ _ecore_timer_expired_call(double when)
914 else 849 else
915 { 850 {
916 /* recursive main loop, continue from where we were */ 851 /* recursive main loop, continue from where we were */
917 Ecore_Timer_Private_Data *timer_old = timer_current; 852 Ecore_Timer_Data *timer_old = timer_current;
918 timer_current = (Ecore_Timer_Private_Data *)EINA_INLIST_GET(timer_current)->next; 853 timer_current = (Ecore_Timer_Data *)EINA_INLIST_GET(timer_current)->next;
919 _ecore_timer_reschedule(timer_old->obj, when); 854 _ecore_timer_reschedule(timer_old->obj, when);
920 } 855 }
921 856
922 while (timer_current) 857 while (timer_current)
923 { 858 {
924 Ecore_Timer_Private_Data *timer = timer_current; 859 Ecore_Timer_Data *timer = timer_current;
925 860
926 if (timer->at > when) 861 if (timer->at > when)
927 { 862 {
@@ -931,7 +866,7 @@ _ecore_timer_expired_call(double when)
931 866
932 if ((timer->just_added) || (timer->delete_me)) 867 if ((timer->just_added) || (timer->delete_me))
933 { 868 {
934 timer_current = (Ecore_Timer_Private_Data *)EINA_INLIST_GET(timer_current)->next; 869 timer_current = (Ecore_Timer_Data *)EINA_INLIST_GET(timer_current)->next;
935 continue; 870 continue;
936 } 871 }
937 872
@@ -943,7 +878,7 @@ _ecore_timer_expired_call(double when)
943 timer->references--; 878 timer->references--;
944 879
945 if (timer_current) /* may have changed in recursive main loops */ 880 if (timer_current) /* may have changed in recursive main loops */
946 timer_current = (Ecore_Timer_Private_Data *)EINA_INLIST_GET(timer_current)->next; 881 timer_current = (Ecore_Timer_Data *)EINA_INLIST_GET(timer_current)->next;
947 882
948 _ecore_timer_reschedule(timer->obj, when); 883 _ecore_timer_reschedule(timer->obj, when);
949 } 884 }
@@ -957,9 +892,9 @@ _ecore_timer_set(Ecore_Timer *obj,
957 Ecore_Task_Cb func, 892 Ecore_Task_Cb func,
958 void *data) 893 void *data)
959{ 894{
960 Ecore_Timer_Private_Data *t2; 895 Ecore_Timer_Data *t2;
961 896
962 Ecore_Timer_Private_Data *timer = eo_data_ref(obj, MY_CLASS); 897 Ecore_Timer_Data *timer = eo_data_ref(obj, MY_CLASS);
963 898
964 timers_added = 1; 899 timers_added = 1;
965 timer->at = at; 900 timer->at = at;
@@ -975,12 +910,12 @@ _ecore_timer_set(Ecore_Timer *obj,
975 { 910 {
976 if (timer->at > t2->at) 911 if (timer->at > t2->at)
977 { 912 {
978 timers = (Ecore_Timer_Private_Data *)eina_inlist_append_relative(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer), EINA_INLIST_GET(t2)); 913 timers = (Ecore_Timer_Data *)eina_inlist_append_relative(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer), EINA_INLIST_GET(t2));
979 return; 914 return;
980 } 915 }
981 } 916 }
982 } 917 }
983 timers = (Ecore_Timer_Private_Data *)eina_inlist_prepend(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer)); 918 timers = (Ecore_Timer_Data *)eina_inlist_prepend(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer));
984} 919}
985 920
986#ifdef WANT_ECORE_TIMER_DUMP 921#ifdef WANT_ECORE_TIMER_DUMP
@@ -988,57 +923,11 @@ static int
988_ecore_timer_cmp(const void *d1, 923_ecore_timer_cmp(const void *d1,
989 const void *d2) 924 const void *d2)
990{ 925{
991 const Ecore_Timer_Private_Data *t1 = d1; 926 const Ecore_Timer_Data *t1 = d1;
992 const Ecore_Timer_Private_Data *t2 = d2; 927 const Ecore_Timer_Data *t2 = d2;
993 928
994 return (int)((t1->in - t2->in) * 100); 929 return (int)((t1->in - t2->in) * 100);
995} 930}
996#endif 931#endif
997 932
998static void 933#include "ecore_timer.eo.c"
999_class_constructor(Eo_Class *klass)
1000{
1001 const Eo_Op_Func_Description func_desc[] = {
1002 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
1003 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
1004
1005 EO_OP_FUNC(ECORE_TIMER_ID(ECORE_TIMER_SUB_ID_CONSTRUCTOR), _timer_constructor),
1006 EO_OP_FUNC(ECORE_TIMER_ID(ECORE_TIMER_SUB_ID_LOOP_CONSTRUCTOR), _timer_loop_constructor),
1007 EO_OP_FUNC(ECORE_TIMER_ID(ECORE_TIMER_SUB_ID_INTERVAL_SET), _timer_interval_set),
1008 EO_OP_FUNC(ECORE_TIMER_ID(ECORE_TIMER_SUB_ID_INTERVAL_GET), _timer_interval_get),
1009
1010 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_FREEZE), _timer_freeze),
1011 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_THAW), _timer_thaw),
1012 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_FREEZE_GET), _timer_freeze_get),
1013
1014 EO_OP_FUNC(ECORE_TIMER_ID(ECORE_TIMER_SUB_ID_DELAY), _timer_delay),
1015 EO_OP_FUNC(ECORE_TIMER_ID(ECORE_TIMER_SUB_ID_RESET), _timer_reset),
1016 EO_OP_FUNC(ECORE_TIMER_ID(ECORE_TIMER_SUB_ID_PENDING_GET), _timer_pending_get),
1017 EO_OP_FUNC_SENTINEL
1018 };
1019
1020 eo_class_funcs_set(klass, func_desc);
1021}
1022
1023static const Eo_Op_Description op_desc[] = {
1024 EO_OP_DESCRIPTION(ECORE_TIMER_SUB_ID_CONSTRUCTOR, "Creates a timer to call the given function in the given period of time."),
1025 EO_OP_DESCRIPTION(ECORE_TIMER_SUB_ID_LOOP_CONSTRUCTOR, "Creates a timer to call the given function in the given period of time."),
1026 EO_OP_DESCRIPTION(ECORE_TIMER_SUB_ID_INTERVAL_SET, "Change the interval the timer ticks of."),
1027 EO_OP_DESCRIPTION(ECORE_TIMER_SUB_ID_INTERVAL_GET, "Get the interval the timer ticks on."),
1028 EO_OP_DESCRIPTION(ECORE_TIMER_SUB_ID_DELAY, "Add some delay for the next occurrence of a timer."),
1029 EO_OP_DESCRIPTION(ECORE_TIMER_SUB_ID_RESET, "Reset a timer to its full interval"),
1030 EO_OP_DESCRIPTION(ECORE_TIMER_SUB_ID_PENDING_GET, "Get the pending time regarding a timer."),
1031 EO_OP_DESCRIPTION_SENTINEL
1032};
1033static const Eo_Class_Description class_desc = {
1034 EO_VERSION,
1035 MY_CLASS_NAME,
1036 EO_CLASS_TYPE_REGULAR,
1037 EO_CLASS_DESCRIPTION_OPS(&ECORE_TIMER_BASE_ID, op_desc, ECORE_TIMER_SUB_ID_LAST),
1038 NULL,
1039 sizeof(Ecore_Timer_Private_Data),
1040 _class_constructor,
1041 NULL
1042};
1043
1044EO_DEFINE_CLASS(ecore_timer_class_get, &class_desc, EO_BASE_CLASS, NULL)
diff --git a/src/lib/ecore/ecore_timer.eo b/src/lib/ecore/ecore_timer.eo
new file mode 100644
index 0000000..720867e
--- /dev/null
+++ b/src/lib/ecore/ecore_timer.eo
@@ -0,0 +1,58 @@
1class Ecore_Timer (Eo_Base)
2{
3 eo_prefix: ecore_obj_timer;
4 constructors {
5 loop_constructor {
6 /*@ Contructor. */
7 params {
8 @in double in;
9 @in Ecore_Task_Cb func;
10 @in const void *data;
11 }
12 }
13 constructor {
14 /*@ Contructor. */
15 params {
16 @in double in;
17 @in Ecore_Task_Cb func;
18 @in const void *data;
19 }
20 }
21 }
22 properties {
23 interval {
24 set {
25 /*@ Change the interval the timer ticks of. */
26 }
27 get {
28 /*@ Get the interval the timer ticks on. */
29 }
30 values {
31 double in;
32 }
33 }
34 pending {
35 get {
36 /*@ Get the pending time regarding a timer. */
37 return double;
38 }
39 }
40 }
41 methods {
42 reset {
43 /*@ Reset a timer to its full interval. */
44 }
45 delay {
46 /*@ Add some delay for the next occurrence of a timer. */
47 params {
48 @in double add;
49 }
50 }
51 }
52 implements {
53 Eo_Base::constructor;
54 Eo_Base::destructor;
55 Eo_Base::event_freeze;
56 Eo_Base::event_thaw;
57 }
58} \ No newline at end of file