1<?xml version="1.0" encoding="UTF-8"?> 2<protocol name="fullscreen_shell_unstable_v1"> 3 4 <copyright> 5 Copyright © 2016 Yong Bakos 6 Copyright © 2015 Jason Ekstrand 7 Copyright © 2015 Jonas Ådahl 8 9 Permission is hereby granted, free of charge, to any person obtaining a 10 copy of this software and associated documentation files (the "Software"), 11 to deal in the Software without restriction, including without limitation 12 the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 and/or sell copies of the Software, and to permit persons to whom the 14 Software is furnished to do so, subject to the following conditions: 15 16 The above copyright notice and this permission notice (including the next 17 paragraph) shall be included in all copies or substantial portions of the 18 Software. 19 20 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 DEALINGS IN THE SOFTWARE. 27 </copyright> 28 29 <interface name="zwp_fullscreen_shell_v1" version="1"> 30 <description summary="displays a single surface per output"> 31 Displays a single surface per output. 32 33 This interface provides a mechanism for a single client to display 34 simple full-screen surfaces. While there technically may be multiple 35 clients bound to this interface, only one of those clients should be 36 shown at a time. 37 38 To present a surface, the client uses either the present_surface or 39 present_surface_for_mode requests. Presenting a surface takes effect 40 on the next wl_surface.commit. See the individual requests for 41 details about scaling and mode switches. 42 43 The client can have at most one surface per output at any time. 44 Requesting a surface to be presented on an output that already has a 45 surface replaces the previously presented surface. Presenting a null 46 surface removes its content and effectively disables the output. 47 Exactly what happens when an output is "disabled" is 48 compositor-specific. The same surface may be presented on multiple 49 outputs simultaneously. 50 51 Once a surface is presented on an output, it stays on that output 52 until either the client removes it or the compositor destroys the 53 output. This way, the client can update the output's contents by 54 simply attaching a new buffer. 55 56 Warning! The protocol described in this file is experimental and 57 backward incompatible changes may be made. Backward compatible changes 58 may be added together with the corresponding interface version bump. 59 Backward incompatible changes are done by bumping the version number in 60 the protocol and interface names and resetting the interface version. 61 Once the protocol is to be declared stable, the 'z' prefix and the 62 version number in the protocol and interface names are removed and the 63 interface version number is reset. 64 </description> 65 66 <request name="release" type="destructor"> 67 <description summary="release the wl_fullscreen_shell interface"> 68 Release the binding from the wl_fullscreen_shell interface. 69 70 This destroys the server-side object and frees this binding. If 71 the client binds to wl_fullscreen_shell multiple times, it may wish 72 to free some of those bindings. 73 </description> 74 </request> 75 76 <enum name="capability"> 77 <description summary="capabilities advertised by the compositor"> 78 Various capabilities that can be advertised by the compositor. They 79 are advertised one-at-a-time when the wl_fullscreen_shell interface is 80 bound. See the wl_fullscreen_shell.capability event for more details. 81 82 ARBITRARY_MODES: 83 This is a hint to the client that indicates that the compositor is 84 capable of setting practically any mode on its outputs. If this 85 capability is provided, wl_fullscreen_shell.present_surface_for_mode 86 will almost never fail and clients should feel free to set whatever 87 mode they like. If the compositor does not advertise this, it may 88 still support some modes that are not advertised through wl_global.mode 89 but it is less likely. 90 91 CURSOR_PLANE: 92 This is a hint to the client that indicates that the compositor can 93 handle a cursor surface from the client without actually compositing. 94 This may be because of a hardware cursor plane or some other mechanism. 95 If the compositor does not advertise this capability then setting 96 wl_pointer.cursor may degrade performance or be ignored entirely. If 97 CURSOR_PLANE is not advertised, it is recommended that the client draw 98 its own cursor and set wl_pointer.cursor(NULL). 99 </description> 100 <entry name="arbitrary_modes" value="1" summary="compositor is capable of almost any output mode"/> 101 <entry name="cursor_plane" value="2" summary="compositor has a separate cursor plane"/> 102 </enum> 103 104 <event name="capability"> 105 <description summary="advertises a capability of the compositor"> 106 Advertises a single capability of the compositor. 107 108 When the wl_fullscreen_shell interface is bound, this event is emitted 109 once for each capability advertised. Valid capabilities are given by 110 the wl_fullscreen_shell.capability enum. If clients want to take 111 advantage of any of these capabilities, they should use a 112 wl_display.sync request immediately after binding to ensure that they 113 receive all the capability events. 114 </description> 115 <arg name="capability" type="uint"/> 116 </event> 117 118 <enum name="present_method"> 119 <description summary="different method to set the surface fullscreen"> 120 Hints to indicate to the compositor how to deal with a conflict 121 between the dimensions of the surface and the dimensions of the 122 output. The compositor is free to ignore this parameter. 123 </description> 124 <entry name="default" value="0" summary="no preference, apply default policy"/> 125 <entry name="center" value="1" summary="center the surface on the output"/> 126 <entry name="zoom" value="2" summary="scale the surface, preserving aspect ratio, to the largest size that will fit on the output" /> 127 <entry name="zoom_crop" value="3" summary="scale the surface, preserving aspect ratio, to fully fill the output cropping if needed" /> 128 <entry name="stretch" value="4" summary="scale the surface to the size of the output ignoring aspect ratio" /> 129 </enum> 130 131 <request name="present_surface"> 132 <description summary="present surface for display"> 133 Present a surface on the given output. 134 135 If the output is null, the compositor will present the surface on 136 whatever display (or displays) it thinks best. In particular, this 137 may replace any or all surfaces currently presented so it should 138 not be used in combination with placing surfaces on specific 139 outputs. 140 141 The method parameter is a hint to the compositor for how the surface 142 is to be presented. In particular, it tells the compositor how to 143 handle a size mismatch between the presented surface and the 144 output. The compositor is free to ignore this parameter. 145 146 The "zoom", "zoom_crop", and "stretch" methods imply a scaling 147 operation on the surface. This will override any kind of output 148 scaling, so the buffer_scale property of the surface is effectively 149 ignored. 150 </description> 151 <arg name="surface" type="object" interface="wl_surface" allow-null="true"/> 152 <arg name="method" type="uint"/> 153 <arg name="output" type="object" interface="wl_output" allow-null="true"/> 154 </request> 155 156 <request name="present_surface_for_mode"> 157 <description summary="present surface for display at a particular mode"> 158 Presents a surface on the given output for a particular mode. 159 160 If the current size of the output differs from that of the surface, 161 the compositor will attempt to change the size of the output to 162 match the surface. The result of the mode-switch operation will be 163 returned via the provided wl_fullscreen_shell_mode_feedback object. 164 165 If the current output mode matches the one requested or if the 166 compositor successfully switches the mode to match the surface, 167 then the mode_successful event will be sent and the output will 168 contain the contents of the given surface. If the compositor 169 cannot match the output size to the surface size, the mode_failed 170 will be sent and the output will contain the contents of the 171 previously presented surface (if any). If another surface is 172 presented on the given output before either of these has a chance 173 to happen, the present_cancelled event will be sent. 174 175 Due to race conditions and other issues unknown to the client, no 176 mode-switch operation is guaranteed to succeed. However, if the 177 mode is one advertised by wl_output.mode or if the compositor 178 advertises the ARBITRARY_MODES capability, then the client should 179 expect that the mode-switch operation will usually succeed. 180 181 If the size of the presented surface changes, the resulting output 182 is undefined. The compositor may attempt to change the output mode 183 to compensate. However, there is no guarantee that a suitable mode 184 will be found and the client has no way to be notified of success 185 or failure. 186 187 The framerate parameter specifies the desired framerate for the 188 output in mHz. The compositor is free to ignore this parameter. A 189 value of 0 indicates that the client has no preference. 190 191 If the value of wl_output.scale differs from wl_surface.buffer_scale, 192 then the compositor may choose a mode that matches either the buffer 193 size or the surface size. In either case, the surface will fill the 194 output. 195 </description> 196 <arg name="surface" type="object" interface="wl_surface"/> 197 <arg name="output" type="object" interface="wl_output"/> 198 <arg name="framerate" type="int"/> 199 <arg name="feedback" type="new_id" interface="zwp_fullscreen_shell_mode_feedback_v1"/> 200 </request> 201 202 <enum name="error"> 203 <description summary="wl_fullscreen_shell error values"> 204 These errors can be emitted in response to wl_fullscreen_shell requests. 205 </description> 206 <entry name="invalid_method" value="0" summary="present_method is not known"/> 207 </enum> 208 </interface> 209 210 <interface name="zwp_fullscreen_shell_mode_feedback_v1" version="1"> 211 <event name="mode_successful"> 212 <description summary="mode switch succeeded"> 213 This event indicates that the attempted mode switch operation was 214 successful. A surface of the size requested in the mode switch 215 will fill the output without scaling. 216 217 Upon receiving this event, the client should destroy the 218 wl_fullscreen_shell_mode_feedback object. 219 </description> 220 </event> 221 222 <event name="mode_failed"> 223 <description summary="mode switch failed"> 224 This event indicates that the attempted mode switch operation 225 failed. This may be because the requested output mode is not 226 possible or it may mean that the compositor does not want to allow it. 227 228 Upon receiving this event, the client should destroy the 229 wl_fullscreen_shell_mode_feedback object. 230 </description> 231 </event> 232 233 <event name="present_cancelled"> 234 <description summary="mode switch cancelled"> 235 This event indicates that the attempted mode switch operation was 236 cancelled. Most likely this is because the client requested a 237 second mode switch before the first one completed. 238 239 Upon receiving this event, the client should destroy the 240 wl_fullscreen_shell_mode_feedback object. 241 </description> 242 </event> 243 </interface> 244 245</protocol> 246