From: Mike Blumenkrantz Date: Thu, 21 Feb 2019 20:50:35 +0000 (+0100) Subject: interfaces: move animator,tick to efl.canvas.object and remove efl.animator X-Git-Tag: submit/tizen/20190308.115227~141 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4d6b1dd715b3d584c9ef6b3fb199c8fd058fc2d;p=platform%2Fupstream%2Fefl.git interfaces: move animator,tick to efl.canvas.object and remove efl.animator Summary: this interface only contains a single event which is implemented only by the canvas object ref T7561 Reviewers: cedric, segfaultxavi Reviewed By: segfaultxavi Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7561 Differential Revision: https://phab.enlightenment.org/D7905 --- diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am index 351ff73..d254f6f 100644 --- a/src/Makefile_Efl.am +++ b/src/Makefile_Efl.am @@ -49,7 +49,6 @@ efl_eolian_files = \ lib/efl/interfaces/efl_gfx_blur.eo \ lib/efl/interfaces/efl_gfx_hint.eo \ lib/efl/interfaces/efl_model.eo \ - lib/efl/interfaces/efl_animator.eo \ lib/efl/interfaces/efl_orientation.eo \ lib/efl/interfaces/efl_container.eo \ lib/efl/interfaces/efl_content.eo \ diff --git a/src/bin/elementary/perf.c b/src/bin/elementary/perf.c index 3cca032..17f26b8 100644 --- a/src/bin/elementary/perf.c +++ b/src/bin/elementary/perf.c @@ -128,7 +128,7 @@ anim_tick(void *data, const Efl_Event *event EINA_UNUSED) ecore_animator_del(animator); animator = NULL; #else - efl_event_callback_del(win, EFL_EVENT_ANIMATOR_TICK, anim_tick, data); + efl_event_callback_del(win, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, anim_tick, data); #endif ecore_timer_add(0.5, next_test_delay, data); } @@ -168,7 +168,7 @@ all_tests(Evas *e) #ifdef ANIMATOR animator = ecore_animator_add(anim_tick, e); #else - efl_event_callback_add(win, EFL_EVENT_ANIMATOR_TICK, anim_tick, e); + efl_event_callback_add(win, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, anim_tick, e); #endif } diff --git a/src/bin/elementary/test_anim.c b/src/bin/elementary/test_anim.c index 4bcf158..caad014 100644 --- a/src/bin/elementary/test_anim.c +++ b/src/bin/elementary/test_anim.c @@ -92,5 +92,5 @@ test_anim(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info evas_object_resize(win, 480, 800); evas_object_show(win); - efl_event_callback_add(win, EFL_EVENT_ANIMATOR_TICK, _anim_tick, NULL); + efl_event_callback_add(win, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _anim_tick, NULL); } diff --git a/src/bin/elementary/test_part_shadow.c b/src/bin/elementary/test_part_shadow.c index 39d170b..70d9a6f 100644 --- a/src/bin/elementary/test_part_shadow.c +++ b/src/bin/elementary/test_part_shadow.c @@ -45,7 +45,7 @@ pulse_start(void *data, const Efl_Event *ev EINA_UNUSED) efl_ui_widget_disabled_set(td->btn_start, EINA_TRUE); efl_ui_widget_disabled_set(td->btn_stop, EINA_FALSE); - efl_event_callback_add(td->ico, EFL_EVENT_ANIMATOR_TICK, animate, td); + efl_event_callback_add(td->ico, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, animate, td); } static void @@ -62,7 +62,7 @@ pulse_stop(void *data, const Efl_Event *ev EINA_UNUSED) efl_ui_widget_disabled_set(td->btn_start, EINA_FALSE); efl_ui_widget_disabled_set(td->btn_stop, EINA_TRUE); - efl_event_callback_del(td->ico, EFL_EVENT_ANIMATOR_TICK, animate, td); + efl_event_callback_del(td->ico, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, animate, td); } static void diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c index a5cf98b..cb42f29 100644 --- a/src/lib/ecore_evas/ecore_evas.c +++ b/src/lib/ecore_evas/ecore_evas.c @@ -274,7 +274,7 @@ _ecore_evas_idle_enter(void *data EINA_UNUSED) { if (!ee->animator_registered) { - efl_event_callback_add(ee->evas, EFL_EVENT_ANIMATOR_TICK, _ecore_evas_animator, ee); + efl_event_callback_add(ee->evas, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _ecore_evas_animator, ee); ee->animator_registered = EINA_TRUE; } } @@ -337,7 +337,7 @@ _ecore_evas_idle_enter(void *data EINA_UNUSED) if (!change) { - efl_event_callback_del(ee->evas, EFL_EVENT_ANIMATOR_TICK, _ecore_evas_animator, ee); + efl_event_callback_del(ee->evas, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _ecore_evas_animator, ee); ee->animator_registered = EINA_FALSE; } #ifdef ECORE_EVAS_ASYNC_RENDER_DEBUG @@ -3324,7 +3324,7 @@ ecore_evas_animator_tick(Ecore_Evas *ee, Eina_Rectangle *viewport, double loop_t // End of TIZEN_ONLY(20171130) ee->animator_ran = EINA_TRUE; - efl_event_callback_call(ee->evas, EFL_EVENT_ANIMATOR_TICK, &a); + efl_event_callback_call(ee->evas, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, &a); if (ee->ee_anim.active) _ecore_evas_animators_do(ee); @@ -3517,7 +3517,7 @@ _check_animator_event_catcher_add(void *data, const Efl_Event *event) for (i = 0; array[i].desc != NULL; i++) { - if (array[i].desc == EFL_EVENT_ANIMATOR_TICK) + if (array[i].desc == EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK) { _ticking_start(ee); @@ -3537,7 +3537,7 @@ _check_animator_event_catcher_del(void *data, const Efl_Event *event) for (i = 0; array[i].desc != NULL; i++) { - if (array[i].desc == EFL_EVENT_ANIMATOR_TICK) + if (array[i].desc == EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK) { _ticking_stop(ee); return; diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c index caf89e7..04a26b4 100644 --- a/src/lib/edje/edje_load.c +++ b/src/lib/edje/edje_load.c @@ -2183,7 +2183,7 @@ _edje_file_del(Edje *ed, Eina_Bool reuse_ic) EINA_LIST_FREE(ed->actions, runp) free(runp); } - efl_event_callback_del(ed->obj, EFL_EVENT_ANIMATOR_TICK, _edje_timer_cb, ed); + efl_event_callback_del(ed->obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _edje_timer_cb, ed); ecore_animator_del(ed->animator); ed->animator = NULL; diff --git a/src/lib/edje/edje_program.c b/src/lib/edje/edje_program.c index 387c031..cbdd486 100644 --- a/src/lib/edje/edje_program.c +++ b/src/lib/edje/edje_program.c @@ -397,7 +397,7 @@ _edje_program_run_cleanup(Edje *ed, Edje_Running_Program *runp) ed->actions = eina_list_remove(ed->actions, runp); if (!ed->actions) { - efl_event_callback_del(ed->obj, EFL_EVENT_ANIMATOR_TICK, _edje_timer_cb, ed); + efl_event_callback_del(ed->obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _edje_timer_cb, ed); ecore_animator_del(ed->animator); ed->animator = NULL; } @@ -761,7 +761,7 @@ low_mem_current: if (!ed->actions) { if (ed->canvas_animator) - efl_event_callback_add(ed->obj, EFL_EVENT_ANIMATOR_TICK, _edje_timer_cb, ed); + efl_event_callback_add(ed->obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _edje_timer_cb, ed); else ed->animator = ecore_animator_add(_edje_animator_cb, ed); } diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h index 35772f8..46fd921 100644 --- a/src/lib/efl/Efl.h +++ b/src/lib/efl/Efl.h @@ -117,7 +117,6 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command; #define EFL_ORIENT_270 EFL_ORIENT_LEFT /* Core interface */ -#include "interfaces/efl_animator.eo.h" #include "interfaces/efl_interpolator.eo.h" /* Graphics */ diff --git a/src/lib/efl/interfaces/efl_animator.eo b/src/lib/efl/interfaces/efl_animator.eo deleted file mode 100644 index 39f7e3c..0000000 --- a/src/lib/efl/interfaces/efl_animator.eo +++ /dev/null @@ -1,15 +0,0 @@ -import eina_types; - -struct Efl.Event_Animator_Tick { - [[EFL event animator tick data structure]] - update_area: Eina.Rect; [[Area of the canvas that will be pushed to screen.]] -} - -interface @beta Efl.Animator { - [[Efl animator interface]] - eo_prefix: efl_animator; - event_prefix: efl; - events { - animator,tick: Efl.Event_Animator_Tick; [[Animator tick synchronized with screen vsync if possible.]] - } -} diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c index 6c2c495..279bf15 100644 --- a/src/lib/efl/interfaces/efl_interfaces_main.c +++ b/src/lib/efl/interfaces/efl_interfaces_main.c @@ -58,7 +58,6 @@ #include "interfaces/efl_pack_table.eo.c" #include "interfaces/efl_model.eo.c" -#include "interfaces/efl_animator.eo.c" #include "interfaces/efl_interpolator.eo.c" #include "interfaces/efl_orientation.eo.c" #include "interfaces/efl_ui_i18n.eo.c" diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build index adf9a13..7483903 100644 --- a/src/lib/efl/interfaces/meson.build +++ b/src/lib/efl/interfaces/meson.build @@ -74,7 +74,6 @@ pub_eo_files = [ 'efl_gfx_blur.eo', 'efl_gfx_hint.eo', 'efl_model.eo', - 'efl_animator.eo', 'efl_interpolator.eo', 'efl_orientation.eo', 'efl_container.eo', diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c index c0bb51f..5147114 100644 --- a/src/lib/elementary/efl_ui_image_zoomable.c +++ b/src/lib/elementary/efl_ui_image_zoomable.c @@ -838,7 +838,7 @@ _zoom_anim_cb(void *data, const Efl_Event *event EINA_UNUSED) { sd->no_smooth--; if (!sd->no_smooth) _smooth_update(data); - efl_event_callback_del(obj, EFL_EVENT_ANIMATOR_TICK, _zoom_anim_cb, obj); + efl_event_callback_del(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _zoom_anim_cb, obj); efl_event_callback_legacy_call(obj, EFL_UI_EVENT_ZOOM_STOP, NULL); } } @@ -1071,7 +1071,7 @@ _bounce_eval(void *data, const Efl_Event *event EINA_UNUSED) efl_ui_scrollable_scroll_freeze_set(sd->smanager, EINA_FALSE); - efl_event_callback_del(obj, EFL_EVENT_ANIMATOR_TICK, _bounce_eval, obj); + efl_event_callback_del(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _bounce_eval, obj); } static void @@ -1079,7 +1079,7 @@ _efl_ui_image_zoomable_bounce_reset(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd EINA { Eina_Bool r; - r = efl_event_callback_del(obj, EFL_EVENT_ANIMATOR_TICK, _bounce_eval, obj); + r = efl_event_callback_del(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _bounce_eval, obj); if (r) _zoom_do(obj, 1.0); } @@ -1088,7 +1088,7 @@ _efl_ui_image_zoomable_zoom_reset(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd) { Eina_Bool r; - r = efl_event_callback_del(obj, EFL_EVENT_ANIMATOR_TICK, _zoom_anim_cb, obj); + r = efl_event_callback_del(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _zoom_anim_cb, obj); if (r) { sd->no_smooth--; @@ -1288,7 +1288,7 @@ _g_layer_zoom_end_cb(void *data, sd->g_layer_zoom.bounce.t_end = t + _elm_config->page_scroll_friction; - efl_event_callback_add(obj, EFL_EVENT_ANIMATOR_TICK, _bounce_eval, obj); + efl_event_callback_add(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _bounce_eval, obj); } else { @@ -1940,8 +1940,8 @@ _efl_ui_image_zoomable_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Image_Zoomable ecore_job_del(sd->calc_job); ecore_timer_del(sd->scr_timer); ecore_timer_del(sd->long_timer); - efl_event_callback_del(obj, EFL_EVENT_ANIMATOR_TICK, _zoom_anim_cb, obj); - efl_event_callback_del(obj, EFL_EVENT_ANIMATOR_TICK, _bounce_eval, obj); + efl_event_callback_del(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _zoom_anim_cb, obj); + efl_event_callback_del(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _bounce_eval, obj); efl_event_callback_del(obj, EFL_UI_EVENT_SCROLL, _scroll_cb, obj); _efl_ui_image_zoomable_edje_object_detach(obj); @@ -2620,8 +2620,8 @@ done: } else { - an = efl_event_callback_del(obj, EFL_EVENT_ANIMATOR_TICK, _zoom_anim_cb, obj); - efl_event_callback_add(obj, EFL_EVENT_ANIMATOR_TICK, _zoom_anim_cb, obj); + an = efl_event_callback_del(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _zoom_anim_cb, obj); + efl_event_callback_add(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _zoom_anim_cb, obj); if (!an) { sd->no_smooth++; diff --git a/src/lib/elementary/efl_ui_pager.c b/src/lib/elementary/efl_ui_pager.c index c912125..419ef7d 100644 --- a/src/lib/elementary/efl_ui_pager.c +++ b/src/lib/elementary/efl_ui_pager.c @@ -109,7 +109,7 @@ _page_set_animation(void *data, const Efl_Event *event) _efl_ui_pager_update(pd); if (EINA_DBL_EQ(p, 1.0)) - efl_event_callback_del(event->object, EFL_EVENT_ANIMATOR_TICK, + efl_event_callback_del(event->object, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _page_set_animation, pd); } @@ -153,7 +153,7 @@ _mouse_up_animation(void *data, const Efl_Event *event) _efl_ui_pager_update(pd); if (EINA_DBL_EQ(p, 1.0)) - efl_event_callback_del(event->object, EFL_EVENT_ANIMATOR_TICK, + efl_event_callback_del(event->object, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _mouse_up_animation, pd); } @@ -169,8 +169,8 @@ _mouse_down_cb(void *data, if (efl_input_pointer_button_get(ev) != 1) return; if (efl_input_event_flags_get(ev) & EFL_INPUT_FLAGS_PROCESSED) return; - efl_event_callback_del(obj, EFL_EVENT_ANIMATOR_TICK, _mouse_up_animation, pd); - efl_event_callback_del(obj, EFL_EVENT_ANIMATOR_TICK, _page_set_animation, pd); + efl_event_callback_del(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _mouse_up_animation, pd); + efl_event_callback_del(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _page_set_animation, pd); pd->move_started = EINA_FALSE; @@ -241,7 +241,7 @@ _mouse_up_cb(void *data, pd->mouse_up_time = ecore_loop_time_get(); - efl_event_callback_add(obj, EFL_EVENT_ANIMATOR_TICK, _mouse_up_animation, pd); + efl_event_callback_add(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _mouse_up_animation, pd); } //FIXME sub_object_parent_add? destruction @@ -551,8 +551,8 @@ _efl_ui_pager_current_page_set(Eo *obj, { if (index == pd->curr.page) return; - efl_event_callback_del(obj, EFL_EVENT_ANIMATOR_TICK, _mouse_up_animation, pd); - efl_event_callback_del(obj, EFL_EVENT_ANIMATOR_TICK, _page_set_animation, pd); + efl_event_callback_del(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _mouse_up_animation, pd); + efl_event_callback_del(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _page_set_animation, pd); if ((index < 0) || (index > (pd->cnt - 1))) { @@ -584,7 +584,7 @@ _efl_ui_pager_current_page_set(Eo *obj, if (pd->change.delta == 0) return; pd->change.start_time = ecore_loop_time_get(); - efl_event_callback_add(obj, EFL_EVENT_ANIMATOR_TICK, _page_set_animation, pd); + efl_event_callback_add(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _page_set_animation, pd); } EOLIAN static int diff --git a/src/lib/elementary/efl_ui_scroll_manager.c b/src/lib/elementary/efl_ui_scroll_manager.c index 866b79e..522b623 100644 --- a/src/lib/elementary/efl_ui_scroll_manager.c +++ b/src/lib/elementary/efl_ui_scroll_manager.c @@ -13,12 +13,12 @@ #define MY_CLASS_NAME "Efl.Ui.Scroll.Manager" #define ELM_ANIMATOR_CONNECT(Obj, Bool, Callback, Data) \ - efl_event_callback_del(Obj, EFL_EVENT_ANIMATOR_TICK, Callback, Data); \ - efl_event_callback_add(Obj, EFL_EVENT_ANIMATOR_TICK, Callback, Data); \ + efl_event_callback_del(Obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, Callback, Data); \ + efl_event_callback_add(Obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, Callback, Data); \ Bool = 1; #define ELM_ANIMATOR_DISCONNECT(Obj, Bool, Callback, Data) \ - efl_event_callback_del(Obj, EFL_EVENT_ANIMATOR_TICK, Callback, Data); \ + efl_event_callback_del(Obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, Callback, Data); \ Bool = 0; diff --git a/src/lib/elementary/elc_naviframe.c b/src/lib/elementary/elc_naviframe.c index 22ed86a..d8fd60e 100644 --- a/src/lib/elementary/elc_naviframe.c +++ b/src/lib/elementary/elc_naviframe.c @@ -1743,7 +1743,7 @@ _deferred(void *data, const Efl_Event *event EINA_UNUSED) free(nfo); } - efl_event_callback_del(nfd->obj, EFL_EVENT_ANIMATOR_TICK, _deferred, nfd); + efl_event_callback_del(nfd->obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _deferred, nfd); } EOLIAN static void @@ -1855,7 +1855,7 @@ static void _schedule_deferred(Elm_Naviframe_Op *nfo, Elm_Naviframe_Data *sd) { if (!sd->ops) - efl_event_callback_add(sd->obj, EFL_EVENT_ANIMATOR_TICK, _deferred, sd); + efl_event_callback_add(sd->obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _deferred, sd); sd->ops = eina_list_append(sd->ops, nfo); } diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index c338ed6..776467d 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -2702,7 +2702,7 @@ _elm_genlist_tree_effect_setup(Elm_Genlist_Data *sd) evas_object_stack_below(sd->event_block_rect, sd->stack[1]); evas_object_show(sd->event_block_rect); sd->start_time = ecore_time_get(); - efl_event_callback_add(sd->obj, EFL_EVENT_ANIMATOR_TICK, _tree_effect_animator_cb, sd->obj); + efl_event_callback_add(sd->obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _tree_effect_animator_cb, sd->obj); sd->tree_effect_animator = 1; return EINA_TRUE; } @@ -2715,7 +2715,7 @@ _elm_genlist_tree_effect_stop(Elm_Genlist_Data *sd) if (sd->tree_effect_animator) { sd->tree_effect_animator = 0; - efl_event_callback_del(sd->obj, EFL_EVENT_ANIMATOR_TICK, _tree_effect_animator_cb, sd->obj); + efl_event_callback_del(sd->obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _tree_effect_animator_cb, sd->obj); } } diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c index a963134..b043d9f 100644 --- a/src/lib/elementary/elm_interface_scrollable.c +++ b/src/lib/elementary/elm_interface_scrollable.c @@ -33,12 +33,12 @@ } #define ELM_ANIMATOR_CONNECT(Obj, Bool, Callback, Data) \ - efl_event_callback_del(Obj, EFL_EVENT_ANIMATOR_TICK, Callback, Data); \ - efl_event_callback_add(Obj, EFL_EVENT_ANIMATOR_TICK, Callback, Data); \ + efl_event_callback_del(Obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, Callback, Data); \ + efl_event_callback_add(Obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, Callback, Data); \ Bool = 1; #define ELM_ANIMATOR_DISCONNECT(Obj, Bool, Callback, Data) \ - efl_event_callback_del(Obj, EFL_EVENT_ANIMATOR_TICK, Callback, Data); \ + efl_event_callback_del(Obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, Callback, Data); \ Bool = 0; #ifndef CLAMP diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c index 5f1dfec..92f722f 100644 --- a/src/lib/elementary/elm_map.c +++ b/src/lib/elementary/elm_map.c @@ -1214,9 +1214,9 @@ _zoom_animator_set(Elm_Map_Data *sd, Eina_Bool r = EINA_FALSE; sd->zoom_animator = !!callback; - r = efl_event_callback_del(sd->obj, EFL_EVENT_ANIMATOR_TICK, _zoom_anim_cb, sd->obj); - r |= efl_event_callback_del(sd->obj, EFL_EVENT_ANIMATOR_TICK, _zoom_bring_anim_cb, sd->obj); - if (callback) efl_event_callback_add(sd->obj, EFL_EVENT_ANIMATOR_TICK, callback, sd->obj); + r = efl_event_callback_del(sd->obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _zoom_anim_cb, sd->obj); + r |= efl_event_callback_del(sd->obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _zoom_bring_anim_cb, sd->obj); + if (callback) efl_event_callback_add(sd->obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, callback, sd->obj); return r; } diff --git a/src/lib/evas/canvas/efl_canvas_object.eo b/src/lib/evas/canvas/efl_canvas_object.eo index 385f67d..75f304a 100644 --- a/src/lib/evas/canvas/efl_canvas_object.eo +++ b/src/lib/evas/canvas/efl_canvas_object.eo @@ -1,8 +1,12 @@ import efl_text_types; struct Efl.Canvas.Object_Animation_Event; [[Information of animation events]] +struct Efl.Event_Animator_Tick { + [[EFL event animator tick data structure]] + update_area: Eina.Rect; [[Area of the canvas that will be pushed to screen.]] +} -abstract @beta Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, Efl.Gfx.Color, Efl.Gfx.Stack, Efl.Animator, +abstract @beta Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, Efl.Gfx.Color, Efl.Gfx.Stack, Efl.Input.Interface, Efl.Gfx.Hint, Efl.Gfx.Mapping, Efl.Ui.I18n, Efl.Canvas.Pointer { @@ -618,5 +622,6 @@ abstract @beta Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.En anim_started: Efl.Canvas.Object_Animation_Event; [[Animation is started.]] anim_running: Efl.Canvas.Object_Animation_Event; [[Animation is running.]] anim_ended: Efl.Canvas.Object_Animation_Event; [[Animation is ended.]] + animator,tick: Efl.Event_Animator_Tick; [[Animator tick synchronized with screen vsync if possible.]] } } diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c index 710bedd..7060437 100644 --- a/src/lib/evas/canvas/evas_callbacks.c +++ b/src/lib/evas/canvas/evas_callbacks.c @@ -780,7 +780,7 @@ _animator_repeater(void *data, const Efl_Event *event) { Evas_Object_Protected_Data *obj = data; - efl_event_callback_legacy_call(obj->object, EFL_EVENT_ANIMATOR_TICK, event->info); + efl_event_callback_legacy_call(obj->object, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, event->info); DBG("Emitting animator tick on %p.", obj->object); } @@ -803,11 +803,11 @@ _check_event_catcher_add(void *data, const Efl_Event *event) _efl_canvas_gesture_manager_callback_add_hook(gd, obj->object, array[i].desc); } - if (array[i].desc == EFL_EVENT_ANIMATOR_TICK) + if (array[i].desc == EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK) { if (obj->animator_ref++ > 0) break; - efl_event_callback_add(obj->layer->evas->evas, EFL_EVENT_ANIMATOR_TICK, _animator_repeater, obj); + efl_event_callback_add(obj->layer->evas->evas, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _animator_repeater, obj); DBG("Registering an animator tick on canvas %p for object %p.", obj->layer->evas->evas, obj->object); } @@ -840,11 +840,11 @@ _check_event_catcher_del(void *data, const Efl_Event *event) _efl_canvas_gesture_manager_callback_del_hook(gd, obj->object, array[i].desc); } - if (array[i].desc == EFL_EVENT_ANIMATOR_TICK) + if (array[i].desc == EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK) { if ((--obj->animator_ref) > 0) break; - efl_event_callback_del(obj->layer->evas->evas, EFL_EVENT_ANIMATOR_TICK, _animator_repeater, obj); + efl_event_callback_del(obj->layer->evas->evas, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _animator_repeater, obj); DBG("Unregistering an animator tick on canvas %p for object %p.", obj->layer->evas->evas, obj->object); } diff --git a/src/lib/evas/canvas/evas_canvas.eo b/src/lib/evas/canvas/evas_canvas.eo index 2e00988..cd1771a 100644 --- a/src/lib/evas/canvas/evas_canvas.eo +++ b/src/lib/evas/canvas/evas_canvas.eo @@ -1,6 +1,6 @@ import efl_input_types; -class Evas.Canvas extends Efl.Loop_Consumer implements Efl.Canvas.Scene, Efl.Animator, Efl.Input.Interface, +class Evas.Canvas extends Efl.Loop_Consumer implements Efl.Canvas.Scene, Efl.Input.Interface, Efl.Canvas.Pointer { [[Evas canvas class]]