/* * ANODE touch gesture classification engine */ #ifndef ANODE_TOUCH_GESTURE_H #define ANODE_TOUCH_GESTURE_H #include #include typedef enum { ANODE_GEST_NONE = 0, ANODE_GEST_LAUNCHER, ANODE_GEST_VKBD_TOGGLE, ANODE_GEST_CONTROL, ANODE_GEST_CYCLE_WIN } anode_gesture_t; typedef struct { bool active; unsigned int detail; double start_x; double start_y; double last_x; double last_y; uint64_t start_ms; } anode_touch_track_t; void anode_touch_begin(anode_touch_track_t *tr, unsigned int detail, double x, double y, uint64_t now_ms); void anode_touch_update(anode_touch_track_t *tr, double x, double y); anode_gesture_t anode_touch_finish(anode_touch_track_t *tr, double x, double y, uint64_t now_ms, int screen_w, int screen_h, double scale); #endif /* ANODE_TOUCH_GESTURE_H */