summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-01-24 13:38:49 -0500
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-02-05 10:10:08 +0100
commit54cb6e04d2ff71858da91f11da1f73e1ef970284 (patch)
treebcee41e6364da1fa21f46719c30612904cfd7b79
parent89e8cb912cee6c0bce47db36f458a2410a4c64dc (diff)
downloadefl-54cb6e04d2ff71858da91f11da1f73e1ef970284.tar.gz
efl/gesture: add an event to notify when a config value has been changed
recognizers should be storing config values internally to avoid overhead of multiple eo/hash lookups on every event Reviewed-by: woochan lee <wc0917.lee@samsung.com> Differential Revision: https://phab.enlightenment.org/D11174
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_manager.c1
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_manager.eo3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_manager.c b/src/lib/evas/gesture/efl_canvas_gesture_manager.c
index 5108eecc31..54b5ab6d18 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_manager.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.c
@@ -142,6 +142,7 @@ _efl_canvas_gesture_manager_config_set(Eo *obj, Efl_Canvas_Gesture_Manager_Data
v = eina_value_new(eina_value_type_get(value));
eina_value_copy(value, v);
eina_hash_add(pd->m_config, name, v);
+ efl_event_callback_call(obj, EFL_GESTURE_MANAGER_EVENT_CONFIG_CHANGED, (void*)name);
if (!eina_streq(name, "glayer_tap_finger_size")) return;
eina_value_get(value, &finger_size);
_update_finger_sizes(pd, finger_size);
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_manager.eo b/src/lib/evas/gesture/efl_canvas_gesture_manager.eo
index 1784f20d1e..1c7f8d2062 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_manager.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.eo
@@ -43,6 +43,9 @@ class @beta Efl.Canvas.Gesture_Manager extends Efl.Object
}
}
}
+ events {
+ config,changed: string; [[Called when a config value has been changed for the manager object. Passed string is the name of the value.]]
+ }
implements {
Efl.Object.constructor;
Efl.Object.destructor;