Gesture Library
gestureparams.h
Go to the documentation of this file.
1 #pragma once
2 
3 // This is the maximum number of simultaneous touches supported.
4 // Processing more simultaneous gestures requires more memory and execution time.
5 #define MAX_TOUCHES 5
6 
7 // This is the maximum number of gesture recognizers supported.
8 // Each recognizer may recognize multiple instances of the same gesture simultaneously.
9 #define MAX_RECOGNIZERS 100
10 
11 // Touch events passed into the library should set their group field to this unless
12 // the user wants to specify a particular group. The touch event struct is defined in
13 // gesturelib.h
14 #define TOUCH_GROUP_UNDEFINED (MAX_TOUCHES + 1)
15 
16 // When using the library to assign touch event groups, two touch events more than this
17 // distance apart will never be assigned the same group. Must call init_gesturelib after modifying this variable.
18 extern float EVENT_GROUPING_DIST_MAX;
19 
20 // Time in seconds for longest tap and shortest hold. Must call init_gesturelib after modifying any of these variables.
21 extern float TAP_TIME_MAX;
22 #define HOLD_TIME_MIN TAP_TIME_MAX
23 
24 // Shortest possible time difference and shortest euclidean distance for double taps. Must call init_gesturelib after
25 // modifying any of these variables.
26 extern float DOUBLE_GROUP_TIME_DIFF;
27 extern float DOUBLE_GROUP_DIST_DIFF;
28 extern float DOUBLE_DIST;
29 extern float DOUBLE_TIME_DIFF;
30 
31 // Euclidean distance for longest tap/hold and shortest drag. Must call init_gesturelib after modifying any of these
32 // variables.
33 extern float TAP_DIST_MAX;
34 #define HOLD_DIST_MAX TAP_DIST_MAX
35 #define DRAG_DIST_MIN TAP_DIST_MAX
36 
37 // Minimum scale factor difference from 1 to be a zoom. Must call init_gesturelib after modifying this variable.
38 extern float ZOOM_SCALE_MIN;
39 
40 // Minimum rotation angle in radians to be a rotate. Must call init_gesturelib after modifying this variable.
41 extern float ROTATE_ANGLE_MIN;
float ROTATE_ANGLE_MIN
Definition: gestureparams.c:19
float EVENT_GROUPING_DIST_MAX
Definition: gestureparams.c:5
float DOUBLE_DIST
Definition: gestureparams.c:12
float TAP_TIME_MAX
Definition: gestureparams.c:7
float TAP_DIST_MAX
Definition: gestureparams.c:15
float DOUBLE_GROUP_DIST_DIFF
Definition: gestureparams.c:10
float DOUBLE_TIME_DIFF
Definition: gestureparams.c:13
float DOUBLE_GROUP_TIME_DIFF
Definition: gestureparams.c:9
float ZOOM_SCALE_MIN
Definition: gestureparams.c:17