summaryrefslogtreecommitdiff
path: root/src/lib/evas
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-01-31 10:44:23 -0500
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-02-14 09:20:42 +0100
commit28b7ea6f0cc8c45674aca2db27361c9064bd53d1 (patch)
tree2e7c1d5e36cdbd241fb4a378c08ddffb736661fb /src/lib/evas
parent23f772b43449823c59de4db44fbac21501a3fed4 (diff)
efl/gesture: rework gesture_recognizer::add to be a 'type' property
this simplifies (and optimizes) a bunch of code by letting gesture recognizers return directly the type of gesture they recognize for use internally ref T8503 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11267
Diffstat (limited to 'src/lib/evas')
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_manager.c81
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo10
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_custom.c5
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_custom.eo1
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_double_tap.c6
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_double_tap.eo2
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_flick.c6
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_flick.eo2
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.c8
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.eo2
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c6
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.eo2
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.c8
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo2
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_triple_tap.c6
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_triple_tap.eo2
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.c8
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.eo2
18 files changed, 100 insertions, 59 deletions
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_manager.c b/src/lib/evas/gesture/efl_canvas_gesture_manager.c
index 9bed44dd97..d0b8907b2a 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_manager.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.c
@@ -36,6 +36,63 @@ static Efl_Canvas_Gesture *
36 _get_state(Efl_Canvas_Gesture_Manager_Data *pd, Eo *target, 36 _get_state(Efl_Canvas_Gesture_Manager_Data *pd, Eo *target,
37 Efl_Canvas_Gesture_Recognizer *recognizer, const Efl_Event_Description *type); 37 Efl_Canvas_Gesture_Recognizer *recognizer, const Efl_Event_Description *type);
38 38
39static const Efl_Event_Description *
40_gesture_recognizer_event_type_get(const Efl_Canvas_Gesture_Recognizer *recognizer)
41{
42 Efl_Canvas_Gesture_Recognizer_Type type = efl_gesture_recognizer_type_get(recognizer);
43
44 switch (type)
45 {
46 case EFL_GESTURE_RECOGNIZER_TYPE_TAP:
47 return EFL_EVENT_GESTURE_TAP;
48 case EFL_GESTURE_RECOGNIZER_TYPE_DOUBLETAP:
49 return EFL_EVENT_GESTURE_DOUBLE_TAP;
50 case EFL_GESTURE_RECOGNIZER_TYPE_TRIPLETAP:
51 return EFL_EVENT_GESTURE_TRIPLE_TAP;
52 case EFL_GESTURE_RECOGNIZER_TYPE_LONGTAP:
53 return EFL_EVENT_GESTURE_LONG_TAP;
54 case EFL_GESTURE_RECOGNIZER_TYPE_MOMENTUM:
55 return EFL_EVENT_GESTURE_MOMENTUM;
56 case EFL_GESTURE_RECOGNIZER_TYPE_FLICK:
57 return EFL_EVENT_GESTURE_FLICK;
58 case EFL_GESTURE_RECOGNIZER_TYPE_ZOOM:
59 return EFL_EVENT_GESTURE_ZOOM;
60 case EFL_GESTURE_RECOGNIZER_TYPE_CUSTOM:
61 return EFL_EVENT_GESTURE_CUSTOM;
62 default: break;
63 }
64 return NULL;
65}
66
67static const Efl_Class *
68_gesture_recognizer_class_type_get(const Efl_Canvas_Gesture_Recognizer *recognizer)
69{
70 Efl_Canvas_Gesture_Recognizer_Type type = efl_gesture_recognizer_type_get(recognizer);
71
72 switch (type)
73 {
74 case EFL_GESTURE_RECOGNIZER_TYPE_TAP:
75 return EFL_CANVAS_GESTURE_TAP_CLASS;
76 case EFL_GESTURE_RECOGNIZER_TYPE_DOUBLETAP:
77 return EFL_CANVAS_GESTURE_DOUBLE_TAP_CLASS;
78 case EFL_GESTURE_RECOGNIZER_TYPE_TRIPLETAP:
79 return EFL_CANVAS_GESTURE_TRIPLE_TAP_CLASS;
80 case EFL_GESTURE_RECOGNIZER_TYPE_LONGTAP:
81 return EFL_CANVAS_GESTURE_LONG_TAP_CLASS;
82 case EFL_GESTURE_RECOGNIZER_TYPE_MOMENTUM:
83 return EFL_CANVAS_GESTURE_MOMENTUM_CLASS;
84 case EFL_GESTURE_RECOGNIZER_TYPE_FLICK:
85 return EFL_CANVAS_GESTURE_FLICK_CLASS;
86 case EFL_GESTURE_RECOGNIZER_TYPE_ZOOM:
87 return EFL_CANVAS_GESTURE_ZOOM_CLASS;
88 case EFL_GESTURE_RECOGNIZER_TYPE_CUSTOM:
89 return EFL_CANVAS_GESTURE_CUSTOM_CLASS;
90 default: break;
91 }
92 return NULL;
93}
94
95
39static void 96static void
40_cleanup_object(Eina_Array *arr) 97_cleanup_object(Eina_Array *arr)
41{ 98{
@@ -335,13 +392,7 @@ EOLIAN static void
335_efl_canvas_gesture_manager_recognizer_register(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Manager_Data *pd, 392_efl_canvas_gesture_manager_recognizer_register(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Manager_Data *pd,
336 Efl_Canvas_Gesture_Recognizer *recognizer) 393 Efl_Canvas_Gesture_Recognizer *recognizer)
337{ 394{
338 Efl_Canvas_Gesture *dummy = efl_gesture_recognizer_add(recognizer, NULL); 395 const Efl_Event_Description *type = _gesture_recognizer_event_type_get(recognizer);
339
340 if (!dummy)
341 return;
342
343 const Efl_Event_Description *type = _efl_gesture_type_get(dummy);
344 efl_del(dummy);
345 //Add the recognizer to the m_recognizers 396 //Add the recognizer to the m_recognizers
346 if (type == EFL_EVENT_GESTURE_CUSTOM) 397 if (type == EFL_EVENT_GESTURE_CUSTOM)
347 { 398 {
@@ -363,16 +414,11 @@ _efl_canvas_gesture_manager_recognizer_unregister(Eo *obj EINA_UNUSED, Efl_Canva
363 Eina_List *l, *l_next; 414 Eina_List *l, *l_next;
364 Object_Gesture *object_gesture; 415 Object_Gesture *object_gesture;
365 const Efl_Event_Description *type; 416 const Efl_Event_Description *type;
366 Efl_Canvas_Gesture *dummy;
367 417
368 if (!recognizer) return; 418 if (!recognizer) return;
369 419
370 //Find the type of the recognizer 420 //Find the type of the recognizer
371 dummy = efl_gesture_recognizer_add(recognizer, 0); 421 type = _gesture_recognizer_event_type_get(recognizer);
372 if (!dummy) return;
373
374 type = _efl_gesture_type_get(dummy);
375 efl_del(dummy);
376 //Check if its already registered 422 //Check if its already registered
377 if (type == EFL_EVENT_GESTURE_CUSTOM) 423 if (type == EFL_EVENT_GESTURE_CUSTOM)
378 { 424 {
@@ -457,7 +503,7 @@ _get_state(Efl_Canvas_Gesture_Manager_Data *pd,
457 } 503 }
458 } 504 }
459 505
460 gesture = efl_gesture_recognizer_add(recognizer, target); 506 gesture = efl_add(_gesture_recognizer_class_type_get(recognizer), recognizer);
461 if (!gesture) 507 if (!gesture)
462 return 0; 508 return 0;
463 509
@@ -497,16 +543,11 @@ EOLIAN static void
497_efl_canvas_gesture_manager_recognizer_cleanup(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Manager_Data *pd, const Efl_Canvas_Gesture_Recognizer *recognizer, const Eo *target) 543_efl_canvas_gesture_manager_recognizer_cleanup(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Manager_Data *pd, const Efl_Canvas_Gesture_Recognizer *recognizer, const Eo *target)
498{ 544{
499 const Efl_Event_Description *type; 545 const Efl_Event_Description *type;
500 Efl_Canvas_Gesture *dummy;
501 546
502 EINA_SAFETY_ON_NULL_RETURN(recognizer); 547 EINA_SAFETY_ON_NULL_RETURN(recognizer);
503 548
504 //Find the type of the recognizer 549 //Find the type of the recognizer
505 dummy = efl_gesture_recognizer_add((void*)recognizer, 0); 550 type = _gesture_recognizer_event_type_get(recognizer);
506 EINA_SAFETY_ON_NULL_RETURN(dummy);
507
508 type = _efl_gesture_type_get(dummy);
509 efl_del(dummy);
510 _cleanup_cached_gestures(pd, target, type, recognizer); 551 _cleanup_cached_gestures(pd, target, type, recognizer);
511 eina_hash_del(pd->m_object_events, &recognizer, NULL); 552 eina_hash_del(pd->m_object_events, &recognizer, NULL);
512 _cleanup_object(pd->m_gestures_to_delete); 553 _cleanup_object(pd->m_gestures_to_delete);
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo b/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo
index 4f5ee45043..b27178de09 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo
@@ -13,12 +13,12 @@ abstract @beta Efl.Canvas.Gesture_Recognizer extends Efl.Object
13 ]] 13 ]]
14 c_prefix: efl_gesture_recognizer; 14 c_prefix: efl_gesture_recognizer;
15 methods { 15 methods {
16 add @pure_virtual { 16 @property type @pure_virtual {
17 [[This function is called to create a new @Efl.Canvas.Gesture object for the given target.]] 17 [[This property returns the type of gesture recognized by this recognizer.]]
18 params { 18 get {}
19 @in target: Efl.Object; [[The target canvas object.]] 19 values {
20 type: Efl.Canvas.Gesture_Recognizer_Type; [[The gesture type to recognize.]]
20 } 21 }
21 return: Efl.Canvas.Gesture; [[Returns the gesture object that will be used to track this gesture.]]
22 } 22 }
23 recognize @pure_virtual { 23 recognize @pure_virtual {
24 [[Analyzes the given $event and the current state of the $gesture object to see if the state 24 [[Analyzes the given $event and the current state of the $gesture object to see if the state
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_custom.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_custom.c
index 8900abe71a..4dfe56944a 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_custom.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_custom.c
@@ -2,6 +2,11 @@
2 2
3#define MY_CLASS EFL_CANVAS_GESTURE_RECOGNIZER_CUSTOM_CLASS 3#define MY_CLASS EFL_CANVAS_GESTURE_RECOGNIZER_CUSTOM_CLASS
4 4
5EOLIAN static Efl_Canvas_Gesture_Recognizer_Type
6_efl_canvas_gesture_recognizer_custom_efl_canvas_gesture_recognizer_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Recognizer_Custom_Data *pd EINA_UNUSED)
7{
8 return EFL_GESTURE_RECOGNIZER_TYPE_CUSTOM;
9}
5 10
6EOLIAN static Eo * 11EOLIAN static Eo *
7_efl_canvas_gesture_recognizer_custom_efl_object_finalize(Eo *obj, Efl_Canvas_Gesture_Recognizer_Custom_Data *pd) 12_efl_canvas_gesture_recognizer_custom_efl_object_finalize(Eo *obj, Efl_Canvas_Gesture_Recognizer_Custom_Data *pd)
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_custom.eo b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_custom.eo
index f691694e8c..1254d29b03 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_custom.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_custom.eo
@@ -19,5 +19,6 @@ abstract @beta Efl.Canvas.Gesture_Recognizer_Custom extends Efl.Canvas.Gesture_R
19 implements { 19 implements {
20 Efl.Object.destructor; 20 Efl.Object.destructor;
21 Efl.Object.finalize; 21 Efl.Object.finalize;
22 Efl.Canvas.Gesture_Recognizer.type { get; }
22 } 23 }
23} 24}
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_double_tap.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_double_tap.c
index 886d17f790..e1a7b7fff3 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_double_tap.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_double_tap.c
@@ -4,10 +4,10 @@
4 4
5#define TAP_TIME_OUT 0.33 5#define TAP_TIME_OUT 0.33
6 6
7EOLIAN static Efl_Canvas_Gesture * 7EOLIAN static Efl_Canvas_Gesture_Recognizer_Type
8_efl_canvas_gesture_recognizer_double_tap_efl_canvas_gesture_recognizer_add(Eo *obj, Efl_Canvas_Gesture_Recognizer_Double_Tap_Data *pd EINA_UNUSED, Efl_Object *target EINA_UNUSED) 8_efl_canvas_gesture_recognizer_double_tap_efl_canvas_gesture_recognizer_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Recognizer_Double_Tap_Data *pd EINA_UNUSED)
9{ 9{
10 return efl_add(EFL_CANVAS_GESTURE_DOUBLE_TAP_CLASS, obj); 10 return EFL_GESTURE_RECOGNIZER_TYPE_DOUBLETAP;
11} 11}
12 12
13EOLIAN static void 13EOLIAN static void
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_double_tap.eo b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_double_tap.eo
index de229b7147..1865242885 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_double_tap.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_double_tap.eo
@@ -19,7 +19,7 @@ class @beta Efl.Canvas.Gesture_Recognizer_Double_Tap extends Efl.Canvas.Gesture_
19 } 19 }
20 implements { 20 implements {
21 Efl.Object.destructor; 21 Efl.Object.destructor;
22 Efl.Canvas.Gesture_Recognizer.add; 22 Efl.Canvas.Gesture_Recognizer.type { get; }
23 Efl.Canvas.Gesture_Recognizer.recognize; 23 Efl.Canvas.Gesture_Recognizer.recognize;
24 } 24 }
25} 25}
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_flick.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_flick.c
index 90ecee66bd..80abac6eb6 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_flick.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_flick.c
@@ -22,10 +22,10 @@ _reset_recognizer(Efl_Canvas_Gesture_Recognizer_Flick_Data *pd)
22 pd->touched = EINA_FALSE; 22 pd->touched = EINA_FALSE;
23} 23}
24 24
25EOLIAN static Efl_Canvas_Gesture * 25EOLIAN static Efl_Canvas_Gesture_Recognizer_Type
26_efl_canvas_gesture_recognizer_flick_efl_canvas_gesture_recognizer_add(Eo *obj, Efl_Canvas_Gesture_Recognizer_Flick_Data *pd EINA_UNUSED, Efl_Object *target EINA_UNUSED) 26_efl_canvas_gesture_recognizer_flick_efl_canvas_gesture_recognizer_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Recognizer_Flick_Data *pd EINA_UNUSED)
27{ 27{
28 return efl_add(EFL_CANVAS_GESTURE_FLICK_CLASS, obj); 28 return EFL_GESTURE_RECOGNIZER_TYPE_FLICK;
29} 29}
30 30
31static void 31static void
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_flick.eo b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_flick.eo
index 5f038f1a17..afb9cceb3e 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_flick.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_flick.eo
@@ -6,7 +6,7 @@ class @beta Efl.Canvas.Gesture_Recognizer_Flick extends Efl.Canvas.Gesture_Recog
6 ]] 6 ]]
7 c_prefix: efl_gesture_recognizer_flick; 7 c_prefix: efl_gesture_recognizer_flick;
8 implements { 8 implements {
9 Efl.Canvas.Gesture_Recognizer.add; 9 Efl.Canvas.Gesture_Recognizer.type { get; }
10 Efl.Canvas.Gesture_Recognizer.recognize; 10 Efl.Canvas.Gesture_Recognizer.recognize;
11 } 11 }
12} 12}
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.c
index 86879037bc..83be3ea696 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.c
@@ -4,12 +4,10 @@
4 4
5#define EFL_GESTURE_LONG_TAP_TIME_OUT 1.2 5#define EFL_GESTURE_LONG_TAP_TIME_OUT 1.2
6 6
7EOLIAN static Efl_Canvas_Gesture * 7EOLIAN static Efl_Canvas_Gesture_Recognizer_Type
8_efl_canvas_gesture_recognizer_long_tap_efl_canvas_gesture_recognizer_add(Eo *obj, 8_efl_canvas_gesture_recognizer_long_tap_efl_canvas_gesture_recognizer_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Recognizer_Long_Tap_Data *pd EINA_UNUSED)
9 Efl_Canvas_Gesture_Recognizer_Long_Tap_Data *pd EINA_UNUSED,
10 Efl_Object *target EINA_UNUSED)
11{ 9{
12 return efl_add(EFL_CANVAS_GESTURE_LONG_TAP_CLASS, obj); 10 return EFL_GESTURE_RECOGNIZER_TYPE_LONGTAP;
13} 11}
14 12
15EOLIAN static void 13EOLIAN static void
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.eo b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.eo
index d18d2c236f..c0a08baeaa 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.eo
@@ -19,7 +19,7 @@ class @beta Efl.Canvas.Gesture_Recognizer_Long_Tap extends Efl.Canvas.Gesture_Re
19 } 19 }
20 implements { 20 implements {
21 Efl.Object.destructor; 21 Efl.Object.destructor;
22 Efl.Canvas.Gesture_Recognizer.add; 22 Efl.Canvas.Gesture_Recognizer.type { get; }
23 Efl.Canvas.Gesture_Recognizer.recognize; 23 Efl.Canvas.Gesture_Recognizer.recognize;
24 Efl.Canvas.Gesture_Recognizer.reset; 24 Efl.Canvas.Gesture_Recognizer.reset;
25 } 25 }
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c
index d1ea879ae7..f6cc9a1ebe 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c
@@ -7,10 +7,10 @@
7#define THUMBSCROLL_MOMENTUM_THRESHOLD 100.0 7#define THUMBSCROLL_MOMENTUM_THRESHOLD 100.0
8#define EFL_GESTURE_MINIMUM_MOMENTUM 0.001 8#define EFL_GESTURE_MINIMUM_MOMENTUM 0.001
9 9
10EOLIAN static Efl_Canvas_Gesture * 10EOLIAN static Efl_Canvas_Gesture_Recognizer_Type
11_efl_canvas_gesture_recognizer_momentum_efl_canvas_gesture_recognizer_add(Eo *obj, Efl_Canvas_Gesture_Recognizer_Momentum_Data *pd EINA_UNUSED, Efl_Object *target EINA_UNUSED) 11_efl_canvas_gesture_recognizer_momentum_efl_canvas_gesture_recognizer_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Recognizer_Momentum_Data *pd EINA_UNUSED)
12{ 12{
13 return efl_add(EFL_CANVAS_GESTURE_MOMENTUM_CLASS, obj); 13 return EFL_GESTURE_RECOGNIZER_TYPE_MOMENTUM;
14} 14}
15 15
16static void 16static void
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.eo b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.eo
index 1713fb4f68..6093fbdcbd 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.eo
@@ -6,7 +6,7 @@ class @beta Efl.Canvas.Gesture_Recognizer_Momentum extends Efl.Canvas.Gesture_Re
6 ]] 6 ]]
7 c_prefix: efl_gesture_recognizer_momentum; 7 c_prefix: efl_gesture_recognizer_momentum;
8 implements { 8 implements {
9 Efl.Canvas.Gesture_Recognizer.add; 9 Efl.Canvas.Gesture_Recognizer.type { get; }
10 Efl.Canvas.Gesture_Recognizer.recognize; 10 Efl.Canvas.Gesture_Recognizer.recognize;
11 } 11 }
12} 12}
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.c
index e63a9a5c02..e0b2c342cd 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.c
@@ -6,12 +6,10 @@
6// may using dobule tap timeout value? 6// may using dobule tap timeout value?
7#define EFL_GESTURE_RECOGNIZER_TYPE_TAP_TIME_OUT 0.33 7#define EFL_GESTURE_RECOGNIZER_TYPE_TAP_TIME_OUT 0.33
8 8
9EOLIAN static Efl_Canvas_Gesture * 9EOLIAN static Efl_Canvas_Gesture_Recognizer_Type
10_efl_canvas_gesture_recognizer_tap_efl_canvas_gesture_recognizer_add(Eo *obj, 10_efl_canvas_gesture_recognizer_tap_efl_canvas_gesture_recognizer_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Recognizer_Tap_Data *pd EINA_UNUSED)
11 Efl_Canvas_Gesture_Recognizer_Tap_Data *pd EINA_UNUSED,
12 Efl_Object *target EINA_UNUSED)
13{ 11{
14 return efl_add(EFL_CANVAS_GESTURE_TAP_CLASS, obj); 12 return EFL_GESTURE_RECOGNIZER_TYPE_TAP;
15} 13}
16 14
17static Eina_Bool 15static Eina_Bool
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo
index 26aeb83a4d..b951013c2a 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo
@@ -6,7 +6,7 @@ class @beta Efl.Canvas.Gesture_Recognizer_Tap extends Efl.Canvas.Gesture_Recogni
6 ]] 6 ]]
7 c_prefix: efl_gesture_recognizer_tap; 7 c_prefix: efl_gesture_recognizer_tap;
8 implements { 8 implements {
9 Efl.Canvas.Gesture_Recognizer.add; 9 Efl.Canvas.Gesture_Recognizer.type { get; }
10 Efl.Canvas.Gesture_Recognizer.recognize; 10 Efl.Canvas.Gesture_Recognizer.recognize;
11 } 11 }
12} 12}
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_triple_tap.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_triple_tap.c
index 6d4d54962f..3dbd61b760 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_triple_tap.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_triple_tap.c
@@ -4,10 +4,10 @@
4 4
5#define TAP_TIME_OUT 0.33 5#define TAP_TIME_OUT 0.33
6 6
7EOLIAN static Efl_Canvas_Gesture * 7EOLIAN static Efl_Canvas_Gesture_Recognizer_Type
8_efl_canvas_gesture_recognizer_triple_tap_efl_canvas_gesture_recognizer_add(Eo *obj, Efl_Canvas_Gesture_Recognizer_Triple_Tap_Data *pd EINA_UNUSED, Efl_Object *target EINA_UNUSED) 8_efl_canvas_gesture_recognizer_triple_tap_efl_canvas_gesture_recognizer_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Recognizer_Triple_Tap_Data *pd EINA_UNUSED)
9{ 9{
10 return efl_add(EFL_CANVAS_GESTURE_TRIPLE_TAP_CLASS, obj); 10 return EFL_GESTURE_RECOGNIZER_TYPE_TRIPLETAP;
11} 11}
12 12
13EOLIAN static void 13EOLIAN static void
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_triple_tap.eo b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_triple_tap.eo
index 99458938fa..11d7e9e1e0 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_triple_tap.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_triple_tap.eo
@@ -19,7 +19,7 @@ class @beta Efl.Canvas.Gesture_Recognizer_Triple_Tap extends Efl.Canvas.Gesture_
19 } 19 }
20 implements { 20 implements {
21 Efl.Object.destructor; 21 Efl.Object.destructor;
22 Efl.Canvas.Gesture_Recognizer.add; 22 Efl.Canvas.Gesture_Recognizer.type { get; }
23 Efl.Canvas.Gesture_Recognizer.recognize; 23 Efl.Canvas.Gesture_Recognizer.recognize;
24 } 24 }
25} 25}
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.c
index 9190302d47..c33b4d7602 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.c
@@ -125,12 +125,10 @@ _zoom_compute(Efl_Canvas_Gesture_Recognizer_Zoom_Data *pd,
125 return rt; 125 return rt;
126} 126}
127 127
128EOLIAN static Efl_Canvas_Gesture * 128EOLIAN static Efl_Canvas_Gesture_Recognizer_Type
129_efl_canvas_gesture_recognizer_zoom_efl_canvas_gesture_recognizer_add(Eo *obj, 129_efl_canvas_gesture_recognizer_zoom_efl_canvas_gesture_recognizer_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Recognizer_Zoom_Data *pd EINA_UNUSED)
130 Efl_Canvas_Gesture_Recognizer_Zoom_Data *pd EINA_UNUSED,
131 Efl_Object *target EINA_UNUSED)
132{ 130{
133 return efl_add(EFL_CANVAS_GESTURE_ZOOM_CLASS, obj); 131 return EFL_GESTURE_RECOGNIZER_TYPE_ZOOM;
134} 132}
135 133
136EOLIAN static Efl_Canvas_Gesture_Recognizer_Result 134EOLIAN static Efl_Canvas_Gesture_Recognizer_Result
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.eo b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.eo
index a07e112d87..8ada83abb3 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.eo
@@ -6,7 +6,7 @@ class @beta Efl.Canvas.Gesture_Recognizer_Zoom extends Efl.Canvas.Gesture_Recogn
6 ]] 6 ]]
7 c_prefix: efl_gesture_recognizer_zoom; 7 c_prefix: efl_gesture_recognizer_zoom;
8 implements { 8 implements {
9 Efl.Canvas.Gesture_Recognizer.add; 9 Efl.Canvas.Gesture_Recognizer.type { get; }
10 Efl.Canvas.Gesture_Recognizer.recognize; 10 Efl.Canvas.Gesture_Recognizer.recognize;
11 } 11 }
12} 12}