dix: Implement internal gesture state handling

This commit is contained in:
Povilas Kanapickas 2021-05-30 13:26:39 +03:00
commit 7656a9c8dd
7 changed files with 144 additions and 0 deletions

View file

@ -153,7 +153,9 @@ typedef struct _ValuatorClassRec *ValuatorClassPtr;
typedef struct _ClassesRec *ClassesPtr;
typedef struct _SpriteRec *SpritePtr;
typedef struct _TouchClassRec *TouchClassPtr;
typedef struct _GestureClassRec *GestureClassPtr;
typedef struct _TouchPointInfo *TouchPointInfoPtr;
typedef struct _GestureInfo *GestureInfoPtr;
typedef struct _DDXTouchPointInfo *DDXTouchPointInfoPtr;
typedef union _GrabMask GrabMask;
@ -340,6 +342,9 @@ extern _X_EXPORT Bool InitTouchClassDeviceStruct(DeviceIntPtr /*device */ ,
unsigned int /*mode */ ,
unsigned int /*numAxes */ );
extern _X_EXPORT Bool InitGestureClassDeviceStruct(DeviceIntPtr device,
unsigned int max_touches);
typedef void (*BellProcPtr) (int percent,
DeviceIntPtr device,
void *ctrl,
@ -576,6 +581,12 @@ enum TouchListenerType {
TOUCH_LISTENER_POINTER_REGULAR,
};
enum GestureListenerType {
GESTURE_LISTENER_GRAB,
GESTURE_LISTENER_NONGESTURE_GRAB,
GESTURE_LISTENER_REGULAR
};
extern void TouchInitDDXTouchPoint(DeviceIntPtr dev,
DDXTouchPointInfoPtr ddxtouch);
extern DDXTouchPointInfoPtr TouchBeginDDXTouch(DeviceIntPtr dev,
@ -621,6 +632,7 @@ extern void TouchEndPhysicallyActiveTouches(DeviceIntPtr dev);
extern void TouchEmitTouchEnd(DeviceIntPtr dev, TouchPointInfoPtr ti, int flags, XID resource);
extern void TouchAcceptAndEnd(DeviceIntPtr dev, int touchid);
extern Bool GestureInitGestureInfo(GestureInfoPtr gesture);
/* misc event helpers */
extern Mask GetEventMask(DeviceIntPtr dev, xEvent *ev, InputClientsPtr clients);
extern Mask GetEventFilter(DeviceIntPtr dev, xEvent *event);