summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-03-05 17:00:37 -0500
committerCedric BAIL <cedric.bail@free.fr>2019-03-07 14:15:22 -0800
commit0886ff0b7d72ca2dbbef7c3ccddf0ea25b1dce6b (patch)
treef6f9d9babc13a89c8b925849d4536bf7961ceb81 /src
parentc4fdda1fb003b1e81215f934d49374b037a3c679 (diff)
elm_gesture_layer: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in efl and adds it to the tree, then removes legacy references from the corresponding eo files. in the case where the entire eo file was for a legacy object, that eo file has been removed from the tree ref T7724 Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D8172
Diffstat (limited to 'src')
-rw-r--r--src/Makefile_Elementary.am5
-rw-r--r--src/lib/elementary/elm_gesture_layer.c4
-rw-r--r--src/lib/elementary/elm_gesture_layer.eo167
-rw-r--r--src/lib/elementary/elm_gesture_layer_eo.c208
-rw-r--r--src/lib/elementary/elm_gesture_layer_eo.h229
-rw-r--r--src/lib/elementary/elm_gesture_layer_eo.legacy.c72
-rw-r--r--src/lib/elementary/elm_gesture_layer_eo.legacy.h222
-rw-r--r--src/lib/elementary/elm_gesture_layer_legacy.h2
-rw-r--r--src/lib/elementary/meson.build3
9 files changed, 740 insertions, 172 deletions
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index ffcff1d..19180e0 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -187,7 +187,6 @@ elm_private_eolian_files = \
187elm_legacy_eolian_files = \ 187elm_legacy_eolian_files = \
188 lib/elementary/efl_ui_clock_legacy.eo \ 188 lib/elementary/efl_ui_clock_legacy.eo \
189 lib/elementary/elm_interface_fileselector.eo \ 189 lib/elementary/elm_interface_fileselector.eo \
190 lib/elementary/elm_gesture_layer.eo \
191 lib/elementary/elm_glview.eo \ 190 lib/elementary/elm_glview.eo \
192 lib/elementary/elm_hover.eo \ 191 lib/elementary/elm_hover.eo \
193 lib/elementary/elm_index.eo \ 192 lib/elementary/elm_index.eo \
@@ -353,6 +352,8 @@ lib/elementary/elm_genlist_eo.c \
353lib/elementary/elm_genlist_item_eo.legacy.c \ 352lib/elementary/elm_genlist_item_eo.legacy.c \
354lib/elementary/elm_genlist_item_eo.c \ 353lib/elementary/elm_genlist_item_eo.c \
355lib/elementary/elm_genlist_pan_eo.c \ 354lib/elementary/elm_genlist_pan_eo.c \
355lib/elementary/elm_gesture_layer_eo.legacy.c \
356lib/elementary/elm_gesture_layer_eo.c \
356lib/elementary/elm_hoversel_eo.c \ 357lib/elementary/elm_hoversel_eo.c \
357lib/elementary/elm_hoversel_item_eo.c \ 358lib/elementary/elm_hoversel_item_eo.c \
358lib/elementary/elm_hoversel_item_eo.legacy.c 359lib/elementary/elm_hoversel_item_eo.legacy.c
@@ -462,6 +463,8 @@ lib/elementary/elm_genlist_item_eo.h \
462lib/elementary/elm_genlist_item_eo.legacy.h \ 463lib/elementary/elm_genlist_item_eo.legacy.h \
463lib/elementary/elm_genlist_pan_eo.h \ 464lib/elementary/elm_genlist_pan_eo.h \
464lib/elementary/elm_genlist_pan_eo.legacy.h \ 465lib/elementary/elm_genlist_pan_eo.legacy.h \
466lib/elementary/elm_gesture_layer_eo.h \
467lib/elementary/elm_gesture_layer_eo.legacy.h \
465lib/elementary/elm_hoversel_eo.h \ 468lib/elementary/elm_hoversel_eo.h \
466lib/elementary/elm_hoversel_eo.legacy.h \ 469lib/elementary/elm_hoversel_eo.legacy.h \
467lib/elementary/elm_hoversel_item_eo.h \ 470lib/elementary/elm_hoversel_item_eo.h \
diff --git a/src/lib/elementary/elm_gesture_layer.c b/src/lib/elementary/elm_gesture_layer.c
index b1c3212..ba5ea9c 100644
--- a/src/lib/elementary/elm_gesture_layer.c
+++ b/src/lib/elementary/elm_gesture_layer.c
@@ -4,7 +4,7 @@
4 4
5#include <Elementary.h> 5#include <Elementary.h>
6#include "elm_priv.h" 6#include "elm_priv.h"
7#include "elm_gesture_layer.eo.h" 7#include "elm_gesture_layer_eo.h"
8 8
9#define MY_CLASS ELM_GESTURE_LAYER_CLASS 9#define MY_CLASS ELM_GESTURE_LAYER_CLASS
10 10
@@ -4175,4 +4175,4 @@ _elm_gesture_layer_class_constructor(Efl_Class *klass)
4175#define ELM_GESTURE_LAYER_EXTRA_OPS \ 4175#define ELM_GESTURE_LAYER_EXTRA_OPS \
4176 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_gesture_layer) 4176 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_gesture_layer)
4177 4177
4178#include "elm_gesture_layer.eo.c" 4178#include "elm_gesture_layer_eo.c"
diff --git a/src/lib/elementary/elm_gesture_layer.eo b/src/lib/elementary/elm_gesture_layer.eo
deleted file mode 100644
index 6fce6d4..0000000
--- a/src/lib/elementary/elm_gesture_layer.eo
+++ /dev/null
@@ -1,167 +0,0 @@
1type Elm_Gesture_Event_Cb: __undefined_type; [[Elementary gesture event callback type]]
2
3enum Elm.Gesture.Type
4{
5 [[
6 Enum of supported gesture types.
7 ]]
8 legacy: elm_gesture;
9 first = 0, [[First type used for iteration over the enum]]
10 n_taps, [[N fingers single taps]]
11 n_long_taps, [[N fingers single long-taps]]
12 n_double_taps, [[N fingers double-single taps]]
13 n_triple_taps, [[N fingers triple-single taps]]
14 momentum, [[Reports momentum in the direction of move]]
15 n_lines, [[N fingers line gesture]]
16 n_flicks, [[N fingers flick gesture]]
17 zoom, [[Zoom]]
18 rotate, [[Rotate]]
19 last [[Sentinel value to indicate last enum field during iteration]]
20}
21
22enum Elm.Gesture.State
23{
24 [[
25 Enum of gesture states.
26 ]]
27 undefined = -1, [[Gesture not started]]
28 start, [[Gesture started]]
29 move, [[Gesture is ongoing]]
30 end, [[Gesture completed]]
31 abort [[Ongoing gesture was aborted]]
32}
33
34class Elm.Gesture_Layer extends Efl.Ui.Widget implements Efl.Ui.Legacy
35{
36 [[Elementary gesture layer class]]
37 legacy_prefix: elm_gesture_layer;
38 eo_prefix: elm_obj_gesture_layer;
39 methods {
40 @property zoom_step {
41 [[Control step value for zoom action.]]
42 set {
43 [[When recognizing the zoom gesture, it should be recognized as zooming larger
44 than step.
45 ]]
46 }
47 get {
48 }
49 values {
50 step: double; [[The zoom step value.]]
51 }
52 }
53 @property tap_finger_size {
54 set {
55 [[This function sets the gesture layer finger-size for taps.
56
57 If not set, it's taken from elm_config.
58 Set to 0 if you want GLayer to use the system finger size
59 value (default).
60
61 @since 1.8
62 ]]
63 }
64 get {
65 [[This function returns the gesture layer finger-size for taps
66
67 @since 1.8
68 ]]
69 }
70 values {
71 sz: int; [[The finger size.]]
72 }
73 }
74 @property hold_events {
75 set {
76 [[This function makes gesture-layer repeat events.
77
78 Set this if you like to get the raw events only if gestures
79 were not detected.
80
81 Clear this if you like gesture layer to forward events as
82 testing gestures.
83 ]]
84 }
85 get {
86 [[Get the repeat-events setting.]]
87 }
88 values {
89 hold_events: bool; [[If $true get events only if gesture was not detected, $false otherwise]]
90 }
91 }
92 @property rotate_step {
93 [[This function returns step-value for rotate action.]]
94 set {
95 [[Set to 0 to cancel step setting.
96
97 When recognizing the rotate gesture, the rotated size must be larger
98 than step.
99 ]]
100 }
101 get {
102 }
103 values {
104 step: double; [[New rotate step value.]]
105 }
106 }
107 @property cb {
108 set {
109 [[Set the gesture state change callback.
110
111 When all callbacks for the gesture are set to $null,
112 it means this gesture is disabled.
113 ]]
114 }
115 values {
116 idx: Elm.Gesture.Type; [[The gesture you want to track state of.]]
117 cb_type: Elm.Gesture.State; [[The event the callback tracks (START, MOVE, END, ABORT).]]
118 cb: Elm_Gesture_Event_Cb; [[The callback itself.]]
119 data: void_ptr @optional; [[Custom data to be passed.]]
120 }
121 }
122 attach {
123 [[Attach a gesture layer widget to an Evas object (setting the
124 widget's target).
125
126 A gesture layer's target may be any Evas object. This object
127 will be used to listen to mouse and key events.
128 ]]
129 return: bool; [[$true on success, $false otherwise.]]
130 params {
131 @in target: Efl.Canvas.Object; [[The object to attach.]]
132 }
133 }
134 cb_del {
135 [[Remove a gesture callback.]]
136 params {
137 @in idx: Elm.Gesture.Type; [[The gesture you want to track state of.]]
138 @in cb_type: Elm.Gesture.State; [[The event the callback tracks (START, MOVE, END, ABORT).]]
139 @in cb: Elm_Gesture_Event_Cb; [[The callback itself.]]
140 @in data: void_ptr @nullable; [[Custom callback data.]]
141 }
142 }
143 cb_add {
144 [[Add a gesture state change callback.
145
146 When all callbacks for the gesture are set to $null,
147 it means this gesture is disabled.
148
149 If a function was already set for this gesture/type/state, it
150 will be replaced by the new one. For ABI compat, callbacks
151 added by @.cb_add will be removed. It is recommended to
152 use only one of these functions for a gesture object.
153 ]]
154 params {
155 @in idx: Elm.Gesture.Type; [[The gesture you want to track state of.]]
156 @in cb_type: Elm.Gesture.State; [[The event the callback tracks (START, MOVE, END, ABORT).]]
157 @in cb: Elm_Gesture_Event_Cb; [[The callback itself.]]
158 @in data: void_ptr @optional; [[Custom data to be passed.]]
159 }
160 }
161 }
162 implements {
163 class.constructor;
164 Efl.Object.constructor;
165 Efl.Ui.Widget.disabled {set;}
166 }
167}
diff --git a/src/lib/elementary/elm_gesture_layer_eo.c b/src/lib/elementary/elm_gesture_layer_eo.c
new file mode 100644
index 0000000..9cdae6c
--- /dev/null
+++ b/src/lib/elementary/elm_gesture_layer_eo.c
@@ -0,0 +1,208 @@
1
2void _elm_gesture_layer_zoom_step_set(Eo *obj, Elm_Gesture_Layer_Data *pd, double step);
3
4
5static Eina_Error
6__eolian_elm_gesture_layer_zoom_step_set_reflect(Eo *obj, Eina_Value val)
7{
8 Eina_Error r = 0; double cval;
9 if (!eina_value_double_convert(&val, &cval))
10 {
11 r = EINA_ERROR_VALUE_FAILED;
12 goto end;
13 }
14 elm_obj_gesture_layer_zoom_step_set(obj, cval);
15 end:
16 eina_value_flush(&val);
17 return r;
18}
19
20EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gesture_layer_zoom_step_set, EFL_FUNC_CALL(step), double step);
21
22double _elm_gesture_layer_zoom_step_get(const Eo *obj, Elm_Gesture_Layer_Data *pd);
23
24
25static Eina_Value
26__eolian_elm_gesture_layer_zoom_step_get_reflect(Eo *obj)
27{
28 double val = elm_obj_gesture_layer_zoom_step_get(obj);
29 return eina_value_double_init(val);
30}
31
32EOAPI EFL_FUNC_BODY_CONST(elm_obj_gesture_layer_zoom_step_get, double, 0);
33
34void _elm_gesture_layer_tap_finger_size_set(Eo *obj, Elm_Gesture_Layer_Data *pd, int sz);
35
36
37static Eina_Error
38__eolian_elm_gesture_layer_tap_finger_size_set_reflect(Eo *obj, Eina_Value val)
39{
40 Eina_Error r = 0; int cval;
41 if (!eina_value_int_convert(&val, &cval))
42 {
43 r = EINA_ERROR_VALUE_FAILED;
44 goto end;
45 }
46 elm_obj_gesture_layer_tap_finger_size_set(obj, cval);
47 end:
48 eina_value_flush(&val);
49 return r;
50}
51
52EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gesture_layer_tap_finger_size_set, EFL_FUNC_CALL(sz), int sz);
53
54int _elm_gesture_layer_tap_finger_size_get(const Eo *obj, Elm_Gesture_Layer_Data *pd);
55
56
57static Eina_Value
58__eolian_elm_gesture_layer_tap_finger_size_get_reflect(Eo *obj)
59{
60 int val = elm_obj_gesture_layer_tap_finger_size_get(obj);
61 return eina_value_int_init(val);
62}
63
64EOAPI EFL_FUNC_BODY_CONST(elm_obj_gesture_layer_tap_finger_size_get, int, 0);
65
66void _elm_gesture_layer_hold_events_set(Eo *obj, Elm_Gesture_Layer_Data *pd, Eina_Bool hold_events);
67
68
69static Eina_Error
70__eolian_elm_gesture_layer_hold_events_set_reflect(Eo *obj, Eina_Value val)
71{
72 Eina_Error r = 0; Eina_Bool cval;
73 if (!eina_value_bool_convert(&val, &cval))
74 {
75 r = EINA_ERROR_VALUE_FAILED;
76 goto end;
77 }
78 elm_obj_gesture_layer_hold_events_set(obj, cval);
79 end:
80 eina_value_flush(&val);
81 return r;
82}
83
84EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gesture_layer_hold_events_set, EFL_FUNC_CALL(hold_events), Eina_Bool hold_events);
85
86Eina_Bool _elm_gesture_layer_hold_events_get(const Eo *obj, Elm_Gesture_Layer_Data *pd);
87
88
89static Eina_Value
90__eolian_elm_gesture_layer_hold_events_get_reflect(Eo *obj)
91{
92 Eina_Bool val = elm_obj_gesture_layer_hold_events_get(obj);
93 return eina_value_bool_init(val);
94}
95
96EOAPI EFL_FUNC_BODY_CONST(elm_obj_gesture_layer_hold_events_get, Eina_Bool, 0);
97
98void _elm_gesture_layer_rotate_step_set(Eo *obj, Elm_Gesture_Layer_Data *pd, double step);
99
100
101static Eina_Error
102__eolian_elm_gesture_layer_rotate_step_set_reflect(Eo *obj, Eina_Value val)
103{
104 Eina_Error r = 0; double cval;
105 if (!eina_value_double_convert(&val, &cval))
106 {
107 r = EINA_ERROR_VALUE_FAILED;
108 goto end;
109 }
110 elm_obj_gesture_layer_rotate_step_set(obj, cval);
111 end:
112 eina_value_flush(&val);
113 return r;
114}
115
116EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gesture_layer_rotate_step_set, EFL_FUNC_CALL(step), double step);
117
118double _elm_gesture_layer_rotate_step_get(const Eo *obj, Elm_Gesture_Layer_Data *pd);
119
120
121static Eina_Value
122__eolian_elm_gesture_layer_rotate_step_get_reflect(Eo *obj)
123{
124 double val = elm_obj_gesture_layer_rotate_step_get(obj);
125 return eina_value_double_init(val);
126}
127
128EOAPI EFL_FUNC_BODY_CONST(elm_obj_gesture_layer_rotate_step_get, double, 0);
129
130void _elm_gesture_layer_cb_set(Eo *obj, Elm_Gesture_Layer_Data *pd, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data);
131
132EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gesture_layer_cb_set, EFL_FUNC_CALL(idx, cb_type, cb, data), Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data);
133
134Eina_Bool _elm_gesture_layer_attach(Eo *obj, Elm_Gesture_Layer_Data *pd, Efl_Canvas_Object *target);
135
136EOAPI EFL_FUNC_BODYV(elm_obj_gesture_layer_attach, Eina_Bool, 0, EFL_FUNC_CALL(target), Efl_Canvas_Object *target);
137
138void _elm_gesture_layer_cb_del(Eo *obj, Elm_Gesture_Layer_Data *pd, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data);
139
140EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gesture_layer_cb_del, EFL_FUNC_CALL(idx, cb_type, cb, data), Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data);
141
142void _elm_gesture_layer_cb_add(Eo *obj, Elm_Gesture_Layer_Data *pd, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data);
143
144EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gesture_layer_cb_add, EFL_FUNC_CALL(idx, cb_type, cb, data), Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data);
145
146Efl_Object *_elm_gesture_layer_efl_object_constructor(Eo *obj, Elm_Gesture_Layer_Data *pd);
147
148
149void _elm_gesture_layer_efl_ui_widget_disabled_set(Eo *obj, Elm_Gesture_Layer_Data *pd, Eina_Bool disabled);
150
151
152static Eina_Bool
153_elm_gesture_layer_class_initializer(Efl_Class *klass)
154{
155 const Efl_Object_Ops *opsp = NULL;
156
157 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
158
159#ifndef ELM_GESTURE_LAYER_EXTRA_OPS
160#define ELM_GESTURE_LAYER_EXTRA_OPS
161#endif
162
163 EFL_OPS_DEFINE(ops,
164 EFL_OBJECT_OP_FUNC(elm_obj_gesture_layer_zoom_step_set, _elm_gesture_layer_zoom_step_set),
165 EFL_OBJECT_OP_FUNC(elm_obj_gesture_layer_zoom_step_get, _elm_gesture_layer_zoom_step_get),
166 EFL_OBJECT_OP_FUNC(elm_obj_gesture_layer_tap_finger_size_set, _elm_gesture_layer_tap_finger_size_set),
167 EFL_OBJECT_OP_FUNC(elm_obj_gesture_layer_tap_finger_size_get, _elm_gesture_layer_tap_finger_size_get),
168 EFL_OBJECT_OP_FUNC(elm_obj_gesture_layer_hold_events_set, _elm_gesture_layer_hold_events_set),
169 EFL_OBJECT_OP_FUNC(elm_obj_gesture_layer_hold_events_get, _elm_gesture_layer_hold_events_get),
170 EFL_OBJECT_OP_FUNC(elm_obj_gesture_layer_rotate_step_set, _elm_gesture_layer_rotate_step_set),
171 EFL_OBJECT_OP_FUNC(elm_obj_gesture_layer_rotate_step_get, _elm_gesture_layer_rotate_step_get),
172 EFL_OBJECT_OP_FUNC(elm_obj_gesture_layer_cb_set, _elm_gesture_layer_cb_set),
173 EFL_OBJECT_OP_FUNC(elm_obj_gesture_layer_attach, _elm_gesture_layer_attach),
174 EFL_OBJECT_OP_FUNC(elm_obj_gesture_layer_cb_del, _elm_gesture_layer_cb_del),
175 EFL_OBJECT_OP_FUNC(elm_obj_gesture_layer_cb_add, _elm_gesture_layer_cb_add),
176 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_gesture_layer_efl_object_constructor),
177 EFL_OBJECT_OP_FUNC(efl_ui_widget_disabled_set, _elm_gesture_layer_efl_ui_widget_disabled_set),
178 ELM_GESTURE_LAYER_EXTRA_OPS
179 );
180 opsp = &ops;
181
182 static const Efl_Object_Property_Reflection refl_table[] = {
183 {"zoom_step", __eolian_elm_gesture_layer_zoom_step_set_reflect, __eolian_elm_gesture_layer_zoom_step_get_reflect},
184 {"tap_finger_size", __eolian_elm_gesture_layer_tap_finger_size_set_reflect, __eolian_elm_gesture_layer_tap_finger_size_get_reflect},
185 {"hold_events", __eolian_elm_gesture_layer_hold_events_set_reflect, __eolian_elm_gesture_layer_hold_events_get_reflect},
186 {"rotate_step", __eolian_elm_gesture_layer_rotate_step_set_reflect, __eolian_elm_gesture_layer_rotate_step_get_reflect},
187 };
188 static const Efl_Object_Property_Reflection_Ops rops = {
189 refl_table, EINA_C_ARRAY_LENGTH(refl_table)
190 };
191 ropsp = &rops;
192
193 return efl_class_functions_set(klass, opsp, ropsp);
194}
195
196static const Efl_Class_Description _elm_gesture_layer_class_desc = {
197 EO_VERSION,
198 "Elm.Gesture_Layer",
199 EFL_CLASS_TYPE_REGULAR,
200 sizeof(Elm_Gesture_Layer_Data),
201 _elm_gesture_layer_class_initializer,
202 _elm_gesture_layer_class_constructor,
203 NULL
204};
205
206EFL_DEFINE_CLASS(elm_gesture_layer_class_get, &_elm_gesture_layer_class_desc, EFL_UI_WIDGET_CLASS, EFL_UI_LEGACY_INTERFACE, NULL);
207
208#include "elm_gesture_layer_eo.legacy.c"
diff --git a/src/lib/elementary/elm_gesture_layer_eo.h b/src/lib/elementary/elm_gesture_layer_eo.h
new file mode 100644
index 0000000..2f15a10
--- /dev/null
+++ b/src/lib/elementary/elm_gesture_layer_eo.h
@@ -0,0 +1,229 @@
1#ifndef _ELM_GESTURE_LAYER_EO_H_
2#define _ELM_GESTURE_LAYER_EO_H_
3
4#ifndef _ELM_GESTURE_LAYER_EO_CLASS_TYPE
5#define _ELM_GESTURE_LAYER_EO_CLASS_TYPE
6
7typedef Eo Elm_Gesture_Layer;
8
9#endif
10
11#ifndef _ELM_GESTURE_LAYER_EO_TYPES
12#define _ELM_GESTURE_LAYER_EO_TYPES
13
14/** Enum of supported gesture types.
15 *
16 * @ingroup Elm_Gesture
17 */
18typedef enum
19{
20 ELM_GESTURE_FIRST = 0, /**< First type used for iteration over the enum */
21 ELM_GESTURE_N_TAPS, /**< N fingers single taps */
22 ELM_GESTURE_N_LONG_TAPS, /**< N fingers single long-taps */
23 ELM_GESTURE_N_DOUBLE_TAPS, /**< N fingers double-single taps */
24 ELM_GESTURE_N_TRIPLE_TAPS, /**< N fingers triple-single taps */
25 ELM_GESTURE_MOMENTUM, /**< Reports momentum in the direction of move */
26 ELM_GESTURE_N_LINES, /**< N fingers line gesture */
27 ELM_GESTURE_N_FLICKS, /**< N fingers flick gesture */
28 ELM_GESTURE_ZOOM, /**< Zoom */
29 ELM_GESTURE_ROTATE, /**< Rotate */
30 ELM_GESTURE_LAST /**< Sentinel value to indicate last enum field during
31 * iteration */
32} Elm_Gesture_Type;
33
34/** Enum of gesture states.
35 *
36 * @ingroup Elm_Gesture
37 */
38typedef enum
39{
40 ELM_GESTURE_STATE_UNDEFINED = -1 /* +1 */, /**< Gesture not started */
41 ELM_GESTURE_STATE_START, /**< Gesture started */
42 ELM_GESTURE_STATE_MOVE, /**< Gesture is ongoing */
43 ELM_GESTURE_STATE_END, /**< Gesture completed */
44 ELM_GESTURE_STATE_ABORT /**< Ongoing gesture was aborted */
45} Elm_Gesture_State;
46
47
48#endif
49/** Elementary gesture layer class
50 *
51 * @ingroup Elm_Gesture_Layer
52 */
53#define ELM_GESTURE_LAYER_CLASS elm_gesture_layer_class_get()
54
55EWAPI const Efl_Class *elm_gesture_layer_class_get(void);
56
57/**
58 * @brief Control step value for zoom action.
59 *
60 * When recognizing the zoom gesture, it should be recognized as zooming larger
61 * than step.
62 *
63 * @param[in] obj The object.
64 * @param[in] step The zoom step value.
65 *
66 * @ingroup Elm_Gesture_Layer
67 */
68EOAPI void elm_obj_gesture_layer_zoom_step_set(Eo *obj, double step);
69
70/**
71 * @brief Control step value for zoom action.
72 *
73 * @param[in] obj The object.
74 *
75 * @return The zoom step value.
76 *
77 * @ingroup Elm_Gesture_Layer
78 */
79EOAPI double elm_obj_gesture_layer_zoom_step_get(const Eo *obj);
80
81/**
82 * @brief This function sets the gesture layer finger-size for taps.
83 *
84 * If not set, it's taken from elm_config. Set to 0 if you want GLayer to use
85 * the system finger size value (default).
86 *
87 * @param[in] obj The object.
88 * @param[in] sz The finger size.
89 *
90 * @since 1.8
91 *
92 * @ingroup Elm_Gesture_Layer
93 */
94EOAPI void elm_obj_gesture_layer_tap_finger_size_set(Eo *obj, int sz);
95
96/**
97 * @brief This function returns the gesture layer finger-size for taps
98 *
99 * @param[in] obj The object.
100 *
101 * @return The finger size.
102 *
103 * @since 1.8
104 *
105 * @ingroup Elm_Gesture_Layer
106 */
107EOAPI int elm_obj_gesture_layer_tap_finger_size_get(const Eo *obj);
108
109/**
110 * @brief This function makes gesture-layer repeat events.
111 *
112 * Set this if you like to get the raw events only if gestures were not
113 * detected.
114 *
115 * Clear this if you like gesture layer to forward events as testing gestures.
116 *
117 * @param[in] obj The object.
118 * @param[in] hold_events If @c true get events only if gesture was not
119 * detected, @c false otherwise
120 *
121 * @ingroup Elm_Gesture_Layer
122 */
123EOAPI void elm_obj_gesture_layer_hold_events_set(Eo *obj, Eina_Bool hold_events);
124
125/**
126 * @brief Get the repeat-events setting.
127 *
128 * @param[in] obj The object.
129 *
130 * @return If @c true get events only if gesture was not detected, @c false
131 * otherwise
132 *
133 * @ingroup Elm_Gesture_Layer
134 */
135EOAPI Eina_Bool elm_obj_gesture_layer_hold_events_get(const Eo *obj);
136
137/**
138 * @brief This function returns step-value for rotate action.
139 *
140 * Set to 0 to cancel step setting.
141 *
142 * When recognizing the rotate gesture, the rotated size must be larger than
143 * step.
144 *
145 * @param[in] obj The object.
146 * @param[in] step New rotate step value.
147 *
148 * @ingroup Elm_Gesture_Layer
149 */
150EOAPI void elm_obj_gesture_layer_rotate_step_set(Eo *obj, double step);
151
152/**
153 * @brief This function returns step-value for rotate action.
154 *
155 * @param[in] obj The object.
156 *
157 * @return New rotate step value.
158 *
159 * @ingroup Elm_Gesture_Layer
160 */
161EOAPI double elm_obj_gesture_layer_rotate_step_get(const Eo *obj);
162
163/**
164 * @brief Set the gesture state change callback.
165 *
166 * When all callbacks for the gesture are set to @c null, it means this gesture
167 * is disabled.
168 *
169 * @param[in] obj The object.
170 * @param[in] idx The gesture you want to track state of.
171 * @param[in] cb_type The event the callback tracks (START, MOVE, END, ABORT).
172 * @param[in] cb The callback itself.
173 * @param[in] data Custom data to be passed.
174 *
175 * @ingroup Elm_Gesture_Layer
176 */
177EOAPI void elm_obj_gesture_layer_cb_set(Eo *obj, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data);
178
179/**
180 * @brief Attach a gesture layer widget to an Evas object (setting the widget's
181 * target).
182 *
183 * A gesture layer's target may be any Evas object. This object will be used to
184 * listen to mouse and key events.
185 *
186 * @param[in] obj The object.
187 * @param[in] target The object to attach.
188 *
189 * @return @c true on success, @c false otherwise.
190 *
191 * @ingroup Elm_Gesture_Layer
192 */
193EOAPI Eina_Bool elm_obj_gesture_layer_attach(Eo *obj, Efl_Canvas_Object *target);
194
195/**
196 * @brief Remove a gesture callback.
197 *
198 * @param[in] obj The object.
199 * @param[in] idx The gesture you want to track state of.
200 * @param[in] cb_type The event the callback tracks (START, MOVE, END, ABORT).
201 * @param[in] cb The callback itself.
202 * @param[in] data Custom callback data.
203 *
204 * @ingroup Elm_Gesture_Layer
205 */
206EOAPI void elm_obj_gesture_layer_cb_del(Eo *obj, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data);
207
208/**
209 * @brief Add a gesture state change callback.
210 *
211 * When all callbacks for the gesture are set to @c null, it means this gesture
212 * is disabled.
213 *
214 * If a function was already set for this gesture/type/state, it will be
215 * replaced by the new one. For ABI compat, callbacks added by
216 * @ref elm_obj_gesture_layer_cb_add will be removed. It is recommended to use
217 * only one of these functions for a gesture object.
218 *
219 * @param[in] obj The object.
220 * @param[in] idx The gesture you want to track state of.
221 * @param[in] cb_type The event the callback tracks (START, MOVE, END, ABORT).
222 * @param[in] cb The callback itself.
223 * @param[in] data Custom data to be passed.
224 *
225 * @ingroup Elm_Gesture_Layer
226 */
227EOAPI void elm_obj_gesture_layer_cb_add(Eo *obj, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data);
228
229#endif
diff --git a/src/lib/elementary/elm_gesture_layer_eo.legacy.c b/src/lib/elementary/elm_gesture_layer_eo.legacy.c
new file mode 100644
index 0000000..ab6c4c9
--- /dev/null
+++ b/src/lib/elementary/elm_gesture_layer_eo.legacy.c
@@ -0,0 +1,72 @@
1
2EAPI void
3elm_gesture_layer_zoom_step_set(Elm_Gesture_Layer *obj, double step)
4{
5 elm_obj_gesture_layer_zoom_step_set(obj, step);
6}
7
8EAPI double
9elm_gesture_layer_zoom_step_get(const Elm_Gesture_Layer *obj)
10{
11 return elm_obj_gesture_layer_zoom_step_get(obj);
12}
13
14EAPI void
15elm_gesture_layer_tap_finger_size_set(Elm_Gesture_Layer *obj, int sz)
16{
17 elm_obj_gesture_layer_tap_finger_size_set(obj, sz);
18}
19
20EAPI int
21elm_gesture_layer_tap_finger_size_get(const Elm_Gesture_Layer *obj)
22{
23 return elm_obj_gesture_layer_tap_finger_size_get(obj);
24}
25
26EAPI void
27elm_gesture_layer_hold_events_set(Elm_Gesture_Layer *obj, Eina_Bool hold_events)
28{
29 elm_obj_gesture_layer_hold_events_set(obj, hold_events);
30}
31
32EAPI Eina_Bool
33elm_gesture_layer_hold_events_get(const Elm_Gesture_Layer *obj)
34{
35 return elm_obj_gesture_layer_hold_events_get(obj);
36}
37
38EAPI void
39elm_gesture_layer_rotate_step_set(Elm_Gesture_Layer *obj, double step)
40{
41 elm_obj_gesture_layer_rotate_step_set(obj, step);
42}
43
44EAPI double
45elm_gesture_layer_rotate_step_get(const Elm_Gesture_Layer *obj)
46{
47 return elm_obj_gesture_layer_rotate_step_get(obj);
48}
49
50EAPI void
51elm_gesture_layer_cb_set(Elm_Gesture_Layer *obj, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data)
52{
53 elm_obj_gesture_layer_cb_set(obj, idx, cb_type, cb, data);
54}
55
56EAPI Eina_Bool
57elm_gesture_layer_attach(Elm_Gesture_Layer *obj, Efl_Canvas_Object *target)
58{
59 return elm_obj_gesture_layer_attach(obj, target);
60}
61
62EAPI void
63elm_gesture_layer_cb_del(Elm_Gesture_Layer *obj, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data)
64{
65 elm_obj_gesture_layer_cb_del(obj, idx, cb_type, cb, data);
66}
67
68EAPI void
69elm_gesture_layer_cb_add(Elm_Gesture_Layer *obj, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data)
70{
71 elm_obj_gesture_layer_cb_add(obj, idx, cb_type, cb, data);
72}
diff --git a/src/lib/elementary/elm_gesture_layer_eo.legacy.h b/src/lib/elementary/elm_gesture_layer_eo.legacy.h
new file mode 100644
index 0000000..268eab1
--- /dev/null
+++ b/src/lib/elementary/elm_gesture_layer_eo.legacy.h
@@ -0,0 +1,222 @@
1#ifndef _ELM_GESTURE_LAYER_EO_LEGACY_H_
2#define _ELM_GESTURE_LAYER_EO_LEGACY_H_
3
4#ifndef _ELM_GESTURE_LAYER_EO_CLASS_TYPE
5#define _ELM_GESTURE_LAYER_EO_CLASS_TYPE
6
7typedef Eo Elm_Gesture_Layer;
8
9#endif
10
11#ifndef _ELM_GESTURE_LAYER_EO_TYPES
12#define _ELM_GESTURE_LAYER_EO_TYPES
13
14/** Enum of supported gesture types.
15 *
16 * @ingroup Elm_Gesture
17 */
18typedef enum
19{
20 ELM_GESTURE_FIRST = 0, /**< First type used for iteration over the enum */
21 ELM_GESTURE_N_TAPS, /**< N fingers single taps */
22 ELM_GESTURE_N_LONG_TAPS, /**< N fingers single long-taps */
23 ELM_GESTURE_N_DOUBLE_TAPS, /**< N fingers double-single taps */
24 ELM_GESTURE_N_TRIPLE_TAPS, /**< N fingers triple-single taps */
25 ELM_GESTURE_MOMENTUM, /**< Reports momentum in the direction of move */
26 ELM_GESTURE_N_LINES, /**< N fingers line gesture */
27 ELM_GESTURE_N_FLICKS, /**< N fingers flick gesture */
28 ELM_GESTURE_ZOOM, /**< Zoom */
29 ELM_GESTURE_ROTATE, /**< Rotate */
30 ELM_GESTURE_LAST /**< Sentinel value to indicate last enum field during
31 * iteration */
32} Elm_Gesture_Type;
33
34/** Enum of gesture states.
35 *
36 * @ingroup Elm_Gesture
37 */
38typedef enum
39{
40 ELM_GESTURE_STATE_UNDEFINED = -1 /* +1 */, /**< Gesture not started */
41 ELM_GESTURE_STATE_START, /**< Gesture started */
42 ELM_GESTURE_STATE_MOVE, /**< Gesture is ongoing */
43 ELM_GESTURE_STATE_END, /**< Gesture completed */
44 ELM_GESTURE_STATE_ABORT /**< Ongoing gesture was aborted */
45} Elm_Gesture_State;
46
47
48#endif
49
50/**
51 * @brief Control step value for zoom action.
52 *
53 * When recognizing the zoom gesture, it should be recognized as zooming larger
54 * than step.
55 *
56 * @param[in] obj The object.
57 * @param[in] step The zoom step value.
58 *
59 * @ingroup Elm_Gesture_Layer_Group
60 */
61EAPI void elm_gesture_layer_zoom_step_set(Elm_Gesture_Layer *obj, double step);
62
63/**
64 * @brief Control step value for zoom action.
65 *
66 * @param[in] obj The object.
67 *
68 * @return The zoom step value.
69 *
70 * @ingroup Elm_Gesture_Layer_Group
71 */
72EAPI double elm_gesture_layer_zoom_step_get(const Elm_Gesture_Layer *obj);
73
74/**
75 * @brief This function sets the gesture layer finger-size for taps.
76 *
77 * If not set, it's taken from elm_config. Set to 0 if you want GLayer to use
78 * the system finger size value (default).
79 *
80 * @param[in] obj The object.
81 * @param[in] sz The finger size.
82 *
83 * @since 1.8
84 *
85 * @ingroup Elm_Gesture_Layer_Group
86 */
87EAPI void elm_gesture_layer_tap_finger_size_set(Elm_Gesture_Layer *obj, int sz);
88
89/**
90 * @brief This function returns the gesture layer finger-size for taps
91 *
92 * @param[in] obj The object.
93 *
94 * @return The finger size.
95 *
96 * @since 1.8
97 *
98 * @ingroup Elm_Gesture_Layer_Group
99 */
100EAPI int elm_gesture_layer_tap_finger_size_get(const Elm_Gesture_Layer *obj);
101
102/**
103 * @brief This function makes gesture-layer repeat events.
104 *
105 * Set this if you like to get the raw events only if gestures were not
106 * detected.
107 *
108 * Clear this if you like gesture layer to forward events as testing gestures.
109 *
110 * @param[in] obj The object.
111 * @param[in] hold_events If @c true get events only if gesture was not
112 * detected, @c false otherwise
113 *
114 * @ingroup Elm_Gesture_Layer_Group
115 */
116EAPI void elm_gesture_layer_hold_events_set(Elm_Gesture_Layer *obj, Eina_Bool hold_events);
117
118/**
119 * @brief Get the repeat-events setting.
120 *
121 * @param[in] obj The object.
122 *
123 * @return If @c true get events only if gesture was not detected, @c false
124 * otherwise
125 *
126 * @ingroup Elm_Gesture_Layer_Group
127 */
128EAPI Eina_Bool elm_gesture_layer_hold_events_get(const Elm_Gesture_Layer *obj);
129
130/**
131 * @brief This function returns step-value for rotate action.
132 *
133 * Set to 0 to cancel step setting.
134 *
135 * When recognizing the rotate gesture, the rotated size must be larger than
136 * step.
137 *
138 * @param[in] obj The object.
139 * @param[in] step New rotate step value.
140 *
141 * @ingroup Elm_Gesture_Layer_Group
142 */
143EAPI void elm_gesture_layer_rotate_step_set(Elm_Gesture_Layer *obj, double step);
144
145/**
146 * @brief This function returns step-value for rotate action.
147 *
148 * @param[in] obj The object.
149 *
150 * @return New rotate step value.
151 *
152 * @ingroup Elm_Gesture_Layer_Group
153 */
154EAPI double elm_gesture_layer_rotate_step_get(const Elm_Gesture_Layer *obj);
155
156/**
157 * @brief Set the gesture state change callback.
158 *
159 * When all callbacks for the gesture are set to @c null, it means this gesture
160 * is disabled.
161 *
162 * @param[in] obj The object.
163 * @param[in] idx The gesture you want to track state of.
164 * @param[in] cb_type The event the callback tracks (START, MOVE, END, ABORT).
165 * @param[in] cb The callback itself.
166 * @param[in] data Custom data to be passed.
167 *
168 * @ingroup Elm_Gesture_Layer_Group
169 */
170EAPI void elm_gesture_layer_cb_set(Elm_Gesture_Layer *obj, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data);
171
172/**
173 * @brief Attach a gesture layer widget to an Evas object (setting the widget's
174 * target).
175 *
176 * A gesture layer's target may be any Evas object. This object will be used to
177 * listen to mouse and key events.
178 *
179 * @param[in] obj The object.
180 * @param[in] target The object to attach.
181 *
182 * @return @c true on success, @c false otherwise.
183 *
184 * @ingroup Elm_Gesture_Layer_Group
185 */
186EAPI Eina_Bool elm_gesture_layer_attach(Elm_Gesture_Layer *obj, Efl_Canvas_Object *target);
187
188/**
189 * @brief Remove a gesture callback.
190 *
191 * @param[in] obj The object.
192 * @param[in] idx The gesture you want to track state of.
193 * @param[in] cb_type The event the callback tracks (START, MOVE, END, ABORT).
194 * @param[in] cb The callback itself.
195 * @param[in] data Custom callback data.
196 *
197 * @ingroup Elm_Gesture_Layer_Group
198 */
199EAPI void elm_gesture_layer_cb_del(Elm_Gesture_Layer *obj, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data);
200
201/**
202 * @brief Add a gesture state change callback.
203 *
204 * When all callbacks for the gesture are set to @c null, it means this gesture
205 * is disabled.
206 *
207 * If a function was already set for this gesture/type/state, it will be
208 * replaced by the new one. For ABI compat, callbacks added by
209 * @ref elm_gesture_layer_cb_add will be removed. It is recommended to use only
210 * one of these functions for a gesture object.
211 *
212 * @param[in] obj The object.
213 * @param[in] idx The gesture you want to track state of.
214 * @param[in] cb_type The event the callback tracks (START, MOVE, END, ABORT).
215 * @param[in] cb The callback itself.
216 * @param[in] data Custom data to be passed.
217 *
218 * @ingroup Elm_Gesture_Layer_Group
219 */
220EAPI void elm_gesture_layer_cb_add(Elm_Gesture_Layer *obj, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data);
221
222#endif
diff --git a/src/lib/elementary/elm_gesture_layer_legacy.h b/src/lib/elementary/elm_gesture_layer_legacy.h
index f6f76e9..7c67737 100644
--- a/src/lib/elementary/elm_gesture_layer_legacy.h
+++ b/src/lib/elementary/elm_gesture_layer_legacy.h
@@ -1,4 +1,4 @@
1#include "elm_gesture_layer.eo.legacy.h" 1#include "elm_gesture_layer_eo.legacy.h"
2 2
3/** 3/**
4 * Call this function to construct a new gesture-layer object. 4 * Call this function to construct a new gesture-layer object.
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index f95140d..c7e5ba4 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -1,7 +1,6 @@
1pub_legacy_eo_files = [ 1pub_legacy_eo_files = [
2 'efl_ui_clock_legacy.eo', 2 'efl_ui_clock_legacy.eo',
3 'elm_interface_fileselector.eo', 3 'elm_interface_fileselector.eo',
4 'elm_gesture_layer.eo',
5 'elm_glview.eo', 4 'elm_glview.eo',
6 'elm_hover.eo', 5 'elm_hover.eo',
7 'elm_index.eo', 6 'elm_index.eo',
@@ -752,6 +751,8 @@ elementary_pub_headers = [
752 'elm_genlist_item_eo.legacy.h', 751 'elm_genlist_item_eo.legacy.h',
753 'elm_genlist_pan_eo.h', 752 'elm_genlist_pan_eo.h',
754 'elm_genlist_pan_eo.legacy.h', 753 'elm_genlist_pan_eo.legacy.h',
754 'elm_gesture_layer_eo.h',
755 'elm_gesture_layer_eo.legacy.h',
755 'elm_hoversel_eo.h', 756 'elm_hoversel_eo.h',
756 'elm_hoversel_eo.legacy.h', 757 'elm_hoversel_eo.legacy.h',
757 'elm_hoversel_item_eo.h', 758 'elm_hoversel_item_eo.h',