dix: move non-exported ptrveloc functions to separate header
unclutter ptrveloc.h by moving non-exported declarations into their own private header file. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1347>
This commit is contained in:
parent
c66eaf431c
commit
a3ebe4fa41
|
@ -49,6 +49,9 @@ SOFTWARE.
|
|||
#endif
|
||||
|
||||
#include <X11/X.h>
|
||||
|
||||
#include "dix/ptrveloc_priv.h"
|
||||
|
||||
#include "misc.h"
|
||||
#include "resource.h"
|
||||
#include <X11/Xproto.h>
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
#endif
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "dix/ptrveloc_priv.h"
|
||||
|
||||
#include <ptrveloc.h>
|
||||
#include <exevents.h>
|
||||
#include <X11/Xatom.h>
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
/* SPDX-License-Identifier: MIT OR X11
|
||||
*
|
||||
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
|
||||
* Copyright © 2006-2011 Simon Thum simon dot thum at gmx dot de
|
||||
*/
|
||||
#ifndef _XSERVER_POINTERVELOCITY_PRIV_H
|
||||
#define _XSERVER_POINTERVELOCITY_PRIV_H
|
||||
|
||||
#include <input.h>
|
||||
|
||||
#include "ptrveloc.h"
|
||||
|
||||
/* fwd */
|
||||
struct _DeviceVelocityRec;
|
||||
|
||||
/**
|
||||
* profile
|
||||
* returns actual acceleration depending on velocity, acceleration control,...
|
||||
*/
|
||||
typedef double (*PointerAccelerationProfileFunc)
|
||||
(DeviceIntPtr dev, struct _DeviceVelocityRec * vel,
|
||||
double velocity, double threshold, double accelCoeff);
|
||||
|
||||
/**
|
||||
* a motion history, with just enough information to
|
||||
* calc mean velocity and decide which motion was along
|
||||
* a more or less straight line
|
||||
*/
|
||||
typedef struct _MotionTracker {
|
||||
double dx, dy; /* accumulated delta for each axis */
|
||||
int time; /* time of creation */
|
||||
int dir; /* initial direction bitfield */
|
||||
} MotionTracker, *MotionTrackerPtr;
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
void AccelerationDefaultCleanup(DeviceIntPtr dev);
|
||||
|
||||
Bool InitPredictableAccelerationScheme(DeviceIntPtr dev,
|
||||
struct _ValuatorAccelerationRec *protoScheme);
|
||||
|
||||
void acceleratePointerPredictable(DeviceIntPtr dev, ValuatorMask *val,
|
||||
CARD32 evtime);
|
||||
|
||||
void acceleratePointerLightweight(DeviceIntPtr dev, ValuatorMask *val,
|
||||
CARD32 evtime);
|
||||
|
||||
#endif /* _XSERVER_POINTERVELOCITY_PRIV_H */
|
|
@ -51,16 +51,7 @@ typedef double (*PointerAccelerationProfileFunc)
|
|||
(DeviceIntPtr dev, struct _DeviceVelocityRec * vel,
|
||||
double velocity, double threshold, double accelCoeff);
|
||||
|
||||
/**
|
||||
* a motion history, with just enough information to
|
||||
* calc mean velocity and decide which motion was along
|
||||
* a more or less straight line
|
||||
*/
|
||||
typedef struct _MotionTracker {
|
||||
double dx, dy; /* accumulated delta for each axis */
|
||||
int time; /* time of creation */
|
||||
int dir; /* initial direction bitfield */
|
||||
} MotionTracker, *MotionTrackerPtr;
|
||||
typedef struct _MotionTracker MotionTracker, *MotionTrackerPtr;
|
||||
|
||||
/**
|
||||
* Contains all data needed to implement mouse ballistics
|
||||
|
@ -90,16 +81,6 @@ typedef struct _DeviceVelocityRec {
|
|||
} statistics;
|
||||
} 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);
|
||||
|
||||
|
@ -126,19 +107,4 @@ extern _X_EXPORT void
|
|||
SetDeviceSpecificAccelerationProfile(DeviceVelocityPtr vel,
|
||||
PointerAccelerationProfileFunc profile);
|
||||
|
||||
extern _X_INTERNAL void
|
||||
AccelerationDefaultCleanup(DeviceIntPtr dev);
|
||||
|
||||
extern _X_INTERNAL Bool
|
||||
InitPredictableAccelerationScheme(DeviceIntPtr dev,
|
||||
struct _ValuatorAccelerationRec *protoScheme);
|
||||
|
||||
extern _X_INTERNAL void
|
||||
acceleratePointerPredictable(DeviceIntPtr dev, ValuatorMask *val,
|
||||
CARD32 evtime);
|
||||
|
||||
extern _X_INTERNAL void
|
||||
acceleratePointerLightweight(DeviceIntPtr dev, ValuatorMask *val,
|
||||
CARD32 evtime);
|
||||
|
||||
#endif /* POINTERVELOCITY_H */
|
||||
|
|
Loading…
Reference in New Issue