Gesture callback function prototype.
#include <sys/queue.h> #include "input/event_types.h" #include "gestures/bucket.h"
typedef void(* gesture_callback_f)(struct gesture_base *gesture, mtouch_event_t *event, void *param, int async);
The callback function gesture_callback_f is invoked every time a gesture changes state, with the exception of the transition from UNRECOGNIZED to FAILED.
Note that if the event passed to the callback is NULL, it means the callback was invoked following a timer callback (as opposed to an event coming in). The async parameter indicates which thread invoked the callback:
the thread that called gestures_set_process_event() (async == 0)
the timer thread (async == 1)