zmike pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3278e827591975548f146c600327316c5c5b7dc9
commit 3278e827591975548f146c600327316c5c5b7dc9 Author: Marcel Hollerbach <[email protected]> Date: Mon Jan 28 12:11:37 2019 -0500 elm_map: convert paused to animation property Summary: this commit migrates the paused property over to the property defined by efl.ui.zoom. This is done in order to implement all APIs in the elm_map object. ref T5719 Depends on D7783 Reviewers: cedric, zmike, segfaultxavi Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T5719 Differential Revision: https://phab.enlightenment.org/D7784 --- src/lib/elementary/elm_map.c | 16 ++++++++++++++-- src/lib/elementary/elm_map.eo | 26 +------------------------- src/lib/elementary/elm_map_legacy.h | 31 +++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 27 deletions(-) diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c index fa64e2ce82..5f1dfec0bf 100644 --- a/src/lib/elementary/elm_map.c +++ b/src/lib/elementary/elm_map.c @@ -4475,7 +4475,7 @@ _elm_map_region_get(const Eo *obj EINA_UNUSED, Elm_Map_Data *sd, double *lon, do } EOLIAN static void -_elm_map_paused_set(Eo *obj, Elm_Map_Data *sd, Eina_Bool paused) +_elm_map_efl_ui_zoom_zoom_animation_set(Eo *obj, Elm_Map_Data *sd, Eina_Bool paused) { ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); @@ -4499,7 +4499,7 @@ _elm_map_paused_set(Eo *obj, Elm_Map_Data *sd, Eina_Bool paused) } EOLIAN static Eina_Bool -_elm_map_paused_get(const Eo *obj EINA_UNUSED, Elm_Map_Data *sd) +_elm_map_efl_ui_zoom_zoom_animation_get(const Eo *obj EINA_UNUSED, Elm_Map_Data *sd) { return sd->paused; } @@ -5504,6 +5504,18 @@ elm_map_wheel_disabled_get(const Evas_Object *obj) return elm_interface_scrollable_wheel_disabled_get(obj); } +EAPI void +elm_map_paused_set(Evas_Object *obj, Eina_Bool paused) +{ + efl_ui_zoom_animation_set(obj, paused); +} + +EAPI Eina_Bool +elm_map_paused_get(const Evas_Object *obj) +{ + return efl_ui_zoom_animation_get(obj); +} + EOLIAN static Elm_Map_Overlay* _elm_map_overlay_route_add(Eo *obj, Elm_Map_Data *sd, const Elm_Map_Route *route) { diff --git a/src/lib/elementary/elm_map.eo b/src/lib/elementary/elm_map.eo index 33ac6a701d..d821f12839 100644 --- a/src/lib/elementary/elm_map.eo +++ b/src/lib/elementary/elm_map.eo @@ -58,31 +58,6 @@ class Elm.Map extends Efl.Ui.Widget implements Elm.Interface_Scrollable, eo_prefix: elm_obj_map; event_prefix: elm_map; methods { - @property paused { - set { - [[Pause or unpause the map. - - This sets the paused state to on ($true) or off ($false) - for map. - - The default is off. - - This will stop zooming using animation, changing zoom levels - will change instantly. This will stop any existing animations - that are running. - ]] - } - get { - [[Get a value whether map is paused or not. - - This gets the current paused state for the map object. - ]] - } - values { - paused: bool; [[Use $true to pause the map $obj or $false - to unpause it.]] - } - } @property zoom_min { set { [[Set the minimum zoom of the source.]] @@ -535,6 +510,7 @@ class Elm.Map extends Efl.Ui.Widget implements Elm.Interface_Scrollable, Efl.Access.Widget.Action.elm_actions { get; } Efl.Ui.Zoom.zoom_level { set; get; } Efl.Ui.Zoom.zoom_mode { set; get; } + Efl.Ui.Zoom.zoom_animation { get; set; } Elm.Interface_Scrollable.wheel_disabled { set; } } events { diff --git a/src/lib/elementary/elm_map_legacy.h b/src/lib/elementary/elm_map_legacy.h index b919b508b0..758d66114b 100644 --- a/src/lib/elementary/elm_map_legacy.h +++ b/src/lib/elementary/elm_map_legacy.h @@ -141,4 +141,35 @@ EAPI void elm_map_wheel_disabled_set(Evas_Object *obj, Eina_Bool disabled); */ EAPI Eina_Bool elm_map_wheel_disabled_get(const Evas_Object *obj); +/** + * @brief Pause or unpause the map. + * + * This sets the paused state to on @c true or off @c false for map. + * + * The default is off. + * + * This will stop zooming using animation, changing zoom levels will change + * instantly. This will stop any existing animations that are running. + * + * @param[in] obj The object. + * @param[in] paused Use @c true to pause the map @c obj or @c false to unpause + * it. + * + * @ingroup Elm_Map_Group + */ +EAPI void elm_map_paused_set(Evas_Object *obj, Eina_Bool paused); + +/** + * @brief Get a value whether map is paused or not. + * + * This gets the current paused state for the map object. + * + * @param[in] obj The object. + * + * @return Use @c true to pause the map @c obj or @c false to unpause it. + * + * @ingroup Elm_Map_Group + */ +EAPI Eina_Bool elm_map_paused_get(const Evas_Object *obj); + #include "elm_map.eo.legacy.h" --
