87 float closest_dist = -1;
108 return closest_group;
126 return null_recognizer;
void recognize_double_tap(const touch_event_t *event)
reads the last tap and stroke data and determines whethers this new stroke is part of a double_tap ev...
void init_double_tap()
initializes the data array by setting all field to 0/NULL
void init_drag()
Initialize drag data structures.
void recognize_drag(const touch_event_t *event)
Recognize drag gesture.
int disable_recognizer(int recognizer)
Disable a recognizer already in the library.
gesture_recognizer_t remove_recognizer(int recognizer)
Remove a recognizer in the library.
touch_event_t latest_touch_events[MAX_TOUCHES]
set containing most recent touch within finger group
int init_gesturelib()
This function should be called by the user before passing touch events to the library....
int enable_recognizer(int recognizer)
Enable a recognizer already in the library.
int add_recognizer(void(*recognize)(const touch_event_t *), void(*init)(void))
Register a recognizer via a recognition function.
void process_touch_event(touch_event_t *touch_event)
Users call this function with a generated touch event to let the library process it....
gesture_recognizer_t recognizers[MAX_RECOGNIZERS]
touch_event_t empty_touch_event
float EVENT_GROUPING_DIST_MAX
#define TOUCH_GROUP_UNDEFINED
void recognize_hold(const touch_event_t *event)
Recognize hold gesture.
void init_hold()
Initialize hold data structures.
void recognize_hold_and_drag(const touch_event_t *event)
Recognize hold and drag gesture.
void init_hold_and_drag()
Initialize hold and drag data structures.
void init_multidrag()
Initialize multidrag data structures.
void recognize_multidrag(const touch_event_t *event)
Recognize multidrag gesture. This gesture locks the number of fingers once any finger starts moving.
void recognize_multistroke(const touch_event_t *event)
Recognize multistroke gesture. This gesture allows the number of fingers to change.
void init_multistroke()
Initialize multistroke data structures.
void recognize_rotate(const touch_event_t *event)
Recognize rotate gesture. This gesture locks the number of fingers once any finger starts moving.
void init_rotate()
Initialize rotate data structures.
void init_stroke()
Initialize stroke data structures.
void recognize_stroke(const touch_event_t *event)
Recognize stroke gesture.
The user may create their own gesture recognizer to add to the library.
void(* recognize)(const touch_event_t *)
To use the gesture library, users create touch events and fill in the appropriate fields.
void init_tap()
Initialize tap data structures.
void recognize_tap(const touch_event_t *event)
Recognize tap gesture.
#define SQUARED_DIST(a, b)
void init_zoom()
Initialize zoom data structures.
void recognize_zoom(const touch_event_t *event)
Recognize zoom gesture. This gesture locks the number of fingers once any finger starts moving.