summaryrefslogtreecommitdiff
path: root/dix/devices.c
diff options
context:
space:
mode:
authorZephaniah E. Hull <warp@agamemnon.b5>2006-10-21 04:24:49 -0400
committerZephaniah E. Hull <warp@agamemnon.b5>2006-10-21 04:24:49 -0400
commit736b0d5078597abbda80444deef852879260af90 (patch)
treeecaa01bbd879d151c1390658ad79be9b84bc45c5 /dix/devices.c
parent1b1698af41b9038d9f9dbf521737d0baab5a2237 (diff)
DEVICE_TOUCHSCREEN becomes DEVICE_ABS_CALIB.
Update the DEVICE_ABS_CALIB stuff to include the new elements. New DEVICE_ABS_AREA support. dev->touchscreen becomes dev->absolute, with _CALIB and _AREA stuff in it. Update xfree86 to compile with this, kdrive needs an update too.
Diffstat (limited to 'dix/devices.c')
-rw-r--r--dix/devices.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/dix/devices.c b/dix/devices.c
index 0121eea97..bf7592bca 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -116,7 +116,7 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart)
dev->button = (ButtonClassPtr)NULL;
dev->focus = (FocusClassPtr)NULL;
dev->proximity = (ProximityClassPtr)NULL;
- dev->touchscreen = (TouchscreenClassPtr)NULL;
+ dev->absolute = (AbsoluteClassPtr)NULL;
dev->kbdfeed = (KbdFeedbackPtr)NULL;
dev->ptrfeed = (PtrFeedbackPtr)NULL;
dev->intfeed = (IntegerFeedbackPtr)NULL;
@@ -805,22 +805,31 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes,
}
_X_EXPORT Bool
-InitTouchscreenClassDeviceStruct(DeviceIntPtr dev)
+InitAbsoluteClassDeviceStruct(DeviceIntPtr dev)
{
- register TouchscreenClassPtr tsc;
+ register AbsoluteClassPtr abs;
- tsc = (TouchscreenClassPtr)xalloc(sizeof(TouchscreenClassRec));
- if (!tsc)
+ abs = (AbsoluteClassPtr)xalloc(sizeof(AbsoluteClassRec));
+ if (!abs)
return FALSE;
/* we don't do anything sensible with these, but should */
- tsc->min_x = -1;
- tsc->min_y = -1;
- tsc->max_x = -1;
- tsc->max_y = -1;
-
- tsc->button_threshold = 0;
- dev->touchscreen = tsc;
+ abs->min_x = -1;
+ abs->min_y = -1;
+ abs->max_x = -1;
+ abs->max_y = -1;
+ abs->flip_x = 0;
+ abs->flip_y = 0;
+ abs->rotation = 0;
+ abs->button_threshold = 0;
+
+ abs->offset_x = 0;
+ abs->offset_y = 0;
+ abs->width = -1;
+ abs->height = -1;
+ abs->following = 0;
+
+ dev->absolute = abs;
return TRUE;
}