xfree86: remove motion history handling

Remove motion history handling, as we now deal with this in the DIX.
This commit is contained in:
Daniel Stone 2006-10-25 01:10:44 +03:00 committed by Daniel Stone
parent b1debebf8f
commit 0514d53e10
3 changed files with 0 additions and 71 deletions

View File

@ -138,13 +138,6 @@ xf86ProcessCommonOptions(LocalDevicePtr local,
} else {
xf86Msg(X_CONFIG, "%s: doesn't report drag events\n", local->name);
}
local->history_size = xf86SetIntOption(list, "HistorySize", 0);
if (local->history_size > 0) {
xf86Msg(X_CONFIG, "%s: has a history of %d motions\n", local->name,
local->history_size);
}
}
void
@ -736,57 +729,6 @@ xf86PostKeyboardEvent(DeviceIntPtr device,
mieqEnqueue(device, xf86Events + i);
}
/*
* Motion history management.
*/
_X_EXPORT void
xf86MotionHistoryAllocate(LocalDevicePtr local)
{
ValuatorClassPtr valuator = local->dev->valuator;
if (!HAS_MOTION_HISTORY(local))
return;
if (local->motion_history) xfree(local->motion_history);
local->motion_history = xalloc((sizeof(INT32) * valuator->numAxes + sizeof(Time))
* valuator->numMotionEvents);
local->first = 0;
local->last = 0;
}
_X_EXPORT int
xf86GetMotionEvents(DeviceIntPtr dev,
xTimecoord *buff,
unsigned long start,
unsigned long stop,
ScreenPtr pScreen)
{
LocalDevicePtr local = (LocalDevicePtr)dev->public.devicePrivate;
ValuatorClassPtr valuator = dev->valuator;
int num = 0;
int loop = local->first;
int size;
Time current;
if (!HAS_MOTION_HISTORY(local))
return 0;
size = (sizeof(INT32) * valuator->numAxes + sizeof(Time));
while (loop != local->last) {
current = *(Time*)(((char *)local->motion_history)+loop*size);
if (current > stop)
return num;
if (current >= start) {
memcpy(((char *)buff)+size*num,
((char *)local->motion_history)+loop*size, size);
num++;
}
loop = (loop + 1) % valuator->numMotionEvents;
}
return num;
}
_X_EXPORT LocalDevicePtr
xf86FirstLocalDevice()
{

View File

@ -86,10 +86,6 @@
#define XI_PRIVATE(dev) \
(((LocalDevicePtr)((dev)->public.devicePrivate))->private)
#ifdef HAS_MOTION_HISTORY
#undef HAS_MOTION_HISTORY
#endif
#define HAS_MOTION_HISTORY(local) ((local)->dev->valuator && (local)->dev->valuator->numMotionEvents)
#ifdef XINPUT
/* This holds the input driver entry and module information. */
@ -138,9 +134,6 @@ typedef struct _LocalDeviceRec {
DeviceIntPtr dev;
pointer private;
int private_flags;
pointer motion_history;
ValuatorMotionProcPtr motion_history_proc;
unsigned int history_size; /* only for configuration purpose */
unsigned int first;
unsigned int last;
int old_x;
@ -176,10 +169,6 @@ void xf86PostKeyEvent(DeviceIntPtr device, unsigned int key_code, int is_down,
...);
void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code,
int is_down);
void xf86MotionHistoryAllocate(LocalDevicePtr local);
int xf86GetMotionEvents(DeviceIntPtr dev, xTimecoord *buff,
unsigned long start, unsigned long stop,
ScreenPtr pScreen);
void xf86XinputFinalizeInit(DeviceIntPtr dev);
void xf86ActivateDevice(LocalDevicePtr local);
Bool xf86CheckButton(int button, int down);

View File

@ -697,8 +697,6 @@ _X_HIDDEN void *xfree86LookupTab[] = {
SYMFUNC(xf86PostButtonEvent)
SYMFUNC(xf86PostKeyEvent)
SYMFUNC(xf86PostKeyboardEvent)
SYMFUNC(xf86GetMotionEvents)
SYMFUNC(xf86MotionHistoryAllocate)
SYMFUNC(xf86FirstLocalDevice)
SYMFUNC(xf86ActivateDevice)
SYMFUNC(xf86XInputSetScreen)