summaryrefslogtreecommitdiff
path: root/src/lib/ecore
diff options
context:
space:
mode:
authorCedric BAIL <cedric@efl.so>2013-11-10 08:51:42 +0100
committerCedric BAIL <cedric.bail@samsung.com>2013-12-17 19:37:05 +0900
commit0a1cc79a917b770ef66afe8b99731f6d5754ca44 (patch)
tree99d52907af9d893cb1fc08d75cd1b9f2ab2bfd0c /src/lib/ecore
parent99e3ce489adbdc711571fa7d71acbd03a413ec00 (diff)
Ecore_Avahi: initial commit.
TODO: - Add tests, how ? - Integrate with Eo, needed ?
Diffstat (limited to 'src/lib/ecore')
-rw-r--r--src/lib/ecore/Ecore_Legacy.h1
-rw-r--r--src/lib/ecore/ecore_timer.c21
2 files changed, 22 insertions, 0 deletions
diff --git a/src/lib/ecore/Ecore_Legacy.h b/src/lib/ecore/Ecore_Legacy.h
index d7d01cef27..f1a73c1ca1 100644
--- a/src/lib/ecore/Ecore_Legacy.h
+++ b/src/lib/ecore/Ecore_Legacy.h
@@ -179,6 +179,7 @@ EAPI 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(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 void ecore_timer_thaw(Ecore_Timer *timer); 183EAPI void ecore_timer_thaw(Ecore_Timer *timer);
183EAPI void ecore_timer_delay(Ecore_Timer *timer, double add); 184EAPI void ecore_timer_delay(Ecore_Timer *timer, double add);
184EAPI void ecore_timer_reset(Ecore_Timer *timer); 185EAPI void ecore_timer_reset(Ecore_Timer *timer);
diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c
index 5c03e805b6..e6e488c67a 100644
--- a/src/lib/ecore/ecore_timer.c
+++ b/src/lib/ecore/ecore_timer.c
@@ -485,6 +485,26 @@ unlock:
485 _ecore_unlock(); 485 _ecore_unlock();
486} 486}
487 487
488EAPI Eina_Bool
489ecore_timer_freeze_get(Ecore_Timer *timer)
490{
491 int r = 0;
492
493 eo_do(timer, eo_event_freeze_get(&r));
494 return !!r;
495}
496
497static void
498_timer_freeze_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
499{
500 EINA_MAIN_LOOP_CHECK_RETURN;
501
502 Ecore_Timer_Private_Data *timer = _pd;
503 int *r = va_arg(*list, int*);
504
505 if (r) *r = timer->frozen;
506}
507
488/** 508/**
489 * Resumes a frozen (paused) timer. 509 * Resumes a frozen (paused) timer.
490 * 510 *
@@ -989,6 +1009,7 @@ _class_constructor(Eo_Class *klass)
989 1009
990 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_FREEZE), _timer_freeze), 1010 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_FREEZE), _timer_freeze),
991 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_THAW), _timer_thaw), 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),
992 1013
993 EO_OP_FUNC(ECORE_TIMER_ID(ECORE_TIMER_SUB_ID_DELAY), _timer_delay), 1014 EO_OP_FUNC(ECORE_TIMER_ID(ECORE_TIMER_SUB_ID_DELAY), _timer_delay),
994 EO_OP_FUNC(ECORE_TIMER_ID(ECORE_TIMER_SUB_ID_RESET), _timer_reset), 1015 EO_OP_FUNC(ECORE_TIMER_ID(ECORE_TIMER_SUB_ID_RESET), _timer_reset),