diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2010-05-14 01:29:38 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2010-05-14 01:41:39 +0200 |
| commit | c8c74659d27b9eb0d45342db9a4969389e20f26a (patch) | |
| tree | cecd1876745b2288cb45007522a046f12d144f31 /src/mtouch.h | |
| parent | bfd266660d69e13263e3895fb059040b65255a72 (diff) | |
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.h | 11 |
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); | |||
| 45 | int read_synchronized_event(struct MTouch *mt, int fd); | 45 | int read_synchronized_event(struct MTouch *mt, int fd); |
| 46 | void parse_event(struct MTouch *mt); | 46 | void parse_event(struct MTouch *mt); |
| 47 | 47 | ||
| 48 | |||
| 49 | static inline void mt_delay_movement(struct MTouch *mt, int t) | ||
| 50 | { | ||
| 51 | mem_hold_movement(&mt->mem, mt->state.evtime + t); | ||
| 52 | } | ||
| 53 | |||
| 54 | static inline void mt_skip_movement(struct MTouch *mt, int t) | ||
| 55 | { | ||
| 56 | mem_forget_movement(&mt->mem, mt->state.evtime + t); | ||
| 57 | } | ||
| 58 | |||
| 48 | #endif | 59 | #endif |
