aboutsummaryrefslogtreecommitdiff
path: root/src/evdev.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@redhat.com>2008-10-30 16:55:29 +1030
committerPeter Hutterer <peter.hutterer@redhat.com>2008-10-30 16:55:29 +1030
commit33eb36f26663c09c873acede1b35e91ef4c64479 (patch)
tree84532529b28c3a3bffc3c3528040145e43653c6d /src/evdev.h
parentAdd test/ directory for uinput-based test devices. (diff)
downloadxf86-input-evdev-33eb36f26663c09c873acede1b35e91ef4c64479.tar.gz
xf86-input-evdev-33eb36f26663c09c873acede1b35e91ef4c64479.tar.bz2
xf86-input-evdev-33eb36f26663c09c873acede1b35e91ef4c64479.zip
Add support for run-time calibration.
Some devices require run-time axis calibration. We can't change the min/max ranges once we've initialised the valuator structs though, so in-driver run-time calibration is required. If the property is set, the driver scales from the calibrated range to the values reported to the X server (which then may scale to screen coordinates). If the property is not set (i.e. zero items) no scaling is performed.
Diffstat (limited to 'src/evdev.h')
-rw-r--r--src/evdev.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/evdev.h b/src/evdev.h
index 5a97185..5696978 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -102,6 +102,13 @@ typedef struct {
Time expires; /* time of expiry */
Time timeout;
} emulateWheel;
+ /* run-time calibration */
+ struct {
+ int min_x;
+ int max_x;
+ int min_y;
+ int max_y;
+ } calibration;
unsigned char btnmap[32]; /* config-file specified button mapping */