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
This commit is contained in:
Mike Blumenkrantz 2020-01-24 13:38:49 -05:00 committed by Marcel Hollerbach
parent 89e8cb912c
commit 54cb6e04d2
2 changed files with 4 additions and 0 deletions

View File

@ -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);

View File

@ -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;