diff options
Diffstat (limited to 'include/mtstate.h')
| -rw-r--r-- | include/mtstate.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/include/mtstate.h b/include/mtstate.h index b6b8e8d..a474114 100644 --- a/include/mtstate.h +++ b/include/mtstate.h | |||
| @@ -24,14 +24,10 @@ | |||
| 24 | 24 | ||
| 25 | #include "hwstate.h" | 25 | #include "hwstate.h" |
| 26 | 26 | ||
| 27 | struct MTFinger { | ||
| 28 | struct FingerData hw; | ||
| 29 | int id, thumb; | ||
| 30 | }; | ||
| 31 | |||
| 32 | struct MTState { | 27 | struct MTState { |
| 33 | struct MTFinger finger[DIM_FINGER]; | 28 | struct FingerState finger[DIM_FINGER]; |
| 34 | int nfinger; | 29 | int nfinger; |
| 30 | bitmask_t thumb; | ||
| 35 | bitmask_t button; | 31 | bitmask_t button; |
| 36 | mstime_t evtime; | 32 | mstime_t evtime; |
| 37 | }; | 33 | }; |
| @@ -42,14 +38,14 @@ void extract_mtstate(struct MTState *s, | |||
| 42 | const struct Capabilities *caps); | 38 | const struct Capabilities *caps); |
| 43 | void output_mtstate(const struct MTState *s); | 39 | void output_mtstate(const struct MTState *s); |
| 44 | 40 | ||
| 45 | const struct MTFinger *find_finger(const struct MTState *s, int id); | 41 | const struct FingerState *find_finger(const struct MTState *s, int id); |
| 46 | 42 | ||
| 47 | 43 | ||
| 48 | static inline int center_dist2(const struct MTFinger *a, | 44 | static inline int center_dist2(const struct FingerState *a, |
| 49 | const struct Capabilities *caps) | 45 | const struct Capabilities *caps) |
| 50 | { | 46 | { |
| 51 | return dist2(a->hw.position_x - get_cap_xmid(caps), | 47 | return dist2(a->position_x - get_cap_xmid(caps), |
| 52 | a->hw.position_y - get_cap_ymid(caps)); | 48 | a->position_y - get_cap_ymid(caps)); |
| 53 | } | 49 | } |
| 54 | 50 | ||
| 55 | static inline int center_maxdist2(const struct Capabilities *caps) | 51 | static inline int center_maxdist2(const struct Capabilities *caps) |
