mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 03:30:04 +01:00
fix warning on duplicate typedef: > In file included from ../hw/xfree86/common/xf86Xinput.c:59: > ../dix/ptrveloc_priv.h:33:3: warning: redefinition of typedef 'MotionTracker' is a C11 feature [-Wtypedef-redefinition] > } MotionTracker, *MotionTrackerPtr; > ^ > ../include/ptrveloc.h:54:31: note: previous definition is here > typedef struct _MotionTracker MotionTracker, *MotionTrackerPtr; > ^ Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1427>
50 lines
1.5 KiB
C
50 lines
1.5 KiB
C
/* 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;
|
|
|
|
/**
|
|
* a motion history, with just enough information to
|
|
* calc mean velocity and decide which motion was along
|
|
* a more or less straight line
|
|
*/
|
|
struct _MotionTracker {
|
|
double dx, dy; /* accumulated delta for each axis */
|
|
int time; /* time of creation */
|
|
int dir; /* initial direction bitfield */
|
|
};
|
|
|
|
/**
|
|
* 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);
|
|
|
|
void InitTrackers(DeviceVelocityPtr vel, int ntracker);
|
|
|
|
#endif /* _XSERVER_POINTERVELOCITY_PRIV_H */
|