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="11">
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 <enum name="tile_orientation" since="11">
71 <entry name="none" value="0"/>
72 <entry name="left" value="1"/>
73 <entry name="right" value="2"/>
74 <entry name="top" value="3"/>
75 <entry name="bottom" value="4"/>
78 <request name="ready">
79 <description summary="client is ready to be shown">
80 Tell the server that this client is ready to be shown. The server
81 will delay presentation during start-up until all shell clients are
82 ready to be shown, and will display a black screen instead.
83 This gives the client an opportunity to set up and configure several
84 surfaces into a coherent interface.
86 The client that binds to this interface must send this request, otherwise
87 they may stall the compositor unnecessarily.
89 If this request is called after the compositor has already finished
90 start-up, no operation is performed.
94 <request name="set_background">
95 <description summary="set surface as output's background">
96 Set the surface to act as the background of an output. After this
97 request, the server will immediately send a configure event with
98 the dimensions the client should use to cover the entire output.
100 The surface must have a "desktop" surface role, as supported by
103 Only a single surface may be the background for any output. If a
104 background surface already exists, a protocol error is raised.
106 <arg name="surface" type="object" interface="wl_surface"/>
107 <arg name="output" type="object" interface="wl_output"/>
110 <request name="set_panel">
111 <description summary="set surface as panel">
112 Set the surface to act as a panel of an output. The 'edge' argument
113 says what edge of the output the surface will be anchored to.
114 After this request, the server will send a configure event with the
115 corresponding width/height that the client should use, and 0 for the
116 other dimension. E.g. if the edge is 'top', the width will be the
117 output's width, and the height will be 0.
119 The surface must have a "desktop" surface role, as supported by
122 The compositor will take the panel's window geometry into account when
123 positioning other windows, so the panels are not covered.
125 XXX: What happens if e.g. both top and left are used at the same time?
126 Who gets to have the corner?
128 Only a single surface may be the panel for an output's edge. If a
129 surface already exists on an edge, a protocol error is raised.
131 <arg name="surface" type="object" interface="wl_surface"/>
132 <arg name="output" type="object" interface="wl_output"/>
133 <arg name="edge" type="uint" enum="edge"/>
136 <request name="activate_app">
137 <description summary="make client current window">
138 Ask the compositor to make a toplevel to become the current/focused
139 window for window management purposes.
141 See xdg_toplevel.set_app_id from the xdg-shell protocol for a
142 description of app_id.
144 If multiple toplevels have the same app_id, the result is unspecified.
146 XXX: Do we need feedback to say it didn't work? (e.g. client does
149 <arg name="app_id" type="string"/>
150 <arg name="output" type="object" interface="wl_output"/>
153 <event name="bound_ok" since="2">
154 <description summary="event sent if binding was ok">
155 Informs the client that it was able to bind the agl_shell
156 interface succesfully. Clients are required to wait for this
157 event before continuing further.
161 <event name="bound_fail" since="2">
162 <description summary="event sent if binding was nok">
163 Informs the client that binding to the agl_shell interface was
164 unsuccesfull. Clients are required to wait for this event for
169 <request name="destroy" type="destructor" since="2">
170 <description summary="destroys the factory object">
174 <event name="app_state" since="3">
175 <description summary="event sent when an application suffered state modification">
176 Informs the client that an application has changed its state to another,
177 specified by the app_state enum. Client can use this event to track
178 current application state. For instance to know when the application has
179 started, or when terminated/stopped.
181 <arg name="app_id" type="string"/>
182 <arg name="state" type="uint" enum="app_state"/>
185 <request name="set_activate_region" since="4">
186 <description summary="sets a specific region to activate">
187 A hint for the compositor to use a custom area, rather than
188 inferring the activation area. If any panels are used
189 the compositor computes the activation area by subtracting the
190 panels geometry area. If no panels are used then the entire output
191 is being used. This request changes that as to hint the compositor
192 to use the supplied rectangle and ignore any potential panels
193 that might been set-up previously.
195 In order for this request to take effect it will need to happen
196 before the 'ready' request in order for the compositor to make use of it.
197 Note that any 'set_panel' request be will not be honored, if this request
200 The x and y coordinates use the top-left corner as the origin. The
201 rectangle area shouldn't exceed the output area, while an area smaller
202 than the output, would basically result in showing up the background
205 <arg name="output" type="object" interface="wl_output"/>
206 <arg name="x" type="int" summary="x position of rectangle"/>
207 <arg name="y" type="int" summary="y position of rectangle"/>
208 <arg name="width" type="int" summary="width of rectangle"/>
209 <arg name="height" type="int" summary="height of rectangle"/>
212 <request name="deactivate_app" since="5">
213 <description summary="de-activate/hide window identified by app_id">
214 Ask the compositor to hide the toplevel window for window
215 management purposes. Depending on the window role, this request
216 will either display the previously active window (or the background
217 in case there's no previously active surface) or temporarily (or
218 until a 'activate_app' is called upon) hide the surface.
220 All the surfaces are identifiable by using the app_id, and no actions
221 are taken in case the app_id is not/was not present.
223 See xdg_toplevel.set_app_id from the xdg-shell protocol for a
224 description of app_id.
226 <arg name="app_id" type="string"/>
229 <request name="set_app_float" since="6">
230 <description summary="set the window identified by app_id as float">
231 Makes the application identified by app_id as floating. If the
232 application's window is already mapped, in a maximized, normal state,
233 it would transition to the float state.
235 For applications that want to modify their own state, this request
236 must be done before the initial surface commit in order to take effect.
238 If the application is already in floating state, this request wouldn't
241 There's no persistence of this request, once the application terminated
242 you'll to issue this request again for that particular app_id.
244 The x, and y values would be initial position of the window where the
245 window surface will be placed.
247 See xdg_toplevel.set_app_id from the xdg-shell protocol for a
248 description of app_id.
250 <arg name="app_id" type="string"/>
251 <arg name="x" type="int" summary="x position"/>
252 <arg name="y" type="int" summary="y position"/>
255 <request name="set_app_normal" since="6">
256 <description summary="set the window identified by app_id as normally started">
257 Returns the application identified by app_id as it was in the normal state.
258 This is useful to come back from other states to the maximized state, the
259 normal state applications are started.
261 <arg name="app_id" type="string"/>
264 <request name="set_app_fullscreen" since="7">
265 <description summary="">
266 Makes the application identified by app_id as fullscreen. If the
267 application's window is already mapped, in a maximized, normal state,
268 it would transition to the fullscreen state.
270 For applications that want to modify their own state, this request
271 must be done before the initial surface commit in order to take effect.
273 If the application is already in fullscreen state, this request wouldn't
276 There's no persistence of this request, once the application terminated
277 you'll to issue this request again for that particular app_id.
279 See xdg_toplevel.set_app_id from the xdg-shell protocol for a
280 description of app_id.
282 <arg name="app_id" type="string"/>
285 <request name="set_app_output" since="8">
286 <description summary="assign an application to a particular output">
287 this would allow the compositor to place an application on a particular
288 output, if that output is indeed available. this can happen before
289 application is started which would make the application start on that
290 particular output. if the application is already started it would
291 move the application to that output.
293 there's no persistence of this request, once the application terminated
294 you'll need to issue this request again for that particular app_id.
296 see xdg_toplevel.set_app_id from the xdg-shell protocol for a
297 description of app_id.
299 <arg name="app_id" type="string"/>
300 <arg name="output" type="object" interface="wl_output"/>
303 <event name="app_on_output" since="8">
304 <description summary="Event sent as a reponse to set_app_output">
305 Clients can use this event to be notified when an application
306 wants to be displayed on a certain output. This event is sent in
307 response to the set_app_output request.
309 See xdg_toplevel.set_app_id from the xdg-shell protocol for a
310 description of app_id.
312 <arg name="app_id" type="string"/>
313 <arg name="output_name" type="string"/>
316 <request name="set_app_position" since="9">
317 <description summary="move window to a specific position">
318 Clients can inform the compositor to position a floating type of window
319 at the specific location, pointed by x and y value. If the window is
320 not a floating type, the request will be discarded. Note that
321 positioning doesn't take output into consideration nor does orientation
322 of the outpus. It is expected that the client knows already where the
323 position is localed in global coordonate space. If the window doesn't
324 exist the compositor will ignore the request. For this request to
325 function properly the window would first to be set as floating and then
326 it can be moved using this request.
328 see xdg_toplevel.set_app_id from the xdg-shell protocol for a
329 description of app_id.
331 <arg name="app_id" type="string"/>
332 <arg name="x" type="int"/>
333 <arg name="y" type="int"/>
336 <request name="set_app_scale" since="10">
337 <description summary="scale window to a specific rectangle">
338 Clients can inform the compositor to scale a floating type of window
339 to the values specified in width and height. If the window is
340 not a floating type, the request will be discarded. If the window
341 doesn't exist the compositor will ignore the request. For this request
342 to function properly the window would first to be set as floating
343 and then it can be moved using this request.
346 see xdg_toplevel.set_app_id from the xdg-shell protocol for a
347 description of app_id.
349 <arg name="app_id" type="string"/>
350 <arg name="width" type="int"/>
351 <arg name="height" type="int"/>
354 <request name="set_app_split" since="11">
355 <description summary="set the application split">
356 This requests asks the compositor to change the application from the
357 original mode (whatever that might be) to a split, tiled orientation
358 mode defined in the tile orientation enum.
359 Clients need to implement resizing (to handle xdg-shell configure
360 events) for this to work correctly.
362 This request only handles a single level of tiling for practical
363 reasons: to keep implementation simple and straight forward. The
364 compositor will ignore requests if there are already two windows
365 present. The client can verify this request succeed by checking the
366 xdg-shell configure event and with it, the states sent
369 If there's no app_id with the supplied name, the compositor will add
370 the app to a pending list in order to be applied when an application
371 gets started, or if the application sets its application after the
372 initial wl_surface.commit request.
374 Applications can use this approach if they want to be started in a
375 tiled orientation position, before creating the xdg-shell toplevel role.
377 A none orientation type would make the window go back to the original
378 maximized mode. If two windows are side by side, returning one of them
379 back the original mode would mean the other one will be made hidden
380 and the one doing the request for the none orientation will become
381 the currently active window. A further activation, using activate_app
382 request for the other window would make that one active.
384 Closing the window in the tiled orientation state implies that either
385 the background surface will displayed, or in case there was another
386 applications being shown at that time, will make that application be
387 returned to the original, maximized state.
389 The tiled orientation could be applied independently of each other,
390 such that a client can transition from one tiled orientation to
391 another. Note that any other window already present would literally
392 take the opposite orientation with the one currently being changed. So
393 tiled orientation modification automatically implies a tile orientation
394 for any other application already present/active at that time.
396 In case there's already a client active at that time, it will be
397 attributed automatically the opposite tiled orientation, such that two
398 concurrent applications can be displayed at the same time.
400 The orientation tiles can not be combined, and only state at a time
401 can be active. Only horizontal and vertical tiling is possible. A
402 horizontal and vertical tile orientation simultaneously is not
405 Input focus is being delivered to the last started/activated window,
406 such that users can cycle between that one or the other, assumes there's
407 another window in the first place.
409 See xdg_toplevel.set_app_id from the xdg-shell protocol for a
410 description of app_id.
412 <arg name="app_id" type="string"/>
413 <arg name="orientation" type="uint" enum="tile_orientation"/>
414 <arg name="output" type="object" interface="wl_output"/>
418 <interface name="agl_shell_ext" version="1">
419 <description summary="extended user interface for Automotive Grade Linux platform">
420 This interface allows another client bind to the agl_shell interface,
421 while there's another shell client already present.
423 The client should first bind to this interface and then inform the
424 compositor with the 'doas_shell_client' request and it wants to bind to
425 the agl_shell interface. The client is still expected, if using a new
426 version of the agl_shell interface, to wait for the 'bound_ok' and
427 'bound_fail' events before issueing any other requests/events.
429 Note that this interface has its limitations, and the compositor would
430 still refuse the act for 'set_panel' or 'set_background' requests
431 of the agl_shell interface if there's already a client that used them.
433 Any other requests or events should be delievered and handled as it would
434 a client bound to the agl_shell interface.
437 <enum name="doas_shell_client_status">
438 <entry name="success" value="0"/>
439 <entry name="failed" value="1"/>
442 <request name="destroy" type="destructor">
443 <description summary="destroys the factory object">
444 Call the destructor once you're ready with agl_shell_ext interface.
445 This would reset the state and would make any requests made
446 on the agl_shell interface be terminated. The client would need
447 to bind again the agl_shell_ext and issue a 'doas_shell_client'
452 <request name="doas_shell_client">
453 <description summary="Informs the compositor it wants to bind to the
454 agl_shell interface">
455 Prior to binding to agl_shell interface, this request would inform
456 the compositor that it wants to gain access the agl_shell interface.
457 The client is expected to wait for 'doas_shell_client_done' event and
458 check for a successful status before going further with binding to
459 the agl_shell interface.
463 <event name="doas_done">
464 <description summary="event sent as a reply to doas_shell_client">
465 The client should check the status event to verify that the
466 compositor was able to handle the request.
468 <arg name="status" type="uint" enum="doas_shell_client_status"/>