1 <?xml version="1.0" encoding="UTF-8"?>
2 <protocol name="agl_shell">
4 Copyright © 2019, 2022 Collabora, Ltd.
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
13 The above copyright notice and this permission notice (including the next
14 paragraph) shall be included in all copies or substantial portions of the
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 DEALINGS IN THE SOFTWARE.
25 <interface name="agl_shell" version="10">
26 <description summary="user interface for Automotive Grade Linux platform">
27 Starting with version 2 of the protocol, the client is required to wait
28 for the 'bound_ok' or 'bound_fail' events in order to proceed further.
30 In case the client gets a 'bound_fail' event then it should consider that
31 there's another client already bound to the agl_shell protocol.
32 A client that receives a 'bound_ok' event should consider that there's
33 no other client already bound to the interface and can proceed further.
35 If the client uses an older version of the protocol it will receive
36 automatically an error and the compositor will terminate the connection,
37 if there's another client already bound the interface.
39 If the client receives the 'bound_fail' event and attempts to use the
40 interface further it will receive an error and the compositor will
41 terminate the connection. After the 'bound_fail' event was received the
42 client should call the destructor, which has been added with version 2
43 of the protocol. The client is free to try at a later point in time to
44 see if it will receive the 'bound_ok' event, but there's no explicit way
45 of finding out when that event will be delivered.
46 It is assumed that it can infer that information through other
51 <entry name="invalid_argument" value="0"/>
52 <entry name="background_exists" value="1"/>
53 <entry name="panel_exists" value="2"/>
57 <entry name="top" value="0"/>
58 <entry name="bottom" value="1"/>
59 <entry name="left" value="2"/>
60 <entry name="right" value="3"/>
63 <enum name="app_state" since="3">
64 <entry name="started" value="0"/>
65 <entry name="terminated" value="1"/>
66 <entry name="activated" value="2"/>
67 <entry name="deactivated" value="3"/>
70 <request name="ready">
71 <description summary="client is ready to be shown">
72 Tell the server that this client is ready to be shown. The server
73 will delay presentation during start-up until all shell clients are
74 ready to be shown, and will display a black screen instead.
75 This gives the client an opportunity to set up and configure several
76 surfaces into a coherent interface.
78 The client that binds to this interface must send this request, otherwise
79 they may stall the compositor unnecessarily.
81 If this request is called after the compositor has already finished
82 start-up, no operation is performed.
86 <request name="set_background">
87 <description summary="set surface as output's background">
88 Set the surface to act as the background of an output. After this
89 request, the server will immediately send a configure event with
90 the dimensions the client should use to cover the entire output.
92 The surface must have a "desktop" surface role, as supported by
95 Only a single surface may be the background for any output. If a
96 background surface already exists, a protocol error is raised.
98 <arg name="surface" type="object" interface="wl_surface"/>
99 <arg name="output" type="object" interface="wl_output"/>
102 <request name="set_panel">
103 <description summary="set surface as panel">
104 Set the surface to act as a panel of an output. The 'edge' argument
105 says what edge of the output the surface will be anchored to.
106 After this request, the server will send a configure event with the
107 corresponding width/height that the client should use, and 0 for the
108 other dimension. E.g. if the edge is 'top', the width will be the
109 output's width, and the height will be 0.
111 The surface must have a "desktop" surface role, as supported by
114 The compositor will take the panel's window geometry into account when
115 positioning other windows, so the panels are not covered.
117 XXX: What happens if e.g. both top and left are used at the same time?
118 Who gets to have the corner?
120 Only a single surface may be the panel for an output's edge. If a
121 surface already exists on an edge, a protocol error is raised.
123 <arg name="surface" type="object" interface="wl_surface"/>
124 <arg name="output" type="object" interface="wl_output"/>
125 <arg name="edge" type="uint" enum="edge"/>
128 <request name="activate_app">
129 <description summary="make client current window">
130 Ask the compositor to make a toplevel to become the current/focused
131 window for window management purposes.
133 See xdg_toplevel.set_app_id from the xdg-shell protocol for a
134 description of app_id.
136 If multiple toplevels have the same app_id, the result is unspecified.
138 XXX: Do we need feedback to say it didn't work? (e.g. client does
141 <arg name="app_id" type="string"/>
142 <arg name="output" type="object" interface="wl_output"/>
145 <event name="bound_ok" since="2">
146 <description summary="event sent if binding was ok">
147 Informs the client that it was able to bind the agl_shell
148 interface succesfully. Clients are required to wait for this
149 event before continuing further.
153 <event name="bound_fail" since="2">
154 <description summary="event sent if binding was nok">
155 Informs the client that binding to the agl_shell interface was
156 unsuccesfull. Clients are required to wait for this event for
161 <request name="destroy" type="destructor" since="2">
162 <description summary="destroys the factory object">
166 <event name="app_state" since="3">
167 <description summary="event sent when an application suffered state modification">
168 Informs the client that an application has changed its state to another,
169 specified by the app_state enum. Client can use this event to track
170 current application state. For instance to know when the application has
171 started, or when terminated/stopped.
173 <arg name="app_id" type="string"/>
174 <arg name="state" type="uint" enum="app_state"/>
177 <request name="set_activate_region" since="4">
178 <description summary="sets a specific region to activate">
179 A hint for the compositor to use a custom area, rather than
180 inferring the activation area. If any panels are used
181 the compositor computes the activation area by subtracting the
182 panels geometry area. If no panels are used then the entire output
183 is being used. This request changes that as to hint the compositor
184 to use the supplied rectangle and ignore any potential panels
185 that might been set-up previously.
187 In order for this request to take effect it will need to happen
188 before the 'ready' request in order for the compositor to make use of it.
189 Note that any 'set_panel' request be will not be honored, if this request
192 The x and y coordinates use the top-left corner as the origin. The
193 rectangle area shouldn't exceed the output area, while an area smaller
194 than the output, would basically result in showing up the background
197 <arg name="output" type="object" interface="wl_output"/>
198 <arg name="x" type="int" summary="x position of rectangle"/>
199 <arg name="y" type="int" summary="y position of rectangle"/>
200 <arg name="width" type="int" summary="width of rectangle"/>
201 <arg name="height" type="int" summary="height of rectangle"/>
204 <request name="deactivate_app" since="5">
205 <description summary="de-activate/hide window identified by app_id">
206 Ask the compositor to hide the toplevel window for window
207 management purposes. Depending on the window role, this request
208 will either display the previously active window (or the background
209 in case there's no previously active surface) or temporarily (or
210 until a 'activate_app' is called upon) hide the surface.
212 All the surfaces are identifiable by using the app_id, and no actions
213 are taken in case the app_id is not/was not present.
215 See xdg_toplevel.set_app_id from the xdg-shell protocol for a
216 description of app_id.
218 <arg name="app_id" type="string"/>
221 <request name="set_app_float" since="6">
222 <description summary="set the window identified by app_id as float">
223 Makes the application identified by app_id as floating. If the
224 application's window is already mapped, in a maximized, normal state,
225 it would transition to the float state.
227 For applications that want to modify their own state, this request
228 must be done before the initial surface commit in order to take effect.
230 If the application is already in floating state, this request wouldn't
233 There's no persistence of this request, once the application terminated
234 you'll to issue this request again for that particular app_id.
236 The x, and y values would be initial position of the window where the
237 window surface will be placed.
239 See xdg_toplevel.set_app_id from the xdg-shell protocol for a
240 description of app_id.
242 <arg name="app_id" type="string"/>
243 <arg name="x" type="int" summary="x position"/>
244 <arg name="y" type="int" summary="y position"/>
247 <request name="set_app_normal" since="6">
248 <description summary="set the window identified by app_id as normally started">
249 Returns the application identified by app_id as it was in the normal state.
250 This is useful to come back from other states to the maximized state, the
251 normal state applications are started.
253 <arg name="app_id" type="string"/>
256 <request name="set_app_fullscreen" since="7">
257 <description summary="">
258 Makes the application identified by app_id as fullscreen. If the
259 application's window is already mapped, in a maximized, normal state,
260 it would transition to the fullscreen state.
262 For applications that want to modify their own state, this request
263 must be done before the initial surface commit in order to take effect.
265 If the application is already in fullscreen state, this request wouldn't
268 There's no persistence of this request, once the application terminated
269 you'll to issue this request again for that particular app_id.
271 See xdg_toplevel.set_app_id from the xdg-shell protocol for a
272 description of app_id.
274 <arg name="app_id" type="string"/>
277 <request name="set_app_output" since="8">
278 <description summary="assign an application to a particular output">
279 this would allow the compositor to place an application on a particular
280 output, if that output is indeed available. this can happen before
281 application is started which would make the application start on that
282 particular output. if the application is already started it would
283 move the application to that output.
285 there's no persistence of this request, once the application terminated
286 you'll need to issue this request again for that particular app_id.
288 see xdg_toplevel.set_app_id from the xdg-shell protocol for a
289 description of app_id.
291 <arg name="app_id" type="string"/>
292 <arg name="output" type="object" interface="wl_output"/>
295 <event name="app_on_output" since="8">
296 <description summary="Event sent as a reponse to set_app_output">
297 Clients can use this event to be notified when an application
298 wants to be displayed on a certain output. This event is sent in
299 response to the set_app_output request.
301 See xdg_toplevel.set_app_id from the xdg-shell protocol for a
302 description of app_id.
304 <arg name="app_id" type="string"/>
305 <arg name="output_name" type="string"/>
308 <request name="set_app_position" since="9">
309 <description summary="move window to a specific position">
310 Clients can inform the compositor to position a floating type of window
311 at the specific location, pointed by x and y value. If the window is
312 not a floating type, the request will be discarded. Note that
313 positioning doesn't take output into consideration nor does orientation
314 of the outpus. It is expected that the client knows already where the
315 position is localed in global coordonate space. If the window doesn't
316 exist the compositor will ignore the request. For this request to
317 function properly the window would first to be set as floating and then
318 it can be moved using this request.
320 see xdg_toplevel.set_app_id from the xdg-shell protocol for a
321 description of app_id.
323 <arg name="app_id" type="string"/>
324 <arg name="x" type="int"/>
325 <arg name="y" type="int"/>
328 <request name="set_app_scale" since="10">
329 <description summary="scale window to a specific rectangle">
330 Clients can inform the compositor to scale a floating type of window
331 to the values specified in width and height. If the window is
332 not a floating type, the request will be discarded. If the window
333 doesn't exist the compositor will ignore the request. For this request
334 to function properly the window would first to be set as floating
335 and then it can be moved using this request.
338 see xdg_toplevel.set_app_id from the xdg-shell protocol for a
339 description of app_id.
341 <arg name="app_id" type="string"/>
342 <arg name="width" type="int"/>
343 <arg name="height" type="int"/>
347 <interface name="agl_shell_ext" version="1">
348 <description summary="extended user interface for Automotive Grade Linux platform">
349 This interface allows another client bind to the agl_shell interface,
350 while there's another shell client already present.
352 The client should first bind to this interface and then inform the
353 compositor with the 'doas_shell_client' request and it wants to bind to
354 the agl_shell interface. The client is still expected, if using a new
355 version of the agl_shell interface, to wait for the 'bound_ok' and
356 'bound_fail' events before issueing any other requests/events.
358 Note that this interface has its limitations, and the compositor would
359 still refuse the act for 'set_panel' or 'set_background' requests
360 of the agl_shell interface if there's already a client that used them.
362 Any other requests or events should be delievered and handled as it would
363 a client bound to the agl_shell interface.
366 <enum name="doas_shell_client_status">
367 <entry name="success" value="0"/>
368 <entry name="failed" value="1"/>
371 <request name="destroy" type="destructor">
372 <description summary="destroys the factory object">
373 Call the destructor once you're ready with agl_shell_ext interface.
374 This would reset the state and would make any requests made
375 on the agl_shell interface be terminated. The client would need
376 to bind again the agl_shell_ext and issue a 'doas_shell_client'
381 <request name="doas_shell_client">
382 <description summary="Informs the compositor it wants to bind to the
383 agl_shell interface">
384 Prior to binding to agl_shell interface, this request would inform
385 the compositor that it wants to gain access the agl_shell interface.
386 The client is expected to wait for 'doas_shell_client_done' event and
387 check for a successful status before going further with binding to
388 the agl_shell interface.
392 <event name="doas_done">
393 <description summary="event sent as a reply to doas_shell_client">
394 The client should check the status event to verify that the
395 compositor was able to handle the request.
397 <arg name="status" type="uint" enum="doas_shell_client_status"/>