diff options
author | Simon Thum <simon.thum@gmx.de> | 2010-09-04 16:31:24 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-02-17 10:23:01 +1000 |
commit | 006157f203f8493bb3d18e333a3fd3d6cb10f8ea (patch) | |
tree | 80d69f0d2189d3119b782f9c1b089cfc01b7839b /include | |
parent | 38ffeec0c89e83afc62579dec221c325d667cc1e (diff) |
dix: refactor scheme init
This makes it possible to init a scheme in one init call, so we
get rid of the tightly coupled two-phase init used before.
Signed-off-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/input.h | 5 | ||||
-rw-r--r-- | include/inputstr.h | 1 | ||||
-rw-r--r-- | include/ptrveloc.h | 10 |
3 files changed, 10 insertions, 6 deletions
diff --git a/include/input.h b/include/input.h index 0dc725a37..643866f98 100644 --- a/include/input.h +++ b/include/input.h @@ -150,6 +150,11 @@ typedef void (*PointerAccelSchemeProc)( typedef void (*DeviceCallbackProc)( DeviceIntPtr /*pDev*/); +struct _ValuatorAccelerationRec; +typedef Bool (*PointerAccelSchemeInitProc)( + DeviceIntPtr /*dev*/, + struct _ValuatorAccelerationRec* /*protoScheme*/); + typedef struct _DeviceRec { pointer devicePrivate; ProcessInputProc processInputProc; /* current */ diff --git a/include/inputstr.h b/include/inputstr.h index b74ee0454..65b9ef9f4 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -266,6 +266,7 @@ typedef struct _ValuatorAccelerationRec { int number; PointerAccelSchemeProc AccelSchemeProc; void *accelData; /* at disposal of AccelScheme */ + PointerAccelSchemeInitProc AccelInitProc; DeviceCallbackProc AccelCleanupProc; } ValuatorAccelerationRec, *ValuatorAccelerationPtr; diff --git a/include/ptrveloc.h b/include/ptrveloc.h index 6f999a88f..8c59c0361 100644 --- a/include/ptrveloc.h +++ b/include/ptrveloc.h @@ -110,12 +110,6 @@ BasicComputeAcceleration(DeviceIntPtr dev, DeviceVelocityPtr vel, extern _X_EXPORT void FreeVelocityData(DeviceVelocityPtr vel); -extern _X_INTERNAL BOOL -InitializePredictableAccelerationProperties(DeviceIntPtr dev); - -extern _X_INTERNAL BOOL -DeletePredictableAccelerationProperties(DeviceIntPtr dev); - extern _X_EXPORT int SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num); @@ -129,6 +123,10 @@ SetDeviceSpecificAccelerationProfile(DeviceVelocityPtr vel, extern _X_INTERNAL void AccelerationDefaultCleanup(DeviceIntPtr dev); +extern _X_INTERNAL Bool +InitPredictableAccelerationScheme(DeviceIntPtr dev, + struct _ValuatorAccelerationRec* protoScheme); + extern _X_INTERNAL void acceleratePointerPredictable(DeviceIntPtr dev, int first_valuator, int num_valuators, int *valuators, int evtime); |