summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-03-09 14:25:54 -0800
committerKeith Packard <keithp@keithp.com>2011-03-09 14:25:54 -0800
commitc3c0e2fdd326214e271ce144e8fc2725cbd738ef (patch)
treec7ee795c9252e1c13ae86848d109773d15b82d9e /include
parenta19771e4337d1c4600550314bbc42a1495a023ff (diff)
parent73555555a440855f9ae64c3367c5c7dca98c8741 (diff)
Merge remote branch 'whot/for-keith'
Diffstat (limited to 'include')
-rw-r--r--include/input.h12
-rw-r--r--include/ptrveloc.h26
2 files changed, 21 insertions, 17 deletions
diff --git a/include/input.h b/include/input.h
index 643866f98..bdef0389e 100644
--- a/include/input.h
+++ b/include/input.h
@@ -106,6 +106,8 @@ typedef struct _ClassesRec *ClassesPtr;
typedef struct _SpriteRec *SpritePtr;
typedef union _GrabMask GrabMask;
+typedef struct _ValuatorMask ValuatorMask;
+
typedef struct _EventList {
xEvent* event;
int evlen; /* length of allocated memory for event in bytes. This is not
@@ -141,11 +143,9 @@ typedef void (*DeviceUnwrapProc)(
/* pointer acceleration handling */
typedef void (*PointerAccelSchemeProc)(
- DeviceIntPtr /*pDev*/,
- int /*first_valuator*/,
- int /*num_valuators*/,
- int* /*valuators*/,
- int /*evtime*/);
+ DeviceIntPtr /*device*/,
+ ValuatorMask* /*valuators*/,
+ CARD32 /*evtime*/);
typedef void (*DeviceCallbackProc)(
DeviceIntPtr /*pDev*/);
@@ -163,8 +163,6 @@ typedef struct _DeviceRec {
Bool on; /* used by DDX to keep state */
} DeviceRec, *DevicePtr;
-typedef struct _ValuatorMask ValuatorMask;
-
typedef struct {
int click, bell, bell_pitch, bell_duration;
Bool autoRepeat;
diff --git a/include/ptrveloc.h b/include/ptrveloc.h
index 8c59c0361..c14e12d61 100644
--- a/include/ptrveloc.h
+++ b/include/ptrveloc.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright © 2006-2009 Simon Thum simon dot thum at gmx dot de
+ * Copyright © 2006-2011 Simon Thum simon dot thum at gmx dot de
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -25,7 +25,7 @@
#ifndef POINTERVELOCITY_H
#define POINTERVELOCITY_H
-#include <input.h> /* DeviceIntPtr */
+#include <input.h>
/* constants for acceleration profiles */
@@ -62,9 +62,6 @@ typedef struct _MotionTracker {
int dir; /* initial direction bitfield */
} MotionTracker, *MotionTrackerPtr;
-/* number of properties for predictable acceleration */
-#define NPROPS_PREDICTABLE_ACCEL 4
-
/**
* Contains all data needed to implement mouse ballistics
*/
@@ -91,9 +88,18 @@ typedef struct _DeviceVelocityRec {
struct { /* to be able to query this information */
int profile_number;
} statistics;
- long prop_handlers[NPROPS_PREDICTABLE_ACCEL];
} DeviceVelocityRec, *DeviceVelocityPtr;
+/**
+ * contains the run-time data for the predictable scheme, that is, a
+ * DeviceVelocityPtr and the property handlers.
+ */
+typedef struct _PredictableAccelSchemeRec {
+ DeviceVelocityPtr vel;
+ long* prop_handlers;
+ int num_prop_handlers;
+} PredictableAccelSchemeRec, *PredictableAccelSchemePtr;
+
extern _X_EXPORT void
InitVelocityData(DeviceVelocityPtr vel);
@@ -128,11 +134,11 @@ InitPredictableAccelerationScheme(DeviceIntPtr dev,
struct _ValuatorAccelerationRec* protoScheme);
extern _X_INTERNAL void
-acceleratePointerPredictable(DeviceIntPtr dev, int first_valuator,
- int num_valuators, int *valuators, int evtime);
+acceleratePointerPredictable(DeviceIntPtr dev, ValuatorMask* val,
+ CARD32 evtime);
extern _X_INTERNAL void
-acceleratePointerLightweight(DeviceIntPtr dev, int first_valuator,
- int num_valuators, int *valuators, int ignored);
+acceleratePointerLightweight(DeviceIntPtr dev, ValuatorMask* val,
+ CARD32 evtime);
#endif /* POINTERVELOCITY_H */