Gesture Layer: support multiple callbacks per type/state

Desktop / Enlightenment / Elementary - Daniel Zaoui [samsung.com] - 26 June 2013 06:37 UTC

elm_gesture_layer_cb_add/del functions have been added to provide this functionality. elm_gesture_layer_cb_set provided only one callback and so was overriding the callback with the new one.

For ABI compatibility, some rules were needed:- when set function is called with NULL, all the callbacks of the state will be removed (old behavior respect)- try to use set or add/del exclusively with a preference to the new APIs. This is because of the first rule and because it will be more correct.- if you remove a callback, only one instance of this callback of this type/state for this gesture will be removed, by comparing func and data. It means that if you register twice the same callback/data, it will be added twice and you will have to remove also twice too.

c5ef1cb Gesture Layer: support multiple callbacks per type/state.
ChangeLog | 5 ++
src/lib/elm_gesture_layer.c | 124 ++++++++++++++++++++++++++++++++----
src/lib/elm_gesture_layer_eo.h | 44 ++++++++++++-
src/lib/elm_gesture_layer_legacy.h | 37 +++++++++++
4 files changed, 197 insertions(+), 13 deletions(-)

Upstream: git.enlightenment.org


  • Share