pointer-gestures-unstable-v1.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <protocol name="pointer_gestures_unstable_v1">
  3. <interface name="zwp_pointer_gestures_v1" version="3">
  4. <description summary="touchpad gestures">
  5. A global interface to provide semantic touchpad gestures for a given
  6. pointer.
  7. Three gestures are currently supported: swipe, pinch, and hold.
  8. Pinch and swipe gestures follow a three-stage cycle: begin, update,
  9. end, hold gestures follow a two-stage cycle: begin and end. All
  10. gestures are identified by a unique id.
  11. Warning! The protocol described in this file is experimental and
  12. backward incompatible changes may be made. Backward compatible changes
  13. may be added together with the corresponding interface version bump.
  14. Backward incompatible changes are done by bumping the version number in
  15. the protocol and interface names and resetting the interface version.
  16. Once the protocol is to be declared stable, the 'z' prefix and the
  17. version number in the protocol and interface names are removed and the
  18. interface version number is reset.
  19. </description>
  20. <request name="get_swipe_gesture">
  21. <description summary="get swipe gesture">
  22. Create a swipe gesture object. See the
  23. wl_pointer_gesture_swipe interface for details.
  24. </description>
  25. <arg name="id" type="new_id" interface="zwp_pointer_gesture_swipe_v1"/>
  26. <arg name="pointer" type="object" interface="wl_pointer"/>
  27. </request>
  28. <request name="get_pinch_gesture">
  29. <description summary="get pinch gesture">
  30. Create a pinch gesture object. See the
  31. wl_pointer_gesture_pinch interface for details.
  32. </description>
  33. <arg name="id" type="new_id" interface="zwp_pointer_gesture_pinch_v1"/>
  34. <arg name="pointer" type="object" interface="wl_pointer"/>
  35. </request>
  36. <!-- Version 2 additions -->
  37. <request name="release" type="destructor" since="2">
  38. <description summary="destroy the pointer gesture object">
  39. Destroy the pointer gesture object. Swipe, pinch and hold objects
  40. created via this gesture object remain valid.
  41. </description>
  42. </request>
  43. <!-- Version 3 additions -->
  44. <request name="get_hold_gesture" since="3">
  45. <description summary="get hold gesture">
  46. Create a hold gesture object. See the
  47. wl_pointer_gesture_hold interface for details.
  48. </description>
  49. <arg name="id" type="new_id" interface="zwp_pointer_gesture_hold_v1"/>
  50. <arg name="pointer" type="object" interface="wl_pointer"/>
  51. </request>
  52. </interface>
  53. <interface name="zwp_pointer_gesture_swipe_v1" version="2">
  54. <description summary="a swipe gesture object">
  55. A swipe gesture object notifies a client about a multi-finger swipe
  56. gesture detected on an indirect input device such as a touchpad.
  57. The gesture is usually initiated by multiple fingers moving in the
  58. same direction but once initiated the direction may change.
  59. The precise conditions of when such a gesture is detected are
  60. implementation-dependent.
  61. A gesture consists of three stages: begin, update (optional) and end.
  62. There cannot be multiple simultaneous hold, pinch or swipe gestures on a
  63. same pointer/seat, how compositors prevent these situations is
  64. implementation-dependent.
  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. <request name="destroy" type="destructor">
  70. <description summary="destroy the pointer swipe gesture object"/>
  71. </request>
  72. <event name="begin">
  73. <description summary="multi-finger swipe begin">
  74. This event is sent when a multi-finger swipe gesture is detected
  75. on the device.
  76. </description>
  77. <arg name="serial" type="uint"/>
  78. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  79. <arg name="surface" type="object" interface="wl_surface"/>
  80. <arg name="fingers" type="uint" summary="number of fingers"/>
  81. </event>
  82. <event name="update">
  83. <description summary="multi-finger swipe motion">
  84. This event is sent when a multi-finger swipe gesture changes the
  85. position of the logical center.
  86. The dx and dy coordinates are relative coordinates of the logical
  87. center of the gesture compared to the previous event.
  88. </description>
  89. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  90. <arg name="dx" type="fixed" summary="delta x coordinate in surface coordinate space"/>
  91. <arg name="dy" type="fixed" summary="delta y coordinate in surface coordinate space"/>
  92. </event>
  93. <event name="end">
  94. <description summary="multi-finger swipe end">
  95. This event is sent when a multi-finger swipe gesture ceases to
  96. be valid. This may happen when one or more fingers are lifted or
  97. the gesture is cancelled.
  98. When a gesture is cancelled, the client should undo state changes
  99. caused by this gesture. What causes a gesture to be cancelled is
  100. implementation-dependent.
  101. </description>
  102. <arg name="serial" type="uint"/>
  103. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  104. <arg name="cancelled" type="int" summary="1 if the gesture was cancelled, 0 otherwise"/>
  105. </event>
  106. </interface>
  107. <interface name="zwp_pointer_gesture_pinch_v1" version="2">
  108. <description summary="a pinch gesture object">
  109. A pinch gesture object notifies a client about a multi-finger pinch
  110. gesture detected on an indirect input device such as a touchpad.
  111. The gesture is usually initiated by multiple fingers moving towards
  112. each other or away from each other, or by two or more fingers rotating
  113. around a logical center of gravity. The precise conditions of when
  114. such a gesture is detected are implementation-dependent.
  115. A gesture consists of three stages: begin, update (optional) and end.
  116. There cannot be multiple simultaneous hold, pinch or swipe gestures on a
  117. same pointer/seat, how compositors prevent these situations is
  118. implementation-dependent.
  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. <request name="destroy" type="destructor">
  124. <description summary="destroy the pinch gesture object"/>
  125. </request>
  126. <event name="begin">
  127. <description summary="multi-finger pinch begin">
  128. This event is sent when a multi-finger pinch gesture is detected
  129. on the device.
  130. </description>
  131. <arg name="serial" type="uint"/>
  132. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  133. <arg name="surface" type="object" interface="wl_surface"/>
  134. <arg name="fingers" type="uint" summary="number of fingers"/>
  135. </event>
  136. <event name="update">
  137. <description summary="multi-finger pinch motion">
  138. This event is sent when a multi-finger pinch gesture changes the
  139. position of the logical center, the rotation or the relative scale.
  140. The dx and dy coordinates are relative coordinates in the
  141. surface coordinate space of the logical center of the gesture.
  142. The scale factor is an absolute scale compared to the
  143. pointer_gesture_pinch.begin event, e.g. a scale of 2 means the fingers
  144. are now twice as far apart as on pointer_gesture_pinch.begin.
  145. The rotation is the relative angle in degrees clockwise compared to the previous
  146. pointer_gesture_pinch.begin or pointer_gesture_pinch.update event.
  147. </description>
  148. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  149. <arg name="dx" type="fixed" summary="delta x coordinate in surface coordinate space"/>
  150. <arg name="dy" type="fixed" summary="delta y coordinate in surface coordinate space"/>
  151. <arg name="scale" type="fixed" summary="scale relative to the initial finger position"/>
  152. <arg name="rotation" type="fixed" summary="angle in degrees cw relative to the previous event"/>
  153. </event>
  154. <event name="end">
  155. <description summary="multi-finger pinch end">
  156. This event is sent when a multi-finger pinch gesture ceases to
  157. be valid. This may happen when one or more fingers are lifted or
  158. the gesture is cancelled.
  159. When a gesture is cancelled, the client should undo state changes
  160. caused by this gesture. What causes a gesture to be cancelled is
  161. implementation-dependent.
  162. </description>
  163. <arg name="serial" type="uint"/>
  164. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  165. <arg name="cancelled" type="int" summary="1 if the gesture was cancelled, 0 otherwise"/>
  166. </event>
  167. </interface>
  168. <interface name="zwp_pointer_gesture_hold_v1" version="3">
  169. <description summary="a hold gesture object">
  170. A hold gesture object notifies a client about a single- or
  171. multi-finger hold gesture detected on an indirect input device such as
  172. a touchpad. The gesture is usually initiated by one or more fingers
  173. being held down without significant movement. The precise conditions
  174. of when such a gesture is detected are implementation-dependent.
  175. In particular, this gesture may be used to cancel kinetic scrolling.
  176. A hold gesture consists of two stages: begin and end. Unlike pinch and
  177. swipe there is no update stage.
  178. There cannot be multiple simultaneous hold, pinch or swipe gestures on a
  179. same pointer/seat, how compositors prevent these situations is
  180. implementation-dependent.
  181. A gesture may be cancelled by the compositor or the hardware.
  182. Clients should not consider performing permanent or irreversible
  183. actions until the end of a gesture has been received.
  184. </description>
  185. <request name="destroy" type="destructor" since="3">
  186. <description summary="destroy the hold gesture object"/>
  187. </request>
  188. <event name="begin" since="3">
  189. <description summary="multi-finger hold begin">
  190. This event is sent when a hold gesture is detected on the device.
  191. </description>
  192. <arg name="serial" type="uint"/>
  193. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  194. <arg name="surface" type="object" interface="wl_surface"/>
  195. <arg name="fingers" type="uint" summary="number of fingers"/>
  196. </event>
  197. <event name="end" since="3">
  198. <description summary="multi-finger hold end">
  199. This event is sent when a hold gesture ceases to
  200. be valid. This may happen when the holding fingers are lifted or
  201. the gesture is cancelled, for example if the fingers move past an
  202. implementation-defined threshold, the finger count changes or the hold
  203. gesture changes into a different type of gesture.
  204. When a gesture is cancelled, the client may need to undo state changes
  205. caused by this gesture. What causes a gesture to be cancelled is
  206. implementation-dependent.
  207. </description>
  208. <arg name="serial" type="uint"/>
  209. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  210. <arg name="cancelled" type="int" summary="1 if the gesture was cancelled, 0 otherwise"/>
  211. </event>
  212. </interface>
  213. </protocol>