• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="pointer_gestures_unstable_v1">
3
4  <interface name="zwp_pointer_gestures_v1" version="1">
5    <description summary="touchpad gestures">
6      A global interface to provide semantic touchpad gestures for a given
7      pointer.
8
9      Two gestures are currently supported: swipe and zoom/rotate.
10      All gestures follow a three-stage cycle: begin, update, end and
11      are identified by a unique id.
12
13      Warning! The protocol described in this file is experimental and
14      backward incompatible changes may be made. Backward compatible changes
15      may be added together with the corresponding interface version bump.
16      Backward incompatible changes are done by bumping the version number in
17      the protocol and interface names and resetting the interface version.
18      Once the protocol is to be declared stable, the 'z' prefix and the
19      version number in the protocol and interface names are removed and the
20      interface version number is reset.
21    </description>
22
23    <request name="get_swipe_gesture">
24      <description summary="get swipe gesture">
25	Create a swipe gesture object. See the
26	wl_pointer_gesture_swipe interface for details.
27      </description>
28      <arg name="id" type="new_id" interface="zwp_pointer_gesture_swipe_v1"/>
29      <arg name="pointer" type="object" interface="wl_pointer"/>
30    </request>
31
32    <request name="get_pinch_gesture">
33      <description summary="get pinch gesture">
34	Create a pinch gesture object. See the
35	wl_pointer_gesture_pinch interface for details.
36      </description>
37      <arg name="id" type="new_id" interface="zwp_pointer_gesture_pinch_v1"/>
38      <arg name="pointer" type="object" interface="wl_pointer"/>
39    </request>
40  </interface>
41
42  <interface name="zwp_pointer_gesture_swipe_v1" version="1">
43    <description summary="a swipe gesture object">
44      A swipe gesture object notifies a client about a multi-finger swipe
45      gesture detected on an indirect input device such as a touchpad.
46      The gesture is usually initiated by multiple fingers moving in the
47      same direction but once initiated the direction may change.
48      The precise conditions of when such a gesture is detected are
49      implementation-dependent.
50
51      A gesture consists of three stages: begin, update (optional) and end.
52      There cannot be multiple simultaneous pinch or swipe gestures on a
53      same pointer/seat, how compositors prevent these situations is
54      implementation-dependent.
55
56      A gesture may be cancelled by the compositor or the hardware.
57      Clients should not consider performing permanent or irreversible
58      actions until the end of a gesture has been received.
59    </description>
60
61    <request name="destroy" type="destructor">
62      <description summary="destroy the pointer swipe gesture object"/>
63    </request>
64
65    <event name="begin">
66      <description summary="multi-finger swipe begin">
67	This event is sent when a multi-finger swipe gesture is detected
68	on the device.
69      </description>
70      <arg name="serial" type="uint"/>
71      <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
72      <arg name="surface" type="object" interface="wl_surface"/>
73      <arg name="fingers" type="uint" summary="number of fingers"/>
74    </event>
75
76    <event name="update">
77      <description summary="multi-finger swipe motion">
78	This event is sent when a multi-finger swipe gesture changes the
79	position of the logical center.
80
81	The dx and dy coordinates are relative coordinates of the logical
82	center of the gesture compared to the previous event.
83      </description>
84      <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
85      <arg name="dx" type="fixed" summary="delta x coordinate in surface coordinate space"/>
86      <arg name="dy" type="fixed" summary="delta y coordinate in surface coordinate space"/>
87    </event>
88
89    <event name="end">
90      <description summary="multi-finger swipe end">
91	This event is sent when a multi-finger swipe gesture ceases to
92	be valid. This may happen when one or more fingers are lifted or
93	the gesture is cancelled.
94
95	When a gesture is cancelled, the client should undo state changes
96	caused by this gesture. What causes a gesture to be cancelled is
97	implementation-dependent.
98      </description>
99      <arg name="serial" type="uint"/>
100      <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
101      <arg name="cancelled" type="int" summary="1 if the gesture was cancelled, 0 otherwise"/>
102    </event>
103  </interface>
104
105  <interface name="zwp_pointer_gesture_pinch_v1" version="1">
106    <description summary="a pinch gesture object">
107      A pinch gesture object notifies a client about a multi-finger pinch
108      gesture detected on an indirect input device such as a touchpad.
109      The gesture is usually initiated by multiple fingers moving towards
110      each other or away from each other, or by two or more fingers rotating
111      around a logical center of gravity. The precise conditions of when
112      such a gesture is detected are implementation-dependent.
113
114      A gesture consists of three stages: begin, update (optional) and end.
115      There cannot be multiple simultaneous pinch or swipe gestures on a
116      same pointer/seat, how compositors prevent these situations is
117      implementation-dependent.
118
119      A gesture may be cancelled by the compositor or the hardware.
120      Clients should not consider performing permanent or irreversible
121      actions until the end of a gesture has been received.
122    </description>
123
124    <request name="destroy" type="destructor">
125      <description summary="destroy the pinch gesture object"/>
126    </request>
127
128    <event name="begin">
129      <description summary="multi-finger pinch begin">
130	This event is sent when a multi-finger pinch gesture is detected
131	on the device.
132      </description>
133      <arg name="serial" type="uint"/>
134      <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
135      <arg name="surface" type="object" interface="wl_surface"/>
136      <arg name="fingers" type="uint" summary="number of fingers"/>
137    </event>
138
139    <event name="update">
140      <description summary="multi-finger pinch motion">
141	This event is sent when a multi-finger pinch gesture changes the
142	position of the logical center, the rotation or the relative scale.
143
144	The dx and dy coordinates are relative coordinates in the
145	surface coordinate space of the logical center of the gesture.
146
147	The scale factor is an absolute scale compared to the
148	pointer_gesture_pinch.begin event, e.g. a scale of 2 means the fingers
149	are now twice as far apart as on pointer_gesture_pinch.begin.
150
151	The rotation is the relative angle in degrees clockwise compared to the previous
152	pointer_gesture_pinch.begin or pointer_gesture_pinch.update event.
153      </description>
154      <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
155      <arg name="dx" type="fixed" summary="delta x coordinate in surface coordinate space"/>
156      <arg name="dy" type="fixed" summary="delta y coordinate in surface coordinate space"/>
157      <arg name="scale" type="fixed" summary="scale relative to the initial finger position"/>
158      <arg name="rotation" type="fixed" summary="angle in degrees cw relative to the previous event"/>
159    </event>
160
161    <event name="end">
162      <description summary="multi-finger pinch end">
163	This event is sent when a multi-finger pinch gesture ceases to
164	be valid. This may happen when one or more fingers are lifted or
165	the gesture is cancelled.
166
167	When a gesture is cancelled, the client should undo state changes
168	caused by this gesture. What causes a gesture to be cancelled is
169	implementation-dependent.
170      </description>
171      <arg name="serial" type="uint"/>
172      <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
173      <arg name="cancelled" type="int" summary="1 if the gesture was cancelled, 0 otherwise"/>
174    </event>
175  </interface>
176
177</protocol>
178