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="3">
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
50 <request name="destroy" type="destructor" since="2">
51 <description summary="destroys the factory object">
56 <entry name="invalid_argument" value="0"/>
57 <entry name="background_exists" value="1"/>
58 <entry name="panel_exists" value="2"/>
59 <entry name="split_failed" value="3" since="3"/>
63 <entry name="top" value="0"/>
64 <entry name="bottom" value="1"/>
65 <entry name="left" value="2"/>
66 <entry name="right" value="3"/>
69 <enum name="tile_orientation" since="3">
70 <entry name="none" value="0"/>
71 <entry name="top" value="1"/>
72 <entry name="bottom" value="2"/>
73 <entry name="left" value="3"/>
74 <entry name="right" 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="set_app_split" since="3">
170 <description summary="set the application split">
171 Request changes the application from the original mode (whatever that
172 might be) to a split, tiled orientation mode defined in the orientation
173 enum. Clients need to implement resizing (meaing handle xdg-shell
174 configure events) for this to work correctly.
176 This request only handles a single level of tiling for practical
177 reasons: to keep implementation simple and straight forward. The
178 compositor will ignore requests if there are already two windows
179 present, and will terminate the client's connection with a protocol
180 violation, if it detects more than one tiling level.
182 If there's no app_id with the supplied name it will be added to a
183 pending list in order to be applied when an application id gets started.
184 Applications can use this approch if they want to be started in a
185 tiled orientantion position, before creating the xdg-shell toplevel role.
187 A none orientation type would make the window go back to the original
188 maximized mode. If two windows are side by side, returning one of them
189 back the original mode would mean the other one will be made hidden
190 and the one doing the request for the none orientation will become
191 the currently active window. A further activation, using activate_app
192 request for the other window would make that one active.
194 Closing the window in the tiled orientation state implies that either
195 the background surface will displayed, or in case there was another
196 applications being shown at that time, will make that application be
197 returned to the original, maximized state.
199 The tiled orientation could be applied independently of each other,
200 such that a client can transition from one tiled orientation to
201 another. Note that any other window already present would literally
202 take the opposite orientation with the one currently being changed. So
203 tiled orientation modification automatically implies a tile orientation
204 for any other application already present/active at that time.
206 In case there's already a client active at that time, it will be
207 attributed automatically the opposite tiled orientation, such that two
208 concurrent applications can be displayed at the same time.
210 The orientation tiles can not be combined, and only state at a time
211 can be active. Only horizontal and vertical tiling is possible.
213 Input focus is being delivered to the last started/activated window, such
214 that users can cycle between that one or the other, assumes there's
215 another window in the first place.
217 See xdg_toplevel.set_app_id from the xdg-shell protocol for a
218 description of app_id.
220 <arg name="app_id" type="string"/>
221 <arg name="orientation" type="uint" enum="tile_orientation"/>
222 <arg name="output" type="object" interface="wl_output"/>