Common data structure for all gestures.


typedef struct gesture_base {
    struct gestures_set * set ;
    gesture_e type ;
    gesture_state_e state ;
    gesture_funcs_t funcs ;
    gesture_callback_f callback ;
    gestures_bucket_t mustallfail ;
    gestures_bucket_t faildependents ;


struct gestures_set * set
A pointer to the gesture set.
gesture_e type
The gesture type.
gesture_state_e state
The current state of the gesture.
gesture_funcs_t funcs
The state and memory handling functions.
gesture_callback_f callback
The gesture handling function, triggered when a gesture changes state.
gestures_bucket_t mustallfail
List of gestures that must fail for this gesture to complete.
gestures_bucket_t faildependents
List of gestures that can only complete after this gesture fails.
TAILQ_ENTRY(gesture_base) glink
A macro that resolves to pointers into the gestures bucket.

Use the gestures_bucket_*() functions to manipulate the gestures bucket, rather than manipulating it directly.




This structure represents information that is common to all gestures. Specific gestures include the gesture base in their representation, and also include additional members to capture gesture-specific information.

It is up to the application to define the failure dependencies between gestures and to add gestures to a gesture set.