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