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