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