From 697b5b5c7d2b1c46387061fcbed24cbee51d98ce Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Wed, 4 Aug 2010 16:47:43 +0200 Subject: Introduce tapping Simplify some common parts of the recognizer code and add tapping to the gesture suite. Signed-off-by: Henrik Rydberg --- src/grail-inserter.h | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'src/grail-inserter.h') diff --git a/src/grail-inserter.h b/src/grail-inserter.h index cca71d2..c76c0e0 100644 --- a/src/grail-inserter.h +++ b/src/grail-inserter.h @@ -48,15 +48,6 @@ struct slot_state { struct gebuf buf; }; -struct gesture_inserter { - struct slot_state state[DIM_INSTANCE]; - grail_mask_t unused[DIM_INSTANCE_BYTES]; - grail_mask_t fresh[DIM_INSTANCE_BYTES]; - grail_mask_t used[DIM_INSTANCE_BYTES]; - grail_time_t time; - int gestureid; -}; - int gin_init(struct grail *ge); void gin_destroy(struct grail *ge); @@ -64,14 +55,16 @@ void gin_frame_begin(struct grail *ge, const struct touch_frame *frame); void gin_frame_end(struct grail *ge, grail_mask_t *filtered, int max_filtered, const struct touch_frame *frame); -int gin_gesture_begin(struct grail *ge, int type, int priority, - const grail_mask_t *span, int nspan); -void gin_gesture_end(struct gesture_inserter *gin, int geslot); -void gin_gesture_discard(struct gesture_inserter *gin, int geslot); -void gin_gesture_discard_type(struct gesture_inserter *gin, int type); +int gin_gid_begin_select(struct grail *ge, int type, int priority, + const grail_mask_t *span, int nspan); +int gin_gid_begin(struct grail *ge, int type, const struct touch_frame *frame); +void gin_gid_discard(struct grail *ge, int gid); -void gin_gesture_event(struct gesture_inserter *gin, int geslot, - float x, float y, int ntouch, - const grail_prop_t *prop, int nprop); +void gin_gid_event(struct grail *ge, int gid, + float x, float y, int ntouch, + const grail_prop_t *prop, int nprop, + int status); +void gin_gid_end(struct grail *ge, int gid, + float x, float y, int ntouch); #endif -- cgit v1.2.3