xi: Implement internal gesture event struct

This commit is contained in:
Povilas Kanapickas 2021-05-30 13:26:31 +03:00
parent 22fa31ed56
commit b544a1fdb8
2 changed files with 34 additions and 0 deletions

View File

@ -28,6 +28,7 @@ typedef struct _DeviceEvent DeviceEvent;
typedef struct _DeviceChangedEvent DeviceChangedEvent;
typedef struct _TouchOwnershipEvent TouchOwnershipEvent;
typedef struct _BarrierEvent BarrierEvent;
typedef struct _GestureEvent GestureEvent;
#ifdef XFreeXDGA
typedef struct _DGAEvent DGAEvent;

View File

@ -266,6 +266,38 @@ struct _BarrierEvent {
uint32_t flags;
};
struct _GestureEvent {
unsigned char header; /**< Always ET_Internal */
enum EventType type; /**< One of ET_Gesture{Pinch,Swipe}{Begin,Update,End} */
int length; /**< Length in bytes */
Time time; /**< Time in ms */
int deviceid; /**< Device to post this event for */
int sourceid; /**< The physical source device */
uint32_t num_touches; /**< The number of touches in this gesture */
double root_x; /**< Pos relative to root window */
double root_y; /**< Pos relative to root window */
double delta_x;
double delta_y;
double delta_unaccel_x;
double delta_unaccel_y;
double scale; /**< Only on ET_GesturePinch{Begin,Update} */
double delta_angle; /**< Only on ET_GesturePinch{Begin,Update} */
struct {
uint32_t base; /**< XKB base modifiers */
uint32_t latched; /**< XKB latched modifiers */
uint32_t locked; /**< XKB locked modifiers */
uint32_t effective;/**< XKB effective modifiers */
} mods;
struct {
uint8_t base; /**< XKB base group */
uint8_t latched; /**< XKB latched group */
uint8_t locked; /**< XKB locked group */
uint8_t effective;/**< XKB effective group */
} group;
Window root; /**< Root window of the event */
uint32_t flags; /**< Flags to be copied into the generated event */
};
#ifdef XQUARTZ
#define XQUARTZ_EVENT_MAXARGS 5
struct _XQuartzEvent {
@ -300,6 +332,7 @@ union _InternalEvent {
#ifdef XQUARTZ
XQuartzEvent xquartz_event;
#endif
GestureEvent gesture_event;
};
#endif