diff options
author | Simon Thum <simon.thum@gmx.de> | 2009-06-24 11:16:24 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-06-29 12:20:48 +1000 |
commit | 373e8c960d00e2b8c2250dd3f66859b081e14854 (patch) | |
tree | 0328b010d617ae37f4c7996fb4bb0ba6abedcb00 /include/ptrveloc.h | |
parent | b8050bb6deebdb1ee60731f63884ffca575c09ce (diff) |
dix: improve pointer acceleration API
This makes the ptr accel api actually sensible from a driver
perspective, since it avoids superfluous device lookups.
Also, makes independent accel contexts possible.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'include/ptrveloc.h')
-rw-r--r-- | include/ptrveloc.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/include/ptrveloc.h b/include/ptrveloc.h index 83d188c54..70d178930 100644 --- a/include/ptrveloc.h +++ b/include/ptrveloc.h @@ -1,6 +1,6 @@ /* * - * Copyright © 2006-2008 Simon Thum simon dot thum at gmx dot de + * Copyright © 2006-2009 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"), @@ -47,8 +47,8 @@ struct _DeviceVelocityRec; * returns actual acceleration depending on velocity, acceleration control,... */ typedef float (*PointerAccelerationProfileFunc) - (struct _DeviceVelocityRec* /*pVel*/, - float /*velocity*/, float /*threshold*/, float /*acc*/); + (DeviceIntPtr dev, struct _DeviceVelocityRec* vel, + float velocity, float threshold, float accelCoeff); /** * a motion history, with just enough information to @@ -96,8 +96,18 @@ InitVelocityData(DeviceVelocityPtr s); extern _X_EXPORT void InitTrackers(DeviceVelocityPtr s, int ntracker); +extern _X_EXPORT short +ProcessVelocityData2D(DeviceVelocityPtr vel, int dx, int dy, int time); + +extern _X_EXPORT float +BasicComputeAcceleration(DeviceIntPtr dev, DeviceVelocityPtr vel, + float velocity, float threshold, float acc); + +extern _X_EXPORT void +FreeVelocityData(DeviceVelocityPtr vel); + extern _X_EXPORT BOOL -InitializePredictableAccelerationProperties(DeviceIntPtr pDev); +InitializePredictableAccelerationProperties(DeviceIntPtr dev); extern _X_EXPORT int SetAccelerationProfile(DeviceVelocityPtr s, int profile_num); |