summaryrefslogtreecommitdiff
path: root/src/lib/evas/gesture
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-02-21 14:20:09 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-02-21 14:43:37 -0500
commitbbbdfbecc4ecafc25841fc1b36d82916f5db6e0e (patch)
tree08ac6fbf8dedaa1f4fe499418e8bbb172e3cb8be /src/lib/evas/gesture
parenta0a80fc74af9f874c67bb8388d2d7de5d9feb24e (diff)
Efl.Gesture: rename to Efl.Canvas.Gesture
most C api remains unchanged ref T6714 ref T6716
Diffstat (limited to 'src/lib/evas/gesture')
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture.c36
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture.eo (renamed from src/lib/evas/gesture/efl_gesture.eo)7
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_long_tap.c27
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_long_tap.eo (renamed from src/lib/evas/gesture/efl_gesture_long_tap.eo)5
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_manager.c (renamed from src/lib/evas/gesture/efl_gesture_manager.c)90
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_manager.eo (renamed from src/lib/evas/gesture/efl_gesture_manager.eo)13
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_private.h42
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer.c18
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo (renamed from src/lib/evas/gesture/efl_gesture_recognizer.eo)17
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.c (renamed from src/lib/evas/gesture/efl_gesture_recognizer_long_tap.c)34
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.eo11
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.c (renamed from src/lib/evas/gesture/efl_gesture_recognizer_tap.c)22
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo10
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_tap.c19
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_tap.eo (renamed from src/lib/evas/gesture/efl_gesture_tap.eo)5
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_touch.c (renamed from src/lib/evas/gesture/efl_gesture_touch.c)32
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_touch.eo (renamed from src/lib/evas/gesture/efl_gesture_touch.eo)7
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_types.eot (renamed from src/lib/evas/gesture/efl_gesture_types.eot)6
-rw-r--r--src/lib/evas/gesture/efl_gesture.c36
-rw-r--r--src/lib/evas/gesture/efl_gesture_long_tap.c27
-rw-r--r--src/lib/evas/gesture/efl_gesture_private.h42
-rw-r--r--src/lib/evas/gesture/efl_gesture_recognizer.c18
-rw-r--r--src/lib/evas/gesture/efl_gesture_recognizer_long_tap.eo10
-rw-r--r--src/lib/evas/gesture/efl_gesture_recognizer_tap.eo9
-rw-r--r--src/lib/evas/gesture/efl_gesture_tap.c19
25 files changed, 285 insertions, 277 deletions
diff --git a/src/lib/evas/gesture/efl_canvas_gesture.c b/src/lib/evas/gesture/efl_canvas_gesture.c
new file mode 100644
index 0000000..b0fca13
--- /dev/null
+++ b/src/lib/evas/gesture/efl_canvas_gesture.c
@@ -0,0 +1,36 @@
1#include "efl_canvas_gesture_private.h"
2
3#define MY_CLASS EFL_CANVAS_GESTURE_CLASS
4
5EOLIAN static const Efl_Event_Description *
6 _efl_canvas_gesture_type_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Data *pd)
7{
8 return pd->type;
9}
10
11EOLIAN static Efl_Canvas_Gesture_State
12_efl_canvas_gesture_state_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Data *pd)
13{
14 return pd->state;
15}
16
17EOLIAN static void
18_efl_canvas_gesture_state_set(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Data *pd, Efl_Canvas_Gesture_State state)
19{
20 pd->state = state;
21}
22
23EOLIAN static void
24_efl_canvas_gesture_hotspot_set(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Data *pd, Eina_Vector2 hotspot)
25{
26 pd->hotspot = hotspot;
27}
28
29
30EOLIAN static Eina_Vector2
31_efl_canvas_gesture_hotspot_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Data *pd)
32{
33 return pd->hotspot;
34}
35
36#include "efl_canvas_gesture.eo.c" \ No newline at end of file
diff --git a/src/lib/evas/gesture/efl_gesture.eo b/src/lib/evas/gesture/efl_canvas_gesture.eo
index 5fd6de9..3a682dc 100644
--- a/src/lib/evas/gesture/efl_gesture.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture.eo
@@ -1,8 +1,9 @@
1import efl_gesture_types; 1import efl_canvas_gesture_types;
2 2
3abstract Efl.Gesture(Efl.Object) 3abstract Efl.Canvas.Gesture(Efl.Object)
4{ 4{
5 [[EFL Gesture abstract class]] 5 [[EFL Gesture abstract class]]
6 eo_prefix: efl_gesture;
6 methods { 7 methods {
7 @property type { 8 @property type {
8 [[This property holds the type of the gesture.]] 9 [[This property holds the type of the gesture.]]
@@ -19,7 +20,7 @@ abstract Efl.Gesture(Efl.Object)
19 set { 20 set {
20 } 21 }
21 values { 22 values {
22 state: Efl.Gesture.State; [[gesture state]] 23 state: Efl.Canvas.Gesture.State; [[gesture state]]
23 } 24 }
24 } 25 }
25 @property hotspot { 26 @property hotspot {
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_long_tap.c b/src/lib/evas/gesture/efl_canvas_gesture_long_tap.c
new file mode 100644
index 0000000..099893a
--- /dev/null
+++ b/src/lib/evas/gesture/efl_canvas_gesture_long_tap.c
@@ -0,0 +1,27 @@
1#include "efl_canvas_gesture_private.h"
2
3#define MY_CLASS EFL_CANVAS_GESTURE_LONG_TAP_CLASS
4
5
6EOLIAN static Efl_Object *
7_efl_canvas_gesture_long_tap_efl_object_constructor(Eo *obj, Efl_Canvas_Gesture_Long_Tap_Data *pd EINA_UNUSED)
8{
9 Efl_Canvas_Gesture_Data *gd;
10
11 obj = efl_constructor(efl_super(obj, MY_CLASS));
12 gd = efl_data_scope_get(obj, EFL_CANVAS_GESTURE_CLASS);
13 gd->type = EFL_EVENT_GESTURE_LONG_TAP;
14
15 return obj;
16}
17
18EOLIAN static void
19_efl_canvas_gesture_long_tap_efl_object_destructor(Eo *obj, Efl_Canvas_Gesture_Long_Tap_Data *pd)
20{
21 if (pd->timeout)
22 ecore_timer_del(pd->timeout);
23
24 efl_destructor(efl_super(obj, MY_CLASS));
25}
26
27#include "efl_canvas_gesture_long_tap.eo.c"
diff --git a/src/lib/evas/gesture/efl_gesture_long_tap.eo b/src/lib/evas/gesture/efl_canvas_gesture_long_tap.eo
index 4bb0869..c60878f 100644
--- a/src/lib/evas/gesture/efl_gesture_long_tap.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_long_tap.eo
@@ -1,8 +1,9 @@
1import efl_gesture_types; 1import efl_canvas_gesture_types;
2 2
3class Efl.Gesture.Long_Tap (Efl.Gesture) 3class Efl.Canvas.Gesture.Long_Tap (Efl.Canvas.Gesture)
4{ 4{
5 [[EFL Gesture Long Tap class]] 5 [[EFL Gesture Long Tap class]]
6 eo_prefix: efl_gesture_long_tap;
6 event_prefix: efl; 7 event_prefix: efl;
7 events { 8 events {
8 gesture,long_tap; [[Event for tap gesture]] 9 gesture,long_tap; [[Event for tap gesture]]
diff --git a/src/lib/evas/gesture/efl_gesture_manager.c b/src/lib/evas/gesture/efl_canvas_gesture_manager.c
index 36cf4e9..af6cc5d 100644
--- a/src/lib/evas/gesture/efl_gesture_manager.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.c
@@ -1,16 +1,16 @@
1#include "efl_gesture_private.h" 1#include "efl_canvas_gesture_private.h"
2 2
3#define MY_CLASS EFL_GESTURE_MANAGER_CLASS 3#define MY_CLASS EFL_CANVAS_GESTURE_MANAGER_CLASS
4 4
5typedef struct _Object_Gesture 5typedef struct _Object_Gesture
6{ 6{
7 Eo *object; 7 Eo *object;
8 const Efl_Event_Description *type; 8 const Efl_Event_Description *type;
9 Efl_Gesture *gesture; 9 Efl_Canvas_Gesture *gesture;
10 Efl_Gesture_Recognizer *recognizer; 10 Efl_Canvas_Gesture_Recognizer *recognizer;
11}Object_Gesture; 11}Object_Gesture;
12 12
13typedef struct _Efl_Gesture_Manager_Data 13typedef struct _Efl_Canvas_Gesture_Manager_Data
14{ 14{
15 // keeps track of all the gesture request for a particular target 15 // keeps track of all the gesture request for a particular target
16 Eina_Hash *m_gesture_contex; // (*target, *event_desc) 16 Eina_Hash *m_gesture_contex; // (*target, *event_desc)
@@ -24,13 +24,13 @@ typedef struct _Efl_Gesture_Manager_Data
24 Eina_List *m_gestures_to_delete; 24 Eina_List *m_gestures_to_delete;
25 25
26 Eina_Hash *m_config; 26 Eina_Hash *m_config;
27} Efl_Gesture_Manager_Data; 27} Efl_Canvas_Gesture_Manager_Data;
28 28
29static void _cleanup_cached_gestures(Efl_Gesture_Manager_Data *pd, 29static void _cleanup_cached_gestures(Efl_Canvas_Gesture_Manager_Data *pd,
30 Eo *target, const Efl_Event_Description *type); 30 Eo *target, const Efl_Event_Description *type);
31static Efl_Gesture* 31static Efl_Canvas_Gesture*
32_get_state(Efl_Gesture_Manager_Data *pd, Eo *target, 32_get_state(Efl_Canvas_Gesture_Manager_Data *pd, Eo *target,
33 Efl_Gesture_Recognizer *recognizer, const Efl_Event_Description *type); 33 Efl_Canvas_Gesture_Recognizer *recognizer, const Efl_Event_Description *type);
34 34
35static void 35static void
36_cleanup_object(Eina_List *list) 36_cleanup_object(Eina_List *list)
@@ -53,7 +53,7 @@ _hash_free_cb(Eo *obj)
53} 53}
54 54
55EOLIAN static Efl_Object * 55EOLIAN static Efl_Object *
56_efl_gesture_manager_efl_object_constructor(Eo *obj, Efl_Gesture_Manager_Data *pd EINA_UNUSED) 56_efl_canvas_gesture_manager_efl_object_constructor(Eo *obj, Efl_Canvas_Gesture_Manager_Data *pd EINA_UNUSED)
57{ 57{
58 obj = efl_constructor(efl_super(obj, MY_CLASS)); 58 obj = efl_constructor(efl_super(obj, MY_CLASS));
59 59
@@ -65,21 +65,21 @@ _efl_gesture_manager_efl_object_constructor(Eo *obj, Efl_Gesture_Manager_Data *p
65 65
66 pd->m_config = eina_hash_string_superfast_new(EINA_FREE_CB(eina_value_free)); 66 pd->m_config = eina_hash_string_superfast_new(EINA_FREE_CB(eina_value_free));
67 67
68 efl_gesture_manager_recognizer_register(obj, efl_add(EFL_GESTURE_RECOGNIZER_TAP_CLASS, obj)); 68 efl_gesture_manager_recognizer_register(obj, efl_add(EFL_CANVAS_GESTURE_RECOGNIZER_TAP_CLASS, obj));
69 efl_gesture_manager_recognizer_register(obj, efl_add(EFL_GESTURE_RECOGNIZER_LONG_TAP_CLASS, obj)); 69 efl_gesture_manager_recognizer_register(obj, efl_add(EFL_CANVAS_GESTURE_RECOGNIZER_LONG_TAP_CLASS, obj));
70 70
71 return obj; 71 return obj;
72} 72}
73 73
74 74
75EOLIAN static Eina_Value * 75EOLIAN static Eina_Value *
76_efl_gesture_manager_config_get(Eo *obj EINA_UNUSED, Efl_Gesture_Manager_Data *pd, const char *name) 76_efl_canvas_gesture_manager_config_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Manager_Data *pd, const char *name)
77{ 77{
78 return eina_hash_find(pd->m_config, name); 78 return eina_hash_find(pd->m_config, name);
79} 79}
80 80
81EOLIAN static void 81EOLIAN static void
82_efl_gesture_manager_config_set(Eo *obj EINA_UNUSED, Efl_Gesture_Manager_Data *pd, const char *name, Eina_Value *value) 82_efl_canvas_gesture_manager_config_set(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Manager_Data *pd, const char *name, Eina_Value *value)
83{ 83{
84 Eina_Value *v = eina_value_new(eina_value_type_get(value)); 84 Eina_Value *v = eina_value_new(eina_value_type_get(value));
85 eina_value_copy(value, v); 85 eina_value_copy(value, v);
@@ -87,7 +87,7 @@ _efl_gesture_manager_config_set(Eo *obj EINA_UNUSED, Efl_Gesture_Manager_Data *p
87} 87}
88 88
89EOLIAN static void 89EOLIAN static void
90_efl_gesture_manager_efl_object_destructor(Eo *obj, Efl_Gesture_Manager_Data *pd EINA_UNUSED) 90_efl_canvas_gesture_manager_efl_object_destructor(Eo *obj, Efl_Canvas_Gesture_Manager_Data *pd EINA_UNUSED)
91{ 91{
92 eina_hash_free(pd->m_config); 92 eina_hash_free(pd->m_config);
93 eina_hash_free(pd->m_recognizers); 93 eina_hash_free(pd->m_recognizers);
@@ -98,11 +98,11 @@ _efl_gesture_manager_efl_object_destructor(Eo *obj, Efl_Gesture_Manager_Data *pd
98} 98}
99 99
100void 100void
101_efl_gesture_manager_callback_add_hook(Eo *obj, Eo *target, const Efl_Event_Description *type) 101_efl_canvas_gesture_manager_callback_add_hook(Eo *obj, Eo *target, const Efl_Event_Description *type)
102{ 102{
103 Efl_Gesture_Manager_Data *pd = efl_data_scope_get(obj, MY_CLASS); 103 Efl_Canvas_Gesture_Manager_Data *pd = efl_data_scope_get(obj, MY_CLASS);
104 // if there is a recognizer registered for that event then add it to the gesture context 104 // if there is a recognizer registered for that event then add it to the gesture context
105 Efl_Gesture_Recognizer *recognizer = eina_hash_find (pd->m_recognizers, &type); 105 Efl_Canvas_Gesture_Recognizer *recognizer = eina_hash_find (pd->m_recognizers, &type);
106 if (recognizer) 106 if (recognizer)
107 { 107 {
108 // add it to the gesture context. 108 // add it to the gesture context.
@@ -111,11 +111,11 @@ _efl_gesture_manager_callback_add_hook(Eo *obj, Eo *target, const Efl_Event_Desc
111} 111}
112 112
113void 113void
114_efl_gesture_manager_callback_del_hook(Eo *obj, Eo *target, const Efl_Event_Description *type) 114_efl_canvas_gesture_manager_callback_del_hook(Eo *obj, Eo *target, const Efl_Event_Description *type)
115{ 115{
116 Efl_Gesture_Manager_Data *pd = efl_data_scope_get(obj, MY_CLASS); 116 Efl_Canvas_Gesture_Manager_Data *pd = efl_data_scope_get(obj, MY_CLASS);
117 // if there is a recognizer registered for that event then add it to the gesture context 117 // if there is a recognizer registered for that event then add it to the gesture context
118 Efl_Gesture_Recognizer *recognizer = eina_hash_find (pd->m_recognizers, &type); 118 Efl_Canvas_Gesture_Recognizer *recognizer = eina_hash_find (pd->m_recognizers, &type);
119 if (recognizer) 119 if (recognizer)
120 { 120 {
121 eina_hash_list_remove(pd->m_gesture_contex, &target, type); 121 eina_hash_list_remove(pd->m_gesture_contex, &target, type);
@@ -124,16 +124,16 @@ _efl_gesture_manager_callback_del_hook(Eo *obj, Eo *target, const Efl_Event_Desc
124} 124}
125 125
126void 126void
127_efl_gesture_manager_filter_event(Eo *obj, Eo *target, void *event) 127_efl_canvas_gesture_manager_filter_event(Eo *obj, Eo *target, void *event)
128{ 128{
129 Eina_List *l, *gesture_context; 129 Eina_List *l, *gesture_context;
130 Efl_Gesture_Manager_Data *pd; 130 Efl_Canvas_Gesture_Manager_Data *pd;
131 const Efl_Event_Description *gesture_type; 131 const Efl_Event_Description *gesture_type;
132 Efl_Gesture_Recognizer *recognizer; 132 Efl_Canvas_Gesture_Recognizer *recognizer;
133 Efl_Gesture *gesture; 133 Efl_Canvas_Gesture *gesture;
134 Efl_Gesture_Recognizer_Result recog_result; 134 Efl_Canvas_Gesture_Recognizer_Result recog_result;
135 Efl_Gesture_Recognizer_Result recog_state; 135 Efl_Canvas_Gesture_Recognizer_Result recog_state;
136 Efl_Gesture_Touch *touch_event; 136 Efl_Canvas_Gesture_Touch *touch_event;
137 Efl_Input_Pointer_Data *pointer_data = efl_data_scope_get(event, EFL_INPUT_POINTER_CLASS); 137 Efl_Input_Pointer_Data *pointer_data = efl_data_scope_get(event, EFL_INPUT_POINTER_CLASS);
138 138
139 pd = efl_data_scope_get(obj, MY_CLASS); 139 pd = efl_data_scope_get(obj, MY_CLASS);
@@ -144,7 +144,7 @@ _efl_gesture_manager_filter_event(Eo *obj, Eo *target, void *event)
144 touch_event = eina_hash_find(pd->m_object_events, &target); 144 touch_event = eina_hash_find(pd->m_object_events, &target);
145 if (!touch_event) 145 if (!touch_event)
146 { 146 {
147 touch_event = efl_add(EFL_GESTURE_TOUCH_CLASS, NULL); 147 touch_event = efl_add(EFL_CANVAS_GESTURE_TOUCH_CLASS, NULL);
148 eina_hash_add(pd->m_object_events, &target, touch_event); 148 eina_hash_add(pd->m_object_events, &target, touch_event);
149 } 149 }
150 150
@@ -207,11 +207,11 @@ _efl_gesture_manager_filter_event(Eo *obj, Eo *target, void *event)
207} 207}
208 208
209EOLIAN static const Efl_Event_Description * 209EOLIAN static const Efl_Event_Description *
210_efl_gesture_manager_recognizer_register(Eo *obj EINA_UNUSED, Efl_Gesture_Manager_Data *pd, 210_efl_canvas_gesture_manager_recognizer_register(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Manager_Data *pd,
211 Efl_Gesture_Recognizer *recognizer) 211 Efl_Canvas_Gesture_Recognizer *recognizer)
212{ 212{
213 Efl_Gesture_Recognizer_Data *rpd; 213 Efl_Canvas_Gesture_Recognizer_Data *rpd;
214 Efl_Gesture *dummy = efl_gesture_recognizer_create(recognizer, 0); 214 Efl_Canvas_Gesture *dummy = efl_gesture_recognizer_create(recognizer, 0);
215 215
216 if (!dummy) 216 if (!dummy)
217 return NULL; 217 return NULL;
@@ -221,7 +221,7 @@ _efl_gesture_manager_recognizer_register(Eo *obj EINA_UNUSED, Efl_Gesture_Manage
221 // Add the recognizer to the m_recognizers 221 // Add the recognizer to the m_recognizers
222 eina_hash_add(pd->m_recognizers, &type, recognizer); 222 eina_hash_add(pd->m_recognizers, &type, recognizer);
223 // update the manager 223 // update the manager
224 rpd = efl_data_scope_get(recognizer, EFL_GESTURE_RECOGNIZER_CLASS); 224 rpd = efl_data_scope_get(recognizer, EFL_CANVAS_GESTURE_RECOGNIZER_CLASS);
225 rpd->manager = obj; 225 rpd->manager = obj;
226 226
227 efl_del(dummy); 227 efl_del(dummy);
@@ -230,13 +230,13 @@ _efl_gesture_manager_recognizer_register(Eo *obj EINA_UNUSED, Efl_Gesture_Manage
230} 230}
231 231
232EOLIAN static void 232EOLIAN static void
233_efl_gesture_manager_recognizer_unregister(Eo *obj EINA_UNUSED, Efl_Gesture_Manager_Data *pd, 233_efl_canvas_gesture_manager_recognizer_unregister(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Manager_Data *pd,
234 Efl_Gesture_Recognizer *recognizer) 234 Efl_Canvas_Gesture_Recognizer *recognizer)
235{ 235{
236 Eina_List *l, *l_next; 236 Eina_List *l, *l_next;
237 Object_Gesture *object_gesture; 237 Object_Gesture *object_gesture;
238 const Efl_Event_Description *type; 238 const Efl_Event_Description *type;
239 Efl_Gesture *dummy; 239 Efl_Canvas_Gesture *dummy;
240 240
241 if (!recognizer) return; 241 if (!recognizer) return;
242 242
@@ -266,7 +266,7 @@ _efl_gesture_manager_recognizer_unregister(Eo *obj EINA_UNUSED, Efl_Gesture_Mana
266} 266}
267 267
268// EOLIAN static void 268// EOLIAN static void
269// _efl_gesture_manager_ungrab_all(Eo *obj EINA_UNUSED, Efl_Gesture_Manager_Data *pd, 269// _efl_canvas_gesture_manager_ungrab_all(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Manager_Data *pd,
270// Eo *target) 270// Eo *target)
271// { 271// {
272// const Efl_Event_Description *type; 272// const Efl_Event_Description *type;
@@ -284,13 +284,13 @@ _efl_gesture_manager_recognizer_unregister(Eo *obj EINA_UNUSED, Efl_Gesture_Mana
284// } 284// }
285 285
286// get or create a gesture object that will represent the state for a given object, used by the recognizer 286// get or create a gesture object that will represent the state for a given object, used by the recognizer
287Efl_Gesture* 287Efl_Canvas_Gesture*
288_get_state(Efl_Gesture_Manager_Data *pd, 288_get_state(Efl_Canvas_Gesture_Manager_Data *pd,
289 Eo *target, Efl_Gesture_Recognizer *recognizer, const Efl_Event_Description *type) 289 Eo *target, Efl_Canvas_Gesture_Recognizer *recognizer, const Efl_Event_Description *type)
290{ 290{
291 Eina_List *l; 291 Eina_List *l;
292 Object_Gesture *object_gesture; 292 Object_Gesture *object_gesture;
293 Efl_Gesture *gesture; 293 Efl_Canvas_Gesture *gesture;
294 294
295 // if the widget is being deleted we should be careful not to 295 // if the widget is being deleted we should be careful not to
296 // create a new state. 296 // create a new state.
@@ -327,7 +327,7 @@ _get_state(Efl_Gesture_Manager_Data *pd,
327} 327}
328 328
329static void 329static void
330_cleanup_cached_gestures(Efl_Gesture_Manager_Data *pd, 330_cleanup_cached_gestures(Efl_Canvas_Gesture_Manager_Data *pd,
331 Eo *target, const Efl_Event_Description *type) 331 Eo *target, const Efl_Event_Description *type)
332{ 332{
333 Eina_List *l, *l_next; 333 Eina_List *l, *l_next;
@@ -345,4 +345,4 @@ _cleanup_cached_gestures(Efl_Gesture_Manager_Data *pd,
345} 345}
346 346
347 347
348#include "efl_gesture_manager.eo.c" 348#include "efl_canvas_gesture_manager.eo.c"
diff --git a/src/lib/evas/gesture/efl_gesture_manager.eo b/src/lib/evas/gesture/efl_canvas_gesture_manager.eo
index 52d48ec..fa2dbd3 100644
--- a/src/lib/evas/gesture/efl_gesture_manager.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.eo
@@ -1,20 +1,21 @@
1import efl_gesture_types; 1import efl_canvas_gesture_types;
2 2
3class Efl.Gesture.Manager (Efl.Object) 3class Efl.Canvas.Gesture.Manager (Efl.Object)
4{ 4{
5 [[EFL Gesture Manager class]] 5 [[EFL Gesture Manager class]]
6 eo_prefix: efl_gesture_manager;
6 methods { 7 methods {
7 recognizer_register { 8 recognizer_register {
8 [[This function is called to register a new Efl.Gesture.Recognizer]] 9 [[This function is called to register a new Efl.Canvas.Gesture.Recognizer]]
9 params { 10 params {
10 @in recognizer: Efl.Gesture.Recognizer; [[The gesture recognizer object]] 11 @in recognizer: Efl.Canvas.Gesture.Recognizer; [[The gesture recognizer object]]
11 } 12 }
12 return: ptr(const(Efl.Event.Description)); [[Returns the Efl.Event.Description type the recognizer supports]] 13 return: ptr(const(Efl.Event.Description)); [[Returns the Efl.Event.Description type the recognizer supports]]
13 } 14 }
14 recognizer_unregister { 15 recognizer_unregister {
15 [[This function is called to unregister a Efl.Gesture.Recognizer]] 16 [[This function is called to unregister a Efl.Canvas.Gesture.Recognizer]]
16 params { 17 params {
17 @in recognizer: Efl.Gesture.Recognizer; [[The gesture recognizer object]] 18 @in recognizer: Efl.Canvas.Gesture.Recognizer; [[The gesture recognizer object]]
18 } 19 }
19 } 20 }
20 @property config { 21 @property config {
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_private.h b/src/lib/evas/gesture/efl_canvas_gesture_private.h
new file mode 100644
index 0000000..c09fd26
--- /dev/null
+++ b/src/lib/evas/gesture/efl_canvas_gesture_private.h
@@ -0,0 +1,42 @@
1#ifndef EFL_GESTURE_PRIVATE_H_
2#define EFL_GESTURE_PRIVATE_H_
3
4#include "evas_common_private.h"
5#include "evas_private.h"
6#define EFL_INTERNAL_UNSTABLE
7#include "interfaces/efl_common_internal.h"
8
9#include <Ecore.h>
10
11//private gesture classes
12#include "efl_canvas_gesture_recognizer_tap.eo.h"
13#include "efl_canvas_gesture_recognizer_long_tap.eo.h"
14
15typedef struct _Efl_Canvas_Gesture_Recognizer_Data Efl_Canvas_Gesture_Recognizer_Data;
16typedef struct _Efl_Canvas_Gesture_Data Efl_Canvas_Gesture_Data;
17typedef struct _Efl_Canvas_Gesture_Tap_Data Efl_Canvas_Gesture_Tap_Data;
18typedef struct _Efl_Canvas_Gesture_Long_Tap_Data Efl_Canvas_Gesture_Long_Tap_Data;
19
20struct _Efl_Canvas_Gesture_Recognizer_Data
21{
22 Eo *manager; // keeps a reference of the manager
23};
24
25struct _Efl_Canvas_Gesture_Data
26{
27 const Efl_Event_Description *type;
28 Efl_Canvas_Gesture_State state;
29 Eina_Vector2 hotspot;
30};
31
32struct _Efl_Canvas_Gesture_Tap_Data
33{
34};
35
36struct _Efl_Canvas_Gesture_Long_Tap_Data
37{
38 Ecore_Timer *timeout;
39 Eina_Bool is_timeout;
40};
41
42#endif
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer.c
new file mode 100644
index 0000000..c7e4b13
--- /dev/null
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer.c
@@ -0,0 +1,18 @@
1#include "efl_canvas_gesture_private.h"
2
3#define MY_CLASS EFL_CANVAS_GESTURE_RECOGNIZER_CLASS
4
5EOLIAN static Eina_Value *
6_efl_canvas_gesture_recognizer_config_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Recognizer_Data *pd, const char *name)
7{
8 return efl_gesture_manager_config_get(pd->manager, name);
9}
10
11EOLIAN static void
12_efl_canvas_gesture_recognizer_reset(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Recognizer_Data *pd EINA_UNUSED,
13 Efl_Canvas_Gesture *gesture EINA_UNUSED)
14{
15
16}
17
18#include "efl_canvas_gesture_recognizer.eo.c"
diff --git a/src/lib/evas/gesture/efl_gesture_recognizer.eo b/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo
index 6176381..db8cc9e 100644
--- a/src/lib/evas/gesture/efl_gesture_recognizer.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo
@@ -1,15 +1,16 @@
1import efl_gesture_types; 1import efl_canvas_gesture_types;
2 2
3abstract Efl.Gesture.Recognizer (Efl.Object) 3abstract Efl.Canvas.Gesture.Recognizer (Efl.Object)
4{ 4{
5 [[EFL Gesture Recognizer abstract class]] 5 [[EFL Gesture Recognizer abstract class]]
6 eo_prefix: efl_gesture_recognizer;
6 methods { 7 methods {
7 create @pure_virtual { 8 create @pure_virtual {
8 [[This function is called to create a new Efl.Gesture object for the given target]] 9 [[This function is called to create a new Efl.Canvas.Gesture object for the given target]]
9 params { 10 params {
10 @in target: Efl.Object; [[The target widget]] 11 @in target: Efl.Object; [[The target widget]]
11 } 12 }
12 return: Efl.Gesture; [[Returns the Efl.Gesture event object]] 13 return: Efl.Canvas.Gesture; [[Returns the Efl.Canvas.Gesture event object]]
13 } 14 }
14 recognize @pure_virtual { 15 recognize @pure_virtual {
15 [[Handles the given event for the watched object. 16 [[Handles the given event for the watched object.
@@ -18,17 +19,17 @@ abstract Efl.Gesture.Recognizer (Efl.Object)
18 suitable result for the current recognition step. 19 suitable result for the current recognition step.
19 ]] 20 ]]
20 params { 21 params {
21 @in gesture: Efl.Gesture; [[The gesture object]] 22 @in gesture: Efl.Canvas.Gesture; [[The gesture object]]
22 @in watched: Efl.Object; [[The watched object]] 23 @in watched: Efl.Object; [[The watched object]]
23 @in event: Efl.Gesture.Touch; [[The pointer event]] 24 @in event: Efl.Canvas.Gesture.Touch; [[The pointer event]]
24 } 25 }
25 return: Efl.Gesture.Recognizer_Result; [[Returns the Efl.Gesture event object]] 26 return: Efl.Canvas.Gesture.Recognizer_Result; [[Returns the Efl.Canvas.Gesture event object]]
26 } 27 }
27 /* FIXME: This function is not used? */ 28 /* FIXME: This function is not used? */
28 reset { 29 reset {
29 [[This function is called by the framework to reset a given gesture.]] 30 [[This function is called by the framework to reset a given gesture.]]
30 params { 31 params {
31 @in gesture: Efl.Gesture; [[The gesture object]] 32 @in gesture: Efl.Canvas.Gesture; [[The gesture object]]
32 } 33 }
33 } 34 }
34 @property config { 35 @property config {
diff --git a/src/lib/evas/gesture/efl_gesture_recognizer_long_tap.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.c
index 501538b..9f5463c 100644
--- a/src/lib/evas/gesture/efl_gesture_recognizer_long_tap.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.c
@@ -1,20 +1,20 @@
1#include "efl_gesture_private.h" 1#include "efl_canvas_gesture_private.h"
2 2
3#define MY_CLASS EFL_GESTURE_RECOGNIZER_LONG_TAP_CLASS 3#define MY_CLASS EFL_CANVAS_GESTURE_RECOGNIZER_LONG_TAP_CLASS
4 4
5#define LONG_TAP_TIME_OUT 0.2 5#define LONG_TAP_TIME_OUT 0.2
6 6
7EOLIAN static Efl_Gesture * 7EOLIAN static Efl_Canvas_Gesture *
8_efl_gesture_recognizer_long_tap_efl_gesture_recognizer_create(Eo *obj, void *pd EINA_UNUSED, 8_efl_canvas_gesture_recognizer_long_tap_efl_canvas_gesture_recognizer_create(Eo *obj, void *pd EINA_UNUSED,
9 Efl_Object *target EINA_UNUSED) 9 Efl_Object *target EINA_UNUSED)
10{ 10{
11 return efl_add(EFL_GESTURE_LONG_TAP_CLASS, obj); 11 return efl_add(EFL_CANVAS_GESTURE_LONG_TAP_CLASS, obj);
12} 12}
13 13
14static Eina_Bool 14static Eina_Bool
15_long_tap_timeout_cb(void *data) 15_long_tap_timeout_cb(void *data)
16{ 16{
17 Efl_Gesture_Long_Tap_Data *ltp = data; 17 Efl_Canvas_Gesture_Long_Tap_Data *ltp = data;
18 18
19 /* FIXME: Needs to propagate this event back to evas! */ 19 /* FIXME: Needs to propagate this event back to evas! */
20 ltp->is_timeout = EINA_TRUE; 20 ltp->is_timeout = EINA_TRUE;
@@ -22,16 +22,16 @@ _long_tap_timeout_cb(void *data)
22 return ECORE_CALLBACK_RENEW; 22 return ECORE_CALLBACK_RENEW;
23} 23}
24 24
25EOLIAN static Efl_Gesture_Recognizer_Result 25EOLIAN static Efl_Canvas_Gesture_Recognizer_Result
26_efl_gesture_recognizer_long_tap_efl_gesture_recognizer_recognize(Eo *obj EINA_UNUSED, 26_efl_canvas_gesture_recognizer_long_tap_efl_canvas_gesture_recognizer_recognize(Eo *obj EINA_UNUSED,
27 void *pd EINA_UNUSED, 27 void *pd EINA_UNUSED,
28 Efl_Gesture *gesture, Efl_Object *watched EINA_UNUSED, 28 Efl_Canvas_Gesture *gesture, Efl_Object *watched EINA_UNUSED,
29 Efl_Gesture_Touch *event) 29 Efl_Canvas_Gesture_Touch *event)
30{ 30{
31 double length; // Manhattan distance 31 double length; // Manhattan distance
32 Eina_Vector2 pos, dist; 32 Eina_Vector2 pos, dist;
33 Efl_Gesture_Recognizer_Result result = EFL_GESTURE_CANCEL; 33 Efl_Canvas_Gesture_Recognizer_Result result = EFL_GESTURE_CANCEL;
34 Efl_Gesture_Long_Tap_Data *ltp = efl_data_scope_get(gesture, EFL_GESTURE_LONG_TAP_CLASS); 34 Efl_Canvas_Gesture_Long_Tap_Data *ltp = efl_data_scope_get(gesture, EFL_CANVAS_GESTURE_LONG_TAP_CLASS);
35 35
36 switch (efl_gesture_touch_state_get(event)) 36 switch (efl_gesture_touch_state_get(event))
37 { 37 {
@@ -99,12 +99,12 @@ _efl_gesture_recognizer_long_tap_efl_gesture_recognizer_recognize(Eo *obj EINA_U
99} 99}
100 100
101EOLIAN static void 101EOLIAN static void
102_efl_gesture_recognizer_long_tap_efl_gesture_recognizer_reset(Eo *obj, 102_efl_canvas_gesture_recognizer_long_tap_efl_canvas_gesture_recognizer_reset(Eo *obj,
103 void *pd EINA_UNUSED, 103 void *pd EINA_UNUSED,
104 Efl_Gesture *gesture) 104 Efl_Canvas_Gesture *gesture)
105{ 105{
106 Efl_Gesture_Long_Tap_Data *ltp; 106 Efl_Canvas_Gesture_Long_Tap_Data *ltp;
107 ltp = efl_data_scope_get(gesture, EFL_GESTURE_LONG_TAP_CLASS); 107 ltp = efl_data_scope_get(gesture, EFL_CANVAS_GESTURE_LONG_TAP_CLASS);
108 if (ltp->timeout) 108 if (ltp->timeout)
109 ecore_timer_del(ltp->timeout); 109 ecore_timer_del(ltp->timeout);
110 ltp->timeout = NULL; 110 ltp->timeout = NULL;
@@ -112,4 +112,4 @@ _efl_gesture_recognizer_long_tap_efl_gesture_recognizer_reset(Eo *obj,
112 efl_gesture_recognizer_reset(efl_super(obj, MY_CLASS), gesture); 112 efl_gesture_recognizer_reset(efl_super(obj, MY_CLASS), gesture);
113} 113}
114 114
115#include "efl_gesture_recognizer_long_tap.eo.c" 115#include "efl_canvas_gesture_recognizer_long_tap.eo.c"
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
new file mode 100644
index 0000000..a44ea88
--- /dev/null
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.eo
@@ -0,0 +1,11 @@
1class Efl.Canvas.Gesture.Recognizer_Long_Tap (Efl.Canvas.Gesture.Recognizer)
2{
3 [[EFL Gesture Recognizer Long Tap class]]
4 data: null;
5 eo_prefix: efl_gesture_recognizer_long_tap;
6 implements {
7 Efl.Canvas.Gesture.Recognizer.create;
8 Efl.Canvas.Gesture.Recognizer.recognize;
9 Efl.Canvas.Gesture.Recognizer.reset;
10 }
11}
diff --git a/src/lib/evas/gesture/efl_gesture_recognizer_tap.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.c
index 7f8c2a8..2e4a5a6 100644
--- a/src/lib/evas/gesture/efl_gesture_recognizer_tap.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.c
@@ -1,23 +1,23 @@
1#include "efl_gesture_private.h" 1#include "efl_canvas_gesture_private.h"
2 2
3#define MY_CLASS EFL_GESTURE_RECOGNIZER_TAP_CLASS 3#define MY_CLASS EFL_CANVAS_GESTURE_RECOGNIZER_TAP_CLASS
4 4
5EOLIAN static Efl_Gesture * 5EOLIAN static Efl_Canvas_Gesture *
6_efl_gesture_recognizer_tap_efl_gesture_recognizer_create(Eo *obj, void *pd EINA_UNUSED, 6_efl_canvas_gesture_recognizer_tap_efl_canvas_gesture_recognizer_create(Eo *obj, void *pd EINA_UNUSED,
7 Efl_Object *target EINA_UNUSED) 7 Efl_Object *target EINA_UNUSED)
8{ 8{
9 return efl_add(EFL_GESTURE_TAP_CLASS, obj); 9 return efl_add(EFL_CANVAS_GESTURE_TAP_CLASS, obj);
10} 10}
11 11
12EOLIAN static Efl_Gesture_Recognizer_Result 12EOLIAN static Efl_Canvas_Gesture_Recognizer_Result
13_efl_gesture_recognizer_tap_efl_gesture_recognizer_recognize(Eo *obj EINA_UNUSED, 13_efl_canvas_gesture_recognizer_tap_efl_canvas_gesture_recognizer_recognize(Eo *obj EINA_UNUSED,
14 void *pd EINA_UNUSED, 14 void *pd EINA_UNUSED,
15 Efl_Gesture *gesture, Efl_Object *watched EINA_UNUSED, 15 Efl_Canvas_Gesture *gesture, Efl_Object *watched EINA_UNUSED,
16 Efl_Gesture_Touch *event EINA_UNUSED) 16 Efl_Canvas_Gesture_Touch *event EINA_UNUSED)
17{ 17{
18 double length; 18 double length;
19 Eina_Vector2 pos, dist; 19 Eina_Vector2 pos, dist;
20 Efl_Gesture_Recognizer_Result result = EFL_GESTURE_CANCEL; 20 Efl_Canvas_Gesture_Recognizer_Result result = EFL_GESTURE_CANCEL;
21 21
22 switch (efl_gesture_touch_state_get(event)) 22 switch (efl_gesture_touch_state_get(event))
23 { 23 {
@@ -52,4 +52,4 @@ _efl_gesture_recognizer_tap_efl_gesture_recognizer_recognize(Eo *obj EINA_UNUSED
52 return result; 52 return result;
53} 53}
54 54
55#include "efl_gesture_recognizer_tap.eo.c" 55#include "efl_canvas_gesture_recognizer_tap.eo.c"
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo
new file mode 100644
index 0000000..78c4546
--- /dev/null
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo
@@ -0,0 +1,10 @@
1class Efl.Canvas.Gesture.Recognizer_Tap (Efl.Canvas.Gesture.Recognizer)
2{
3 [[EFL Gesture Recognizer Tap class]]
4 data: null;
5 eo_prefix: efl_gesture_recognizer_tap;
6 implements {
7 Efl.Canvas.Gesture.Recognizer.create;
8 Efl.Canvas.Gesture.Recognizer.recognize;
9 }
10}
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_tap.c b/src/lib/evas/gesture/efl_canvas_gesture_tap.c
new file mode 100644
index 0000000..aca24a9
--- /dev/null
+++ b/src/lib/evas/gesture/efl_canvas_gesture_tap.c
@@ -0,0 +1,19 @@
1#include "efl_canvas_gesture_private.h"
2
3#define MY_CLASS EFL_CANVAS_GESTURE_TAP_CLASS
4
5
6EOLIAN static Efl_Object *
7_efl_canvas_gesture_tap_efl_object_constructor(Eo *obj, Efl_Canvas_Gesture_Tap_Data *pd EINA_UNUSED)
8{
9 Efl_Canvas_Gesture_Data *gd;
10
11 obj = efl_constructor(efl_super(obj, MY_CLASS));
12
13 gd = efl_data_scope_get(obj, EFL_CANVAS_GESTURE_CLASS);
14 gd->type = EFL_EVENT_GESTURE_TAP;
15
16 return obj;
17}
18
19#include "efl_canvas_gesture_tap.eo.c"
diff --git a/src/lib/evas/gesture/efl_gesture_tap.eo b/src/lib/evas/gesture/efl_canvas_gesture_tap.eo
index 993d206..f6a7352 100644
--- a/src/lib/evas/gesture/efl_gesture_tap.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_tap.eo
@@ -1,8 +1,9 @@
1import efl_gesture_types; 1import efl_canvas_gesture_types;
2 2
3class Efl.Gesture.Tap(Efl.Gesture) 3class Efl.Canvas.Gesture.Tap(Efl.Canvas.Gesture)
4{ 4{
5 [[EFL Gesture Tap class]] 5 [[EFL Gesture Tap class]]
6 eo_prefix: efl_gesture_tap;
6 event_prefix: efl; 7 event_prefix: efl;
7 events { 8 events {
8 gesture,tap; [[Event for tap gesture]] 9 gesture,tap; [[Event for tap gesture]]
diff --git a/src/lib/evas/gesture/efl_gesture_touch.c b/src/lib/evas/gesture/efl_canvas_gesture_touch.c
index 0484d43..5fb493b 100644
--- a/src/lib/evas/gesture/efl_gesture_touch.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_touch.c
@@ -1,6 +1,6 @@
1#include "efl_gesture_private.h" 1#include "efl_canvas_gesture_private.h"
2 2
3#define MY_CLASS EFL_GESTURE_TOUCH_CLASS 3#define MY_CLASS EFL_CANVAS_GESTURE_TOUCH_CLASS
4 4
5typedef struct _Pointer_Data 5typedef struct _Pointer_Data
6{ 6{
@@ -12,14 +12,14 @@ typedef struct _Pointer_Data
12 Efl_Pointer_Action action; 12 Efl_Pointer_Action action;
13} Pointer_Data; 13} Pointer_Data;
14 14
15typedef struct _Efl_Gesture_Touch_Data 15typedef struct _Efl_Canvas_Gesture_Touch_Data
16{ 16{
17 Efl_Gesture_Touch_State state; 17 Efl_Canvas_Gesture_Touch_State state;
18 Eina_Hash *touch_points; 18 Eina_Hash *touch_points;
19 int touch_down; 19 int touch_down;
20 Eina_Bool multi_touch; 20 Eina_Bool multi_touch;
21 Eo *target; 21 Eo *target;
22} Efl_Gesture_Touch_Data; 22} Efl_Canvas_Gesture_Touch_Data;
23 23
24 24
25// This event object accumulates all the touch points 25// This event object accumulates all the touch points
@@ -32,7 +32,7 @@ static void _hash_free_cb(Pointer_Data *point)
32} 32}
33 33
34static inline void 34static inline void
35_touch_points_reset(Efl_Gesture_Touch_Data *pd) 35_touch_points_reset(Efl_Canvas_Gesture_Touch_Data *pd)
36{ 36{
37 eina_hash_free(pd->touch_points); 37 eina_hash_free(pd->touch_points);
38 pd->touch_points = eina_hash_int32_new(EINA_FREE_CB(_hash_free_cb)); 38 pd->touch_points = eina_hash_int32_new(EINA_FREE_CB(_hash_free_cb));
@@ -41,7 +41,7 @@ _touch_points_reset(Efl_Gesture_Touch_Data *pd)
41} 41}
42 42
43EOLIAN static Efl_Object * 43EOLIAN static Efl_Object *
44_efl_gesture_touch_efl_object_constructor(Eo *obj, Efl_Gesture_Touch_Data *pd) 44_efl_canvas_gesture_touch_efl_object_constructor(Eo *obj, Efl_Canvas_Gesture_Touch_Data *pd)
45{ 45{
46 obj = efl_constructor(efl_super(obj, MY_CLASS)); 46 obj = efl_constructor(efl_super(obj, MY_CLASS));
47 _touch_points_reset(pd); 47 _touch_points_reset(pd);
@@ -49,20 +49,20 @@ _efl_gesture_touch_efl_object_constructor(Eo *obj, Efl_Gesture_Touch_Data *pd)
49} 49}
50 50
51EOLIAN static void 51EOLIAN static void
52_efl_gesture_touch_efl_object_destructor(Eo *obj, Efl_Gesture_Touch_Data *pd) 52_efl_canvas_gesture_touch_efl_object_destructor(Eo *obj, Efl_Canvas_Gesture_Touch_Data *pd)
53{ 53{
54 eina_hash_free(pd->touch_points); 54 eina_hash_free(pd->touch_points);
55 efl_destructor(efl_super(obj, MY_CLASS)); 55 efl_destructor(efl_super(obj, MY_CLASS));
56} 56}
57 57
58EOLIAN static Efl_Gesture_Touch_State 58EOLIAN static Efl_Canvas_Gesture_Touch_State
59_efl_gesture_touch_state_get(Eo *obj EINA_UNUSED, Efl_Gesture_Touch_Data *pd) 59_efl_canvas_gesture_touch_state_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd)
60{ 60{
61 return pd->state; 61 return pd->state;
62} 62}
63 63
64EOLIAN static void 64EOLIAN static void
65_efl_gesture_touch_point_record(Eo *obj EINA_UNUSED, Efl_Gesture_Touch_Data *pd, 65_efl_canvas_gesture_touch_point_record(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd,
66 int id, Eina_Vector2 pos, double timestamp, Efl_Pointer_Action action) 66 int id, Eina_Vector2 pos, double timestamp, Efl_Pointer_Action action)
67{ 67{
68 Pointer_Data *point = eina_hash_find(pd->touch_points, &id); 68 Pointer_Data *point = eina_hash_find(pd->touch_points, &id);
@@ -122,13 +122,13 @@ bad_fingers:
122} 122}
123 123
124EOLIAN static Eina_Bool 124EOLIAN static Eina_Bool
125_efl_gesture_touch_multi_touch_get(Eo *obj EINA_UNUSED, Efl_Gesture_Touch_Data *pd) 125_efl_canvas_gesture_touch_multi_touch_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd)
126{ 126{
127 return pd->multi_touch; 127 return pd->multi_touch;
128} 128}
129 129
130EOLIAN static Eina_Vector2 130EOLIAN static Eina_Vector2
131_efl_gesture_touch_start_point_get(Eo *obj EINA_UNUSED, Efl_Gesture_Touch_Data *pd) 131_efl_canvas_gesture_touch_start_point_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd)
132{ 132{
133 int tool = 0; 133 int tool = 0;
134 Pointer_Data *point = eina_hash_find(pd->touch_points, &tool); 134 Pointer_Data *point = eina_hash_find(pd->touch_points, &tool);
@@ -141,7 +141,7 @@ _efl_gesture_touch_start_point_get(Eo *obj EINA_UNUSED, Efl_Gesture_Touch_Data *
141} 141}
142 142
143EOLIAN static Eina_Vector2 143EOLIAN static Eina_Vector2
144_efl_gesture_touch_delta(const Eo *obj EINA_UNUSED, Efl_Gesture_Touch_Data *pd, int tool) 144_efl_canvas_gesture_touch_delta(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd, int tool)
145{ 145{
146 Pointer_Data *point = eina_hash_find(pd->touch_points, &tool); 146 Pointer_Data *point = eina_hash_find(pd->touch_points, &tool);
147 Eina_Vector2 vec = { 0, 0 }; 147 Eina_Vector2 vec = { 0, 0 };
@@ -154,7 +154,7 @@ _efl_gesture_touch_delta(const Eo *obj EINA_UNUSED, Efl_Gesture_Touch_Data *pd,
154} 154}
155 155
156EOLIAN static Eina_Vector2 156EOLIAN static Eina_Vector2
157_efl_gesture_touch_distance(const Eo *obj EINA_UNUSED, Efl_Gesture_Touch_Data *pd, int tool) 157_efl_canvas_gesture_touch_distance(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd, int tool)
158{ 158{
159 Pointer_Data *point = eina_hash_find(pd->touch_points, &tool); 159 Pointer_Data *point = eina_hash_find(pd->touch_points, &tool);
160 Eina_Vector2 vec = { 0, 0 }; 160 Eina_Vector2 vec = { 0, 0 };
@@ -166,4 +166,4 @@ _efl_gesture_touch_distance(const Eo *obj EINA_UNUSED, Efl_Gesture_Touch_Data *p
166 return vec; 166 return vec;
167} 167}
168 168
169#include "efl_gesture_touch.eo.c" 169#include "efl_canvas_gesture_touch.eo.c"
diff --git a/src/lib/evas/gesture/efl_gesture_touch.eo b/src/lib/evas/gesture/efl_canvas_gesture_touch.eo
index b85d145..b123fd3 100644
--- a/src/lib/evas/gesture/efl_gesture_touch.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_touch.eo
@@ -1,11 +1,12 @@
1import efl_gesture_types; 1import efl_canvas_gesture_types;
2import efl_input_types; 2import efl_input_types;
3 3
4/* FIXME: This class lacks a lot of useful helpers. */ 4/* FIXME: This class lacks a lot of useful helpers. */
5 5
6class Efl.Gesture.Touch(Efl.Object) 6class Efl.Canvas.Gesture.Touch(Efl.Object)
7{ 7{
8 [[EFL Gesture Touch class]] 8 [[EFL Gesture Touch class]]
9 eo_prefix: efl_gesture_touch;
9 methods { 10 methods {
10 point_record { 11 point_record {
11 [[Touch point record method]] 12 [[Touch point record method]]
@@ -47,7 +48,7 @@ class Efl.Gesture.Touch(Efl.Object)
47 @property state { 48 @property state {
48 [[This property holds the state of the touch event.]] 49 [[This property holds the state of the touch event.]]
49 get { 50 get {
50 return : Efl.Gesture.Touch.State; [[touch event state]] 51 return : Efl.Canvas.Gesture.Touch.State; [[touch event state]]
51 } 52 }
52 } 53 }
53 /* FIXME: finger_list was broken by design - TODO */ 54 /* FIXME: finger_list was broken by design - TODO */
diff --git a/src/lib/evas/gesture/efl_gesture_types.eot b/src/lib/evas/gesture/efl_canvas_gesture_types.eot
index d78d12b..4710b7d 100644
--- a/src/lib/evas/gesture/efl_gesture_types.eot
+++ b/src/lib/evas/gesture/efl_canvas_gesture_types.eot
@@ -1,4 +1,4 @@
1enum Efl.Gesture.Touch.State 1enum Efl.Canvas.Gesture.Touch.State
2{ 2{
3 [[ This enum type describes the state of a touch event. ]] 3 [[ This enum type describes the state of a touch event. ]]
4 legacy: efl_gesture_touch; 4 legacy: efl_gesture_touch;
@@ -8,7 +8,7 @@ enum Efl.Gesture.Touch.State
8 end, [[Last fingure touch up]] 8 end, [[Last fingure touch up]]
9} 9}
10 10
11enum Efl.Gesture.State 11enum Efl.Canvas.Gesture.State
12{ 12{
13 [[ This enum type describes the state of a gesture. ]] 13 [[ This enum type describes the state of a gesture. ]]
14 legacy: efl_gesture; 14 legacy: efl_gesture;
@@ -19,7 +19,7 @@ enum Efl.Gesture.State
19 canceled, [[A gesture was canceled.]] 19 canceled, [[A gesture was canceled.]]
20} 20}
21 21
22enum Efl.Gesture.Recognizer_Result 22enum Efl.Canvas.Gesture.Recognizer_Result
23{ 23{
24 [[ This enum type describes the state of a gesture recognizer. ]] 24 [[ This enum type describes the state of a gesture recognizer. ]]
25 legacy: efl_gesture; 25 legacy: efl_gesture;
diff --git a/src/lib/evas/gesture/efl_gesture.c b/src/lib/evas/gesture/efl_gesture.c
deleted file mode 100644
index 1ea9993..0000000
--- a/src/lib/evas/gesture/efl_gesture.c
+++ /dev/null
@@ -1,36 +0,0 @@
1#include "efl_gesture_private.h"
2
3#define MY_CLASS EFL_GESTURE_CLASS
4
5EOLIAN static const Efl_Event_Description *
6 _efl_gesture_type_get(Eo *obj EINA_UNUSED, Efl_Gesture_Data *pd)
7{
8 return pd->type;
9}
10
11EOLIAN static Efl_Gesture_State
12_efl_gesture_state_get(Eo *obj EINA_UNUSED, Efl_Gesture_Data *pd)
13{
14 return pd->state;
15}
16
17EOLIAN static void
18_efl_gesture_state_set(Eo *obj EINA_UNUSED, Efl_Gesture_Data *pd, Efl_Gesture_State state)
19{
20 pd->state = state;
21}
22
23EOLIAN static void
24_efl_gesture_hotspot_set(Eo *obj EINA_UNUSED, Efl_Gesture_Data *pd, Eina_Vector2 hotspot)
25{
26 pd->hotspot = hotspot;
27}
28
29
30EOLIAN static Eina_Vector2
31_efl_gesture_hotspot_get(Eo *obj EINA_UNUSED, Efl_Gesture_Data *pd)
32{
33 return pd->hotspot;
34}
35
36#include "efl_gesture.eo.c" \ No newline at end of file
diff --git a/src/lib/evas/gesture/efl_gesture_long_tap.c b/src/lib/evas/gesture/efl_gesture_long_tap.c
deleted file mode 100644
index 9c1bd45..0000000
--- a/src/lib/evas/gesture/efl_gesture_long_tap.c
+++ /dev/null
@@ -1,27 +0,0 @@
1#include "efl_gesture_private.h"
2
3#define MY_CLASS EFL_GESTURE_LONG_TAP_CLASS
4
5
6EOLIAN static Efl_Object *
7_efl_gesture_long_tap_efl_object_constructor(Eo *obj, Efl_Gesture_Long_Tap_Data *pd EINA_UNUSED)
8{
9 Efl_Gesture_Data *gd;
10
11 obj = efl_constructor(efl_super(obj, MY_CLASS));
12 gd = efl_data_scope_get(obj, EFL_GESTURE_CLASS);
13 gd->type = EFL_EVENT_GESTURE_LONG_TAP;
14
15 return obj;
16}
17
18EOLIAN static void
19_efl_gesture_long_tap_efl_object_destructor(Eo *obj, Efl_Gesture_Long_Tap_Data *pd)
20{
21 if (pd->timeout)
22 ecore_timer_del(pd->timeout);
23
24 efl_destructor(efl_super(obj, MY_CLASS));
25}
26
27#include "efl_gesture_long_tap.eo.c"
diff --git a/src/lib/evas/gesture/efl_gesture_private.h b/src/lib/evas/gesture/efl_gesture_private.h
deleted file mode 100644
index 6a7d452..0000000
--- a/src/lib/evas/gesture/efl_gesture_private.h
+++ /dev/null
@@ -1,42 +0,0 @@
1#ifndef EFL_GESTURE_PRIVATE_H_
2#define EFL_GESTURE_PRIVATE_H_
3
4#include "evas_common_private.h"
5#include "evas_private.h"
6#define EFL_INTERNAL_UNSTABLE
7#include "interfaces/efl_common_internal.h"
8
9#include <Ecore.h>
10
11//private gesture classes
12#include "efl_gesture_recognizer_tap.eo.h"
13#include "efl_gesture_recognizer_long_tap.eo.h"
14
15typedef struct _Efl_Gesture_Recognizer_Data Efl_Gesture_Recognizer_Data;
16typedef struct _Efl_Gesture_Data Efl_Gesture_Data;
17typedef struct _Efl_Gesture_Tap_Data Efl_Gesture_Tap_Data;
18typedef struct _Efl_Gesture_Long_Tap_Data Efl_Gesture_Long_Tap_Data;
19
20struct _Efl_Gesture_Recognizer_Data
21{
22 Eo *manager; // keeps a reference of the manager
23};
24
25struct _Efl_Gesture_Data
26{
27 const Efl_Event_Description *type;
28 Efl_Gesture_State state;
29 Eina_Vector2 hotspot;
30};
31
32struct _Efl_Gesture_Tap_Data
33{
34};
35
36struct _Efl_Gesture_Long_Tap_Data
37{
38 Ecore_Timer *timeout;
39 Eina_Bool is_timeout;
40};
41
42#endif
diff --git a/src/lib/evas/gesture/efl_gesture_recognizer.c b/src/lib/evas/gesture/efl_gesture_recognizer.c
deleted file mode 100644
index 684bfe0..0000000
--- a/src/lib/evas/gesture/efl_gesture_recognizer.c
+++ /dev/null
@@ -1,18 +0,0 @@
1#include "efl_gesture_private.h"
2
3#define MY_CLASS EFL_GESTURE_RECOGNIZER_CLASS
4
5EOLIAN static Eina_Value *
6_efl_gesture_recognizer_config_get(Eo *obj EINA_UNUSED, Efl_Gesture_Recognizer_Data *pd, const char *name)
7{
8 return efl_gesture_manager_config_get(pd->manager, name);
9}
10
11EOLIAN static void
12_efl_gesture_recognizer_reset(Eo *obj EINA_UNUSED, Efl_Gesture_Recognizer_Data *pd EINA_UNUSED,
13 Efl_Gesture *gesture EINA_UNUSED)
14{
15
16}
17
18#include "efl_gesture_recognizer.eo.c"
diff --git a/src/lib/evas/gesture/efl_gesture_recognizer_long_tap.eo b/src/lib/evas/gesture/efl_gesture_recognizer_long_tap.eo
deleted file mode 100644
index 94b5b10..0000000
--- a/src/lib/evas/gesture/efl_gesture_recognizer_long_tap.eo
+++ /dev/null
@@ -1,10 +0,0 @@
1class Efl.Gesture.Recognizer_Long_Tap (Efl.Gesture.Recognizer)
2{
3 [[EFL Gesture Recognizer Long Tap class]]
4 data: null;
5 implements {
6 Efl.Gesture.Recognizer.create;
7 Efl.Gesture.Recognizer.recognize;
8 Efl.Gesture.Recognizer.reset;
9 }
10}
diff --git a/src/lib/evas/gesture/efl_gesture_recognizer_tap.eo b/src/lib/evas/gesture/efl_gesture_recognizer_tap.eo
deleted file mode 100644
index bf2ceef..0000000
--- a/src/lib/evas/gesture/efl_gesture_recognizer_tap.eo
+++ /dev/null
@@ -1,9 +0,0 @@
1class Efl.Gesture.Recognizer_Tap (Efl.Gesture.Recognizer)
2{
3 [[EFL Gesture Recognizer Tap class]]
4 data: null;
5 implements {
6 Efl.Gesture.Recognizer.create;
7 Efl.Gesture.Recognizer.recognize;
8 }
9}
diff --git a/src/lib/evas/gesture/efl_gesture_tap.c b/src/lib/evas/gesture/efl_gesture_tap.c
deleted file mode 100644
index 6b1a239..0000000
--- a/src/lib/evas/gesture/efl_gesture_tap.c
+++ /dev/null
@@ -1,19 +0,0 @@
1#include "efl_gesture_private.h"
2
3#define MY_CLASS EFL_GESTURE_TAP_CLASS
4
5
6EOLIAN static Efl_Object *
7_efl_gesture_tap_efl_object_constructor(Eo *obj, Efl_Gesture_Tap_Data *pd EINA_UNUSED)
8{
9 Efl_Gesture_Data *gd;
10
11 obj = efl_constructor(efl_super(obj, MY_CLASS));
12
13 gd = efl_data_scope_get(obj, EFL_GESTURE_CLASS);
14 gd->type = EFL_EVENT_GESTURE_TAP;
15
16 return obj;
17}
18
19#include "efl_gesture_tap.eo.c"