XFree86 input: Add backwards compatibility for motion history

Add the old motion history API back, as a shim around the new mi API.
This commit is contained in:
Daniel Stone 2007-03-21 00:18:24 +02:00 committed by Daniel Stone
parent 0f75c47e0c
commit 9398d62f27
3 changed files with 20 additions and 0 deletions

View File

@ -2981,3 +2981,16 @@ xf86IsUnblank(int mode)
return TRUE;
}
}
_X_EXPORT void
xf86MotionHistoryAllocate(LocalDevicePtr local)
{
AllocateMotionHistory(local->dev);
}
_X_EXPORT int
xf86GetMotionEvents(DeviceIntPtr pDev, xTimecoord *buff, unsigned long start,
unsigned long stop, ScreenPtr pScreen)
{
return GetMotionHistory(pDev, buff, start, stop, pScreen);
}

View File

@ -132,6 +132,9 @@ xf86ProcessCommonOptions(LocalDevicePtr local,
} else {
xf86Msg(X_CONFIG, "%s: doesn't report drag events\n", local->name);
}
/* Backwards compatibility. */
local->history_size = GetMotionHistorySize();
}
/***********************************************************************

View File

@ -86,6 +86,9 @@
#define XI_PRIVATE(dev) \
(((LocalDevicePtr)((dev)->public.devicePrivate))->private)
/* Stupid API backwards-compatibility. */
#define TS_Raw 60
#define TS_Scaled 61
#ifdef XINPUT
/* This holds the input driver entry and module information. */
@ -144,6 +147,7 @@ typedef struct _LocalDeviceRec {
InputDriverPtr drv;
pointer module;
pointer options;
unsigned int history_size;
} LocalDeviceRec, *LocalDevicePtr, InputInfoRec, *InputInfoPtr;
typedef struct _DeviceAssocRec