1 <?xml version="1.0" encoding="UTF-8"?>
2 <protocol name="agl_shell_desktop">
4 Copyright © 2020 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_desktop" version="1">
26 <description summary="Private extension to allow applications activate other apps">
27 This extension can be used by regular application to instruct to compositor
28 to activate or switch to other running (regular) applications. The client
29 is responsbile for filtering their own app_id when receiving application id.
31 The compositor will allow clients to bind to this interface only if the
32 policy engine allows it.
35 <enum name="app_role">
36 <entry name="popup" value="0"/>
37 <entry name="fullscreen" value="1"/>
38 <entry name="split_vertical" value="2"/>
39 <entry name="split_horizontal" value="3"/>
40 <entry name="remote" value="4"/>
43 <enum name="app_state">
44 <entry name="activated" value="0"/>
45 <entry name="deactivated" value="1"/>
46 <entry name="destroyed" value="2"/>
49 <event name="application">
50 <description summary="advertise application id">
51 The compositor may choose to advertise one or more application ids which
52 can be used to activate/switch to.
54 When this global is bound, the compositor will send all application ids
55 available for activation, but may send additional application id at any
56 time (when they've been mapped in the compositor).
58 <arg name="app_id" type="string"/>
61 <request name="activate_app">
62 <description summary="make client current window">
63 Ask the compositor to make a toplevel to become the current/focused
64 window for window management purposes.
66 See xdg_toplevel.set_app_id from the xdg-shell protocol for a
67 description of app_id.
69 <arg name="app_id" type="string"/>
70 <arg name="app_data" type="string" allow-null="true"/>
71 <arg name="output" type="object" interface="wl_output"/>
74 <request name="set_app_property">
75 <description summary="set properties for a client identified by app_id">
76 Ask the compositor to make a top-level window obey the 'app_role' enum
77 and, depending on that role, to use some of the arguments as initial
78 values to take into account.
80 Note that x, y, bx, by, width and height would only make sense for the
81 pop-up role, with the output argument being applicable to all the roles.
82 The width and height values define the maximum area which the
83 top-level window should be placed into. Note this doesn't correspond to
84 top-level surface size, but to a bounding box which will be used to
85 clip the surface to, in case the surface area extends that of this
86 bounding box. Both of these values need to be larger than 0 (zero) to be
87 taken into account by the compositor. Any negative values for the width
88 and height will be discarded.
90 The x and y values will serve as the (initial) position values.
91 The bx and by values are the top-left x and y value of the bounding box.
92 Any clipping happening to the bounding box will not affect the surface
93 size or the position of the underlying surface backing the top-level
94 window. The bx and by values, like the positional values, could be
95 both set to zero, or even negative values. The compositor will pass
96 those on without any further validation.
98 The initial position values and the bounding rectangle will still be
99 in effect on a subsequent activation request of the 'app_id', assuming
100 it was previously de-activated at some point in time.
102 See xdg_toplevel.set_app_id from the xdg-shell protocol for a
103 description of app_id.
105 <arg name="app_id" type="string"/>
106 <arg name="role" type="uint" enum="app_role"/>
107 <arg name="x" type="int"/>
108 <arg name="y" type="int"/>
109 <arg name="bx" type="int"/>
110 <arg name="by" type="int"/>
111 <arg name="width" type="int"/>
112 <arg name="height" type="int"/>
113 <arg name="output" type="object" interface="wl_output"/>
116 <request name="deactivate_app">
117 <description summary="de-activate/hide window identified by app_id">
118 Ask the compositor to hide the toplevel window for window
119 management purposes. Depending on the window role, this request
120 will either display the previously active window (or the background
121 in case there's no previously activate surface) or temporarly (or
122 until a 'activate_app' is called upon) hide the surface. All
123 the surfaces are identifiable by using the app_id, and no actions are
124 taken in case the app_id is not/was not present.
126 See xdg_toplevel.set_app_id from the xdg-shell protocol for a
127 description of app_id.
129 <arg name="app_id" type="string"/>
132 <event name="state_app">
133 <description summary="event sent when application has suffered state modification">
134 Notifies application(s) when other application have suffered state modifications.
136 <arg name="app_id" type="string"/>
137 <arg name="app_data" type="string" allow-null="true"/>
138 <arg name="state" type="uint" enum="app_state"/>
139 <arg name="role" type="uint" enum="app_role"/>