🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2892 lines
130 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <protocol name="wayland">
  3. <copyright>
  4. Copyright © 2008-2011 Kristian Høgsberg
  5. Copyright © 2010-2011 Intel Corporation
  6. Copyright © 2012-2013 Collabora, Ltd.
  7. Permission is hereby granted, free of charge, to any person
  8. obtaining a copy of this software and associated documentation files
  9. (the "Software"), to deal in the Software without restriction,
  10. including without limitation the rights to use, copy, modify, merge,
  11. publish, distribute, sublicense, and/or sell copies of the Software,
  12. and to permit persons to whom the Software is furnished to do so,
  13. subject to the following conditions:
  14. The above copyright notice and this permission notice (including the
  15. next paragraph) shall be included in all copies or substantial
  16. portions of the Software.
  17. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  18. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  19. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  20. NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  21. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  22. ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  23. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  24. SOFTWARE.
  25. </copyright>
  26. <interface name="wl_display" version="1">
  27. <description summary="core global object">
  28. The core global object. This is a special singleton object. It
  29. is used for internal Wayland protocol features.
  30. </description>
  31. <request name="sync">
  32. <description summary="asynchronous roundtrip">
  33. The sync request asks the server to emit the 'done' event
  34. on the returned wl_callback object. Since requests are
  35. handled in-order and events are delivered in-order, this can
  36. be used as a barrier to ensure all previous requests and the
  37. resulting events have been handled.
  38. The object returned by this request will be destroyed by the
  39. compositor after the callback is fired and as such the client must not
  40. attempt to use it after that point.
  41. The callback_data passed in the callback is the event serial.
  42. </description>
  43. <arg name="callback" type="new_id" interface="wl_callback"
  44. summary="callback object for the sync request"/>
  45. </request>
  46. <request name="get_registry">
  47. <description summary="get global registry object">
  48. This request creates a registry object that allows the client
  49. to list and bind the global objects available from the
  50. compositor.
  51. It should be noted that the server side resources consumed in
  52. response to a get_registry request can only be released when the
  53. client disconnects, not when the client side proxy is destroyed.
  54. Therefore, clients should invoke get_registry as infrequently as
  55. possible to avoid wasting memory.
  56. </description>
  57. <arg name="registry" type="new_id" interface="wl_registry"
  58. summary="global registry object"/>
  59. </request>
  60. <event name="error">
  61. <description summary="fatal error event">
  62. The error event is sent out when a fatal (non-recoverable)
  63. error has occurred. The object_id argument is the object
  64. where the error occurred, most often in response to a request
  65. to that object. The code identifies the error and is defined
  66. by the object interface. As such, each interface defines its
  67. own set of error codes. The message is a brief description
  68. of the error, for (debugging) convenience.
  69. </description>
  70. <arg name="object_id" type="object" summary="object where the error occurred"/>
  71. <arg name="code" type="uint" summary="error code"/>
  72. <arg name="message" type="string" summary="error description"/>
  73. </event>
  74. <enum name="error">
  75. <description summary="global error values">
  76. These errors are global and can be emitted in response to any
  77. server request.
  78. </description>
  79. <entry name="invalid_object" value="0"
  80. summary="server couldn't find object"/>
  81. <entry name="invalid_method" value="1"
  82. summary="method doesn't exist on the specified interface or malformed request"/>
  83. <entry name="no_memory" value="2"
  84. summary="server is out of memory"/>
  85. <entry name="implementation" value="3"
  86. summary="implementation error in compositor"/>
  87. </enum>
  88. <event name="delete_id">
  89. <description summary="acknowledge object ID deletion">
  90. This event is used internally by the object ID management
  91. logic. When a client deletes an object that it had created,
  92. the server will send this event to acknowledge that it has
  93. seen the delete request. When the client receives this event,
  94. it will know that it can safely reuse the object ID.
  95. </description>
  96. <arg name="id" type="uint" summary="deleted object ID"/>
  97. </event>
  98. </interface>
  99. <interface name="wl_registry" version="1">
  100. <description summary="global registry object">
  101. The singleton global registry object. The server has a number of
  102. global objects that are available to all clients. These objects
  103. typically represent an actual object in the server (for example,
  104. an input device) or they are singleton objects that provide
  105. extension functionality.
  106. When a client creates a registry object, the registry object
  107. will emit a global event for each global currently in the
  108. registry. Globals come and go as a result of device or
  109. monitor hotplugs, reconfiguration or other events, and the
  110. registry will send out global and global_remove events to
  111. keep the client up to date with the changes. To mark the end
  112. of the initial burst of events, the client can use the
  113. wl_display.sync request immediately after calling
  114. wl_display.get_registry.
  115. A client can bind to a global object by using the bind
  116. request. This creates a client-side handle that lets the object
  117. emit events to the client and lets the client invoke requests on
  118. the object.
  119. </description>
  120. <request name="bind">
  121. <description summary="bind an object to the display">
  122. Binds a new, client-created object to the server using the
  123. specified name as the identifier.
  124. </description>
  125. <arg name="name" type="uint" summary="unique numeric name of the object"/>
  126. <arg name="id" type="new_id" summary="bounded object"/>
  127. </request>
  128. <event name="global">
  129. <description summary="announce global object">
  130. Notify the client of global objects.
  131. The event notifies the client that a global object with
  132. the given name is now available, and it implements the
  133. given version of the given interface.
  134. </description>
  135. <arg name="name" type="uint" summary="numeric name of the global object"/>
  136. <arg name="interface" type="string" summary="interface implemented by the object"/>
  137. <arg name="version" type="uint" summary="interface version"/>
  138. </event>
  139. <event name="global_remove">
  140. <description summary="announce removal of global object">
  141. Notify the client of removed global objects.
  142. This event notifies the client that the global identified
  143. by name is no longer available. If the client bound to
  144. the global using the bind request, the client should now
  145. destroy that object.
  146. The object remains valid and requests to the object will be
  147. ignored until the client destroys it, to avoid races between
  148. the global going away and a client sending a request to it.
  149. </description>
  150. <arg name="name" type="uint" summary="numeric name of the global object"/>
  151. </event>
  152. </interface>
  153. <interface name="wl_callback" version="1">
  154. <description summary="callback object">
  155. Clients can handle the 'done' event to get notified when
  156. the related request is done.
  157. </description>
  158. <event name="done">
  159. <description summary="done event">
  160. Notify the client when the related request is done.
  161. </description>
  162. <arg name="callback_data" type="uint" summary="request-specific data for the callback"/>
  163. </event>
  164. </interface>
  165. <interface name="wl_compositor" version="4">
  166. <description summary="the compositor singleton">
  167. A compositor. This object is a singleton global. The
  168. compositor is in charge of combining the contents of multiple
  169. surfaces into one displayable output.
  170. </description>
  171. <request name="create_surface">
  172. <description summary="create new surface">
  173. Ask the compositor to create a new surface.
  174. </description>
  175. <arg name="id" type="new_id" interface="wl_surface" summary="the new surface"/>
  176. </request>
  177. <request name="create_region">
  178. <description summary="create new region">
  179. Ask the compositor to create a new region.
  180. </description>
  181. <arg name="id" type="new_id" interface="wl_region" summary="the new region"/>
  182. </request>
  183. </interface>
  184. <interface name="wl_shm_pool" version="1">
  185. <description summary="a shared memory pool">
  186. The wl_shm_pool object encapsulates a piece of memory shared
  187. between the compositor and client. Through the wl_shm_pool
  188. object, the client can allocate shared memory wl_buffer objects.
  189. All objects created through the same pool share the same
  190. underlying mapped memory. Reusing the mapped memory avoids the
  191. setup/teardown overhead and is useful when interactively resizing
  192. a surface or for many small buffers.
  193. </description>
  194. <request name="create_buffer">
  195. <description summary="create a buffer from the pool">
  196. Create a wl_buffer object from the pool.
  197. The buffer is created offset bytes into the pool and has
  198. width and height as specified. The stride argument specifies
  199. the number of bytes from the beginning of one row to the beginning
  200. of the next. The format is the pixel format of the buffer and
  201. must be one of those advertised through the wl_shm.format event.
  202. A buffer will keep a reference to the pool it was created from
  203. so it is valid to destroy the pool immediately after creating
  204. a buffer from it.
  205. </description>
  206. <arg name="id" type="new_id" interface="wl_buffer" summary="buffer to create"/>
  207. <arg name="offset" type="int" summary="buffer byte offset within the pool"/>
  208. <arg name="width" type="int" summary="buffer width, in pixels"/>
  209. <arg name="height" type="int" summary="buffer height, in pixels"/>
  210. <arg name="stride" type="int" summary="number of bytes from the beginning of one row to the beginning of the next row"/>
  211. <arg name="format" type="uint" enum="wl_shm.format" summary="buffer pixel format"/>
  212. </request>
  213. <request name="destroy" type="destructor">
  214. <description summary="destroy the pool">
  215. Destroy the shared memory pool.
  216. The mmapped memory will be released when all
  217. buffers that have been created from this pool
  218. are gone.
  219. </description>
  220. </request>
  221. <request name="resize">
  222. <description summary="change the size of the pool mapping">
  223. This request will cause the server to remap the backing memory
  224. for the pool from the file descriptor passed when the pool was
  225. created, but using the new size. This request can only be
  226. used to make the pool bigger.
  227. </description>
  228. <arg name="size" type="int" summary="new size of the pool, in bytes"/>
  229. </request>
  230. </interface>
  231. <interface name="wl_shm" version="1">
  232. <description summary="shared memory support">
  233. A singleton global object that provides support for shared
  234. memory.
  235. Clients can create wl_shm_pool objects using the create_pool
  236. request.
  237. At connection setup time, the wl_shm object emits one or more
  238. format events to inform clients about the valid pixel formats
  239. that can be used for buffers.
  240. </description>
  241. <enum name="error">
  242. <description summary="wl_shm error values">
  243. These errors can be emitted in response to wl_shm requests.
  244. </description>
  245. <entry name="invalid_format" value="0" summary="buffer format is not known"/>
  246. <entry name="invalid_stride" value="1" summary="invalid size or stride during pool or buffer creation"/>
  247. <entry name="invalid_fd" value="2" summary="mmapping the file descriptor failed"/>
  248. </enum>
  249. <enum name="format">
  250. <description summary="pixel formats">
  251. This describes the memory layout of an individual pixel.
  252. All renderers should support argb8888 and xrgb8888 but any other
  253. formats are optional and may not be supported by the particular
  254. renderer in use.
  255. The drm format codes match the macros defined in drm_fourcc.h, except
  256. argb8888 and xrgb8888. The formats actually supported by the compositor
  257. will be reported by the format event.
  258. </description>
  259. <!-- Note to protocol writers: don't update this list manually, instead
  260. run the automated script that keeps it in sync with drm_fourcc.h. -->
  261. <entry name="argb8888" value="0" summary="32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian"/>
  262. <entry name="xrgb8888" value="1" summary="32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian"/>
  263. <entry name="c8" value="0x20203843" summary="8-bit color index format, [7:0] C"/>
  264. <entry name="rgb332" value="0x38424752" summary="8-bit RGB format, [7:0] R:G:B 3:3:2"/>
  265. <entry name="bgr233" value="0x38524742" summary="8-bit BGR format, [7:0] B:G:R 2:3:3"/>
  266. <entry name="xrgb4444" value="0x32315258" summary="16-bit xRGB format, [15:0] x:R:G:B 4:4:4:4 little endian"/>
  267. <entry name="xbgr4444" value="0x32314258" summary="16-bit xBGR format, [15:0] x:B:G:R 4:4:4:4 little endian"/>
  268. <entry name="rgbx4444" value="0x32315852" summary="16-bit RGBx format, [15:0] R:G:B:x 4:4:4:4 little endian"/>
  269. <entry name="bgrx4444" value="0x32315842" summary="16-bit BGRx format, [15:0] B:G:R:x 4:4:4:4 little endian"/>
  270. <entry name="argb4444" value="0x32315241" summary="16-bit ARGB format, [15:0] A:R:G:B 4:4:4:4 little endian"/>
  271. <entry name="abgr4444" value="0x32314241" summary="16-bit ABGR format, [15:0] A:B:G:R 4:4:4:4 little endian"/>
  272. <entry name="rgba4444" value="0x32314152" summary="16-bit RBGA format, [15:0] R:G:B:A 4:4:4:4 little endian"/>
  273. <entry name="bgra4444" value="0x32314142" summary="16-bit BGRA format, [15:0] B:G:R:A 4:4:4:4 little endian"/>
  274. <entry name="xrgb1555" value="0x35315258" summary="16-bit xRGB format, [15:0] x:R:G:B 1:5:5:5 little endian"/>
  275. <entry name="xbgr1555" value="0x35314258" summary="16-bit xBGR 1555 format, [15:0] x:B:G:R 1:5:5:5 little endian"/>
  276. <entry name="rgbx5551" value="0x35315852" summary="16-bit RGBx 5551 format, [15:0] R:G:B:x 5:5:5:1 little endian"/>
  277. <entry name="bgrx5551" value="0x35315842" summary="16-bit BGRx 5551 format, [15:0] B:G:R:x 5:5:5:1 little endian"/>
  278. <entry name="argb1555" value="0x35315241" summary="16-bit ARGB 1555 format, [15:0] A:R:G:B 1:5:5:5 little endian"/>
  279. <entry name="abgr1555" value="0x35314241" summary="16-bit ABGR 1555 format, [15:0] A:B:G:R 1:5:5:5 little endian"/>
  280. <entry name="rgba5551" value="0x35314152" summary="16-bit RGBA 5551 format, [15:0] R:G:B:A 5:5:5:1 little endian"/>
  281. <entry name="bgra5551" value="0x35314142" summary="16-bit BGRA 5551 format, [15:0] B:G:R:A 5:5:5:1 little endian"/>
  282. <entry name="rgb565" value="0x36314752" summary="16-bit RGB 565 format, [15:0] R:G:B 5:6:5 little endian"/>
  283. <entry name="bgr565" value="0x36314742" summary="16-bit BGR 565 format, [15:0] B:G:R 5:6:5 little endian"/>
  284. <entry name="rgb888" value="0x34324752" summary="24-bit RGB format, [23:0] R:G:B little endian"/>
  285. <entry name="bgr888" value="0x34324742" summary="24-bit BGR format, [23:0] B:G:R little endian"/>
  286. <entry name="xbgr8888" value="0x34324258" summary="32-bit xBGR format, [31:0] x:B:G:R 8:8:8:8 little endian"/>
  287. <entry name="rgbx8888" value="0x34325852" summary="32-bit RGBx format, [31:0] R:G:B:x 8:8:8:8 little endian"/>
  288. <entry name="bgrx8888" value="0x34325842" summary="32-bit BGRx format, [31:0] B:G:R:x 8:8:8:8 little endian"/>
  289. <entry name="abgr8888" value="0x34324241" summary="32-bit ABGR format, [31:0] A:B:G:R 8:8:8:8 little endian"/>
  290. <entry name="rgba8888" value="0x34324152" summary="32-bit RGBA format, [31:0] R:G:B:A 8:8:8:8 little endian"/>
  291. <entry name="bgra8888" value="0x34324142" summary="32-bit BGRA format, [31:0] B:G:R:A 8:8:8:8 little endian"/>
  292. <entry name="xrgb2101010" value="0x30335258" summary="32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian"/>
  293. <entry name="xbgr2101010" value="0x30334258" summary="32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian"/>
  294. <entry name="rgbx1010102" value="0x30335852" summary="32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian"/>
  295. <entry name="bgrx1010102" value="0x30335842" summary="32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian"/>
  296. <entry name="argb2101010" value="0x30335241" summary="32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian"/>
  297. <entry name="abgr2101010" value="0x30334241" summary="32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian"/>
  298. <entry name="rgba1010102" value="0x30334152" summary="32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian"/>
  299. <entry name="bgra1010102" value="0x30334142" summary="32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian"/>
  300. <entry name="yuyv" value="0x56595559" summary="packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian"/>
  301. <entry name="yvyu" value="0x55595659" summary="packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian"/>
  302. <entry name="uyvy" value="0x59565955" summary="packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian"/>
  303. <entry name="vyuy" value="0x59555956" summary="packed YCbCr format, [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian"/>
  304. <entry name="ayuv" value="0x56555941" summary="packed AYCbCr format, [31:0] A:Y:Cb:Cr 8:8:8:8 little endian"/>
  305. <entry name="nv12" value="0x3231564e" summary="2 plane YCbCr Cr:Cb format, 2x2 subsampled Cr:Cb plane"/>
  306. <entry name="nv21" value="0x3132564e" summary="2 plane YCbCr Cb:Cr format, 2x2 subsampled Cb:Cr plane"/>
  307. <entry name="nv16" value="0x3631564e" summary="2 plane YCbCr Cr:Cb format, 2x1 subsampled Cr:Cb plane"/>
  308. <entry name="nv61" value="0x3136564e" summary="2 plane YCbCr Cb:Cr format, 2x1 subsampled Cb:Cr plane"/>
  309. <entry name="yuv410" value="0x39565559" summary="3 plane YCbCr format, 4x4 subsampled Cb (1) and Cr (2) planes"/>
  310. <entry name="yvu410" value="0x39555659" summary="3 plane YCbCr format, 4x4 subsampled Cr (1) and Cb (2) planes"/>
  311. <entry name="yuv411" value="0x31315559" summary="3 plane YCbCr format, 4x1 subsampled Cb (1) and Cr (2) planes"/>
  312. <entry name="yvu411" value="0x31315659" summary="3 plane YCbCr format, 4x1 subsampled Cr (1) and Cb (2) planes"/>
  313. <entry name="yuv420" value="0x32315559" summary="3 plane YCbCr format, 2x2 subsampled Cb (1) and Cr (2) planes"/>
  314. <entry name="yvu420" value="0x32315659" summary="3 plane YCbCr format, 2x2 subsampled Cr (1) and Cb (2) planes"/>
  315. <entry name="yuv422" value="0x36315559" summary="3 plane YCbCr format, 2x1 subsampled Cb (1) and Cr (2) planes"/>
  316. <entry name="yvu422" value="0x36315659" summary="3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes"/>
  317. <entry name="yuv444" value="0x34325559" summary="3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes"/>
  318. <entry name="yvu444" value="0x34325659" summary="3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes"/>
  319. <entry name="r8" value="0x20203852" summary="[7:0] R"/>
  320. <entry name="r16" value="0x20363152" summary="[15:0] R little endian"/>
  321. <entry name="rg88" value="0x38384752" summary="[15:0] R:G 8:8 little endian"/>
  322. <entry name="gr88" value="0x38385247" summary="[15:0] G:R 8:8 little endian"/>
  323. <entry name="rg1616" value="0x32334752" summary="[31:0] R:G 16:16 little endian"/>
  324. <entry name="gr1616" value="0x32335247" summary="[31:0] G:R 16:16 little endian"/>
  325. <entry name="xrgb16161616f" value="0x48345258" summary="[63:0] x:R:G:B 16:16:16:16 little endian"/>
  326. <entry name="xbgr16161616f" value="0x48344258" summary="[63:0] x:B:G:R 16:16:16:16 little endian"/>
  327. <entry name="argb16161616f" value="0x48345241" summary="[63:0] A:R:G:B 16:16:16:16 little endian"/>
  328. <entry name="abgr16161616f" value="0x48344241" summary="[63:0] A:B:G:R 16:16:16:16 little endian"/>
  329. <entry name="xyuv8888" value="0x56555958" summary="[31:0] X:Y:Cb:Cr 8:8:8:8 little endian"/>
  330. <entry name="vuy888" value="0x34325556" summary="[23:0] Cr:Cb:Y 8:8:8 little endian"/>
  331. <entry name="vuy101010" value="0x30335556" summary="Y followed by U then V, 10:10:10. Non-linear modifier only"/>
  332. <entry name="y210" value="0x30313259" summary="[63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 10:6:10:6:10:6:10:6 little endian per 2 Y pixels"/>
  333. <entry name="y212" value="0x32313259" summary="[63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 12:4:12:4:12:4:12:4 little endian per 2 Y pixels"/>
  334. <entry name="y216" value="0x36313259" summary="[63:0] Cr0:Y1:Cb0:Y0 16:16:16:16 little endian per 2 Y pixels"/>
  335. <entry name="y410" value="0x30313459" summary="[31:0] A:Cr:Y:Cb 2:10:10:10 little endian"/>
  336. <entry name="y412" value="0x32313459" summary="[63:0] A:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian"/>
  337. <entry name="y416" value="0x36313459" summary="[63:0] A:Cr:Y:Cb 16:16:16:16 little endian"/>
  338. <entry name="xvyu2101010" value="0x30335658" summary="[31:0] X:Cr:Y:Cb 2:10:10:10 little endian"/>
  339. <entry name="xvyu12_16161616" value="0x36335658" summary="[63:0] X:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian"/>
  340. <entry name="xvyu16161616" value="0x38345658" summary="[63:0] X:Cr:Y:Cb 16:16:16:16 little endian"/>
  341. <entry name="y0l0" value="0x304c3059" summary="[63:0] A3:A2:Y3:0:Cr0:0:Y2:0:A1:A0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian"/>
  342. <entry name="x0l0" value="0x304c3058" summary="[63:0] X3:X2:Y3:0:Cr0:0:Y2:0:X1:X0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian"/>
  343. <entry name="y0l2" value="0x324c3059" summary="[63:0] A3:A2:Y3:Cr0:Y2:A1:A0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian"/>
  344. <entry name="x0l2" value="0x324c3058" summary="[63:0] X3:X2:Y3:Cr0:Y2:X1:X0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian"/>
  345. <entry name="yuv420_8bit" value="0x38305559"/>
  346. <entry name="yuv420_10bit" value="0x30315559"/>
  347. <entry name="xrgb8888_a8" value="0x38415258"/>
  348. <entry name="xbgr8888_a8" value="0x38414258"/>
  349. <entry name="rgbx8888_a8" value="0x38415852"/>
  350. <entry name="bgrx8888_a8" value="0x38415842"/>
  351. <entry name="rgb888_a8" value="0x38413852"/>
  352. <entry name="bgr888_a8" value="0x38413842"/>
  353. <entry name="rgb565_a8" value="0x38413552"/>
  354. <entry name="bgr565_a8" value="0x38413542"/>
  355. <entry name="nv24" value="0x3432564e" summary="non-subsampled Cr:Cb plane"/>
  356. <entry name="nv42" value="0x3234564e" summary="non-subsampled Cb:Cr plane"/>
  357. <entry name="p210" value="0x30313250" summary="2x1 subsampled Cr:Cb plane, 10 bit per channel"/>
  358. <entry name="p010" value="0x30313050" summary="2x2 subsampled Cr:Cb plane 10 bits per channel"/>
  359. <entry name="p012" value="0x32313050" summary="2x2 subsampled Cr:Cb plane 12 bits per channel"/>
  360. <entry name="p016" value="0x36313050" summary="2x2 subsampled Cr:Cb plane 16 bits per channel"/>
  361. <entry name="axbxgxrx106106106106" value="0x30314241" summary="[63:0] A:x:B:x:G:x:R:x 10:6:10:6:10:6:10:6 little endian"/>
  362. <entry name="nv15" value="0x3531564e" summary="2x2 subsampled Cr:Cb plane"/>
  363. <entry name="q410" value="0x30313451"/>
  364. <entry name="q401" value="0x31303451"/>
  365. </enum>
  366. <request name="create_pool">
  367. <description summary="create a shm pool">
  368. Create a new wl_shm_pool object.
  369. The pool can be used to create shared memory based buffer
  370. objects. The server will mmap size bytes of the passed file
  371. descriptor, to use as backing memory for the pool.
  372. </description>
  373. <arg name="id" type="new_id" interface="wl_shm_pool" summary="pool to create"/>
  374. <arg name="fd" type="fd" summary="file descriptor for the pool"/>
  375. <arg name="size" type="int" summary="pool size, in bytes"/>
  376. </request>
  377. <event name="format">
  378. <description summary="pixel format description">
  379. Informs the client about a valid pixel format that
  380. can be used for buffers. Known formats include
  381. argb8888 and xrgb8888.
  382. </description>
  383. <arg name="format" type="uint" enum="format" summary="buffer pixel format"/>
  384. </event>
  385. </interface>
  386. <interface name="wl_buffer" version="1">
  387. <description summary="content for a wl_surface">
  388. A buffer provides the content for a wl_surface. Buffers are
  389. created through factory interfaces such as wl_drm, wl_shm or
  390. similar. It has a width and a height and can be attached to a
  391. wl_surface, but the mechanism by which a client provides and
  392. updates the contents is defined by the buffer factory interface.
  393. </description>
  394. <request name="destroy" type="destructor">
  395. <description summary="destroy a buffer">
  396. Destroy a buffer. If and how you need to release the backing
  397. storage is defined by the buffer factory interface.
  398. For possible side-effects to a surface, see wl_surface.attach.
  399. </description>
  400. </request>
  401. <event name="release">
  402. <description summary="compositor releases buffer">
  403. Sent when this wl_buffer is no longer used by the compositor.
  404. The client is now free to reuse or destroy this buffer and its
  405. backing storage.
  406. If a client receives a release event before the frame callback
  407. requested in the same wl_surface.commit that attaches this
  408. wl_buffer to a surface, then the client is immediately free to
  409. reuse the buffer and its backing storage, and does not need a
  410. second buffer for the next surface content update. Typically
  411. this is possible, when the compositor maintains a copy of the
  412. wl_surface contents, e.g. as a GL texture. This is an important
  413. optimization for GL(ES) compositors with wl_shm clients.
  414. </description>
  415. </event>
  416. </interface>
  417. <interface name="wl_data_offer" version="3">
  418. <description summary="offer to transfer data">
  419. A wl_data_offer represents a piece of data offered for transfer
  420. by another client (the source client). It is used by the
  421. copy-and-paste and drag-and-drop mechanisms. The offer
  422. describes the different mime types that the data can be
  423. converted to and provides the mechanism for transferring the
  424. data directly from the source client.
  425. </description>
  426. <enum name="error">
  427. <entry name="invalid_finish" value="0"
  428. summary="finish request was called untimely"/>
  429. <entry name="invalid_action_mask" value="1"
  430. summary="action mask contains invalid values"/>
  431. <entry name="invalid_action" value="2"
  432. summary="action argument has an invalid value"/>
  433. <entry name="invalid_offer" value="3"
  434. summary="offer doesn't accept this request"/>
  435. </enum>
  436. <request name="accept">
  437. <description summary="accept one of the offered mime types">
  438. Indicate that the client can accept the given mime type, or
  439. NULL for not accepted.
  440. For objects of version 2 or older, this request is used by the
  441. client to give feedback whether the client can receive the given
  442. mime type, or NULL if none is accepted; the feedback does not
  443. determine whether the drag-and-drop operation succeeds or not.
  444. For objects of version 3 or newer, this request determines the
  445. final result of the drag-and-drop operation. If the end result
  446. is that no mime types were accepted, the drag-and-drop operation
  447. will be cancelled and the corresponding drag source will receive
  448. wl_data_source.cancelled. Clients may still use this event in
  449. conjunction with wl_data_source.action for feedback.
  450. </description>
  451. <arg name="serial" type="uint" summary="serial number of the accept request"/>
  452. <arg name="mime_type" type="string" allow-null="true" summary="mime type accepted by the client"/>
  453. </request>
  454. <request name="receive">
  455. <description summary="request that the data is transferred">
  456. To transfer the offered data, the client issues this request
  457. and indicates the mime type it wants to receive. The transfer
  458. happens through the passed file descriptor (typically created
  459. with the pipe system call). The source client writes the data
  460. in the mime type representation requested and then closes the
  461. file descriptor.
  462. The receiving client reads from the read end of the pipe until
  463. EOF and then closes its end, at which point the transfer is
  464. complete.
  465. This request may happen multiple times for different mime types,
  466. both before and after wl_data_device.drop. Drag-and-drop destination
  467. clients may preemptively fetch data or examine it more closely to
  468. determine acceptance.
  469. </description>
  470. <arg name="mime_type" type="string" summary="mime type desired by receiver"/>
  471. <arg name="fd" type="fd" summary="file descriptor for data transfer"/>
  472. </request>
  473. <request name="destroy" type="destructor">
  474. <description summary="destroy data offer">
  475. Destroy the data offer.
  476. </description>
  477. </request>
  478. <event name="offer">
  479. <description summary="advertise offered mime type">
  480. Sent immediately after creating the wl_data_offer object. One
  481. event per offered mime type.
  482. </description>
  483. <arg name="mime_type" type="string" summary="offered mime type"/>
  484. </event>
  485. <!-- Version 3 additions -->
  486. <request name="finish" since="3">
  487. <description summary="the offer will no longer be used">
  488. Notifies the compositor that the drag destination successfully
  489. finished the drag-and-drop operation.
  490. Upon receiving this request, the compositor will emit
  491. wl_data_source.dnd_finished on the drag source client.
  492. It is a client error to perform other requests than
  493. wl_data_offer.destroy after this one. It is also an error to perform
  494. this request after a NULL mime type has been set in
  495. wl_data_offer.accept or no action was received through
  496. wl_data_offer.action.
  497. If wl_data_offer.finish request is received for a non drag and drop
  498. operation, the invalid_finish protocol error is raised.
  499. </description>
  500. </request>
  501. <request name="set_actions" since="3">
  502. <description summary="set the available/preferred drag-and-drop actions">
  503. Sets the actions that the destination side client supports for
  504. this operation. This request may trigger the emission of
  505. wl_data_source.action and wl_data_offer.action events if the compositor
  506. needs to change the selected action.
  507. This request can be called multiple times throughout the
  508. drag-and-drop operation, typically in response to wl_data_device.enter
  509. or wl_data_device.motion events.
  510. This request determines the final result of the drag-and-drop
  511. operation. If the end result is that no action is accepted,
  512. the drag source will receive wl_data_source.cancelled.
  513. The dnd_actions argument must contain only values expressed in the
  514. wl_data_device_manager.dnd_actions enum, and the preferred_action
  515. argument must only contain one of those values set, otherwise it
  516. will result in a protocol error.
  517. While managing an "ask" action, the destination drag-and-drop client
  518. may perform further wl_data_offer.receive requests, and is expected
  519. to perform one last wl_data_offer.set_actions request with a preferred
  520. action other than "ask" (and optionally wl_data_offer.accept) before
  521. requesting wl_data_offer.finish, in order to convey the action selected
  522. by the user. If the preferred action is not in the
  523. wl_data_offer.source_actions mask, an error will be raised.
  524. If the "ask" action is dismissed (e.g. user cancellation), the client
  525. is expected to perform wl_data_offer.destroy right away.
  526. This request can only be made on drag-and-drop offers, a protocol error
  527. will be raised otherwise.
  528. </description>
  529. <arg name="dnd_actions" type="uint" summary="actions supported by the destination client"
  530. enum="wl_data_device_manager.dnd_action"/>
  531. <arg name="preferred_action" type="uint" summary="action preferred by the destination client"
  532. enum="wl_data_device_manager.dnd_action"/>
  533. </request>
  534. <event name="source_actions" since="3">
  535. <description summary="notify the source-side available actions">
  536. This event indicates the actions offered by the data source. It
  537. will be sent right after wl_data_device.enter, or anytime the source
  538. side changes its offered actions through wl_data_source.set_actions.
  539. </description>
  540. <arg name="source_actions" type="uint" summary="actions offered by the data source"
  541. enum="wl_data_device_manager.dnd_action"/>
  542. </event>
  543. <event name="action" since="3">
  544. <description summary="notify the selected action">
  545. This event indicates the action selected by the compositor after
  546. matching the source/destination side actions. Only one action (or
  547. none) will be offered here.
  548. This event can be emitted multiple times during the drag-and-drop
  549. operation in response to destination side action changes through
  550. wl_data_offer.set_actions.
  551. This event will no longer be emitted after wl_data_device.drop
  552. happened on the drag-and-drop destination, the client must
  553. honor the last action received, or the last preferred one set
  554. through wl_data_offer.set_actions when handling an "ask" action.
  555. Compositors may also change the selected action on the fly, mainly
  556. in response to keyboard modifier changes during the drag-and-drop
  557. operation.
  558. The most recent action received is always the valid one. Prior to
  559. receiving wl_data_device.drop, the chosen action may change (e.g.
  560. due to keyboard modifiers being pressed). At the time of receiving
  561. wl_data_device.drop the drag-and-drop destination must honor the
  562. last action received.
  563. Action changes may still happen after wl_data_device.drop,
  564. especially on "ask" actions, where the drag-and-drop destination
  565. may choose another action afterwards. Action changes happening
  566. at this stage are always the result of inter-client negotiation, the
  567. compositor shall no longer be able to induce a different action.
  568. Upon "ask" actions, it is expected that the drag-and-drop destination
  569. may potentially choose a different action and/or mime type,
  570. based on wl_data_offer.source_actions and finally chosen by the
  571. user (e.g. popping up a menu with the available options). The
  572. final wl_data_offer.set_actions and wl_data_offer.accept requests
  573. must happen before the call to wl_data_offer.finish.
  574. </description>
  575. <arg name="dnd_action" type="uint" summary="action selected by the compositor"
  576. enum="wl_data_device_manager.dnd_action"/>
  577. </event>
  578. </interface>
  579. <interface name="wl_data_source" version="3">
  580. <description summary="offer to transfer data">
  581. The wl_data_source object is the source side of a wl_data_offer.
  582. It is created by the source client in a data transfer and
  583. provides a way to describe the offered data and a way to respond
  584. to requests to transfer the data.
  585. </description>
  586. <enum name="error">
  587. <entry name="invalid_action_mask" value="0"
  588. summary="action mask contains invalid values"/>
  589. <entry name="invalid_source" value="1"
  590. summary="source doesn't accept this request"/>
  591. </enum>
  592. <request name="offer">
  593. <description summary="add an offered mime type">
  594. This request adds a mime type to the set of mime types
  595. advertised to targets. Can be called several times to offer
  596. multiple types.
  597. </description>
  598. <arg name="mime_type" type="string" summary="mime type offered by the data source"/>
  599. </request>
  600. <request name="destroy" type="destructor">
  601. <description summary="destroy the data source">
  602. Destroy the data source.
  603. </description>
  604. </request>
  605. <event name="target">
  606. <description summary="a target accepts an offered mime type">
  607. Sent when a target accepts pointer_focus or motion events. If
  608. a target does not accept any of the offered types, type is NULL.
  609. Used for feedback during drag-and-drop.
  610. </description>
  611. <arg name="mime_type" type="string" allow-null="true" summary="mime type accepted by the target"/>
  612. </event>
  613. <event name="send">
  614. <description summary="send the data">
  615. Request for data from the client. Send the data as the
  616. specified mime type over the passed file descriptor, then
  617. close it.
  618. </description>
  619. <arg name="mime_type" type="string" summary="mime type for the data"/>
  620. <arg name="fd" type="fd" summary="file descriptor for the data"/>
  621. </event>
  622. <event name="cancelled">
  623. <description summary="selection was cancelled">
  624. This data source is no longer valid. There are several reasons why
  625. this could happen:
  626. - The data source has been replaced by another data source.
  627. - The drag-and-drop operation was performed, but the drop destination
  628. did not accept any of the mime types offered through
  629. wl_data_source.target.
  630. - The drag-and-drop operation was performed, but the drop destination
  631. did not select any of the actions present in the mask offered through
  632. wl_data_source.action.
  633. - The drag-and-drop operation was performed but didn't happen over a
  634. surface.
  635. - The compositor cancelled the drag-and-drop operation (e.g. compositor
  636. dependent timeouts to avoid stale drag-and-drop transfers).
  637. The client should clean up and destroy this data source.
  638. For objects of version 2 or older, wl_data_source.cancelled will
  639. only be emitted if the data source was replaced by another data
  640. source.
  641. </description>
  642. </event>
  643. <!-- Version 3 additions -->
  644. <request name="set_actions" since="3">
  645. <description summary="set the available drag-and-drop actions">
  646. Sets the actions that the source side client supports for this
  647. operation. This request may trigger wl_data_source.action and
  648. wl_data_offer.action events if the compositor needs to change the
  649. selected action.
  650. The dnd_actions argument must contain only values expressed in the
  651. wl_data_device_manager.dnd_actions enum, otherwise it will result
  652. in a protocol error.
  653. This request must be made once only, and can only be made on sources
  654. used in drag-and-drop, so it must be performed before
  655. wl_data_device.start_drag. Attempting to use the source other than
  656. for drag-and-drop will raise a protocol error.
  657. </description>
  658. <arg name="dnd_actions" type="uint" summary="actions supported by the data source"
  659. enum="wl_data_device_manager.dnd_action"/>
  660. </request>
  661. <event name="dnd_drop_performed" since="3">
  662. <description summary="the drag-and-drop operation physically finished">
  663. The user performed the drop action. This event does not indicate
  664. acceptance, wl_data_source.cancelled may still be emitted afterwards
  665. if the drop destination does not accept any mime type.
  666. However, this event might however not be received if the compositor
  667. cancelled the drag-and-drop operation before this event could happen.
  668. Note that the data_source may still be used in the future and should
  669. not be destroyed here.
  670. </description>
  671. </event>
  672. <event name="dnd_finished" since="3">
  673. <description summary="the drag-and-drop operation concluded">
  674. The drop destination finished interoperating with this data
  675. source, so the client is now free to destroy this data source and
  676. free all associated data.
  677. If the action used to perform the operation was "move", the
  678. source can now delete the transferred data.
  679. </description>
  680. </event>
  681. <event name="action" since="3">
  682. <description summary="notify the selected action">
  683. This event indicates the action selected by the compositor after
  684. matching the source/destination side actions. Only one action (or
  685. none) will be offered here.
  686. This event can be emitted multiple times during the drag-and-drop
  687. operation, mainly in response to destination side changes through
  688. wl_data_offer.set_actions, and as the data device enters/leaves
  689. surfaces.
  690. It is only possible to receive this event after
  691. wl_data_source.dnd_drop_performed if the drag-and-drop operation
  692. ended in an "ask" action, in which case the final wl_data_source.action
  693. event will happen immediately before wl_data_source.dnd_finished.
  694. Compositors may also change the selected action on the fly, mainly
  695. in response to keyboard modifier changes during the drag-and-drop
  696. operation.
  697. The most recent action received is always the valid one. The chosen
  698. action may change alongside negotiation (e.g. an "ask" action can turn
  699. into a "move" operation), so the effects of the final action must
  700. always be applied in wl_data_offer.dnd_finished.
  701. Clients can trigger cursor surface changes from this point, so
  702. they reflect the current action.
  703. </description>
  704. <arg name="dnd_action" type="uint" summary="action selected by the compositor"
  705. enum="wl_data_device_manager.dnd_action"/>
  706. </event>
  707. </interface>
  708. <interface name="wl_data_device" version="3">
  709. <description summary="data transfer device">
  710. There is one wl_data_device per seat which can be obtained
  711. from the global wl_data_device_manager singleton.
  712. A wl_data_device provides access to inter-client data transfer
  713. mechanisms such as copy-and-paste and drag-and-drop.
  714. </description>
  715. <enum name="error">
  716. <entry name="role" value="0" summary="given wl_surface has another role"/>
  717. </enum>
  718. <request name="start_drag">
  719. <description summary="start drag-and-drop operation">
  720. This request asks the compositor to start a drag-and-drop
  721. operation on behalf of the client.
  722. The source argument is the data source that provides the data
  723. for the eventual data transfer. If source is NULL, enter, leave
  724. and motion events are sent only to the client that initiated the
  725. drag and the client is expected to handle the data passing
  726. internally. If source is destroyed, the drag-and-drop session will be
  727. cancelled.
  728. The origin surface is the surface where the drag originates and
  729. the client must have an active implicit grab that matches the
  730. serial.
  731. The icon surface is an optional (can be NULL) surface that
  732. provides an icon to be moved around with the cursor. Initially,
  733. the top-left corner of the icon surface is placed at the cursor
  734. hotspot, but subsequent wl_surface.attach request can move the
  735. relative position. Attach requests must be confirmed with
  736. wl_surface.commit as usual. The icon surface is given the role of
  737. a drag-and-drop icon. If the icon surface already has another role,
  738. it raises a protocol error.
  739. The current and pending input regions of the icon wl_surface are
  740. cleared, and wl_surface.set_input_region is ignored until the
  741. wl_surface is no longer used as the icon surface. When the use
  742. as an icon ends, the current and pending input regions become
  743. undefined, and the wl_surface is unmapped.
  744. </description>
  745. <arg name="source" type="object" interface="wl_data_source" allow-null="true" summary="data source for the eventual transfer"/>
  746. <arg name="origin" type="object" interface="wl_surface" summary="surface where the drag originates"/>
  747. <arg name="icon" type="object" interface="wl_surface" allow-null="true" summary="drag-and-drop icon surface"/>
  748. <arg name="serial" type="uint" summary="serial number of the implicit grab on the origin"/>
  749. </request>
  750. <request name="set_selection">
  751. <description summary="copy data to the selection">
  752. This request asks the compositor to set the selection
  753. to the data from the source on behalf of the client.
  754. To unset the selection, set the source to NULL.
  755. </description>
  756. <arg name="source" type="object" interface="wl_data_source" allow-null="true" summary="data source for the selection"/>
  757. <arg name="serial" type="uint" summary="serial number of the event that triggered this request"/>
  758. </request>
  759. <event name="data_offer">
  760. <description summary="introduce a new wl_data_offer">
  761. The data_offer event introduces a new wl_data_offer object,
  762. which will subsequently be used in either the
  763. data_device.enter event (for drag-and-drop) or the
  764. data_device.selection event (for selections). Immediately
  765. following the data_device_data_offer event, the new data_offer
  766. object will send out data_offer.offer events to describe the
  767. mime types it offers.
  768. </description>
  769. <arg name="id" type="new_id" interface="wl_data_offer" summary="the new data_offer object"/>
  770. </event>
  771. <event name="enter">
  772. <description summary="initiate drag-and-drop session">
  773. This event is sent when an active drag-and-drop pointer enters
  774. a surface owned by the client. The position of the pointer at
  775. enter time is provided by the x and y arguments, in surface-local
  776. coordinates.
  777. </description>
  778. <arg name="serial" type="uint" summary="serial number of the enter event"/>
  779. <arg name="surface" type="object" interface="wl_surface" summary="client surface entered"/>
  780. <arg name="x" type="fixed" summary="surface-local x coordinate"/>
  781. <arg name="y" type="fixed" summary="surface-local y coordinate"/>
  782. <arg name="id" type="object" interface="wl_data_offer" allow-null="true"
  783. summary="source data_offer object"/>
  784. </event>
  785. <event name="leave">
  786. <description summary="end drag-and-drop session">
  787. This event is sent when the drag-and-drop pointer leaves the
  788. surface and the session ends. The client must destroy the
  789. wl_data_offer introduced at enter time at this point.
  790. </description>
  791. </event>
  792. <event name="motion">
  793. <description summary="drag-and-drop session motion">
  794. This event is sent when the drag-and-drop pointer moves within
  795. the currently focused surface. The new position of the pointer
  796. is provided by the x and y arguments, in surface-local
  797. coordinates.
  798. </description>
  799. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  800. <arg name="x" type="fixed" summary="surface-local x coordinate"/>
  801. <arg name="y" type="fixed" summary="surface-local y coordinate"/>
  802. </event>
  803. <event name="drop">
  804. <description summary="end drag-and-drop session successfully">
  805. The event is sent when a drag-and-drop operation is ended
  806. because the implicit grab is removed.
  807. The drag-and-drop destination is expected to honor the last action
  808. received through wl_data_offer.action, if the resulting action is
  809. "copy" or "move", the destination can still perform
  810. wl_data_offer.receive requests, and is expected to end all
  811. transfers with a wl_data_offer.finish request.
  812. If the resulting action is "ask", the action will not be considered
  813. final. The drag-and-drop destination is expected to perform one last
  814. wl_data_offer.set_actions request, or wl_data_offer.destroy in order
  815. to cancel the operation.
  816. </description>
  817. </event>
  818. <event name="selection">
  819. <description summary="advertise new selection">
  820. The selection event is sent out to notify the client of a new
  821. wl_data_offer for the selection for this device. The
  822. data_device.data_offer and the data_offer.offer events are
  823. sent out immediately before this event to introduce the data
  824. offer object. The selection event is sent to a client
  825. immediately before receiving keyboard focus and when a new
  826. selection is set while the client has keyboard focus. The
  827. data_offer is valid until a new data_offer or NULL is received
  828. or until the client loses keyboard focus. The client must
  829. destroy the previous selection data_offer, if any, upon receiving
  830. this event.
  831. </description>
  832. <arg name="id" type="object" interface="wl_data_offer" allow-null="true"
  833. summary="selection data_offer object"/>
  834. </event>
  835. <!-- Version 2 additions -->
  836. <request name="release" type="destructor" since="2">
  837. <description summary="destroy data device">
  838. This request destroys the data device.
  839. </description>
  840. </request>
  841. </interface>
  842. <interface name="wl_data_device_manager" version="3">
  843. <description summary="data transfer interface">
  844. The wl_data_device_manager is a singleton global object that
  845. provides access to inter-client data transfer mechanisms such as
  846. copy-and-paste and drag-and-drop. These mechanisms are tied to
  847. a wl_seat and this interface lets a client get a wl_data_device
  848. corresponding to a wl_seat.
  849. Depending on the version bound, the objects created from the bound
  850. wl_data_device_manager object will have different requirements for
  851. functioning properly. See wl_data_source.set_actions,
  852. wl_data_offer.accept and wl_data_offer.finish for details.
  853. </description>
  854. <request name="create_data_source">
  855. <description summary="create a new data source">
  856. Create a new data source.
  857. </description>
  858. <arg name="id" type="new_id" interface="wl_data_source" summary="data source to create"/>
  859. </request>
  860. <request name="get_data_device">
  861. <description summary="create a new data device">
  862. Create a new data device for a given seat.
  863. </description>
  864. <arg name="id" type="new_id" interface="wl_data_device" summary="data device to create"/>
  865. <arg name="seat" type="object" interface="wl_seat" summary="seat associated with the data device"/>
  866. </request>
  867. <!-- Version 3 additions -->
  868. <enum name="dnd_action" bitfield="true" since="3">
  869. <description summary="drag and drop actions">
  870. This is a bitmask of the available/preferred actions in a
  871. drag-and-drop operation.
  872. In the compositor, the selected action is a result of matching the
  873. actions offered by the source and destination sides. "action" events
  874. with a "none" action will be sent to both source and destination if
  875. there is no match. All further checks will effectively happen on
  876. (source actions ∩ destination actions).
  877. In addition, compositors may also pick different actions in
  878. reaction to key modifiers being pressed. One common design that
  879. is used in major toolkits (and the behavior recommended for
  880. compositors) is:
  881. - If no modifiers are pressed, the first match (in bit order)
  882. will be used.
  883. - Pressing Shift selects "move", if enabled in the mask.
  884. - Pressing Control selects "copy", if enabled in the mask.
  885. Behavior beyond that is considered implementation-dependent.
  886. Compositors may for example bind other modifiers (like Alt/Meta)
  887. or drags initiated with other buttons than BTN_LEFT to specific
  888. actions (e.g. "ask").
  889. </description>
  890. <entry name="none" value="0" summary="no action"/>
  891. <entry name="copy" value="1" summary="copy action"/>
  892. <entry name="move" value="2" summary="move action"/>
  893. <entry name="ask" value="4" summary="ask action"/>
  894. </enum>
  895. </interface>
  896. <interface name="wl_shell" version="1">
  897. <description summary="create desktop-style surfaces">
  898. This interface is implemented by servers that provide
  899. desktop-style user interfaces.
  900. It allows clients to associate a wl_shell_surface with
  901. a basic surface.
  902. Note! This protocol is deprecated and not intended for production use.
  903. For desktop-style user interfaces, use xdg_shell.
  904. </description>
  905. <enum name="error">
  906. <entry name="role" value="0" summary="given wl_surface has another role"/>
  907. </enum>
  908. <request name="get_shell_surface">
  909. <description summary="create a shell surface from a surface">
  910. Create a shell surface for an existing surface. This gives
  911. the wl_surface the role of a shell surface. If the wl_surface
  912. already has another role, it raises a protocol error.
  913. Only one shell surface can be associated with a given surface.
  914. </description>
  915. <arg name="id" type="new_id" interface="wl_shell_surface" summary="shell surface to create"/>
  916. <arg name="surface" type="object" interface="wl_surface" summary="surface to be given the shell surface role"/>
  917. </request>
  918. </interface>
  919. <interface name="wl_shell_surface" version="1">
  920. <description summary="desktop-style metadata interface">
  921. An interface that may be implemented by a wl_surface, for
  922. implementations that provide a desktop-style user interface.
  923. It provides requests to treat surfaces like toplevel, fullscreen
  924. or popup windows, move, resize or maximize them, associate
  925. metadata like title and class, etc.
  926. On the server side the object is automatically destroyed when
  927. the related wl_surface is destroyed. On the client side,
  928. wl_shell_surface_destroy() must be called before destroying
  929. the wl_surface object.
  930. </description>
  931. <request name="pong">
  932. <description summary="respond to a ping event">
  933. A client must respond to a ping event with a pong request or
  934. the client may be deemed unresponsive.
  935. </description>
  936. <arg name="serial" type="uint" summary="serial number of the ping event"/>
  937. </request>
  938. <request name="move">
  939. <description summary="start an interactive move">
  940. Start a pointer-driven move of the surface.
  941. This request must be used in response to a button press event.
  942. The server may ignore move requests depending on the state of
  943. the surface (e.g. fullscreen or maximized).
  944. </description>
  945. <arg name="seat" type="object" interface="wl_seat" summary="seat whose pointer is used"/>
  946. <arg name="serial" type="uint" summary="serial number of the implicit grab on the pointer"/>
  947. </request>
  948. <enum name="resize" bitfield="true">
  949. <description summary="edge values for resizing">
  950. These values are used to indicate which edge of a surface
  951. is being dragged in a resize operation. The server may
  952. use this information to adapt its behavior, e.g. choose
  953. an appropriate cursor image.
  954. </description>
  955. <entry name="none" value="0" summary="no edge"/>
  956. <entry name="top" value="1" summary="top edge"/>
  957. <entry name="bottom" value="2" summary="bottom edge"/>
  958. <entry name="left" value="4" summary="left edge"/>
  959. <entry name="top_left" value="5" summary="top and left edges"/>
  960. <entry name="bottom_left" value="6" summary="bottom and left edges"/>
  961. <entry name="right" value="8" summary="right edge"/>
  962. <entry name="top_right" value="9" summary="top and right edges"/>
  963. <entry name="bottom_right" value="10" summary="bottom and right edges"/>
  964. </enum>
  965. <request name="resize">
  966. <description summary="start an interactive resize">
  967. Start a pointer-driven resizing of the surface.
  968. This request must be used in response to a button press event.
  969. The server may ignore resize requests depending on the state of
  970. the surface (e.g. fullscreen or maximized).
  971. </description>
  972. <arg name="seat" type="object" interface="wl_seat" summary="seat whose pointer is used"/>
  973. <arg name="serial" type="uint" summary="serial number of the implicit grab on the pointer"/>
  974. <arg name="edges" type="uint" enum="resize" summary="which edge or corner is being dragged"/>
  975. </request>
  976. <request name="set_toplevel">
  977. <description summary="make the surface a toplevel surface">
  978. Map the surface as a toplevel surface.
  979. A toplevel surface is not fullscreen, maximized or transient.
  980. </description>
  981. </request>
  982. <enum name="transient" bitfield="true">
  983. <description summary="details of transient behaviour">
  984. These flags specify details of the expected behaviour
  985. of transient surfaces. Used in the set_transient request.
  986. </description>
  987. <entry name="inactive" value="0x1" summary="do not set keyboard focus"/>
  988. </enum>
  989. <request name="set_transient">
  990. <description summary="make the surface a transient surface">
  991. Map the surface relative to an existing surface.
  992. The x and y arguments specify the location of the upper left
  993. corner of the surface relative to the upper left corner of the
  994. parent surface, in surface-local coordinates.
  995. The flags argument controls details of the transient behaviour.
  996. </description>
  997. <arg name="parent" type="object" interface="wl_surface" summary="parent surface"/>
  998. <arg name="x" type="int" summary="surface-local x coordinate"/>
  999. <arg name="y" type="int" summary="surface-local y coordinate"/>
  1000. <arg name="flags" type="uint" enum="transient" summary="transient surface behavior"/>
  1001. </request>
  1002. <enum name="fullscreen_method">
  1003. <description summary="different method to set the surface fullscreen">
  1004. Hints to indicate to the compositor how to deal with a conflict
  1005. between the dimensions of the surface and the dimensions of the
  1006. output. The compositor is free to ignore this parameter.
  1007. </description>
  1008. <entry name="default" value="0" summary="no preference, apply default policy"/>
  1009. <entry name="scale" value="1" summary="scale, preserve the surface's aspect ratio and center on output"/>
  1010. <entry name="driver" value="2" summary="switch output mode to the smallest mode that can fit the surface, add black borders to compensate size mismatch"/>
  1011. <entry name="fill" value="3" summary="no upscaling, center on output and add black borders to compensate size mismatch"/>
  1012. </enum>
  1013. <request name="set_fullscreen">
  1014. <description summary="make the surface a fullscreen surface">
  1015. Map the surface as a fullscreen surface.
  1016. If an output parameter is given then the surface will be made
  1017. fullscreen on that output. If the client does not specify the
  1018. output then the compositor will apply its policy - usually
  1019. choosing the output on which the surface has the biggest surface
  1020. area.
  1021. The client may specify a method to resolve a size conflict
  1022. between the output size and the surface size - this is provided
  1023. through the method parameter.
  1024. The framerate parameter is used only when the method is set
  1025. to "driver", to indicate the preferred framerate. A value of 0
  1026. indicates that the client does not care about framerate. The
  1027. framerate is specified in mHz, that is framerate of 60000 is 60Hz.
  1028. A method of "scale" or "driver" implies a scaling operation of
  1029. the surface, either via a direct scaling operation or a change of
  1030. the output mode. This will override any kind of output scaling, so
  1031. that mapping a surface with a buffer size equal to the mode can
  1032. fill the screen independent of buffer_scale.
  1033. A method of "fill" means we don't scale up the buffer, however
  1034. any output scale is applied. This means that you may run into
  1035. an edge case where the application maps a buffer with the same
  1036. size of the output mode but buffer_scale 1 (thus making a
  1037. surface larger than the output). In this case it is allowed to
  1038. downscale the results to fit the screen.
  1039. The compositor must reply to this request with a configure event
  1040. with the dimensions for the output on which the surface will
  1041. be made fullscreen.
  1042. </description>
  1043. <arg name="method" type="uint" enum="fullscreen_method" summary="method for resolving size conflict"/>
  1044. <arg name="framerate" type="uint" summary="framerate in mHz"/>
  1045. <arg name="output" type="object" interface="wl_output" allow-null="true"
  1046. summary="output on which the surface is to be fullscreen"/>
  1047. </request>
  1048. <request name="set_popup">
  1049. <description summary="make the surface a popup surface">
  1050. Map the surface as a popup.
  1051. A popup surface is a transient surface with an added pointer
  1052. grab.
  1053. An existing implicit grab will be changed to owner-events mode,
  1054. and the popup grab will continue after the implicit grab ends
  1055. (i.e. releasing the mouse button does not cause the popup to
  1056. be unmapped).
  1057. The popup grab continues until the window is destroyed or a
  1058. mouse button is pressed in any other client's window. A click
  1059. in any of the client's surfaces is reported as normal, however,
  1060. clicks in other clients' surfaces will be discarded and trigger
  1061. the callback.
  1062. The x and y arguments specify the location of the upper left
  1063. corner of the surface relative to the upper left corner of the
  1064. parent surface, in surface-local coordinates.
  1065. </description>
  1066. <arg name="seat" type="object" interface="wl_seat" summary="seat whose pointer is used"/>
  1067. <arg name="serial" type="uint" summary="serial number of the implicit grab on the pointer"/>
  1068. <arg name="parent" type="object" interface="wl_surface" summary="parent surface"/>
  1069. <arg name="x" type="int" summary="surface-local x coordinate"/>
  1070. <arg name="y" type="int" summary="surface-local y coordinate"/>
  1071. <arg name="flags" type="uint" enum="transient" summary="transient surface behavior"/>
  1072. </request>
  1073. <request name="set_maximized">
  1074. <description summary="make the surface a maximized surface">
  1075. Map the surface as a maximized surface.
  1076. If an output parameter is given then the surface will be
  1077. maximized on that output. If the client does not specify the
  1078. output then the compositor will apply its policy - usually
  1079. choosing the output on which the surface has the biggest surface
  1080. area.
  1081. The compositor will reply with a configure event telling
  1082. the expected new surface size. The operation is completed
  1083. on the next buffer attach to this surface.
  1084. A maximized surface typically fills the entire output it is
  1085. bound to, except for desktop elements such as panels. This is
  1086. the main difference between a maximized shell surface and a
  1087. fullscreen shell surface.
  1088. The details depend on the compositor implementation.
  1089. </description>
  1090. <arg name="output" type="object" interface="wl_output" allow-null="true"
  1091. summary="output on which the surface is to be maximized"/>
  1092. </request>
  1093. <request name="set_title">
  1094. <description summary="set surface title">
  1095. Set a short title for the surface.
  1096. This string may be used to identify the surface in a task bar,
  1097. window list, or other user interface elements provided by the
  1098. compositor.
  1099. The string must be encoded in UTF-8.
  1100. </description>
  1101. <arg name="title" type="string" summary="surface title"/>
  1102. </request>
  1103. <request name="set_class">
  1104. <description summary="set surface class">
  1105. Set a class for the surface.
  1106. The surface class identifies the general class of applications
  1107. to which the surface belongs. A common convention is to use the
  1108. file name (or the full path if it is a non-standard location) of
  1109. the application's .desktop file as the class.
  1110. </description>
  1111. <arg name="class_" type="string" summary="surface class"/>
  1112. </request>
  1113. <event name="ping">
  1114. <description summary="ping client">
  1115. Ping a client to check if it is receiving events and sending
  1116. requests. A client is expected to reply with a pong request.
  1117. </description>
  1118. <arg name="serial" type="uint" summary="serial number of the ping"/>
  1119. </event>
  1120. <event name="configure">
  1121. <description summary="suggest resize">
  1122. The configure event asks the client to resize its surface.
  1123. The size is a hint, in the sense that the client is free to
  1124. ignore it if it doesn't resize, pick a smaller size (to
  1125. satisfy aspect ratio or resize in steps of NxM pixels).
  1126. The edges parameter provides a hint about how the surface
  1127. was resized. The client may use this information to decide
  1128. how to adjust its content to the new size (e.g. a scrolling
  1129. area might adjust its content position to leave the viewable
  1130. content unmoved).
  1131. The client is free to dismiss all but the last configure
  1132. event it received.
  1133. The width and height arguments specify the size of the window
  1134. in surface-local coordinates.
  1135. </description>
  1136. <arg name="edges" type="uint" enum="resize" summary="how the surface was resized"/>
  1137. <arg name="width" type="int" summary="new width of the surface"/>
  1138. <arg name="height" type="int" summary="new height of the surface"/>
  1139. </event>
  1140. <event name="popup_done">
  1141. <description summary="popup interaction is done">
  1142. The popup_done event is sent out when a popup grab is broken,
  1143. that is, when the user clicks a surface that doesn't belong
  1144. to the client owning the popup surface.
  1145. </description>
  1146. </event>
  1147. </interface>
  1148. <interface name="wl_surface" version="4">
  1149. <description summary="an onscreen surface">
  1150. A surface is a rectangular area that may be displayed on zero
  1151. or more outputs, and shown any number of times at the compositor's
  1152. discretion. They can present wl_buffers, receive user input, and
  1153. define a local coordinate system.
  1154. The size of a surface (and relative positions on it) is described
  1155. in surface-local coordinates, which may differ from the buffer
  1156. coordinates of the pixel content, in case a buffer_transform
  1157. or a buffer_scale is used.
  1158. A surface without a "role" is fairly useless: a compositor does
  1159. not know where, when or how to present it. The role is the
  1160. purpose of a wl_surface. Examples of roles are a cursor for a
  1161. pointer (as set by wl_pointer.set_cursor), a drag icon
  1162. (wl_data_device.start_drag), a sub-surface
  1163. (wl_subcompositor.get_subsurface), and a window as defined by a
  1164. shell protocol (e.g. wl_shell.get_shell_surface).
  1165. A surface can have only one role at a time. Initially a
  1166. wl_surface does not have a role. Once a wl_surface is given a
  1167. role, it is set permanently for the whole lifetime of the
  1168. wl_surface object. Giving the current role again is allowed,
  1169. unless explicitly forbidden by the relevant interface
  1170. specification.
  1171. Surface roles are given by requests in other interfaces such as
  1172. wl_pointer.set_cursor. The request should explicitly mention
  1173. that this request gives a role to a wl_surface. Often, this
  1174. request also creates a new protocol object that represents the
  1175. role and adds additional functionality to wl_surface. When a
  1176. client wants to destroy a wl_surface, they must destroy this 'role
  1177. object' before the wl_surface.
  1178. Destroying the role object does not remove the role from the
  1179. wl_surface, but it may stop the wl_surface from "playing the role".
  1180. For instance, if a wl_subsurface object is destroyed, the wl_surface
  1181. it was created for will be unmapped and forget its position and
  1182. z-order. It is allowed to create a wl_subsurface for the same
  1183. wl_surface again, but it is not allowed to use the wl_surface as
  1184. a cursor (cursor is a different role than sub-surface, and role
  1185. switching is not allowed).
  1186. </description>
  1187. <enum name="error">
  1188. <description summary="wl_surface error values">
  1189. These errors can be emitted in response to wl_surface requests.
  1190. </description>
  1191. <entry name="invalid_scale" value="0" summary="buffer scale value is invalid"/>
  1192. <entry name="invalid_transform" value="1" summary="buffer transform value is invalid"/>
  1193. <entry name="invalid_size" value="2" summary="buffer size is invalid"/>
  1194. </enum>
  1195. <request name="destroy" type="destructor">
  1196. <description summary="delete surface">
  1197. Deletes the surface and invalidates its object ID.
  1198. </description>
  1199. </request>
  1200. <request name="attach">
  1201. <description summary="set the surface contents">
  1202. Set a buffer as the content of this surface.
  1203. The new size of the surface is calculated based on the buffer
  1204. size transformed by the inverse buffer_transform and the
  1205. inverse buffer_scale. This means that at commit time the supplied
  1206. buffer size must be an integer multiple of the buffer_scale. If
  1207. that's not the case, an invalid_size error is sent.
  1208. The x and y arguments specify the location of the new pending
  1209. buffer's upper left corner, relative to the current buffer's upper
  1210. left corner, in surface-local coordinates. In other words, the
  1211. x and y, combined with the new surface size define in which
  1212. directions the surface's size changes.
  1213. Surface contents are double-buffered state, see wl_surface.commit.
  1214. The initial surface contents are void; there is no content.
  1215. wl_surface.attach assigns the given wl_buffer as the pending
  1216. wl_buffer. wl_surface.commit makes the pending wl_buffer the new
  1217. surface contents, and the size of the surface becomes the size
  1218. calculated from the wl_buffer, as described above. After commit,
  1219. there is no pending buffer until the next attach.
  1220. Committing a pending wl_buffer allows the compositor to read the
  1221. pixels in the wl_buffer. The compositor may access the pixels at
  1222. any time after the wl_surface.commit request. When the compositor
  1223. will not access the pixels anymore, it will send the
  1224. wl_buffer.release event. Only after receiving wl_buffer.release,
  1225. the client may reuse the wl_buffer. A wl_buffer that has been
  1226. attached and then replaced by another attach instead of committed
  1227. will not receive a release event, and is not used by the
  1228. compositor.
  1229. If a pending wl_buffer has been committed to more than one wl_surface,
  1230. the delivery of wl_buffer.release events becomes undefined. A well
  1231. behaved client should not rely on wl_buffer.release events in this
  1232. case. Alternatively, a client could create multiple wl_buffer objects
  1233. from the same backing storage or use wp_linux_buffer_release.
  1234. Destroying the wl_buffer after wl_buffer.release does not change
  1235. the surface contents. However, if the client destroys the
  1236. wl_buffer before receiving the wl_buffer.release event, the surface
  1237. contents become undefined immediately.
  1238. If wl_surface.attach is sent with a NULL wl_buffer, the
  1239. following wl_surface.commit will remove the surface content.
  1240. </description>
  1241. <arg name="buffer" type="object" interface="wl_buffer" allow-null="true"
  1242. summary="buffer of surface contents"/>
  1243. <arg name="x" type="int" summary="surface-local x coordinate"/>
  1244. <arg name="y" type="int" summary="surface-local y coordinate"/>
  1245. </request>
  1246. <request name="damage">
  1247. <description summary="mark part of the surface damaged">
  1248. This request is used to describe the regions where the pending
  1249. buffer is different from the current surface contents, and where
  1250. the surface therefore needs to be repainted. The compositor
  1251. ignores the parts of the damage that fall outside of the surface.
  1252. Damage is double-buffered state, see wl_surface.commit.
  1253. The damage rectangle is specified in surface-local coordinates,
  1254. where x and y specify the upper left corner of the damage rectangle.
  1255. The initial value for pending damage is empty: no damage.
  1256. wl_surface.damage adds pending damage: the new pending damage
  1257. is the union of old pending damage and the given rectangle.
  1258. wl_surface.commit assigns pending damage as the current damage,
  1259. and clears pending damage. The server will clear the current
  1260. damage as it repaints the surface.
  1261. Note! New clients should not use this request. Instead damage can be
  1262. posted with wl_surface.damage_buffer which uses buffer coordinates
  1263. instead of surface coordinates.
  1264. </description>
  1265. <arg name="x" type="int" summary="surface-local x coordinate"/>
  1266. <arg name="y" type="int" summary="surface-local y coordinate"/>
  1267. <arg name="width" type="int" summary="width of damage rectangle"/>
  1268. <arg name="height" type="int" summary="height of damage rectangle"/>
  1269. </request>
  1270. <request name="frame">
  1271. <description summary="request a frame throttling hint">
  1272. Request a notification when it is a good time to start drawing a new
  1273. frame, by creating a frame callback. This is useful for throttling
  1274. redrawing operations, and driving animations.
  1275. When a client is animating on a wl_surface, it can use the 'frame'
  1276. request to get notified when it is a good time to draw and commit the
  1277. next frame of animation. If the client commits an update earlier than
  1278. that, it is likely that some updates will not make it to the display,
  1279. and the client is wasting resources by drawing too often.
  1280. The frame request will take effect on the next wl_surface.commit.
  1281. The notification will only be posted for one frame unless
  1282. requested again. For a wl_surface, the notifications are posted in
  1283. the order the frame requests were committed.
  1284. The server must send the notifications so that a client
  1285. will not send excessive updates, while still allowing
  1286. the highest possible update rate for clients that wait for the reply
  1287. before drawing again. The server should give some time for the client
  1288. to draw and commit after sending the frame callback events to let it
  1289. hit the next output refresh.
  1290. A server should avoid signaling the frame callbacks if the
  1291. surface is not visible in any way, e.g. the surface is off-screen,
  1292. or completely obscured by other opaque surfaces.
  1293. The object returned by this request will be destroyed by the
  1294. compositor after the callback is fired and as such the client must not
  1295. attempt to use it after that point.
  1296. The callback_data passed in the callback is the current time, in
  1297. milliseconds, with an undefined base.
  1298. </description>
  1299. <arg name="callback" type="new_id" interface="wl_callback" summary="callback object for the frame request"/>
  1300. </request>
  1301. <request name="set_opaque_region">
  1302. <description summary="set opaque region">
  1303. This request sets the region of the surface that contains
  1304. opaque content.
  1305. The opaque region is an optimization hint for the compositor
  1306. that lets it optimize the redrawing of content behind opaque
  1307. regions. Setting an opaque region is not required for correct
  1308. behaviour, but marking transparent content as opaque will result
  1309. in repaint artifacts.
  1310. The opaque region is specified in surface-local coordinates.
  1311. The compositor ignores the parts of the opaque region that fall
  1312. outside of the surface.
  1313. Opaque region is double-buffered state, see wl_surface.commit.
  1314. wl_surface.set_opaque_region changes the pending opaque region.
  1315. wl_surface.commit copies the pending region to the current region.
  1316. Otherwise, the pending and current regions are never changed.
  1317. The initial value for an opaque region is empty. Setting the pending
  1318. opaque region has copy semantics, and the wl_region object can be
  1319. destroyed immediately. A NULL wl_region causes the pending opaque
  1320. region to be set to empty.
  1321. </description>
  1322. <arg name="region" type="object" interface="wl_region" allow-null="true"
  1323. summary="opaque region of the surface"/>
  1324. </request>
  1325. <request name="set_input_region">
  1326. <description summary="set input region">
  1327. This request sets the region of the surface that can receive
  1328. pointer and touch events.
  1329. Input events happening outside of this region will try the next
  1330. surface in the server surface stack. The compositor ignores the
  1331. parts of the input region that fall outside of the surface.
  1332. The input region is specified in surface-local coordinates.
  1333. Input region is double-buffered state, see wl_surface.commit.
  1334. wl_surface.set_input_region changes the pending input region.
  1335. wl_surface.commit copies the pending region to the current region.
  1336. Otherwise the pending and current regions are never changed,
  1337. except cursor and icon surfaces are special cases, see
  1338. wl_pointer.set_cursor and wl_data_device.start_drag.
  1339. The initial value for an input region is infinite. That means the
  1340. whole surface will accept input. Setting the pending input region
  1341. has copy semantics, and the wl_region object can be destroyed
  1342. immediately. A NULL wl_region causes the input region to be set
  1343. to infinite.
  1344. </description>
  1345. <arg name="region" type="object" interface="wl_region" allow-null="true"
  1346. summary="input region of the surface"/>
  1347. </request>
  1348. <request name="commit">
  1349. <description summary="commit pending surface state">
  1350. Surface state (input, opaque, and damage regions, attached buffers,
  1351. etc.) is double-buffered. Protocol requests modify the pending state,
  1352. as opposed to the current state in use by the compositor. A commit
  1353. request atomically applies all pending state, replacing the current
  1354. state. After commit, the new pending state is as documented for each
  1355. related request.
  1356. On commit, a pending wl_buffer is applied first, and all other state
  1357. second. This means that all coordinates in double-buffered state are
  1358. relative to the new wl_buffer coming into use, except for
  1359. wl_surface.attach itself. If there is no pending wl_buffer, the
  1360. coordinates are relative to the current surface contents.
  1361. All requests that need a commit to become effective are documented
  1362. to affect double-buffered state.
  1363. Other interfaces may add further double-buffered surface state.
  1364. </description>
  1365. </request>
  1366. <event name="enter">
  1367. <description summary="surface enters an output">
  1368. This is emitted whenever a surface's creation, movement, or resizing
  1369. results in some part of it being within the scanout region of an
  1370. output.
  1371. Note that a surface may be overlapping with zero or more outputs.
  1372. </description>
  1373. <arg name="output" type="object" interface="wl_output" summary="output entered by the surface"/>
  1374. </event>
  1375. <event name="leave">
  1376. <description summary="surface leaves an output">
  1377. This is emitted whenever a surface's creation, movement, or resizing
  1378. results in it no longer having any part of it within the scanout region
  1379. of an output.
  1380. Clients should not use the number of outputs the surface is on for frame
  1381. throttling purposes. The surface might be hidden even if no leave event
  1382. has been sent, and the compositor might expect new surface content
  1383. updates even if no enter event has been sent. The frame event should be
  1384. used instead.
  1385. </description>
  1386. <arg name="output" type="object" interface="wl_output" summary="output left by the surface"/>
  1387. </event>
  1388. <!-- Version 2 additions -->
  1389. <request name="set_buffer_transform" since="2">
  1390. <description summary="sets the buffer transformation">
  1391. This request sets an optional transformation on how the compositor
  1392. interprets the contents of the buffer attached to the surface. The
  1393. accepted values for the transform parameter are the values for
  1394. wl_output.transform.
  1395. Buffer transform is double-buffered state, see wl_surface.commit.
  1396. A newly created surface has its buffer transformation set to normal.
  1397. wl_surface.set_buffer_transform changes the pending buffer
  1398. transformation. wl_surface.commit copies the pending buffer
  1399. transformation to the current one. Otherwise, the pending and current
  1400. values are never changed.
  1401. The purpose of this request is to allow clients to render content
  1402. according to the output transform, thus permitting the compositor to
  1403. use certain optimizations even if the display is rotated. Using
  1404. hardware overlays and scanning out a client buffer for fullscreen
  1405. surfaces are examples of such optimizations. Those optimizations are
  1406. highly dependent on the compositor implementation, so the use of this
  1407. request should be considered on a case-by-case basis.
  1408. Note that if the transform value includes 90 or 270 degree rotation,
  1409. the width of the buffer will become the surface height and the height
  1410. of the buffer will become the surface width.
  1411. If transform is not one of the values from the
  1412. wl_output.transform enum the invalid_transform protocol error
  1413. is raised.
  1414. </description>
  1415. <arg name="transform" type="int" enum="wl_output.transform"
  1416. summary="transform for interpreting buffer contents"/>
  1417. </request>
  1418. <!-- Version 3 additions -->
  1419. <request name="set_buffer_scale" since="3">
  1420. <description summary="sets the buffer scaling factor">
  1421. This request sets an optional scaling factor on how the compositor
  1422. interprets the contents of the buffer attached to the window.
  1423. Buffer scale is double-buffered state, see wl_surface.commit.
  1424. A newly created surface has its buffer scale set to 1.
  1425. wl_surface.set_buffer_scale changes the pending buffer scale.
  1426. wl_surface.commit copies the pending buffer scale to the current one.
  1427. Otherwise, the pending and current values are never changed.
  1428. The purpose of this request is to allow clients to supply higher
  1429. resolution buffer data for use on high resolution outputs. It is
  1430. intended that you pick the same buffer scale as the scale of the
  1431. output that the surface is displayed on. This means the compositor
  1432. can avoid scaling when rendering the surface on that output.
  1433. Note that if the scale is larger than 1, then you have to attach
  1434. a buffer that is larger (by a factor of scale in each dimension)
  1435. than the desired surface size.
  1436. If scale is not positive the invalid_scale protocol error is
  1437. raised.
  1438. </description>
  1439. <arg name="scale" type="int"
  1440. summary="positive scale for interpreting buffer contents"/>
  1441. </request>
  1442. <!-- Version 4 additions -->
  1443. <request name="damage_buffer" since="4">
  1444. <description summary="mark part of the surface damaged using buffer coordinates">
  1445. This request is used to describe the regions where the pending
  1446. buffer is different from the current surface contents, and where
  1447. the surface therefore needs to be repainted. The compositor
  1448. ignores the parts of the damage that fall outside of the surface.
  1449. Damage is double-buffered state, see wl_surface.commit.
  1450. The damage rectangle is specified in buffer coordinates,
  1451. where x and y specify the upper left corner of the damage rectangle.
  1452. The initial value for pending damage is empty: no damage.
  1453. wl_surface.damage_buffer adds pending damage: the new pending
  1454. damage is the union of old pending damage and the given rectangle.
  1455. wl_surface.commit assigns pending damage as the current damage,
  1456. and clears pending damage. The server will clear the current
  1457. damage as it repaints the surface.
  1458. This request differs from wl_surface.damage in only one way - it
  1459. takes damage in buffer coordinates instead of surface-local
  1460. coordinates. While this generally is more intuitive than surface
  1461. coordinates, it is especially desirable when using wp_viewport
  1462. or when a drawing library (like EGL) is unaware of buffer scale
  1463. and buffer transform.
  1464. Note: Because buffer transformation changes and damage requests may
  1465. be interleaved in the protocol stream, it is impossible to determine
  1466. the actual mapping between surface and buffer damage until
  1467. wl_surface.commit time. Therefore, compositors wishing to take both
  1468. kinds of damage into account will have to accumulate damage from the
  1469. two requests separately and only transform from one to the other
  1470. after receiving the wl_surface.commit.
  1471. </description>
  1472. <arg name="x" type="int" summary="buffer-local x coordinate"/>
  1473. <arg name="y" type="int" summary="buffer-local y coordinate"/>
  1474. <arg name="width" type="int" summary="width of damage rectangle"/>
  1475. <arg name="height" type="int" summary="height of damage rectangle"/>
  1476. </request>
  1477. </interface>
  1478. <interface name="wl_seat" version="7">
  1479. <description summary="group of input devices">
  1480. A seat is a group of keyboards, pointer and touch devices. This
  1481. object is published as a global during start up, or when such a
  1482. device is hot plugged. A seat typically has a pointer and
  1483. maintains a keyboard focus and a pointer focus.
  1484. </description>
  1485. <enum name="capability" bitfield="true">
  1486. <description summary="seat capability bitmask">
  1487. This is a bitmask of capabilities this seat has; if a member is
  1488. set, then it is present on the seat.
  1489. </description>
  1490. <entry name="pointer" value="1" summary="the seat has pointer devices"/>
  1491. <entry name="keyboard" value="2" summary="the seat has one or more keyboards"/>
  1492. <entry name="touch" value="4" summary="the seat has touch devices"/>
  1493. </enum>
  1494. <enum name="error">
  1495. <description summary="wl_seat error values">
  1496. These errors can be emitted in response to wl_seat requests.
  1497. </description>
  1498. <entry name="missing_capability" value="0"
  1499. summary="get_pointer, get_keyboard or get_touch called on seat without the matching capability"/>
  1500. </enum>
  1501. <event name="capabilities">
  1502. <description summary="seat capabilities changed">
  1503. This is emitted whenever a seat gains or loses the pointer,
  1504. keyboard or touch capabilities. The argument is a capability
  1505. enum containing the complete set of capabilities this seat has.
  1506. When the pointer capability is added, a client may create a
  1507. wl_pointer object using the wl_seat.get_pointer request. This object
  1508. will receive pointer events until the capability is removed in the
  1509. future.
  1510. When the pointer capability is removed, a client should destroy the
  1511. wl_pointer objects associated with the seat where the capability was
  1512. removed, using the wl_pointer.release request. No further pointer
  1513. events will be received on these objects.
  1514. In some compositors, if a seat regains the pointer capability and a
  1515. client has a previously obtained wl_pointer object of version 4 or
  1516. less, that object may start sending pointer events again. This
  1517. behavior is considered a misinterpretation of the intended behavior
  1518. and must not be relied upon by the client. wl_pointer objects of
  1519. version 5 or later must not send events if created before the most
  1520. recent event notifying the client of an added pointer capability.
  1521. The above behavior also applies to wl_keyboard and wl_touch with the
  1522. keyboard and touch capabilities, respectively.
  1523. </description>
  1524. <arg name="capabilities" type="uint" enum="capability" summary="capabilities of the seat"/>
  1525. </event>
  1526. <request name="get_pointer">
  1527. <description summary="return pointer object">
  1528. The ID provided will be initialized to the wl_pointer interface
  1529. for this seat.
  1530. This request only takes effect if the seat has the pointer
  1531. capability, or has had the pointer capability in the past.
  1532. It is a protocol violation to issue this request on a seat that has
  1533. never had the pointer capability. The missing_capability error will
  1534. be sent in this case.
  1535. </description>
  1536. <arg name="id" type="new_id" interface="wl_pointer" summary="seat pointer"/>
  1537. </request>
  1538. <request name="get_keyboard">
  1539. <description summary="return keyboard object">
  1540. The ID provided will be initialized to the wl_keyboard interface
  1541. for this seat.
  1542. This request only takes effect if the seat has the keyboard
  1543. capability, or has had the keyboard capability in the past.
  1544. It is a protocol violation to issue this request on a seat that has
  1545. never had the keyboard capability. The missing_capability error will
  1546. be sent in this case.
  1547. </description>
  1548. <arg name="id" type="new_id" interface="wl_keyboard" summary="seat keyboard"/>
  1549. </request>
  1550. <request name="get_touch">
  1551. <description summary="return touch object">
  1552. The ID provided will be initialized to the wl_touch interface
  1553. for this seat.
  1554. This request only takes effect if the seat has the touch
  1555. capability, or has had the touch capability in the past.
  1556. It is a protocol violation to issue this request on a seat that has
  1557. never had the touch capability. The missing_capability error will
  1558. be sent in this case.
  1559. </description>
  1560. <arg name="id" type="new_id" interface="wl_touch" summary="seat touch interface"/>
  1561. </request>
  1562. <!-- Version 2 additions -->
  1563. <event name="name" since="2">
  1564. <description summary="unique identifier for this seat">
  1565. In a multiseat configuration this can be used by the client to help
  1566. identify which physical devices the seat represents. Based on
  1567. the seat configuration used by the compositor.
  1568. </description>
  1569. <arg name="name" type="string" summary="seat identifier"/>
  1570. </event>
  1571. <!-- Version 5 additions -->
  1572. <request name="release" type="destructor" since="5">
  1573. <description summary="release the seat object">
  1574. Using this request a client can tell the server that it is not going to
  1575. use the seat object anymore.
  1576. </description>
  1577. </request>
  1578. </interface>
  1579. <interface name="wl_pointer" version="7">
  1580. <description summary="pointer input device">
  1581. The wl_pointer interface represents one or more input devices,
  1582. such as mice, which control the pointer location and pointer_focus
  1583. of a seat.
  1584. The wl_pointer interface generates motion, enter and leave
  1585. events for the surfaces that the pointer is located over,
  1586. and button and axis events for button presses, button releases
  1587. and scrolling.
  1588. </description>
  1589. <enum name="error">
  1590. <entry name="role" value="0" summary="given wl_surface has another role"/>
  1591. </enum>
  1592. <request name="set_cursor">
  1593. <description summary="set the pointer surface">
  1594. Set the pointer surface, i.e., the surface that contains the
  1595. pointer image (cursor). This request gives the surface the role
  1596. of a cursor. If the surface already has another role, it raises
  1597. a protocol error.
  1598. The cursor actually changes only if the pointer
  1599. focus for this device is one of the requesting client's surfaces
  1600. or the surface parameter is the current pointer surface. If
  1601. there was a previous surface set with this request it is
  1602. replaced. If surface is NULL, the pointer image is hidden.
  1603. The parameters hotspot_x and hotspot_y define the position of
  1604. the pointer surface relative to the pointer location. Its
  1605. top-left corner is always at (x, y) - (hotspot_x, hotspot_y),
  1606. where (x, y) are the coordinates of the pointer location, in
  1607. surface-local coordinates.
  1608. On surface.attach requests to the pointer surface, hotspot_x
  1609. and hotspot_y are decremented by the x and y parameters
  1610. passed to the request. Attach must be confirmed by
  1611. wl_surface.commit as usual.
  1612. The hotspot can also be updated by passing the currently set
  1613. pointer surface to this request with new values for hotspot_x
  1614. and hotspot_y.
  1615. The current and pending input regions of the wl_surface are
  1616. cleared, and wl_surface.set_input_region is ignored until the
  1617. wl_surface is no longer used as the cursor. When the use as a
  1618. cursor ends, the current and pending input regions become
  1619. undefined, and the wl_surface is unmapped.
  1620. </description>
  1621. <arg name="serial" type="uint" summary="serial number of the enter event"/>
  1622. <arg name="surface" type="object" interface="wl_surface" allow-null="true"
  1623. summary="pointer surface"/>
  1624. <arg name="hotspot_x" type="int" summary="surface-local x coordinate"/>
  1625. <arg name="hotspot_y" type="int" summary="surface-local y coordinate"/>
  1626. </request>
  1627. <event name="enter">
  1628. <description summary="enter event">
  1629. Notification that this seat's pointer is focused on a certain
  1630. surface.
  1631. When a seat's focus enters a surface, the pointer image
  1632. is undefined and a client should respond to this event by setting
  1633. an appropriate pointer image with the set_cursor request.
  1634. </description>
  1635. <arg name="serial" type="uint" summary="serial number of the enter event"/>
  1636. <arg name="surface" type="object" interface="wl_surface" summary="surface entered by the pointer"/>
  1637. <arg name="surface_x" type="fixed" summary="surface-local x coordinate"/>
  1638. <arg name="surface_y" type="fixed" summary="surface-local y coordinate"/>
  1639. </event>
  1640. <event name="leave">
  1641. <description summary="leave event">
  1642. Notification that this seat's pointer is no longer focused on
  1643. a certain surface.
  1644. The leave notification is sent before the enter notification
  1645. for the new focus.
  1646. </description>
  1647. <arg name="serial" type="uint" summary="serial number of the leave event"/>
  1648. <arg name="surface" type="object" interface="wl_surface" summary="surface left by the pointer"/>
  1649. </event>
  1650. <event name="motion">
  1651. <description summary="pointer motion event">
  1652. Notification of pointer location change. The arguments
  1653. surface_x and surface_y are the location relative to the
  1654. focused surface.
  1655. </description>
  1656. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  1657. <arg name="surface_x" type="fixed" summary="surface-local x coordinate"/>
  1658. <arg name="surface_y" type="fixed" summary="surface-local y coordinate"/>
  1659. </event>
  1660. <enum name="button_state">
  1661. <description summary="physical button state">
  1662. Describes the physical state of a button that produced the button
  1663. event.
  1664. </description>
  1665. <entry name="released" value="0" summary="the button is not pressed"/>
  1666. <entry name="pressed" value="1" summary="the button is pressed"/>
  1667. </enum>
  1668. <event name="button">
  1669. <description summary="pointer button event">
  1670. Mouse button click and release notifications.
  1671. The location of the click is given by the last motion or
  1672. enter event.
  1673. The time argument is a timestamp with millisecond
  1674. granularity, with an undefined base.
  1675. The button is a button code as defined in the Linux kernel's
  1676. linux/input-event-codes.h header file, e.g. BTN_LEFT.
  1677. Any 16-bit button code value is reserved for future additions to the
  1678. kernel's event code list. All other button codes above 0xFFFF are
  1679. currently undefined but may be used in future versions of this
  1680. protocol.
  1681. </description>
  1682. <arg name="serial" type="uint" summary="serial number of the button event"/>
  1683. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  1684. <arg name="button" type="uint" summary="button that produced the event"/>
  1685. <arg name="state" type="uint" enum="button_state" summary="physical state of the button"/>
  1686. </event>
  1687. <enum name="axis">
  1688. <description summary="axis types">
  1689. Describes the axis types of scroll events.
  1690. </description>
  1691. <entry name="vertical_scroll" value="0" summary="vertical axis"/>
  1692. <entry name="horizontal_scroll" value="1" summary="horizontal axis"/>
  1693. </enum>
  1694. <event name="axis">
  1695. <description summary="axis event">
  1696. Scroll and other axis notifications.
  1697. For scroll events (vertical and horizontal scroll axes), the
  1698. value parameter is the length of a vector along the specified
  1699. axis in a coordinate space identical to those of motion events,
  1700. representing a relative movement along the specified axis.
  1701. For devices that support movements non-parallel to axes multiple
  1702. axis events will be emitted.
  1703. When applicable, for example for touch pads, the server can
  1704. choose to emit scroll events where the motion vector is
  1705. equivalent to a motion event vector.
  1706. When applicable, a client can transform its content relative to the
  1707. scroll distance.
  1708. </description>
  1709. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  1710. <arg name="axis" type="uint" enum="axis" summary="axis type"/>
  1711. <arg name="value" type="fixed" summary="length of vector in surface-local coordinate space"/>
  1712. </event>
  1713. <!-- Version 3 additions -->
  1714. <request name="release" type="destructor" since="3">
  1715. <description summary="release the pointer object">
  1716. Using this request a client can tell the server that it is not going to
  1717. use the pointer object anymore.
  1718. This request destroys the pointer proxy object, so clients must not call
  1719. wl_pointer_destroy() after using this request.
  1720. </description>
  1721. </request>
  1722. <!-- Version 5 additions -->
  1723. <event name="frame" since="5">
  1724. <description summary="end of a pointer event sequence">
  1725. Indicates the end of a set of events that logically belong together.
  1726. A client is expected to accumulate the data in all events within the
  1727. frame before proceeding.
  1728. All wl_pointer events before a wl_pointer.frame event belong
  1729. logically together. For example, in a diagonal scroll motion the
  1730. compositor will send an optional wl_pointer.axis_source event, two
  1731. wl_pointer.axis events (horizontal and vertical) and finally a
  1732. wl_pointer.frame event. The client may use this information to
  1733. calculate a diagonal vector for scrolling.
  1734. When multiple wl_pointer.axis events occur within the same frame,
  1735. the motion vector is the combined motion of all events.
  1736. When a wl_pointer.axis and a wl_pointer.axis_stop event occur within
  1737. the same frame, this indicates that axis movement in one axis has
  1738. stopped but continues in the other axis.
  1739. When multiple wl_pointer.axis_stop events occur within the same
  1740. frame, this indicates that these axes stopped in the same instance.
  1741. A wl_pointer.frame event is sent for every logical event group,
  1742. even if the group only contains a single wl_pointer event.
  1743. Specifically, a client may get a sequence: motion, frame, button,
  1744. frame, axis, frame, axis_stop, frame.
  1745. The wl_pointer.enter and wl_pointer.leave events are logical events
  1746. generated by the compositor and not the hardware. These events are
  1747. also grouped by a wl_pointer.frame. When a pointer moves from one
  1748. surface to another, a compositor should group the
  1749. wl_pointer.leave event within the same wl_pointer.frame.
  1750. However, a client must not rely on wl_pointer.leave and
  1751. wl_pointer.enter being in the same wl_pointer.frame.
  1752. Compositor-specific policies may require the wl_pointer.leave and
  1753. wl_pointer.enter event being split across multiple wl_pointer.frame
  1754. groups.
  1755. </description>
  1756. </event>
  1757. <enum name="axis_source">
  1758. <description summary="axis source types">
  1759. Describes the source types for axis events. This indicates to the
  1760. client how an axis event was physically generated; a client may
  1761. adjust the user interface accordingly. For example, scroll events
  1762. from a "finger" source may be in a smooth coordinate space with
  1763. kinetic scrolling whereas a "wheel" source may be in discrete steps
  1764. of a number of lines.
  1765. The "continuous" axis source is a device generating events in a
  1766. continuous coordinate space, but using something other than a
  1767. finger. One example for this source is button-based scrolling where
  1768. the vertical motion of a device is converted to scroll events while
  1769. a button is held down.
  1770. The "wheel tilt" axis source indicates that the actual device is a
  1771. wheel but the scroll event is not caused by a rotation but a
  1772. (usually sideways) tilt of the wheel.
  1773. </description>
  1774. <entry name="wheel" value="0" summary="a physical wheel rotation" />
  1775. <entry name="finger" value="1" summary="finger on a touch surface" />
  1776. <entry name="continuous" value="2" summary="continuous coordinate space"/>
  1777. <entry name="wheel_tilt" value="3" summary="a physical wheel tilt" since="6"/>
  1778. </enum>
  1779. <event name="axis_source" since="5">
  1780. <description summary="axis source event">
  1781. Source information for scroll and other axes.
  1782. This event does not occur on its own. It is sent before a
  1783. wl_pointer.frame event and carries the source information for
  1784. all events within that frame.
  1785. The source specifies how this event was generated. If the source is
  1786. wl_pointer.axis_source.finger, a wl_pointer.axis_stop event will be
  1787. sent when the user lifts the finger off the device.
  1788. If the source is wl_pointer.axis_source.wheel,
  1789. wl_pointer.axis_source.wheel_tilt or
  1790. wl_pointer.axis_source.continuous, a wl_pointer.axis_stop event may
  1791. or may not be sent. Whether a compositor sends an axis_stop event
  1792. for these sources is hardware-specific and implementation-dependent;
  1793. clients must not rely on receiving an axis_stop event for these
  1794. scroll sources and should treat scroll sequences from these scroll
  1795. sources as unterminated by default.
  1796. This event is optional. If the source is unknown for a particular
  1797. axis event sequence, no event is sent.
  1798. Only one wl_pointer.axis_source event is permitted per frame.
  1799. The order of wl_pointer.axis_discrete and wl_pointer.axis_source is
  1800. not guaranteed.
  1801. </description>
  1802. <arg name="axis_source" type="uint" enum="axis_source" summary="source of the axis event"/>
  1803. </event>
  1804. <event name="axis_stop" since="5">
  1805. <description summary="axis stop event">
  1806. Stop notification for scroll and other axes.
  1807. For some wl_pointer.axis_source types, a wl_pointer.axis_stop event
  1808. is sent to notify a client that the axis sequence has terminated.
  1809. This enables the client to implement kinetic scrolling.
  1810. See the wl_pointer.axis_source documentation for information on when
  1811. this event may be generated.
  1812. Any wl_pointer.axis events with the same axis_source after this
  1813. event should be considered as the start of a new axis motion.
  1814. The timestamp is to be interpreted identical to the timestamp in the
  1815. wl_pointer.axis event. The timestamp value may be the same as a
  1816. preceding wl_pointer.axis event.
  1817. </description>
  1818. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  1819. <arg name="axis" type="uint" enum="axis" summary="the axis stopped with this event"/>
  1820. </event>
  1821. <event name="axis_discrete" since="5">
  1822. <description summary="axis click event">
  1823. Discrete step information for scroll and other axes.
  1824. This event carries the axis value of the wl_pointer.axis event in
  1825. discrete steps (e.g. mouse wheel clicks).
  1826. This event does not occur on its own, it is coupled with a
  1827. wl_pointer.axis event that represents this axis value on a
  1828. continuous scale. The protocol guarantees that each axis_discrete
  1829. event is always followed by exactly one axis event with the same
  1830. axis number within the same wl_pointer.frame. Note that the protocol
  1831. allows for other events to occur between the axis_discrete and
  1832. its coupled axis event, including other axis_discrete or axis
  1833. events.
  1834. This event is optional; continuous scrolling devices
  1835. like two-finger scrolling on touchpads do not have discrete
  1836. steps and do not generate this event.
  1837. The discrete value carries the directional information. e.g. a value
  1838. of -2 is two steps towards the negative direction of this axis.
  1839. The axis number is identical to the axis number in the associated
  1840. axis event.
  1841. The order of wl_pointer.axis_discrete and wl_pointer.axis_source is
  1842. not guaranteed.
  1843. </description>
  1844. <arg name="axis" type="uint" enum="axis" summary="axis type"/>
  1845. <arg name="discrete" type="int" summary="number of steps"/>
  1846. </event>
  1847. </interface>
  1848. <interface name="wl_keyboard" version="7">
  1849. <description summary="keyboard input device">
  1850. The wl_keyboard interface represents one or more keyboards
  1851. associated with a seat.
  1852. </description>
  1853. <enum name="keymap_format">
  1854. <description summary="keyboard mapping format">
  1855. This specifies the format of the keymap provided to the
  1856. client with the wl_keyboard.keymap event.
  1857. </description>
  1858. <entry name="no_keymap" value="0"
  1859. summary="no keymap; client must understand how to interpret the raw keycode"/>
  1860. <entry name="xkb_v1" value="1"
  1861. summary="libxkbcommon compatible; to determine the xkb keycode, clients must add 8 to the key event keycode"/>
  1862. </enum>
  1863. <event name="keymap">
  1864. <description summary="keyboard mapping">
  1865. This event provides a file descriptor to the client which can be
  1866. memory-mapped to provide a keyboard mapping description.
  1867. From version 7 onwards, the fd must be mapped with MAP_PRIVATE by
  1868. the recipient, as MAP_SHARED may fail.
  1869. </description>
  1870. <arg name="format" type="uint" enum="keymap_format" summary="keymap format"/>
  1871. <arg name="fd" type="fd" summary="keymap file descriptor"/>
  1872. <arg name="size" type="uint" summary="keymap size, in bytes"/>
  1873. </event>
  1874. <event name="enter">
  1875. <description summary="enter event">
  1876. Notification that this seat's keyboard focus is on a certain
  1877. surface.
  1878. The compositor must send the wl_keyboard.modifiers event after this
  1879. event.
  1880. </description>
  1881. <arg name="serial" type="uint" summary="serial number of the enter event"/>
  1882. <arg name="surface" type="object" interface="wl_surface" summary="surface gaining keyboard focus"/>
  1883. <arg name="keys" type="array" summary="the currently pressed keys"/>
  1884. </event>
  1885. <event name="leave">
  1886. <description summary="leave event">
  1887. Notification that this seat's keyboard focus is no longer on
  1888. a certain surface.
  1889. The leave notification is sent before the enter notification
  1890. for the new focus.
  1891. After this event client must assume that all keys, including modifiers,
  1892. are lifted and also it must stop key repeating if there's some going on.
  1893. </description>
  1894. <arg name="serial" type="uint" summary="serial number of the leave event"/>
  1895. <arg name="surface" type="object" interface="wl_surface" summary="surface that lost keyboard focus"/>
  1896. </event>
  1897. <enum name="key_state">
  1898. <description summary="physical key state">
  1899. Describes the physical state of a key that produced the key event.
  1900. </description>
  1901. <entry name="released" value="0" summary="key is not pressed"/>
  1902. <entry name="pressed" value="1" summary="key is pressed"/>
  1903. </enum>
  1904. <event name="key">
  1905. <description summary="key event">
  1906. A key was pressed or released.
  1907. The time argument is a timestamp with millisecond
  1908. granularity, with an undefined base.
  1909. The key is a platform-specific key code that can be interpreted
  1910. by feeding it to the keyboard mapping (see the keymap event).
  1911. If this event produces a change in modifiers, then the resulting
  1912. wl_keyboard.modifiers event must be sent after this event.
  1913. </description>
  1914. <arg name="serial" type="uint" summary="serial number of the key event"/>
  1915. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  1916. <arg name="key" type="uint" summary="key that produced the event"/>
  1917. <arg name="state" type="uint" enum="key_state" summary="physical state of the key"/>
  1918. </event>
  1919. <event name="modifiers">
  1920. <description summary="modifier and group state">
  1921. Notifies clients that the modifier and/or group state has
  1922. changed, and it should update its local state.
  1923. </description>
  1924. <arg name="serial" type="uint" summary="serial number of the modifiers event"/>
  1925. <arg name="mods_depressed" type="uint" summary="depressed modifiers"/>
  1926. <arg name="mods_latched" type="uint" summary="latched modifiers"/>
  1927. <arg name="mods_locked" type="uint" summary="locked modifiers"/>
  1928. <arg name="group" type="uint" summary="keyboard layout"/>
  1929. </event>
  1930. <!-- Version 3 additions -->
  1931. <request name="release" type="destructor" since="3">
  1932. <description summary="release the keyboard object"/>
  1933. </request>
  1934. <!-- Version 4 additions -->
  1935. <event name="repeat_info" since="4">
  1936. <description summary="repeat rate and delay">
  1937. Informs the client about the keyboard's repeat rate and delay.
  1938. This event is sent as soon as the wl_keyboard object has been created,
  1939. and is guaranteed to be received by the client before any key press
  1940. event.
  1941. Negative values for either rate or delay are illegal. A rate of zero
  1942. will disable any repeating (regardless of the value of delay).
  1943. This event can be sent later on as well with a new value if necessary,
  1944. so clients should continue listening for the event past the creation
  1945. of wl_keyboard.
  1946. </description>
  1947. <arg name="rate" type="int"
  1948. summary="the rate of repeating keys in characters per second"/>
  1949. <arg name="delay" type="int"
  1950. summary="delay in milliseconds since key down until repeating starts"/>
  1951. </event>
  1952. </interface>
  1953. <interface name="wl_touch" version="7">
  1954. <description summary="touchscreen input device">
  1955. The wl_touch interface represents a touchscreen
  1956. associated with a seat.
  1957. Touch interactions can consist of one or more contacts.
  1958. For each contact, a series of events is generated, starting
  1959. with a down event, followed by zero or more motion events,
  1960. and ending with an up event. Events relating to the same
  1961. contact point can be identified by the ID of the sequence.
  1962. </description>
  1963. <event name="down">
  1964. <description summary="touch down event and beginning of a touch sequence">
  1965. A new touch point has appeared on the surface. This touch point is
  1966. assigned a unique ID. Future events from this touch point reference
  1967. this ID. The ID ceases to be valid after a touch up event and may be
  1968. reused in the future.
  1969. </description>
  1970. <arg name="serial" type="uint" summary="serial number of the touch down event"/>
  1971. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  1972. <arg name="surface" type="object" interface="wl_surface" summary="surface touched"/>
  1973. <arg name="id" type="int" summary="the unique ID of this touch point"/>
  1974. <arg name="x" type="fixed" summary="surface-local x coordinate"/>
  1975. <arg name="y" type="fixed" summary="surface-local y coordinate"/>
  1976. </event>
  1977. <event name="up">
  1978. <description summary="end of a touch event sequence">
  1979. The touch point has disappeared. No further events will be sent for
  1980. this touch point and the touch point's ID is released and may be
  1981. reused in a future touch down event.
  1982. </description>
  1983. <arg name="serial" type="uint" summary="serial number of the touch up event"/>
  1984. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  1985. <arg name="id" type="int" summary="the unique ID of this touch point"/>
  1986. </event>
  1987. <event name="motion">
  1988. <description summary="update of touch point coordinates">
  1989. A touch point has changed coordinates.
  1990. </description>
  1991. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  1992. <arg name="id" type="int" summary="the unique ID of this touch point"/>
  1993. <arg name="x" type="fixed" summary="surface-local x coordinate"/>
  1994. <arg name="y" type="fixed" summary="surface-local y coordinate"/>
  1995. </event>
  1996. <event name="frame">
  1997. <description summary="end of touch frame event">
  1998. Indicates the end of a set of events that logically belong together.
  1999. A client is expected to accumulate the data in all events within the
  2000. frame before proceeding.
  2001. A wl_touch.frame terminates at least one event but otherwise no
  2002. guarantee is provided about the set of events within a frame. A client
  2003. must assume that any state not updated in a frame is unchanged from the
  2004. previously known state.
  2005. </description>
  2006. </event>
  2007. <event name="cancel">
  2008. <description summary="touch session cancelled">
  2009. Sent if the compositor decides the touch stream is a global
  2010. gesture. No further events are sent to the clients from that
  2011. particular gesture. Touch cancellation applies to all touch points
  2012. currently active on this client's surface. The client is
  2013. responsible for finalizing the touch points, future touch points on
  2014. this surface may reuse the touch point ID.
  2015. </description>
  2016. </event>
  2017. <!-- Version 3 additions -->
  2018. <request name="release" type="destructor" since="3">
  2019. <description summary="release the touch object"/>
  2020. </request>
  2021. <!-- Version 6 additions -->
  2022. <event name="shape" since="6">
  2023. <description summary="update shape of touch point">
  2024. Sent when a touchpoint has changed its shape.
  2025. This event does not occur on its own. It is sent before a
  2026. wl_touch.frame event and carries the new shape information for
  2027. any previously reported, or new touch points of that frame.
  2028. Other events describing the touch point such as wl_touch.down,
  2029. wl_touch.motion or wl_touch.orientation may be sent within the
  2030. same wl_touch.frame. A client should treat these events as a single
  2031. logical touch point update. The order of wl_touch.shape,
  2032. wl_touch.orientation and wl_touch.motion is not guaranteed.
  2033. A wl_touch.down event is guaranteed to occur before the first
  2034. wl_touch.shape event for this touch ID but both events may occur within
  2035. the same wl_touch.frame.
  2036. A touchpoint shape is approximated by an ellipse through the major and
  2037. minor axis length. The major axis length describes the longer diameter
  2038. of the ellipse, while the minor axis length describes the shorter
  2039. diameter. Major and minor are orthogonal and both are specified in
  2040. surface-local coordinates. The center of the ellipse is always at the
  2041. touchpoint location as reported by wl_touch.down or wl_touch.move.
  2042. This event is only sent by the compositor if the touch device supports
  2043. shape reports. The client has to make reasonable assumptions about the
  2044. shape if it did not receive this event.
  2045. </description>
  2046. <arg name="id" type="int" summary="the unique ID of this touch point"/>
  2047. <arg name="major" type="fixed" summary="length of the major axis in surface-local coordinates"/>
  2048. <arg name="minor" type="fixed" summary="length of the minor axis in surface-local coordinates"/>
  2049. </event>
  2050. <event name="orientation" since="6">
  2051. <description summary="update orientation of touch point">
  2052. Sent when a touchpoint has changed its orientation.
  2053. This event does not occur on its own. It is sent before a
  2054. wl_touch.frame event and carries the new shape information for
  2055. any previously reported, or new touch points of that frame.
  2056. Other events describing the touch point such as wl_touch.down,
  2057. wl_touch.motion or wl_touch.shape may be sent within the
  2058. same wl_touch.frame. A client should treat these events as a single
  2059. logical touch point update. The order of wl_touch.shape,
  2060. wl_touch.orientation and wl_touch.motion is not guaranteed.
  2061. A wl_touch.down event is guaranteed to occur before the first
  2062. wl_touch.orientation event for this touch ID but both events may occur
  2063. within the same wl_touch.frame.
  2064. The orientation describes the clockwise angle of a touchpoint's major
  2065. axis to the positive surface y-axis and is normalized to the -180 to
  2066. +180 degree range. The granularity of orientation depends on the touch
  2067. device, some devices only support binary rotation values between 0 and
  2068. 90 degrees.
  2069. This event is only sent by the compositor if the touch device supports
  2070. orientation reports.
  2071. </description>
  2072. <arg name="id" type="int" summary="the unique ID of this touch point"/>
  2073. <arg name="orientation" type="fixed" summary="angle between major axis and positive surface y-axis in degrees"/>
  2074. </event>
  2075. </interface>
  2076. <interface name="wl_output" version="3">
  2077. <description summary="compositor output region">
  2078. An output describes part of the compositor geometry. The
  2079. compositor works in the 'compositor coordinate system' and an
  2080. output corresponds to a rectangular area in that space that is
  2081. actually visible. This typically corresponds to a monitor that
  2082. displays part of the compositor space. This object is published
  2083. as global during start up, or when a monitor is hotplugged.
  2084. </description>
  2085. <enum name="subpixel">
  2086. <description summary="subpixel geometry information">
  2087. This enumeration describes how the physical
  2088. pixels on an output are laid out.
  2089. </description>
  2090. <entry name="unknown" value="0" summary="unknown geometry"/>
  2091. <entry name="none" value="1" summary="no geometry"/>
  2092. <entry name="horizontal_rgb" value="2" summary="horizontal RGB"/>
  2093. <entry name="horizontal_bgr" value="3" summary="horizontal BGR"/>
  2094. <entry name="vertical_rgb" value="4" summary="vertical RGB"/>
  2095. <entry name="vertical_bgr" value="5" summary="vertical BGR"/>
  2096. </enum>
  2097. <enum name="transform">
  2098. <description summary="transform from framebuffer to output">
  2099. This describes the transform that a compositor will apply to a
  2100. surface to compensate for the rotation or mirroring of an
  2101. output device.
  2102. The flipped values correspond to an initial flip around a
  2103. vertical axis followed by rotation.
  2104. The purpose is mainly to allow clients to render accordingly and
  2105. tell the compositor, so that for fullscreen surfaces, the
  2106. compositor will still be able to scan out directly from client
  2107. surfaces.
  2108. </description>
  2109. <entry name="normal" value="0" summary="no transform"/>
  2110. <entry name="90" value="1" summary="90 degrees counter-clockwise"/>
  2111. <entry name="180" value="2" summary="180 degrees counter-clockwise"/>
  2112. <entry name="270" value="3" summary="270 degrees counter-clockwise"/>
  2113. <entry name="flipped" value="4" summary="180 degree flip around a vertical axis"/>
  2114. <entry name="flipped_90" value="5" summary="flip and rotate 90 degrees counter-clockwise"/>
  2115. <entry name="flipped_180" value="6" summary="flip and rotate 180 degrees counter-clockwise"/>
  2116. <entry name="flipped_270" value="7" summary="flip and rotate 270 degrees counter-clockwise"/>
  2117. </enum>
  2118. <event name="geometry">
  2119. <description summary="properties of the output">
  2120. The geometry event describes geometric properties of the output.
  2121. The event is sent when binding to the output object and whenever
  2122. any of the properties change.
  2123. The physical size can be set to zero if it doesn't make sense for this
  2124. output (e.g. for projectors or virtual outputs).
  2125. Note: wl_output only advertises partial information about the output
  2126. position and identification. Some compositors, for instance those not
  2127. implementing a desktop-style output layout or those exposing virtual
  2128. outputs, might fake this information. Instead of using x and y, clients
  2129. should use xdg_output.logical_position. Instead of using make and model,
  2130. clients should use xdg_output.name and xdg_output.description.
  2131. </description>
  2132. <arg name="x" type="int"
  2133. summary="x position within the global compositor space"/>
  2134. <arg name="y" type="int"
  2135. summary="y position within the global compositor space"/>
  2136. <arg name="physical_width" type="int"
  2137. summary="width in millimeters of the output"/>
  2138. <arg name="physical_height" type="int"
  2139. summary="height in millimeters of the output"/>
  2140. <arg name="subpixel" type="int" enum="subpixel"
  2141. summary="subpixel orientation of the output"/>
  2142. <arg name="make" type="string"
  2143. summary="textual description of the manufacturer"/>
  2144. <arg name="model" type="string"
  2145. summary="textual description of the model"/>
  2146. <arg name="transform" type="int" enum="transform"
  2147. summary="transform that maps framebuffer to output"/>
  2148. </event>
  2149. <enum name="mode" bitfield="true">
  2150. <description summary="mode information">
  2151. These flags describe properties of an output mode.
  2152. They are used in the flags bitfield of the mode event.
  2153. </description>
  2154. <entry name="current" value="0x1"
  2155. summary="indicates this is the current mode"/>
  2156. <entry name="preferred" value="0x2"
  2157. summary="indicates this is the preferred mode"/>
  2158. </enum>
  2159. <event name="mode">
  2160. <description summary="advertise available modes for the output">
  2161. The mode event describes an available mode for the output.
  2162. The event is sent when binding to the output object and there
  2163. will always be one mode, the current mode. The event is sent
  2164. again if an output changes mode, for the mode that is now
  2165. current. In other words, the current mode is always the last
  2166. mode that was received with the current flag set.
  2167. Non-current modes are deprecated. A compositor can decide to only
  2168. advertise the current mode and never send other modes. Clients
  2169. should not rely on non-current modes.
  2170. The size of a mode is given in physical hardware units of
  2171. the output device. This is not necessarily the same as
  2172. the output size in the global compositor space. For instance,
  2173. the output may be scaled, as described in wl_output.scale,
  2174. or transformed, as described in wl_output.transform. Clients
  2175. willing to retrieve the output size in the global compositor
  2176. space should use xdg_output.logical_size instead.
  2177. The vertical refresh rate can be set to zero if it doesn't make
  2178. sense for this output (e.g. for virtual outputs).
  2179. Clients should not use the refresh rate to schedule frames. Instead,
  2180. they should use the wl_surface.frame event or the presentation-time
  2181. protocol.
  2182. Note: this information is not always meaningful for all outputs. Some
  2183. compositors, such as those exposing virtual outputs, might fake the
  2184. refresh rate or the size.
  2185. </description>
  2186. <arg name="flags" type="uint" enum="mode" summary="bitfield of mode flags"/>
  2187. <arg name="width" type="int" summary="width of the mode in hardware units"/>
  2188. <arg name="height" type="int" summary="height of the mode in hardware units"/>
  2189. <arg name="refresh" type="int" summary="vertical refresh rate in mHz"/>
  2190. </event>
  2191. <!-- Version 2 additions -->
  2192. <event name="done" since="2">
  2193. <description summary="sent all information about output">
  2194. This event is sent after all other properties have been
  2195. sent after binding to the output object and after any
  2196. other property changes done after that. This allows
  2197. changes to the output properties to be seen as
  2198. atomic, even if they happen via multiple events.
  2199. </description>
  2200. </event>
  2201. <event name="scale" since="2">
  2202. <description summary="output scaling properties">
  2203. This event contains scaling geometry information
  2204. that is not in the geometry event. It may be sent after
  2205. binding the output object or if the output scale changes
  2206. later. If it is not sent, the client should assume a
  2207. scale of 1.
  2208. A scale larger than 1 means that the compositor will
  2209. automatically scale surface buffers by this amount
  2210. when rendering. This is used for very high resolution
  2211. displays where applications rendering at the native
  2212. resolution would be too small to be legible.
  2213. It is intended that scaling aware clients track the
  2214. current output of a surface, and if it is on a scaled
  2215. output it should use wl_surface.set_buffer_scale with
  2216. the scale of the output. That way the compositor can
  2217. avoid scaling the surface, and the client can supply
  2218. a higher detail image.
  2219. </description>
  2220. <arg name="factor" type="int" summary="scaling factor of output"/>
  2221. </event>
  2222. <!-- Version 3 additions -->
  2223. <request name="release" type="destructor" since="3">
  2224. <description summary="release the output object">
  2225. Using this request a client can tell the server that it is not going to
  2226. use the output object anymore.
  2227. </description>
  2228. </request>
  2229. </interface>
  2230. <interface name="wl_region" version="1">
  2231. <description summary="region interface">
  2232. A region object describes an area.
  2233. Region objects are used to describe the opaque and input
  2234. regions of a surface.
  2235. </description>
  2236. <request name="destroy" type="destructor">
  2237. <description summary="destroy region">
  2238. Destroy the region. This will invalidate the object ID.
  2239. </description>
  2240. </request>
  2241. <request name="add">
  2242. <description summary="add rectangle to region">
  2243. Add the specified rectangle to the region.
  2244. </description>
  2245. <arg name="x" type="int" summary="region-local x coordinate"/>
  2246. <arg name="y" type="int" summary="region-local y coordinate"/>
  2247. <arg name="width" type="int" summary="rectangle width"/>
  2248. <arg name="height" type="int" summary="rectangle height"/>
  2249. </request>
  2250. <request name="subtract">
  2251. <description summary="subtract rectangle from region">
  2252. Subtract the specified rectangle from the region.
  2253. </description>
  2254. <arg name="x" type="int" summary="region-local x coordinate"/>
  2255. <arg name="y" type="int" summary="region-local y coordinate"/>
  2256. <arg name="width" type="int" summary="rectangle width"/>
  2257. <arg name="height" type="int" summary="rectangle height"/>
  2258. </request>
  2259. </interface>
  2260. <interface name="wl_subcompositor" version="1">
  2261. <description summary="sub-surface compositing">
  2262. The global interface exposing sub-surface compositing capabilities.
  2263. A wl_surface, that has sub-surfaces associated, is called the
  2264. parent surface. Sub-surfaces can be arbitrarily nested and create
  2265. a tree of sub-surfaces.
  2266. The root surface in a tree of sub-surfaces is the main
  2267. surface. The main surface cannot be a sub-surface, because
  2268. sub-surfaces must always have a parent.
  2269. A main surface with its sub-surfaces forms a (compound) window.
  2270. For window management purposes, this set of wl_surface objects is
  2271. to be considered as a single window, and it should also behave as
  2272. such.
  2273. The aim of sub-surfaces is to offload some of the compositing work
  2274. within a window from clients to the compositor. A prime example is
  2275. a video player with decorations and video in separate wl_surface
  2276. objects. This should allow the compositor to pass YUV video buffer
  2277. processing to dedicated overlay hardware when possible.
  2278. </description>
  2279. <request name="destroy" type="destructor">
  2280. <description summary="unbind from the subcompositor interface">
  2281. Informs the server that the client will not be using this
  2282. protocol object anymore. This does not affect any other
  2283. objects, wl_subsurface objects included.
  2284. </description>
  2285. </request>
  2286. <enum name="error">
  2287. <entry name="bad_surface" value="0"
  2288. summary="the to-be sub-surface is invalid"/>
  2289. </enum>
  2290. <request name="get_subsurface">
  2291. <description summary="give a surface the role sub-surface">
  2292. Create a sub-surface interface for the given surface, and
  2293. associate it with the given parent surface. This turns a
  2294. plain wl_surface into a sub-surface.
  2295. The to-be sub-surface must not already have another role, and it
  2296. must not have an existing wl_subsurface object. Otherwise a protocol
  2297. error is raised.
  2298. Adding sub-surfaces to a parent is a double-buffered operation on the
  2299. parent (see wl_surface.commit). The effect of adding a sub-surface
  2300. becomes visible on the next time the state of the parent surface is
  2301. applied.
  2302. This request modifies the behaviour of wl_surface.commit request on
  2303. the sub-surface, see the documentation on wl_subsurface interface.
  2304. </description>
  2305. <arg name="id" type="new_id" interface="wl_subsurface"
  2306. summary="the new sub-surface object ID"/>
  2307. <arg name="surface" type="object" interface="wl_surface"
  2308. summary="the surface to be turned into a sub-surface"/>
  2309. <arg name="parent" type="object" interface="wl_surface"
  2310. summary="the parent surface"/>
  2311. </request>
  2312. </interface>
  2313. <interface name="wl_subsurface" version="1">
  2314. <description summary="sub-surface interface to a wl_surface">
  2315. An additional interface to a wl_surface object, which has been
  2316. made a sub-surface. A sub-surface has one parent surface. A
  2317. sub-surface's size and position are not limited to that of the parent.
  2318. Particularly, a sub-surface is not automatically clipped to its
  2319. parent's area.
  2320. A sub-surface becomes mapped, when a non-NULL wl_buffer is applied
  2321. and the parent surface is mapped. The order of which one happens
  2322. first is irrelevant. A sub-surface is hidden if the parent becomes
  2323. hidden, or if a NULL wl_buffer is applied. These rules apply
  2324. recursively through the tree of surfaces.
  2325. The behaviour of a wl_surface.commit request on a sub-surface
  2326. depends on the sub-surface's mode. The possible modes are
  2327. synchronized and desynchronized, see methods
  2328. wl_subsurface.set_sync and wl_subsurface.set_desync. Synchronized
  2329. mode caches the wl_surface state to be applied when the parent's
  2330. state gets applied, and desynchronized mode applies the pending
  2331. wl_surface state directly. A sub-surface is initially in the
  2332. synchronized mode.
  2333. Sub-surfaces also have another kind of state, which is managed by
  2334. wl_subsurface requests, as opposed to wl_surface requests. This
  2335. state includes the sub-surface position relative to the parent
  2336. surface (wl_subsurface.set_position), and the stacking order of
  2337. the parent and its sub-surfaces (wl_subsurface.place_above and
  2338. .place_below). This state is applied when the parent surface's
  2339. wl_surface state is applied, regardless of the sub-surface's mode.
  2340. As the exception, set_sync and set_desync are effective immediately.
  2341. The main surface can be thought to be always in desynchronized mode,
  2342. since it does not have a parent in the sub-surfaces sense.
  2343. Even if a sub-surface is in desynchronized mode, it will behave as
  2344. in synchronized mode, if its parent surface behaves as in
  2345. synchronized mode. This rule is applied recursively throughout the
  2346. tree of surfaces. This means, that one can set a sub-surface into
  2347. synchronized mode, and then assume that all its child and grand-child
  2348. sub-surfaces are synchronized, too, without explicitly setting them.
  2349. If the wl_surface associated with the wl_subsurface is destroyed, the
  2350. wl_subsurface object becomes inert. Note, that destroying either object
  2351. takes effect immediately. If you need to synchronize the removal
  2352. of a sub-surface to the parent surface update, unmap the sub-surface
  2353. first by attaching a NULL wl_buffer, update parent, and then destroy
  2354. the sub-surface.
  2355. If the parent wl_surface object is destroyed, the sub-surface is
  2356. unmapped.
  2357. </description>
  2358. <request name="destroy" type="destructor">
  2359. <description summary="remove sub-surface interface">
  2360. The sub-surface interface is removed from the wl_surface object
  2361. that was turned into a sub-surface with a
  2362. wl_subcompositor.get_subsurface request. The wl_surface's association
  2363. to the parent is deleted, and the wl_surface loses its role as
  2364. a sub-surface. The wl_surface is unmapped immediately.
  2365. </description>
  2366. </request>
  2367. <enum name="error">
  2368. <entry name="bad_surface" value="0"
  2369. summary="wl_surface is not a sibling or the parent"/>
  2370. </enum>
  2371. <request name="set_position">
  2372. <description summary="reposition the sub-surface">
  2373. This schedules a sub-surface position change.
  2374. The sub-surface will be moved so that its origin (top left
  2375. corner pixel) will be at the location x, y of the parent surface
  2376. coordinate system. The coordinates are not restricted to the parent
  2377. surface area. Negative values are allowed.
  2378. The scheduled coordinates will take effect whenever the state of the
  2379. parent surface is applied. When this happens depends on whether the
  2380. parent surface is in synchronized mode or not. See
  2381. wl_subsurface.set_sync and wl_subsurface.set_desync for details.
  2382. If more than one set_position request is invoked by the client before
  2383. the commit of the parent surface, the position of a new request always
  2384. replaces the scheduled position from any previous request.
  2385. The initial position is 0, 0.
  2386. </description>
  2387. <arg name="x" type="int" summary="x coordinate in the parent surface"/>
  2388. <arg name="y" type="int" summary="y coordinate in the parent surface"/>
  2389. </request>
  2390. <request name="place_above">
  2391. <description summary="restack the sub-surface">
  2392. This sub-surface is taken from the stack, and put back just
  2393. above the reference surface, changing the z-order of the sub-surfaces.
  2394. The reference surface must be one of the sibling surfaces, or the
  2395. parent surface. Using any other surface, including this sub-surface,
  2396. will cause a protocol error.
  2397. The z-order is double-buffered. Requests are handled in order and
  2398. applied immediately to a pending state. The final pending state is
  2399. copied to the active state the next time the state of the parent
  2400. surface is applied. When this happens depends on whether the parent
  2401. surface is in synchronized mode or not. See wl_subsurface.set_sync and
  2402. wl_subsurface.set_desync for details.
  2403. A new sub-surface is initially added as the top-most in the stack
  2404. of its siblings and parent.
  2405. </description>
  2406. <arg name="sibling" type="object" interface="wl_surface"
  2407. summary="the reference surface"/>
  2408. </request>
  2409. <request name="place_below">
  2410. <description summary="restack the sub-surface">
  2411. The sub-surface is placed just below the reference surface.
  2412. See wl_subsurface.place_above.
  2413. </description>
  2414. <arg name="sibling" type="object" interface="wl_surface"
  2415. summary="the reference surface"/>
  2416. </request>
  2417. <request name="set_sync">
  2418. <description summary="set sub-surface to synchronized mode">
  2419. Change the commit behaviour of the sub-surface to synchronized
  2420. mode, also described as the parent dependent mode.
  2421. In synchronized mode, wl_surface.commit on a sub-surface will
  2422. accumulate the committed state in a cache, but the state will
  2423. not be applied and hence will not change the compositor output.
  2424. The cached state is applied to the sub-surface immediately after
  2425. the parent surface's state is applied. This ensures atomic
  2426. updates of the parent and all its synchronized sub-surfaces.
  2427. Applying the cached state will invalidate the cache, so further
  2428. parent surface commits do not (re-)apply old state.
  2429. See wl_subsurface for the recursive effect of this mode.
  2430. </description>
  2431. </request>
  2432. <request name="set_desync">
  2433. <description summary="set sub-surface to desynchronized mode">
  2434. Change the commit behaviour of the sub-surface to desynchronized
  2435. mode, also described as independent or freely running mode.
  2436. In desynchronized mode, wl_surface.commit on a sub-surface will
  2437. apply the pending state directly, without caching, as happens
  2438. normally with a wl_surface. Calling wl_surface.commit on the
  2439. parent surface has no effect on the sub-surface's wl_surface
  2440. state. This mode allows a sub-surface to be updated on its own.
  2441. If cached state exists when wl_surface.commit is called in
  2442. desynchronized mode, the pending state is added to the cached
  2443. state, and applied as a whole. This invalidates the cache.
  2444. Note: even if a sub-surface is set to desynchronized, a parent
  2445. sub-surface may override it to behave as synchronized. For details,
  2446. see wl_subsurface.
  2447. If a surface's parent surface behaves as desynchronized, then
  2448. the cached state is applied on set_desync.
  2449. </description>
  2450. </request>
  2451. </interface>
  2452. </protocol>