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 Note that other (regular) applications can bind to this interface and there is
32 no mechanism to place to restrict or limit that.
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"/>
48 <event name="application">
49 <description summary="advertise application id">
50 The compositor may choose to advertise one or more application ids which
51 can be used to activate/switch to.
53 When this global is bound, the compositor will send all application ids
54 available for activation, but may send additional application id at any
55 time (when they've been mapped in the compositor).
57 <arg name="app_id" type="string"/>
60 <request name="activate_app">
61 <description summary="make client current window">
62 Ask the compositor to make a toplevel to become the current/focused
63 window for window management purposes.
65 See xdg_toplevel.set_app_id from the xdg-shell protocol for a
66 description of app_id.
68 <arg name="app_id" type="string"/>
69 <arg name="app_data" type="string" allow-null="true"/>
70 <arg name="output" type="object" interface="wl_output"/>
73 <request name="set_app_property">
74 <description summary="set properties for a client identified by app_id">
75 Ask the compositor to make a top-level window obey the 'app_role' enum
76 and, depending on that role, to use some of the arguments as initial
77 values to take into account.
79 Note that x, y, bx, by, width and height would only make sense for the
80 pop-up role, with the output argument being applicable to all the roles.
81 The width and height values define the maximum area which the
82 top-level window should be placed into. Note this doesn't correspond to
83 top-level surface size, but to a bounding box which will be used to
84 clip the surface to, in case the surface area extends that of this
85 bounding box. Both of these values need to be larger than 0 (zero) to be
86 taken into account by the compositor. Any negative values for the width
87 and height will be discarded.
89 The x and y values will serve as the (initial) position values.
90 The bx and by values are the top-left x and y value of the bounding box.
91 Any clipping happening to the bounding box will not affect the surface
92 size or the position of the underlying surface backing the top-level
93 window. The bx and by values, like the positional values, could be
94 both set to zero, or even negative values. The compositor will pass
95 those on without any further validation.
97 The initial position values and the bounding rectangle will still be
98 in effect on a subsequent activation request of the 'app_id', assuming
99 it was previously de-activated at some point in time.
101 See xdg_toplevel.set_app_id from the xdg-shell protocol for a
102 description of app_id.
104 <arg name="app_id" type="string"/>
105 <arg name="role" type="uint" enum="app_role"/>
106 <arg name="x" type="int"/>
107 <arg name="y" type="int"/>
108 <arg name="bx" type="int"/>
109 <arg name="by" type="int"/>
110 <arg name="width" type="int"/>
111 <arg name="height" type="int"/>
112 <arg name="output" type="object" interface="wl_output"/>
115 <request name="deactivate_app">
116 <description summary="de-activate/hide window identified by app_id">
117 Ask the compositor to hide the toplevel window for window
118 management purposes. Depending on the window role, this request
119 will either display the previously active window (or the background
120 in case there's no previously activate surface) or temporarly (or
121 until a 'activate_app' is called upon) hide the surface. All
122 the surfaces are identifiable by using the app_id, and no actions are
123 taken in case the app_id is not/was not present.
125 See xdg_toplevel.set_app_id from the xdg-shell protocol for a
126 description of app_id.
128 <arg name="app_id" type="string"/>
131 <event name="state_app">
132 <description summary="event sent when application has suffered state modification">
133 Notifies application(s) when other application have suffered state modifications.
135 <arg name="app_id" type="string"/>
136 <arg name="app_data" type="string" allow-null="true"/>
137 <arg name="state" type="uint" enum="app_state"/>
138 <arg name="role" type="uint" enum="app_role"/>