Add support for multiple pointer acceleration schemes. #8583
Available acceleration schemes: - xorg classic scheme. - the new "Predictable" polynomial accel scheme. X.Org Bug 8583 <http://bugs.freedesktop.org/show_bug.cgi?id=8583> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Peter Hutterer
parent
e7abe1676a
commit
c9eb0e870c
@@ -63,6 +63,12 @@ SOFTWARE.
|
||||
#define POINTER_ABSOLUTE (1 << 2)
|
||||
#define POINTER_ACCELERATE (1 << 3)
|
||||
|
||||
/*int constants for pointer acceleration schemes*/
|
||||
#define PtrAccelNoOp 0
|
||||
#define PtrAccelPredictable 1
|
||||
#define PtrAccelClassic 2
|
||||
#define PtrAccelDefault PtrAccelPredictable
|
||||
|
||||
#define MAX_VALUATORS 36 /* XXX from comment in dix/getevents.c */
|
||||
|
||||
#define NO_AXIS_LIMITS -1
|
||||
@@ -155,6 +161,17 @@ typedef void (*DeviceUnwrapProc)(
|
||||
void* /*data*/
|
||||
);
|
||||
|
||||
/* pointer acceleration handling */
|
||||
typedef void (*PointerAccelSchemeProc)(
|
||||
DeviceIntPtr /*pDev*/,
|
||||
int /*first_valuator*/,
|
||||
int /*num_valuators*/,
|
||||
int* /*valuators*/,
|
||||
int /*evtime*/);
|
||||
|
||||
typedef void (*DeviceCallbackProc)(
|
||||
DeviceIntPtr /*pDev*/);
|
||||
|
||||
typedef struct _DeviceRec {
|
||||
pointer devicePrivate;
|
||||
ProcessInputProc processInputProc; /* current */
|
||||
@@ -280,6 +297,10 @@ extern Bool InitValuatorClassDeviceStruct(
|
||||
int /*numMotionEvents*/,
|
||||
int /*mode*/);
|
||||
|
||||
extern Bool InitPointerAccelerationScheme(
|
||||
DeviceIntPtr /*dev*/,
|
||||
int /*scheme*/);
|
||||
|
||||
extern Bool InitAbsoluteClassDeviceStruct(
|
||||
DeviceIntPtr /*device*/);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user