diff options
author | Matt Helsley <matt.helsley@gmail.com> | 2009-02-16 11:18:50 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-02-16 13:19:53 +1000 |
commit | dd2c89ac93535b833ee79e459410f4679c060774 (patch) | |
tree | 74921e7d571d03e540379c832f2a5e84d7814152 /src/evdev.h | |
parent | Change cached bitmasks from long to unsigned long. (diff) | |
download | xf86-input-evdev-dd2c89ac93535b833ee79e459410f4679c060774.tar.gz xf86-input-evdev-dd2c89ac93535b833ee79e459410f4679c060774.tar.bz2 xf86-input-evdev-dd2c89ac93535b833ee79e459410f4679c060774.zip |
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 <peter.hutterer@who-t.net>
Diffstat (limited to 'src/evdev.h')
-rw-r--r-- | src/evdev.h | 9 |
1 files changed, 6 insertions, 3 deletions
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 <axis> 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 |