summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_embryo.c
diff options
context:
space:
mode:
authorzmike <michael.blumenkrantz@gmail.com>2014-02-03 17:18:52 -0500
committerzmike <michael.blumenkrantz@gmail.com>2014-02-03 17:19:31 -0500
commit0ee6327035ea1109fddfe929547c3c1c6e521429 (patch)
tree494dcd8e02c256351e7edf5eee17c4963d3a7238 /src/lib/edje/edje_embryo.c
parenta5a907023dd7e7abdc75c20117eeacfa3992d776 (diff)
edje embryo now supports reset_timer()
works the same as ecore_timer_reset()
Diffstat (limited to 'src/lib/edje/edje_embryo.c')
-rw-r--r--src/lib/edje/edje_embryo.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c
index 5fa5ba308e..a22bc31b35 100644
--- a/src/lib/edje/edje_embryo.c
+++ b/src/lib/edje/edje_embryo.c
@@ -66,6 +66,7 @@
66 * set_str(id, str[]) 66 * set_str(id, str[])
67 * timer(Float:in, fname[], val) 67 * timer(Float:in, fname[], val)
68 * cancel_timer(id) 68 * cancel_timer(id)
69 * reset_timer(id)
69 * anim(Float:len, fname[], val) 70 * anim(Float:len, fname[], val)
70 * cancel_anim(id) 71 * cancel_anim(id)
71 * emit(sig[], src[]) 72 * emit(sig[], src[])
@@ -635,6 +636,21 @@ _edje_embryo_fn_cancel_timer(Embryo_Program *ep, Embryo_Cell *params)
635 return 0; 636 return 0;
636} 637}
637 638
639/* reset_timer(id) */
640static Embryo_Cell
641_edje_embryo_fn_reset_timer(Embryo_Program *ep, Embryo_Cell *params)
642{
643 Edje *ed;
644 int id;
645
646 CHKPARAM(1);
647 ed = embryo_program_data_get(ep);
648 id = params[1];
649 if (id <= 0) return 0;
650 _edje_var_timer_del(ed, id);
651 return 0;
652}
653
638/* anim(Float:len, fname[], val) */ 654/* anim(Float:len, fname[], val) */
639static Embryo_Cell 655static Embryo_Cell
640_edje_embryo_fn_anim(Embryo_Program *ep, Embryo_Cell *params) 656_edje_embryo_fn_anim(Embryo_Program *ep, Embryo_Cell *params)
@@ -3690,6 +3706,7 @@ _edje_embryo_script_init(Edje_Part_Collection *edc)
3690 3706
3691 embryo_program_native_call_add(ep, "timer", _edje_embryo_fn_timer); 3707 embryo_program_native_call_add(ep, "timer", _edje_embryo_fn_timer);
3692 embryo_program_native_call_add(ep, "cancel_timer", _edje_embryo_fn_cancel_timer); 3708 embryo_program_native_call_add(ep, "cancel_timer", _edje_embryo_fn_cancel_timer);
3709 embryo_program_native_call_add(ep, "reset_timer", _edje_embryo_fn_reset_timer);
3693 3710
3694 embryo_program_native_call_add(ep, "anim", _edje_embryo_fn_anim); 3711 embryo_program_native_call_add(ep, "anim", _edje_embryo_fn_anim);
3695 embryo_program_native_call_add(ep, "cancel_anim", _edje_embryo_fn_cancel_anim); 3712 embryo_program_native_call_add(ep, "cancel_anim", _edje_embryo_fn_cancel_anim);