From dd2c89ac93535b833ee79e459410f4679c060774 Mon Sep 17 00:00:00 2001 From: Matt Helsley Date: Mon, 16 Feb 2009 11:18:50 +1000 Subject: General axis valuator support. Instead of x/y and pressure, support any absolute axis that is reported on the device. Note that there are still locations that special-case X and Y. Minor modifications by Peter Hutterer. Signed-off-by: Peter Hutterer --- src/evdev.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/evdev.h') diff --git a/src/evdev.h b/src/evdev.h index 68380cf..183ea9e 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -84,15 +84,18 @@ typedef struct { typedef struct { const char *device; int grabDevice; /* grab the event device? */ - int min_x, min_y, max_x, max_y, min_p, max_p; - int abs_x, abs_y, abs_p, old_x, old_y; + + int num_vals; /* number of valuators */ + int axis_map[max(ABS_CNT, REL_CNT)]; /* Map evdev to index */ + int vals[MAX_VALUATORS]; + int old_vals[MAX_VALUATORS]; /* Translate absolute inputs to relative */ + int flags; int tool; int buttons; /* number of buttons */ BOOL swap_axes; BOOL invert_x; BOOL invert_y; - BOOL has_pressure; /* XKB stuff has to be per-device rather than per-driver */ #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 5 -- cgit v1.2.3