summaryrefslogtreecommitdiff
path: root/include/X11/extensions/XI2proto.h
diff options
context:
space:
mode:
authorPovilas Kanapickas <povilas@radix.lt>2020-09-21 04:03:43 +0300
committerPovilas Kanapickas <povilas@radix.lt>2021-05-11 01:45:27 +0300
commitd74ffaed9183a94d47bc7397b14a2fd21d67e230 (patch)
tree0aabc580e6c001f61492237f7b6991fa75b1bbe8 /include/X11/extensions/XI2proto.h
parenteec0adee25847de29ab1a41bba530612451361a5 (diff)
include: Add support for XI 2.4 gesture input events
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
Diffstat (limited to 'include/X11/extensions/XI2proto.h')
-rw-r--r--include/X11/extensions/XI2proto.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/include/X11/extensions/XI2proto.h b/include/X11/extensions/XI2proto.h
index a1133b5..aaeac7b 100644
--- a/include/X11/extensions/XI2proto.h
+++ b/include/X11/extensions/XI2proto.h
@@ -219,6 +219,17 @@ typedef struct {
} xXITouchInfo;
/**
+ * Denotes touchpad gesture capability on a device.
+ */
+typedef struct {
+ uint16_t type; /**< Always GestureClass */
+ uint16_t length; /**< Length in 4 byte units */
+ uint16_t sourceid; /**< source device for this class */
+ uint8_t num_touches; /**< Maximum number of touches gesture supports (0==unlimited) */
+ uint8_t pad0;
+} xXIGestureInfo;
+
+/**
* Used to select for events on a given window.
* Struct is followed by (mask_len * CARD8), with each bit set representing
* the event mask for the given type. A mask bit represents an event type if
@@ -1083,6 +1094,72 @@ typedef xXIBarrierEvent xXIBarrierHitEvent;
typedef xXIBarrierEvent xXIBarrierPointerReleasedEvent;
typedef xXIBarrierEvent xXIBarrierLeaveEvent;
+/**
+ * Event for touchpad gesture pinch input events
+ */
+typedef struct
+{
+ uint8_t type; /**< Always GenericEvent */
+ uint8_t extension; /**< XI extension offset */
+ uint16_t sequenceNumber;
+ uint32_t length; /**< Length in 4 byte uints */
+ uint16_t evtype;
+ uint16_t deviceid;
+ Time time;
+ uint32_t detail; /**< The number of touches in the gesture */
+ Window root;
+ Window event;
+ Window child;
+/* └──────── 32 byte boundary ────────┘ */
+ FP1616 root_x; /**< Always screen coords, 16.16 fixed point */
+ FP1616 root_y;
+ FP1616 event_x; /**< Always screen coords, 16.16 fixed point */
+ FP1616 event_y;
+ FP1616 delta_x;
+ FP1616 delta_y;
+ FP1616 delta_unaccel_x;
+ FP1616 delta_unaccel_y;
+ FP1616 scale;
+ FP1616 delta_angle;
+ uint16_t sourceid; /**< The source device */
+ uint16_t pad0;
+ xXIModifierInfo mods;
+ xXIGroupInfo group;
+ uint32_t flags; /**< ::XIGesturePinchEventCancelled */
+} xXIGesturePinchEvent;
+
+/**
+ * Event for touchpad gesture swipe input events
+ */
+typedef struct
+{
+ uint8_t type; /**< Always GenericEvent */
+ uint8_t extension; /**< XI extension offset */
+ uint16_t sequenceNumber;
+ uint32_t length; /**< Length in 4 byte uints */
+ uint16_t evtype;
+ uint16_t deviceid;
+ Time time;
+ uint32_t detail; /**< The number of touches in the gesture */
+ Window root;
+ Window event;
+ Window child;
+/* └──────── 32 byte boundary ────────┘ */
+ FP1616 root_x; /**< Always screen coords, 16.16 fixed point */
+ FP1616 root_y;
+ FP1616 event_x; /**< Always screen coords, 16.16 fixed point */
+ FP1616 event_y;
+ FP1616 delta_x;
+ FP1616 delta_y;
+ FP1616 delta_unaccel_x;
+ FP1616 delta_unaccel_y;
+ uint16_t sourceid; /**< The source device */
+ uint16_t pad0;
+ xXIModifierInfo mods;
+ xXIGroupInfo group;
+ uint32_t flags; /**< ::XIGestureSwipeEventCancelled */
+} xXIGestureSwipeEvent;
+
#undef Window
#undef Time
#undef Atom