dix: improve the driver interface to predictable pointer acceleration
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
87aa529857
commit
c184b91d9a
|
@ -616,22 +616,32 @@ SetAccelerationProfile(
|
|||
*/
|
||||
extern void
|
||||
SetDeviceSpecificAccelerationProfile(
|
||||
DeviceIntPtr pDev,
|
||||
DeviceVelocityPtr s,
|
||||
PointerAccelerationProfileFunc profile)
|
||||
{
|
||||
if(s)
|
||||
s->deviceSpecificProfile = profile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this function to obtain a DeviceVelocityPtr for a device. Will return NULL if
|
||||
* the predictable acceleration scheme is not in effect.
|
||||
*/
|
||||
DeviceVelocityPtr
|
||||
GetDevicePredictableAccelData(
|
||||
DeviceIntPtr pDev)
|
||||
{
|
||||
/*sanity check*/
|
||||
if( pDev->valuator &&
|
||||
pDev->valuator->accelScheme.AccelSchemeProc ==
|
||||
acceleratePointerPredictable &&
|
||||
pDev->valuator->accelScheme.accelData != NULL){
|
||||
((DeviceVelocityPtr)
|
||||
(pDev->valuator->accelScheme.accelData))->deviceSpecificProfile
|
||||
= profile;
|
||||
|
||||
return (DeviceVelocityPtr)pDev->valuator->accelScheme.accelData;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/********************************
|
||||
* acceleration schemes
|
||||
*******************************/
|
||||
|
|
|
@ -104,8 +104,11 @@ InitFilterChain(DeviceVelocityPtr s, float rdecay, float degression,
|
|||
extern int
|
||||
SetAccelerationProfile(DeviceVelocityPtr s, int profile_num);
|
||||
|
||||
extern DeviceVelocityPtr
|
||||
GetDevicePredictableAccelData(DeviceIntPtr pDev);
|
||||
|
||||
extern void
|
||||
SetDeviceSpecificAccelerationProfile(DeviceIntPtr s,
|
||||
SetDeviceSpecificAccelerationProfile(DeviceVelocityPtr s,
|
||||
PointerAccelerationProfileFunc profile);
|
||||
|
||||
extern void
|
||||
|
|
Loading…
Reference in New Issue
Block a user