Skip to content
0.2.0-dev Download ZIP
160 lines ·7.1 KB Raw
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="xdg_decoration_unstable_v1">
3 <copyright>
4 Copyright © 2018 Simon Ser
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
26 <interface name="zxdg_decoration_manager_v1" version="1">
27 <description summary="window decoration manager">
28 This interface allows a compositor to announce support for server-side
29 decorations.
30
31 A window decoration is a set of window controls as deemed appropriate by
32 the party managing them, such as user interface components used to move,
33 resize and change a window's state.
34
35 A client can use this protocol to request being decorated by a supporting
36 compositor.
37
38 If compositor and client do not negotiate the use of a server-side
39 decoration using this protocol, clients continue to self-decorate as they
40 see fit.
41
42 Warning! The protocol described in this file is experimental and
43 backward incompatible changes may be made. Backward compatible changes
44 may be added together with the corresponding interface version bump.
45 Backward incompatible changes are done by bumping the version number in
46 the protocol and interface names and resetting the interface version.
47 Once the protocol is to be declared stable, the 'z' prefix and the
48 version number in the protocol and interface names are removed and the
49 interface version number is reset.
50 </description>
51
52 <request name="destroy" type="destructor">
53 <description summary="destroy the decoration manager object">
54 Destroy the decoration manager. This doesn't destroy objects created
55 with the manager.
56 </description>
57 </request>
58
59 <request name="get_toplevel_decoration">
60 <description summary="create a new toplevel decoration object">
61 Create a new decoration object associated with the given toplevel.
62
63 Creating an xdg_toplevel_decoration from an xdg_toplevel which has a
64 buffer attached or committed is a client error, and any attempts by a
65 client to attach or manipulate a buffer prior to the first
66 xdg_toplevel_decoration.configure event must also be treated as
67 errors.
68 </description>
69 <arg name="id" type="new_id" interface="zxdg_toplevel_decoration_v1"/>
70 <arg name="toplevel" type="object" interface="xdg_toplevel"/>
71 </request>
72 </interface>
73
74 <interface name="zxdg_toplevel_decoration_v1" version="1">
75 <description summary="decoration object for a toplevel surface">
76 The decoration object allows the compositor to toggle server-side window
77 decorations for a toplevel surface. The client can request to switch to
78 another mode.
79
80 The xdg_toplevel_decoration object must be destroyed before its
81 xdg_toplevel.
82 </description>
83
84 <enum name="error">
85 <entry name="unconfigured_buffer" value="0"
86 summary="xdg_toplevel has a buffer attached before configure"/>
87 <entry name="already_constructed" value="1"
88 summary="xdg_toplevel already has a decoration object"/>
89 <entry name="orphaned" value="2"
90 summary="xdg_toplevel destroyed before the decoration object"/>
91 <entry name="invalid_mode" value="3" summary="invalid mode"/>
92 </enum>
93
94 <request name="destroy" type="destructor">
95 <description summary="destroy the decoration object">
96 Switch back to a mode without any server-side decorations at the next
97 commit.
98 </description>
99 </request>
100
101 <enum name="mode">
102 <description summary="window decoration modes">
103 These values describe window decoration modes.
104 </description>
105 <entry name="client_side" value="1"
106 summary="no server-side window decoration"/>
107 <entry name="server_side" value="2"
108 summary="server-side window decoration"/>
109 </enum>
110
111 <request name="set_mode">
112 <description summary="set the decoration mode">
113 Set the toplevel surface decoration mode. This informs the compositor
114 that the client prefers the provided decoration mode.
115
116 After requesting a decoration mode, the compositor will respond by
117 emitting an xdg_surface.configure event. The client should then update
118 its content, drawing it without decorations if the received mode is
119 server-side decorations. The client must also acknowledge the configure
120 when committing the new content (see xdg_surface.ack_configure).
121
122 The compositor can decide not to use the client's mode and enforce a
123 different mode instead.
124
125 Clients whose decoration mode depend on the xdg_toplevel state may send
126 a set_mode request in response to an xdg_surface.configure event and wait
127 for the next xdg_surface.configure event to prevent unwanted state.
128 Such clients are responsible for preventing configure loops and must
129 make sure not to send multiple successive set_mode requests with the
130 same decoration mode.
131
132 If an invalid mode is supplied by the client, the invalid_mode protocol
133 error is raised by the compositor.
134 </description>
135 <arg name="mode" type="uint" enum="mode" summary="the decoration mode"/>
136 </request>
137
138 <request name="unset_mode">
139 <description summary="unset the decoration mode">
140 Unset the toplevel surface decoration mode. This informs the compositor
141 that the client doesn't prefer a particular decoration mode.
142
143 This request has the same semantics as set_mode.
144 </description>
145 </request>
146
147 <event name="configure">
148 <description summary="notify a decoration mode change">
149 The configure event configures the effective decoration mode. The
150 configured state should not be applied immediately. Clients must send an
151 ack_configure in response to this event. See xdg_surface.configure and
152 xdg_surface.ack_configure for details.
153
154 A configure event can be sent at any time. The specified mode must be
155 obeyed by the client.
156 </description>
157 <arg name="mode" type="uint" enum="mode" summary="the decoration mode"/>
158 </event>
159 </interface>
160</protocol>