From c8c74659d27b9eb0d45342db9a4969389e20f26a Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Fri, 14 May 2010 01:29:38 +0200 Subject: Refactor parsor memory usage Add the bitmasks "fingers" and "added" to parsor memory, and extend time handling to use a hold time and a forget time. Signed-off-by: Henrik Rydberg --- src/mtouch.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/mtouch.h') diff --git a/src/mtouch.h b/src/mtouch.h index 4004b4d..aab35bd 100644 --- a/src/mtouch.h +++ b/src/mtouch.h @@ -45,4 +45,15 @@ int close_mtouch(struct MTouch *mt, int fd); int read_synchronized_event(struct MTouch *mt, int fd); void parse_event(struct MTouch *mt); + +static inline void mt_delay_movement(struct MTouch *mt, int t) +{ + mem_hold_movement(&mt->mem, mt->state.evtime + t); +} + +static inline void mt_skip_movement(struct MTouch *mt, int t) +{ + mem_forget_movement(&mt->mem, mt->state.evtime + t); +} + #endif -- cgit v1.2.3