meson.build: Do another version bump
[src/agl-compositor.git] / protocol / agl-shell-desktop.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <protocol name="agl_shell_desktop">
3   <copyright>
4     Copyright © 2020 Collabora, Ltd.
5
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:
12
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
15     Software.
16
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.
24   </copyright>
25   <interface name="agl_shell_desktop" version="2">
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 responsible for filtering their own app_id when receiving application id.
30
31       The compositor will allow clients to bind to this interface only if the
32       policy engine allows it.
33     </description>
34
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"/>
41     </enum>
42
43     <enum name="app_state">
44       <entry name="activated" value="0"/>
45       <entry name="deactivated" value="1"/>
46       <entry name="destroyed" value="2"/>
47     </enum>
48
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.
53
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).
57       </description>
58       <arg name="app_id" type="string"/>
59     </event>
60
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.
65
66         See xdg_toplevel.set_app_id from the xdg-shell protocol for a
67         description of app_id.
68       </description>
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"/>
72     </request>
73
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.
79
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.
89
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.
97
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.
101
102         See xdg_toplevel.set_app_id from the xdg-shell protocol for a
103         description of app_id.
104       </description>
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"/>
114     </request>
115
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 active surface) or temporarily (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.
125
126         See xdg_toplevel.set_app_id from the xdg-shell protocol for a
127         description of app_id.
128       </description>
129       <arg name="app_id" type="string"/>
130     </request>
131
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.
135       </description>
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"/>
140     </event>
141
142     <!-- Version 2 addition -->
143     <request name="set_app_property_mode" since="2">
144       <description summary="Request to change the application properties lifetime">
145         Use this request to inform the compositor to maintain a pending state
146         for an app_id being set with set_app_property() request. Any
147         subsequent application matching that app_id would survive a potential
148         application destruction. Note that this request will take effect
149         globally on all applications.
150
151         To turn it on, or off, use the 'permanent' argument. Initially,
152         the compositor will have this option set to off. Note that it
153         doesn't matter the order of this request with respect to
154         set_app_property() request, as the changes will only take effect
155         when the application itself does the commit with an app_id set,
156         therefore the only requirement is to call this request before
157         the app_id client does its first commit.
158       </description>
159       <arg name="permanent" type="uint"/>
160     </request>
161
162   </interface>
163 </protocol>