From 753a645f463f2d72234554bc211cc32f65129929 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Tue, 15 Jun 2010 20:32:14 +0200 Subject: refactor: Use the bitmask_t type Use the bitmask_t for all bitfields, to simplify future expansions to larger bit fields. Signed-off-by: Henrik Rydberg --- include/gestures.h | 2 +- include/hwstate.h | 2 +- include/memory.h | 6 +++--- include/mtstate.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/gestures.h b/include/gestures.h index 2866ba4..2bd4a55 100644 --- a/include/gestures.h +++ b/include/gestures.h @@ -34,7 +34,7 @@ #define GS_ROTATE 7 struct Gestures { - unsigned type, btmask, btdata; + bitmask_t type, btmask, btdata; int same_fingers, dx, dy, scale, rot; }; diff --git a/include/hwstate.h b/include/hwstate.h index 76ed016..07d4ed6 100644 --- a/include/hwstate.h +++ b/include/hwstate.h @@ -33,7 +33,7 @@ struct FingerState { struct HWState { struct FingerState finger[DIM_FINGER]; - unsigned button; + bitmask_t button; int nfinger; mstime_t evtime; int lastid; diff --git a/include/memory.h b/include/memory.h index 8ffbdab..1a1b688 100644 --- a/include/memory.h +++ b/include/memory.h @@ -43,9 +43,9 @@ * */ struct Memory { - unsigned btdata, same; - unsigned fingers, added, thumb; - unsigned pointing, pending, moving; + bitmask_t btdata, same; + bitmask_t fingers, added, thumb; + bitmask_t pointing, pending, moving; int ybar; mstime_t mvhold, mvforget; int dx[DIM_FINGER], dy[DIM_FINGER]; diff --git a/include/mtstate.h b/include/mtstate.h index b5f5dd1..b6b8e8d 100644 --- a/include/mtstate.h +++ b/include/mtstate.h @@ -32,7 +32,7 @@ struct MTFinger { struct MTState { struct MTFinger finger[DIM_FINGER]; int nfinger; - unsigned button; + bitmask_t button; mstime_t evtime; }; -- cgit v1.2.3