From c52453de9426197f9b209ce7bd1bd2a6e93d5238 Mon Sep 17 00:00:00 2001 From: Woochanlee Date: Wed, 5 Jun 2019 20:31:19 +0900 Subject: [PATCH] efl_gesture_manager: Delete type property. Summary: User already know the gesture type. And the gesture type(Efl.Event.Description) can't using after binding. T7959 Reviewers: Jaehyun_Cho Reviewed By: Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7959 Differential Revision: https://phab.enlightenment.org/D9033 --- src/lib/evas/gesture/efl_canvas_gesture.c | 6 ++++-- src/lib/evas/gesture/efl_canvas_gesture.eo | 8 -------- src/lib/evas/gesture/efl_canvas_gesture_manager.c | 4 ++-- src/lib/evas/gesture/efl_canvas_gesture_private.h | 1 + 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/lib/evas/gesture/efl_canvas_gesture.c b/src/lib/evas/gesture/efl_canvas_gesture.c index a593684..0cc7f8d 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture.c +++ b/src/lib/evas/gesture/efl_canvas_gesture.c @@ -2,9 +2,11 @@ #define MY_CLASS EFL_CANVAS_GESTURE_CLASS -EOLIAN static const Efl_Event_Description * - _efl_canvas_gesture_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Data *pd) +const Efl_Event_Description * +_efl_gesture_type_get(const Eo *obj) { + Efl_Canvas_Gesture_Data *pd = efl_data_scope_get(obj, EFL_CANVAS_GESTURE_CLASS); + return pd->type; } diff --git a/src/lib/evas/gesture/efl_canvas_gesture.eo b/src/lib/evas/gesture/efl_canvas_gesture.eo index 2a097d5..c703237 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture.eo @@ -11,14 +11,6 @@ abstract @beta Efl.Canvas.Gesture extends Efl.Object information to the user.]] c_prefix: efl_gesture; methods { - @property type { - [[This property holds the type of the gesture.]] - get { - } - values { - @cref type: Efl.Event_Description; [[gesture type]] - } - } @property state { [[This property holds the current state of the gesture.]] get { diff --git a/src/lib/evas/gesture/efl_canvas_gesture_manager.c b/src/lib/evas/gesture/efl_canvas_gesture_manager.c index 8696004..4fbb4d4 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_manager.c +++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.c @@ -262,7 +262,7 @@ _efl_canvas_gesture_manager_recognizer_register(Eo *obj EINA_UNUSED, Efl_Canvas_ if (!dummy) return; - const Efl_Event_Description *type = efl_gesture_type_get(dummy); + const Efl_Event_Description *type = _efl_gesture_type_get(dummy); //Add the recognizer to the m_recognizers eina_hash_add(pd->m_recognizers, &type, efl_ref(recognizer)); @@ -288,7 +288,7 @@ _efl_canvas_gesture_manager_recognizer_unregister(Eo *obj EINA_UNUSED, Efl_Canva dummy = efl_gesture_recognizer_add(recognizer, 0); if (!dummy)return; - type = efl_gesture_type_get(dummy); + type = _efl_gesture_type_get(dummy); efl_del(dummy); //Check if its already registered diff --git a/src/lib/evas/gesture/efl_canvas_gesture_private.h b/src/lib/evas/gesture/efl_canvas_gesture_private.h index cfe588a..ceb7ca7 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_private.h +++ b/src/lib/evas/gesture/efl_canvas_gesture_private.h @@ -10,6 +10,7 @@ #include +const Efl_Event_Description * _efl_gesture_type_get(const Eo *obj); void efl_gesture_manager_gesture_clean_up(Eo *obj, Eo *target, const Efl_Event_Description *type); typedef struct _Efl_Canvas_Gesture_Manager_Data Efl_Canvas_Gesture_Manager_Data; -- 2.7.4