1 /** 2 * @addtogroup Elm_Gesture_Layer 3 * 4 * @{ 5 */ 6 7 /** 8 * Holds taps info for user 9 */ 10 typedef struct _Elm_Gesture_Taps_Info Elm_Gesture_Taps_Info; 11 12 /** 13 * Struct holds taps info for user 14 */ 15 struct _Elm_Gesture_Taps_Info 16 { 17 Evas_Coord x, y; /**< Holds center point between fingers */ 18 unsigned int n; /**< Number of fingers tapped */ 19 unsigned int timestamp; /**< event timestamp */ 20 }; 21 22 /** 23 * holds momentum info for user 24 */ 25 typedef struct _Elm_Gesture_Momentum_Info Elm_Gesture_Momentum_Info; 26 27 /** 28 * Struct holds momentum info for user 29 * x1 and y1 are not necessarily in sync 30 * x1 holds x value of x direction starting point 31 * and same holds for y1. 32 * This is noticeable when doing V-shape movement 33 */ 34 struct _Elm_Gesture_Momentum_Info /* Report line ends, timestamps, and momentum computed */ 35 { 36 Evas_Coord x1; /**< Final-swipe direction starting point on X */ 37 Evas_Coord y1; /**< Final-swipe direction starting point on Y */ 38 Evas_Coord x2; /**< Final-swipe direction ending point on X */ 39 Evas_Coord y2; /**< Final-swipe direction ending point on Y */ 40 41 unsigned int tx; /**< Timestamp of start of final x-swipe */ 42 unsigned int ty; /**< Timestamp of start of final y-swipe */ 43 44 Evas_Coord mx; /**< Momentum on X */ 45 Evas_Coord my; /**< Momentum on Y */ 46 47 unsigned int n; /**< Number of fingers */ 48 }; 49 50 /** 51 * Holds line info for user 52 */ 53 typedef struct _Elm_Gesture_Line_Info Elm_Gesture_Line_Info; 54 55 /** 56 * Struct holds line info for user 57 */ 58 struct _Elm_Gesture_Line_Info /* Report line ends, timestamps, and momentum computed */ 59 { 60 Elm_Gesture_Momentum_Info momentum; /**< Line momentum info */ 61 double angle; /**< Angle (direction) of lines */ 62 }; 63 64 /** 65 * Holds zoom info for user 66 */ 67 typedef struct _Elm_Gesture_Zoom_Info Elm_Gesture_Zoom_Info; 68 69 /** 70 * Struct holds zoom info for user 71 */ 72 struct _Elm_Gesture_Zoom_Info 73 { 74 Evas_Coord x, y; /**< Holds zoom center point reported to user */ 75 Evas_Coord radius; /**< Holds radius between fingers reported to user */ 76 double zoom; /**< Zoom value: 1.0 means no zoom */ 77 double momentum; /**< Zoom momentum: zoom growth per second (NOT YET SUPPORTED) */ 78 }; 79 80 /** 81 * Holds rotation info for user 82 */ 83 typedef struct _Elm_Gesture_Rotate_Info Elm_Gesture_Rotate_Info; 84 85 /** 86 * Struct holds rotation info for user 87 */ 88 struct _Elm_Gesture_Rotate_Info 89 { 90 Evas_Coord x, y; /**< Holds zoom center point reported to user */ 91 Evas_Coord radius; /**< Holds radius between fingers reported to user */ 92 double base_angle; /**< Holds start-angle */ 93 double angle; /**< Rotation value: 0.0 means no rotation */ 94 double momentum; /**< Rotation momentum: rotation done per second (NOT YET SUPPORTED) */ 95 }; 96 97 /** 98 * User callback used to stream gesture info from gesture layer 99 * @param data user data 100 * @param event_info gesture report info 101 * Returns a flag field to be applied on the causing event. 102 * You should probably return EVAS_EVENT_FLAG_ON_HOLD if your widget acted 103 * upon the event, in an irreversible way. 104 */ 105 typedef Evas_Event_Flags (*Elm_Gesture_Event_Cb)(void *data, void *event_info); 106 107 /** 108 * This function sets the gesture layer line min length of an object 109 * 110 * Sets the minimum line length at which the user's gesture will be recognized as a line. 111 * 112 * @param obj gesture-layer. 113 * @param line_min_length the length. 114 * 115 * @since 1.8 116 */ 117 EAPI void elm_gesture_layer_line_min_length_set(Evas_Object *obj, int line_min_length); 118 119 /** 120 * This function returns the gesture layer line min length of an object 121 * 122 * @param obj gesture-layer. 123 * @return the length. 124 * 125 * @since 1.8 126 */ 127 EAPI int elm_gesture_layer_line_min_length_get(const Evas_Object *obj); 128 129 /** 130 * This function sets the gesture layer zoom distance tolerance of an object 131 * 132 * If the distance between the two tab events becomes larger or smaller 133 * than @c zoom_distance_tolerance, it is recognized as the start of the 134 * zoom gesture. 135 * 136 * @param obj gesture-layer. 137 * @param zoom_distance_tolerance zoom distance tolerance 138 * 139 * @since 1.8 140 */ 141 EAPI void elm_gesture_layer_zoom_distance_tolerance_set(Evas_Object *obj, Evas_Coord zoom_distance_tolerance); 142 143 /** 144 * This function returns the gesture layer zoom distance tolerance of an object 145 * 146 * @param obj gesture-layer. 147 * @return zoom distance tolerance 148 * 149 * @since 1.8 150 */ 151 EAPI Evas_Coord elm_gesture_layer_zoom_distance_tolerance_get(const Evas_Object *obj); 152 153 /** 154 * This function sets the gesture layer line distance tolerance of an object 155 * 156 * Sets the minimum @c line_distance_tolerance length for the gesture to be recognized as a line. 157 * 158 * @param obj gesture-layer. 159 * @param line_distance_tolerance line distance tolerance 160 * 161 * @since 1.8 162 */ 163 EAPI void elm_gesture_layer_line_distance_tolerance_set(Evas_Object *obj, Evas_Coord line_distance_tolerance); 164 165 /** 166 * This function returns the gesture layer line distance tolerance of an object 167 * 168 * @param obj gesture-layer. 169 * @return line distance tolerance 170 * 171 * @since 1.8 172 */ 173 EAPI Evas_Coord elm_gesture_layer_line_distance_tolerance_get(const Evas_Object *obj); 174 175 /** 176 * This function sets the gesture layer line angular tolerance of an object 177 * 178 * Sets the minimum @c line_angular_tolerance angle for the gesture to be recognized as a line. 179 * 180 * @param obj gesture-layer. 181 * @param line_angular_tolerance line angular tolerance 182 * 183 * @since 1.8 184 */ 185 EAPI void elm_gesture_layer_line_angular_tolerance_set(Evas_Object *obj, double line_angular_tolerance); 186 187 /** 188 * This function returns the gesture layer line angular tolerance of an object 189 * 190 * @param obj gesture-layer. 191 * @return line angular tolerance 192 * 193 * @since 1.8 194 */ 195 EAPI double elm_gesture_layer_line_angular_tolerance_get(const Evas_Object *obj); 196 197 /** 198 * This function sets the gesture layer zoom wheel factor of an object 199 * 200 * Sets the zoom size when a mouse wheel event occurs. 201 * 202 * @param obj gesture-layer. 203 * @param zoom_wheel_factor zoom wheel factor 204 * 205 * @since 1.8 206 */ 207 EAPI void elm_gesture_layer_zoom_wheel_factor_set(Evas_Object *obj, double zoom_wheel_factor); 208 209 /** 210 * This function returns the gesture layer zoom wheel factor of an object 211 * 212 * @param obj gesture-layer. 213 * @return zoom wheel factor 214 * 215 * @since 1.8 216 */ 217 EAPI double elm_gesture_layer_zoom_wheel_factor_get(const Evas_Object *obj); 218 219 /** 220 * This function sets the gesture layer zoom finger factor of an object 221 * 222 * Sets the zoom size by multiplaying the zoom value by @c zoom_finger_factor 223 * when zooming. 224 * 225 * @param obj gesture-layer. 226 * @param zoom_finger_factor zoom finger factor 227 * 228 * @since 1.8 229 */ 230 EAPI void elm_gesture_layer_zoom_finger_factor_set(Evas_Object *obj, double zoom_finger_factor); 231 232 /** 233 * This function returns the gesture layer zoom finger factor of an object 234 * 235 * @param obj gesture-layer. 236 * @return zoom finger factor 237 * 238 * @since 1.8 239 */ 240 EAPI double elm_gesture_layer_zoom_finger_factor_get(const Evas_Object *obj); 241 242 /** 243 * This function sets the gesture layer rotate angular tolerance of an object 244 * 245 * Sets the minimum @c rotate_angular_tolerance angle for the gesture to be recognized as a rotate. 246 * Rotate should be rotated beyond the givin @c rotate_angular_tolerance to recognize 247 * the start of the rotate gesture. 248 * 249 * @param obj gesture-layer. 250 * @param rotate_angular_tolerance rotate angular tolerance 251 * 252 * @since 1.8 253 */ 254 EAPI void elm_gesture_layer_rotate_angular_tolerance_set(Evas_Object *obj, double rotate_angular_tolerance); 255 256 /** 257 * This function returns the gesture layer rotate angular tolerance of an object 258 * 259 * @param obj gesture-layer. 260 * @return rotate angular tolerance 261 * 262 * @since 1.8 263 */ 264 EAPI double elm_gesture_layer_rotate_angular_tolerance_get(const Evas_Object *obj); 265 266 /** 267 * This function sets the gesture layer flick time limit (in ms) of an object 268 * 269 * Recognize as a flick when a gesture occurs over @c flick_time_limit_ms. 270 * 271 * @param obj gesture-layer. 272 * @param flick_time_limit_ms flick time limit (in ms) 273 * 274 * @since 1.8 275 */ 276 EAPI void elm_gesture_layer_flick_time_limit_ms_set(Evas_Object *obj, unsigned int flick_time_limit_ms); 277 278 /** 279 * This function returns the gesture layer flick time limit (in ms) of an object 280 * 281 * @param obj gesture-layer. 282 * @return flick time limit (in ms) 283 * 284 * @since 1.8 285 */ 286 EAPI unsigned int elm_gesture_layer_flick_time_limit_ms_get(const Evas_Object *obj); 287 288 /** 289 * This function sets the gesture layer long tap start timeout of an object 290 * 291 * Recognize as a long tap when a tab occurs over @c long_tap_start_timeout, 292 * if set negative value, timeout will be 0. 293 * 294 * @param obj gesture-layer. 295 * @param long_tap_start_timeout long tap start timeout 296 * 297 * @since 1.8 298 */ 299 EAPI void elm_gesture_layer_long_tap_start_timeout_set(Evas_Object *obj, double long_tap_start_timeout); 300 301 /** 302 * this function returns the gesture layer long tap start timeout of an object 303 * 304 * @param obj gesture-layer. 305 * @return long tap start timeout 306 * 307 * @since 1.8 308 */ 309 EAPI double elm_gesture_layer_long_tap_start_timeout_get(const Evas_Object *obj); 310 311 /** 312 * This function sets the gesture layer continues enable of an object 313 * 314 * An option that allows user to start a gesture even when user is in touch move state. 315 * 316 * @param obj gesture-layer. 317 * @param continues_enable continues enable 318 * 319 * @since 1.8 320 */ 321 EAPI void elm_gesture_layer_continues_enable_set(Evas_Object *obj, Eina_Bool continues_enable); 322 323 /** 324 * This function returns the gesture layer continues enable of an object 325 * 326 * @param obj gesture-layer. 327 * @return continues enable 328 * 329 * @since 1.8 330 */ 331 EAPI Eina_Bool elm_gesture_layer_continues_enable_get(const Evas_Object *obj); 332 333 /** 334 * This function sets the gesture layer double tap timeout of an object 335 * 336 * When the time difference between two tabs is less than the @c double_tap_timeout value, 337 * it is recognized as a double tab, if set negative value, timeout will be 0. 338 * 339 * @param obj gesture-layer. 340 * @param double_tap_timeout double tap timeout 341 * 342 * @since 1.8 343 */ 344 EAPI void elm_gesture_layer_double_tap_timeout_set(Evas_Object *obj, double double_tap_timeout); 345 346 /** 347 * this function returns the gesture layer double tap timeout of an object 348 * 349 * @param obj gesture-layer. 350 * @return double tap timeout 351 * 352 * @since 1.8 353 */ 354 EAPI double elm_gesture_layer_double_tap_timeout_get(const Evas_Object *obj); 355 356 /** 357 * This function sets the gesture layer finger-size for taps 358 * If not set, this size taken from elm_config. 359 * Set to ZERO if you want GLayer to use system finger size value (default) 360 * 361 * @param obj gesture-layer. 362 * @param sz Finger size 363 * 364 * @since 1.8 365 */ 366 EAPI void elm_gesture_layer_tap_finger_size_set(Evas_Object *obj, Evas_Coord sz); 367 368 /** 369 * This function returns the gesture layer finger-size for taps 370 * 371 * @param obj gesture-layer. 372 * @return Finger size that is currently used by Gesture Layer for taps. 373 * 374 * @since 1.8 375 */ 376 EAPI Evas_Coord elm_gesture_layer_tap_finger_size_get(const Evas_Object *obj); 377 378 /** 379 * @} 380 */ 381