2 * @addtogroup Elm_Gesture_Layer
8 * @typedef Elm_Gesture_Type
9 * @brief This is a convenient macro around #_Elm_Gesture_Type.
13 ELM_GESTURE_FIRST = 0,
15 ELM_GESTURE_N_TAPS, /**< N fingers single taps */
16 ELM_GESTURE_N_LONG_TAPS, /**< N fingers single long-taps */
17 ELM_GESTURE_N_DOUBLE_TAPS, /**< N fingers double-single taps */
18 ELM_GESTURE_N_TRIPLE_TAPS, /**< N fingers triple-single taps */
20 ELM_GESTURE_MOMENTUM, /**< Reports momentum in the direction of move */
22 ELM_GESTURE_N_LINES, /**< N fingers line gesture */
23 ELM_GESTURE_N_FLICKS, /**< N fingers flick gesture */
25 ELM_GESTURE_ZOOM, /**< Zoom */
26 ELM_GESTURE_ROTATE, /**< Rotate */
32 * @typedef Elm_Gesture_State
33 * @brief This is a convenient macro around #_Elm_Gesture_State
37 ELM_GESTURE_STATE_UNDEFINED = -1, /**< Gesture not STARTed */
38 ELM_GESTURE_STATE_START, /**< Gesture STARTed */
39 ELM_GESTURE_STATE_MOVE, /**< Gesture is ongoing */
40 ELM_GESTURE_STATE_END, /**< Gesture completed */
41 ELM_GESTURE_STATE_ABORT /**< Ongoing gesture was ABORTed */
45 * @typedef Elm_Gesture_Taps_Info
46 * @brief The structure type that holds taps info for the user.
48 typedef struct _Elm_Gesture_Taps_Info Elm_Gesture_Taps_Info;
51 * Struct holds taps info for user
53 struct _Elm_Gesture_Taps_Info
55 Evas_Coord x, y; /**< Holds center point between fingers */
56 unsigned int n; /**< Number of fingers tapped */
57 unsigned int timestamp; /**< event timestamp */
61 * @typedef Elm_Gesture_Momentum_Info
62 * @brief The structure type that holds momentum info for the user.
64 typedef struct _Elm_Gesture_Momentum_Info Elm_Gesture_Momentum_Info;
67 * Struct holds momentum info for user
68 * x1 and y1 are not necessarily in sync
69 * x1 holds x value of x direction starting point
70 * and same holds for y1.
71 * This is noticeable when doing V-shape movement
73 struct _Elm_Gesture_Momentum_Info /* Report line ends, timestamps, and momentum computed */
75 Evas_Coord x1; /**< Final-swipe direction starting point on X */
76 Evas_Coord y1; /**< Final-swipe direction starting point on Y */
77 Evas_Coord x2; /**< Final-swipe direction ending point on X */
78 Evas_Coord y2; /**< Final-swipe direction ending point on Y */
80 unsigned int tx; /**< Timestamp of start of final x-swipe */
81 unsigned int ty; /**< Timestamp of start of final y-swipe */
83 Evas_Coord mx; /**< Momentum on X */
84 Evas_Coord my; /**< Momentum on Y */
86 unsigned int n; /**< Number of fingers */
90 * @typedef Elm_Gesture_Line_Info
91 * @brief The structure type that holds line info for the user.
93 typedef struct _Elm_Gesture_Line_Info Elm_Gesture_Line_Info;
96 * Struct holds line info for user
98 struct _Elm_Gesture_Line_Info /* Report line ends, timestamps, and momentum computed */
100 Elm_Gesture_Momentum_Info momentum; /**< Line momentum info */
101 double angle; /**< Angle (direction) of lines */
105 * @typedef Elm_Gesture_Zoom_Info
106 * @brief The structure type that holds zoom info for the user.
108 typedef struct _Elm_Gesture_Zoom_Info Elm_Gesture_Zoom_Info;
111 * Struct holds zoom info for user
113 struct _Elm_Gesture_Zoom_Info
115 Evas_Coord x, y; /**< Holds zoom center point reported to user */
116 Evas_Coord radius; /**< Holds radius between fingers reported to user */
117 double zoom; /**< Zoom value: 1.0 means no zoom */
118 double momentum; /**< Zoom momentum: zoom growth per second (NOT YET SUPPORTED) */
122 * @typedef Elm_Gesture_Rotate_Info
123 * @brief The structure type that holds rotation info for the user.
125 typedef struct _Elm_Gesture_Rotate_Info Elm_Gesture_Rotate_Info;
128 * Struct holds rotation info for user
130 struct _Elm_Gesture_Rotate_Info
132 Evas_Coord x, y; /**< Holds zoom center point reported to user */
133 Evas_Coord radius; /**< Holds radius between fingers reported to user */
134 double base_angle; /**< Holds start-angle */
135 double angle; /**< Rotation value: 0.0 means no rotation */
136 double momentum; /**< Rotation momentum: rotation done per second (NOT YET SUPPORTED) */
140 * @typedef Elm_Gesture_Event_Cb
141 * @brief User callback used to stream gesture info from the gesture layer.
143 * @remarks You should probably return EVAS_EVENT_FLAG_ON_HOLD if your widget acted
144 * upon the event, in an irreversible way.
146 * @param data The user data
147 * @param event_info The gesture report info
148 * @return The flag field to be applied on the causing event
151 typedef Evas_Event_Flags (*Elm_Gesture_Event_Cb)(void *data, void *event_info);
154 * @brief This function sets the gesture layer line min length of an object
156 * @if MOBILE @since_tizen 2.3
157 * @elseif WEARABLE @since_tizen 2.3.1
160 * @param[in] obj gesture-layer.
161 * @param[in] line_min_length the length.
165 EAPI void elm_gesture_layer_line_min_length_set(Evas_Object *obj, int line_min_length);
168 * @brief This function returns the gesture layer line min length of an object
170 * @if MOBILE @since_tizen 2.3
171 * @elseif WEARABLE @since_tizen 2.3.1
174 * @param[in] obj gesture-layer.
175 * @return the length.
179 EAPI int elm_gesture_layer_line_min_length_get(const Evas_Object *obj);
182 * @brief This function sets the gesture layer zoom distance tolerance of an object
184 * @if MOBILE @since_tizen 2.3
185 * @elseif WEARABLE @since_tizen 2.3.1
188 * @param[in] obj gesture-layer.
189 * @param[in] zoom_distance_tolerance zoom distance tolerance
193 EAPI void elm_gesture_layer_zoom_distance_tolerance_set(Evas_Object *obj, Evas_Coord zoom_distance_tolerance);
196 * @brief This function returns the gesture layer zoom distance tolerance of an object
198 * @if MOBILE @since_tizen 2.3
199 * @elseif WEARABLE @since_tizen 2.3.1
202 * @param[in] obj gesture-layer.
203 * @return zoom distance tolerance
207 EAPI Evas_Coord elm_gesture_layer_zoom_distance_tolerance_get(const Evas_Object *obj);
210 * @brief This function sets the gesture layer line distance tolerance of an object
212 * @if MOBILE @since_tizen 2.3
213 * @elseif WEARABLE @since_tizen 2.3.1
216 * @param[in] obj gesture-layer.
217 * @param[in] line_distance_tolerance line distance tolerance
221 EAPI void elm_gesture_layer_line_distance_tolerance_set(Evas_Object *obj, Evas_Coord line_distance_tolerance);
224 * @brief This function returns the gesture layer line distance tolerance of an object
226 * @if MOBILE @since_tizen 2.3
227 * @elseif WEARABLE @since_tizen 2.3.1
230 * @param[in] obj gesture-layer.
231 * @return line distance tolerance
235 EAPI Evas_Coord elm_gesture_layer_line_distance_tolerance_get(const Evas_Object *obj);
238 * @brief This function sets the gesture layer line angular tolerance of an object
240 * @if MOBILE @since_tizen 2.3
241 * @elseif WEARABLE @since_tizen 2.3.1
244 * @param[in] obj gesture-layer.
245 * @param[in] line_angular_tolerance line angular tolerance
249 EAPI void elm_gesture_layer_line_angular_tolerance_set(Evas_Object *obj, double line_angular_tolerance);
252 * @brief This function returns the gesture layer line angular tolerance of an object
254 * @if MOBILE @since_tizen 2.3
255 * @elseif WEARABLE @since_tizen 2.3.1
258 * @param[in] obj gesture-layer.
259 * @return line angular tolerance
263 EAPI double elm_gesture_layer_line_angular_tolerance_get(const Evas_Object *obj);
266 * @brief This function sets the gesture layer zoom wheel factor of an object
268 * @if MOBILE @since_tizen 2.3
269 * @elseif WEARABLE @since_tizen 2.3.1
272 * @param[in] obj gesture-layer.
273 * @param[in] zoom_wheel_factor zoom wheel factor
277 EAPI void elm_gesture_layer_zoom_wheel_factor_set(Evas_Object *obj, double zoom_wheel_factor);
280 * @brief This function returns the gesture layer zoom wheel factor of an object
282 * @if MOBILE @since_tizen 2.3
283 * @elseif WEARABLE @since_tizen 2.3.1
286 * @param[in] obj gesture-layer.
287 * @return zoom wheel factor
291 EAPI double elm_gesture_layer_zoom_wheel_factor_get(const Evas_Object *obj);
294 * @brief This function sets the gesture layer zoom finger factor of an object
296 * @if MOBILE @since_tizen 2.3
297 * @elseif WEARABLE @since_tizen 2.3.1
300 * @param[in] obj gesture-layer.
301 * @param[in] zoom_finger_factor zoom finger factor
305 EAPI void elm_gesture_layer_zoom_finger_factor_set(Evas_Object *obj, double zoom_finger_factor);
308 * @brief This function returns the gesture layer zoom finger factor of an object
310 * @if MOBILE @since_tizen 2.3
311 * @elseif WEARABLE @since_tizen 2.3.1
314 * @param[in] obj gesture-layer.
315 * @return zoom finger factor
319 EAPI double elm_gesture_layer_zoom_finger_factor_get(const Evas_Object *obj);
322 * @brief This function sets the gesture layer rotate angular tolerance of an object
324 * @if MOBILE @since_tizen 2.3
325 * @elseif WEARABLE @since_tizen 2.3.1
328 * @param[in] obj gesture-layer.
329 * @param[in] rotate_angular_tolerance rotate angular tolerance
333 EAPI void elm_gesture_layer_rotate_angular_tolerance_set(Evas_Object *obj, double rotate_angular_tolerance);
336 * @brief This function returns the gesture layer rotate angular tolerance of an object
338 * @if MOBILE @since_tizen 2.3
339 * @elseif WEARABLE @since_tizen 2.3.1
342 * @param[in] obj gesture-layer.
343 * @return rotate angular tolerance
347 EAPI double elm_gesture_layer_rotate_angular_tolerance_get(const Evas_Object *obj);
350 * @brief This function sets the gesture layer flick time limit (in ms) of an object
352 * @if MOBILE @since_tizen 2.3
353 * @elseif WEARABLE @since_tizen 2.3.1
356 * @param[in] obj gesture-layer.
357 * @param[in] flick_time_limit_ms flick time limit (in ms)
361 EAPI void elm_gesture_layer_flick_time_limit_ms_set(Evas_Object *obj, unsigned int flick_time_limit_ms);
364 * @brief This function returns the gesture layer flick time limit (in ms) of an object
366 * @if MOBILE @since_tizen 2.3
367 * @elseif WEARABLE @since_tizen 2.3.1
370 * @param[in] obj gesture-layer.
371 * @return flick time limit (in ms)
375 EAPI unsigned int elm_gesture_layer_flick_time_limit_ms_get(const Evas_Object *obj);
378 * @brief This function sets the gesture layer long tap start timeout of an object
380 * @if MOBILE @since_tizen 2.3
381 * @elseif WEARABLE @since_tizen 2.3.1
384 * @param[in] obj gesture-layer.
385 * @param[in] long_tap_start_timeout long tap start timeout
389 EAPI void elm_gesture_layer_long_tap_start_timeout_set(Evas_Object *obj, double long_tap_start_timeout);
392 * @brief this function returns the gesture layer long tap start timeout of an object
394 * @if MOBILE @since_tizen 2.3
395 * @elseif WEARABLE @since_tizen 2.3.1
398 * @param[in] obj gesture-layer.
399 * @return long tap start timeout
403 EAPI double elm_gesture_layer_long_tap_start_timeout_get(const Evas_Object *obj);
406 * @brief This function sets the gesture layer continues enable of an object
408 * @if MOBILE @since_tizen 2.3
409 * @elseif WEARABLE @since_tizen 2.3.1
412 * @param[in] obj gesture-layer.
413 * @param[in] continues_enable continues enable
417 EAPI void elm_gesture_layer_continues_enable_set(Evas_Object *obj, Eina_Bool continues_enable);
420 * @brief This function returns the gesture layer continues enable of an object
422 * @if MOBILE @since_tizen 2.3
423 * @elseif WEARABLE @since_tizen 2.3.1
426 * @param[in] obj gesture-layer.
427 * @return continues enable
431 EAPI Eina_Bool elm_gesture_layer_continues_enable_get(const Evas_Object *obj);
434 * @brief This function sets the gesture layer double tap timeout of an object
436 * @if MOBILE @since_tizen 2.3
437 * @elseif WEARABLE @since_tizen 2.3.1
440 * @param[in] obj gesture-layer.
441 * @param[in] double_tap_timeout double tap timeout
445 EAPI void elm_gesture_layer_double_tap_timeout_set(Evas_Object *obj, double double_tap_timeout);
448 * @brief this function returns the gesture layer double tap timeout of an object
450 * @if MOBILE @since_tizen 2.3
451 * @elseif WEARABLE @since_tizen 2.3.1
454 * @param[in] obj gesture-layer.
455 * @return double tap timeout
459 EAPI double elm_gesture_layer_double_tap_timeout_get(const Evas_Object *obj);
464 * @brief This function sets the gesture layer finger-size for taps
465 * If not set, this size taken from elm_config.
466 * Set to ZERO if you want GLayer to use system finger size value (default)
468 * @if MOBILE @since_tizen 2.3
469 * @elseif WEARABLE @since_tizen 2.3.1
472 * @param[in] obj gesture-layer.
473 * @param[in] sz Finger size
477 EAPI void elm_gesture_layer_tap_finger_size_set(Evas_Object *obj, Evas_Coord sz);
482 * @brief This function returns the gesture layer finger-size for taps
484 * @if MOBILE @since_tizen 2.3
485 * @elseif WEARABLE @since_tizen 2.3.1
488 * @param[in] obj gesture-layer.
489 * @return Finger size that is currently used by Gesture Layer for taps.
493 EAPI Evas_Coord elm_gesture_layer_tap_finger_size_get(const Evas_Object *obj);