• 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="2">
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
41    <!-- Version 2 additions -->
42
43    <request name="release" type="destructor" since="2">
44      <description summary="destroy the pointer gesture object">
45	Destroy the pointer gesture object. Swipe and pinch objects created via this
46	gesture object remain valid.
47      </description>
48    </request>
49  </interface>
50
51  <interface name="zwp_pointer_gesture_swipe_v1" version="2">
52    <description summary="a swipe gesture object">
53      A swipe gesture object notifies a client about a multi-finger swipe
54      gesture detected on an indirect input device such as a touchpad.
55      The gesture is usually initiated by multiple fingers moving in the
56      same direction but once initiated the direction may change.
57      The precise conditions of when such a gesture is detected are
58      implementation-dependent.
59
60      A gesture consists of three stages: begin, update (optional) and end.
61      There cannot be multiple simultaneous pinch or swipe gestures on a
62      same pointer/seat, how compositors prevent these situations is
63      implementation-dependent.
64
65      A gesture may be cancelled by the compositor or the hardware.
66      Clients should not consider performing permanent or irreversible
67      actions until the end of a gesture has been received.
68    </description>
69
70    <request name="destroy" type="destructor">
71      <description summary="destroy the pointer swipe gesture object"/>
72    </request>
73
74    <event name="begin">
75      <description summary="multi-finger swipe begin">
76	This event is sent when a multi-finger swipe gesture is detected
77	on the device.
78      </description>
79      <arg name="serial" type="uint"/>
80      <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
81      <arg name="surface" type="object" interface="wl_surface"/>
82      <arg name="fingers" type="uint" summary="number of fingers"/>
83    </event>
84
85    <event name="update">
86      <description summary="multi-finger swipe motion">
87	This event is sent when a multi-finger swipe gesture changes the
88	position of the logical center.
89
90	The dx and dy coordinates are relative coordinates of the logical
91	center of the gesture compared to the previous event.
92      </description>
93      <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
94      <arg name="dx" type="fixed" summary="delta x coordinate in surface coordinate space"/>
95      <arg name="dy" type="fixed" summary="delta y coordinate in surface coordinate space"/>
96    </event>
97
98    <event name="end">
99      <description summary="multi-finger swipe end">
100	This event is sent when a multi-finger swipe gesture ceases to
101	be valid. This may happen when one or more fingers are lifted or
102	the gesture is cancelled.
103
104	When a gesture is cancelled, the client should undo state changes
105	caused by this gesture. What causes a gesture to be cancelled is
106	implementation-dependent.
107      </description>
108      <arg name="serial" type="uint"/>
109      <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
110      <arg name="cancelled" type="int" summary="1 if the gesture was cancelled, 0 otherwise"/>
111    </event>
112  </interface>
113
114  <interface name="zwp_pointer_gesture_pinch_v1" version="2">
115    <description summary="a pinch gesture object">
116      A pinch gesture object notifies a client about a multi-finger pinch
117      gesture detected on an indirect input device such as a touchpad.
118      The gesture is usually initiated by multiple fingers moving towards
119      each other or away from each other, or by two or more fingers rotating
120      around a logical center of gravity. The precise conditions of when
121      such a gesture is detected are implementation-dependent.
122
123      A gesture consists of three stages: begin, update (optional) and end.
124      There cannot be multiple simultaneous pinch or swipe gestures on a
125      same pointer/seat, how compositors prevent these situations is
126      implementation-dependent.
127
128      A gesture may be cancelled by the compositor or the hardware.
129      Clients should not consider performing permanent or irreversible
130      actions until the end of a gesture has been received.
131    </description>
132
133    <request name="destroy" type="destructor">
134      <description summary="destroy the pinch gesture object"/>
135    </request>
136
137    <event name="begin">
138      <description summary="multi-finger pinch begin">
139	This event is sent when a multi-finger pinch gesture is detected
140	on the device.
141      </description>
142      <arg name="serial" type="uint"/>
143      <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
144      <arg name="surface" type="object" interface="wl_surface"/>
145      <arg name="fingers" type="uint" summary="number of fingers"/>
146    </event>
147
148    <event name="update">
149      <description summary="multi-finger pinch motion">
150	This event is sent when a multi-finger pinch gesture changes the
151	position of the logical center, the rotation or the relative scale.
152
153	The dx and dy coordinates are relative coordinates in the
154	surface coordinate space of the logical center of the gesture.
155
156	The scale factor is an absolute scale compared to the
157	pointer_gesture_pinch.begin event, e.g. a scale of 2 means the fingers
158	are now twice as far apart as on pointer_gesture_pinch.begin.
159
160	The rotation is the relative angle in degrees clockwise compared to the previous
161	pointer_gesture_pinch.begin or pointer_gesture_pinch.update event.
162      </description>
163      <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
164      <arg name="dx" type="fixed" summary="delta x coordinate in surface coordinate space"/>
165      <arg name="dy" type="fixed" summary="delta y coordinate in surface coordinate space"/>
166      <arg name="scale" type="fixed" summary="scale relative to the initial finger position"/>
167      <arg name="rotation" type="fixed" summary="angle in degrees cw relative to the previous event"/>
168    </event>
169
170    <event name="end">
171      <description summary="multi-finger pinch end">
172	This event is sent when a multi-finger pinch gesture ceases to
173	be valid. This may happen when one or more fingers are lifted or
174	the gesture is cancelled.
175
176	When a gesture is cancelled, the client should undo state changes
177	caused by this gesture. What causes a gesture to be cancelled is
178	implementation-dependent.
179      </description>
180      <arg name="serial" type="uint"/>
181      <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
182      <arg name="cancelled" type="int" summary="1 if the gesture was cancelled, 0 otherwise"/>
183    </event>
184  </interface>
185
186</protocol>
187