Updated: October 28, 2024 |
Common data structure for all gestures
#include <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; } gesture_base_t;
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.