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