cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=38561202bf5d35b94f0b97e9d763655d7d18f6dd
commit 38561202bf5d35b94f0b97e9d763655d7d18f6dd Author: Andrii Kroitor <[email protected]> Date: Fri Sep 12 23:00:47 2014 +0200 edje: Edje_Edit - add edje_edit_program_stop_all Summary: Stops all running programs. If any program has "after" field its value will be ignored. Reviewers: cedric, seoz, Hermet Subscribers: cedric, reutskiy.v.v Differential Revision: https://phab.enlightenment.org/D1433 Signed-off-by: Cedric BAIL <[email protected]> --- src/lib/edje/Edje_Edit.h | 8 ++++++++ src/lib/edje/edje_edit.c | 14 ++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h index 20506b9..55b68ce 100644 --- a/src/lib/edje/Edje_Edit.h +++ b/src/lib/edje/Edje_Edit.h @@ -5436,6 +5436,14 @@ EAPI Eina_Bool edje_edit_program_exist(Evas_Object *obj, const char *prog); */ EAPI Eina_Bool edje_edit_program_run(Evas_Object *obj, const char *prog); +/** Stop all running programs. + * + * @param obj Object being edited. + * + * @return @c EINA_TRUE in case of success, @c EINA_FALSE otherwise. + */ +EAPI Eina_Bool edje_edit_program_stop_all(Evas_Object *obj); + /** Set a new name for the given program * * @param obj Object being edited. diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index 68f64b8..d8c8cc4 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c @@ -8103,6 +8103,20 @@ edje_edit_program_run(Evas_Object *obj, const char *prog) } EAPI Eina_Bool +edje_edit_program_stop_all(Evas_Object *obj) +{ + GET_ED_OR_RETURN(EINA_FALSE); + + Eina_List *l, *ln; + Edje_Running_Program *runp; + + EINA_LIST_FOREACH_SAFE(ed->actions, l, ln, runp) + _edje_program_end(ed, runp); + + return EINA_TRUE; +} + +EAPI Eina_Bool edje_edit_program_name_set(Evas_Object *obj, const char *prog, const char* new_name) { GET_EED_OR_RETURN(EINA_FALSE); --
