summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Makefile_Evas.am2
-rw-r--r--src/lib/evas/gesture/efl_gesture_recognizer.c22
-rw-r--r--src/lib/evas/gesture/efl_gesture_recognizer_tap.c14
3 files changed, 32 insertions, 6 deletions
diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index 7ef134ef05..a74ebd7642 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -268,6 +268,8 @@ lib/evas/canvas/efl_animation_object_group_sequential.c \
268lib/evas/gesture/efl_gesture_touch.c \ 268lib/evas/gesture/efl_gesture_touch.c \
269lib/evas/gesture/efl_gesture.c \ 269lib/evas/gesture/efl_gesture.c \
270lib/evas/gesture/efl_gesture_tap.c \ 270lib/evas/gesture/efl_gesture_tap.c \
271lib/evas/gesture/efl_gesture_recognizer.c \
272lib/evas/gesture/efl_gesture_recognizer_tap.c \
271$(NULL) 273$(NULL)
272 274
273EXTRA_DIST2 += \ 275EXTRA_DIST2 += \
diff --git a/src/lib/evas/gesture/efl_gesture_recognizer.c b/src/lib/evas/gesture/efl_gesture_recognizer.c
new file mode 100644
index 0000000000..f25590a029
--- /dev/null
+++ b/src/lib/evas/gesture/efl_gesture_recognizer.c
@@ -0,0 +1,22 @@
1#include "efl_gesture_private.h"
2
3#define MY_CLASS EFL_GESTURE_RECOGNIZER_CLASS
4
5
6EOLIAN static Eina_Value *
7_efl_gesture_recognizer_config_get(Eo *obj EINA_UNUSED, Efl_Gesture_Recognizer_Data *pd, const char *name)
8{
9 return efl_gesture_manager_config_get(pd->manager, name);
10}
11
12
13EOLIAN static void
14_efl_gesture_recognizer_reset(Eo *obj EINA_UNUSED, Efl_Gesture_Recognizer_Data *pd EINA_UNUSED,
15 Efl_Gesture *gesture EINA_UNUSED)
16{
17
18}
19
20#include "efl_gesture_recognizer.eo.c"
21
22
diff --git a/src/lib/evas/gesture/efl_gesture_recognizer_tap.c b/src/lib/evas/gesture/efl_gesture_recognizer_tap.c
index e89106c5e5..37456a913c 100644
--- a/src/lib/evas/gesture/efl_gesture_recognizer_tap.c
+++ b/src/lib/evas/gesture/efl_gesture_recognizer_tap.c
@@ -21,10 +21,10 @@ _efl_gesture_recognizer_tap_efl_object_destructor(Eo *obj EINA_UNUSED, Efl_Gestu
21} 21}
22 22
23EOLIAN static Efl_Gesture * 23EOLIAN static Efl_Gesture *
24_efl_gesture_recognizer_tap_efl_gesture_recognizer_create(Eo *obj EINA_UNUSED, Efl_Gesture_Recognizer_Tap_Data *pd EINA_UNUSED, 24_efl_gesture_recognizer_tap_efl_gesture_recognizer_create(Eo *obj, Efl_Gesture_Recognizer_Tap_Data *pd EINA_UNUSED,
25 Efl_Object *target EINA_UNUSED) 25 Efl_Object *target EINA_UNUSED)
26{ 26{
27 return efl_add(EFL_GESTURE_TAP_CLASS, NULL); 27 return efl_add(EFL_GESTURE_TAP_CLASS, obj);
28} 28}
29 29
30EOLIAN static Efl_Gesture_Recognizer_Result 30EOLIAN static Efl_Gesture_Recognizer_Result
@@ -34,6 +34,7 @@ _efl_gesture_recognizer_tap_efl_gesture_recognizer_recognize(Eo *obj EINA_UNUSED
34 Efl_Gesture_Touch *event EINA_UNUSED) 34 Efl_Gesture_Touch *event EINA_UNUSED)
35{ 35{
36 double dist_x, dist_y, length, x, y; 36 double dist_x, dist_y, length, x, y;
37 Eina_Vector2 pos;
37 Efl_Gesture_Recognizer_Result result = EFL_GESTURE_CANCEL; 38 Efl_Gesture_Recognizer_Result result = EFL_GESTURE_CANCEL;
38 39
39 switch (efl_gesture_touch_state_get(event)) 40 switch (efl_gesture_touch_state_get(event))
@@ -41,8 +42,9 @@ _efl_gesture_recognizer_tap_efl_gesture_recognizer_recognize(Eo *obj EINA_UNUSED
41 case EFL_GESTURE_TOUCH_BEGIN: 42 case EFL_GESTURE_TOUCH_BEGIN:
42 { 43 {
43 efl_gesture_touch_start_point(event, &x, &y); 44 efl_gesture_touch_start_point(event, &x, &y);
44 efl_gesture_tap_position_set(gesture, EINA_POSITION2D(x, y)); 45 eina_vector2_set(&pos, x, y);
45 efl_gesture_hotspot_set(gesture, EINA_POSITION2D(x, y)); 46 efl_gesture_tap_position_set(gesture, pos);
47 efl_gesture_hotspot_set(gesture, pos);
46 result = EFL_GESTURE_TRIGGER; 48 result = EFL_GESTURE_TRIGGER;
47 break; 49 break;
48 } 50 }
@@ -77,7 +79,7 @@ _efl_gesture_recognizer_tap_efl_gesture_recognizer_reset(Eo *obj,
77{ 79{
78 Efl_Gesture_Tap_Data *tap; 80 Efl_Gesture_Tap_Data *tap;
79 tap = efl_data_scope_get(gesture, EFL_GESTURE_TAP_CLASS); 81 tap = efl_data_scope_get(gesture, EFL_GESTURE_TAP_CLASS);
80 tap->pos = EINA_POSITION2D(0, 0); 82 eina_vector2_set(&tap->pos, 0, 0);
81 efl_gesture_recognizer_reset(efl_super(obj, MY_CLASS), gesture); 83 efl_gesture_recognizer_reset(efl_super(obj, MY_CLASS), gesture);
82} 84}
83 85