aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-02-14 21:14:52 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-02-15 13:11:01 -0500
commit6b8b0301c35c66bfe4fa15870825c30bebcbb5c9 (patch)
tree0735972169ced1ece311e72db44a69be344c4bfb
parentelm_web: use Efl.Ui.Zoom (diff)
downloadefl-6b8b0301c35c66bfe4fa15870825c30bebcbb5c9.tar.gz
elm_map: remove 'wheel_disabled' property
-rw-r--r--src/lib/elementary/elm_map.c21
-rw-r--r--src/lib/elementary/elm_map.eo21
-rw-r--r--src/lib/elementary/elm_map_legacy.h26
3 files changed, 41 insertions, 27 deletions
diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c
index fa0a22f984..c7ec2dac3f 100644
--- a/src/lib/elementary/elm_map.c
+++ b/src/lib/elementary/elm_map.c
@@ -4470,7 +4470,7 @@ _elm_map_rotate_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, double *degree, Evas_
}
EOLIAN static void
-_elm_map_wheel_disabled_set(Eo *obj, Elm_Map_Data *sd, Eina_Bool disabled)
+_elm_map_elm_interface_scrollable_wheel_disabled_set(Eo *obj, Elm_Map_Data *sd, Eina_Bool disabled)
{
if ((!sd->wheel_disabled) && (disabled))
evas_object_event_callback_del_full
@@ -4479,12 +4479,7 @@ _elm_map_wheel_disabled_set(Eo *obj, Elm_Map_Data *sd, Eina_Bool disabled)
evas_object_event_callback_add
(obj, EVAS_CALLBACK_MOUSE_WHEEL, _mouse_wheel_cb, obj);
sd->wheel_disabled = !!disabled;
-}
-
-EOLIAN static Eina_Bool
-_elm_map_wheel_disabled_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
-{
- return sd->wheel_disabled;
+ elm_interface_scrollable_wheel_disabled_set(efl_super(obj, ELM_MAP_CLASS), disabled);
}
EOLIAN static void
@@ -5444,6 +5439,18 @@ elm_map_overlay_bubble_content_clear(Elm_Map_Overlay *bubble)
evas_object_smart_changed(bubble->wsd->pan_obj);
}
+EAPI void
+elm_map_wheel_disabled_set(Evas_Object *obj, Eina_Bool disabled)
+{
+ elm_interface_scrollable_wheel_disabled_set(obj, disabled);
+}
+
+EAPI Eina_Bool
+elm_map_wheel_disabled_get(const Evas_Object *obj)
+{
+ return elm_interface_scrollable_wheel_disabled_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 e70b8f6f8a..f3ae671305 100644
--- a/src/lib/elementary/elm_map.eo
+++ b/src/lib/elementary/elm_map.eo
@@ -82,26 +82,6 @@ class Elm.Map (Efl.Ui.Widget, Elm.Interface_Scrollable,
to unpause it.]]
}
}
- @property wheel_disabled {
- set {
- [[Enable or disable mouse wheel to be used to zoom in / out the
- map.
-
- Wheel is enabled by default.
- ]]
- }
- get {
- [[Get a value whether mouse wheel is enabled or not.
-
- Mouse wheel can be used for the user to zoom in or zoom out
- the map.
- ]]
- }
- values {
- disabled: bool; [[Use $true to disable mouse wheel or $false
- to enable it.]]
- }
- }
@property zoom_min {
set {
[[Set the minimum zoom of the source.]]
@@ -550,6 +530,7 @@ class Elm.Map (Efl.Ui.Widget, Elm.Interface_Scrollable,
Efl.Access.Widget.Action.elm_actions { get; }
Efl.Ui.Zoom.zoom_level { set; }
Efl.Ui.Zoom.zoom_mode { set; }
+ Elm.Interface_Scrollable.wheel_disabled { set; }
}
events {
press; [[Called when map was pressed]]
diff --git a/src/lib/elementary/elm_map_legacy.h b/src/lib/elementary/elm_map_legacy.h
index 993bc966f7..b919b508b0 100644
--- a/src/lib/elementary/elm_map_legacy.h
+++ b/src/lib/elementary/elm_map_legacy.h
@@ -115,4 +115,30 @@ EAPI void elm_map_zoom_mode_set(Evas_Object *obj, Elm_Map_Zoom_Mode mode);
*/
EAPI Elm_Map_Zoom_Mode elm_map_zoom_mode_get(const Evas_Object *obj);
+/**
+ * @brief Enable or disable mouse wheel to be used to zoom in / out the map.
+ *
+ * Wheel is enabled by default.
+ *
+ * @param[in] obj The object.
+ * @param[in] disabled Use @c true to disable mouse wheel or @c false to enable
+ * it.
+ *
+ * @ingroup Elm_Map
+ */
+EAPI void elm_map_wheel_disabled_set(Evas_Object *obj, Eina_Bool disabled);
+
+/**
+ * @brief Get a value whether mouse wheel is enabled or not.
+ *
+ * Mouse wheel can be used for the user to zoom in or zoom out the map.
+ *
+ * @param[in] obj The object.
+ *
+ * @return Use @c true to disable mouse wheel or @c false to enable it.
+ *
+ * @ingroup Elm_Map
+ */
+EAPI Eina_Bool elm_map_wheel_disabled_get(const Evas_Object *obj);
+
#include "elm_map.eo.legacy.h"