aboutsummaryrefslogtreecommitdiffstats
path: root/src/mtouch.h
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-05-14 01:29:38 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-05-14 01:41:39 +0200
commitc8c74659d27b9eb0d45342db9a4969389e20f26a (patch)
treececd1876745b2288cb45007522a046f12d144f31 /src/mtouch.h
parentbfd266660d69e13263e3895fb059040b65255a72 (diff)
downloadxorg-input-kobomultitouch-c8c74659d27b9eb0d45342db9a4969389e20f26a.tar.gz
xorg-input-kobomultitouch-c8c74659d27b9eb0d45342db9a4969389e20f26a.tar.bz2
xorg-input-kobomultitouch-c8c74659d27b9eb0d45342db9a4969389e20f26a.zip
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 <rydberg@euromail.se>
Diffstat (limited to 'src/mtouch.h')
-rw-r--r--src/mtouch.h11
1 files changed, 11 insertions, 0 deletions
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