SDL
156 строк · 6.9 Кб
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="xdg_decoration_unstable_v1">3<copyright>4Copyright © 2018 Simon Ser
5
6Permission is hereby granted, free of charge, to any person obtaining a
7copy of this software and associated documentation files (the "Software"),
8to deal in the Software without restriction, including without limitation
9the rights to use, copy, modify, merge, publish, distribute, sublicense,
10and/or sell copies of the Software, and to permit persons to whom the
11Software is furnished to do so, subject to the following conditions:
12
13The above copyright notice and this permission notice (including the next
14paragraph) shall be included in all copies or substantial portions of the
15Software.
16
17THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23DEALINGS IN THE SOFTWARE.
24</copyright>25
26<interface name="zxdg_decoration_manager_v1" version="1">27<description summary="window decoration manager">28This interface allows a compositor to announce support for server-side
29decorations.
30
31A window decoration is a set of window controls as deemed appropriate by
32the party managing them, such as user interface components used to move,
33resize and change a window's state.
34
35A client can use this protocol to request being decorated by a supporting
36compositor.
37
38If compositor and client do not negotiate the use of a server-side
39decoration using this protocol, clients continue to self-decorate as they
40see fit.
41
42Warning! The protocol described in this file is experimental and
43backward incompatible changes may be made. Backward compatible changes
44may be added together with the corresponding interface version bump.
45Backward incompatible changes are done by bumping the version number in
46the protocol and interface names and resetting the interface version.
47Once the protocol is to be declared stable, the 'z' prefix and the
48version number in the protocol and interface names are removed and the
49interface version number is reset.
50</description>51
52<request name="destroy" type="destructor">53<description summary="destroy the decoration manager object">54Destroy the decoration manager. This doesn't destroy objects created
55with the manager.
56</description>57</request>58
59<request name="get_toplevel_decoration">60<description summary="create a new toplevel decoration object">61Create a new decoration object associated with the given toplevel.
62
63Creating an xdg_toplevel_decoration from an xdg_toplevel which has a
64buffer attached or committed is a client error, and any attempts by a
65client to attach or manipulate a buffer prior to the first
66xdg_toplevel_decoration.configure event must also be treated as
67errors.
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">76The decoration object allows the compositor to toggle server-side window
77decorations for a toplevel surface. The client can request to switch to
78another mode.
79
80The xdg_toplevel_decoration object must be destroyed before its
81xdg_toplevel.
82</description>83
84<enum name="error">85<entry name="unconfigured_buffer" value="0"86summary="xdg_toplevel has a buffer attached before configure"/>87<entry name="already_constructed" value="1"88summary="xdg_toplevel already has a decoration object"/>89<entry name="orphaned" value="2"90summary="xdg_toplevel destroyed before the decoration object"/>91</enum>92
93<request name="destroy" type="destructor">94<description summary="destroy the decoration object">95Switch back to a mode without any server-side decorations at the next
96commit.
97</description>98</request>99
100<enum name="mode">101<description summary="window decoration modes">102These values describe window decoration modes.
103</description>104<entry name="client_side" value="1"105summary="no server-side window decoration"/>106<entry name="server_side" value="2"107summary="server-side window decoration"/>108</enum>109
110<request name="set_mode">111<description summary="set the decoration mode">112Set the toplevel surface decoration mode. This informs the compositor
113that the client prefers the provided decoration mode.
114
115After requesting a decoration mode, the compositor will respond by
116emitting a xdg_surface.configure event. The client should then update
117its content, drawing it without decorations if the received mode is
118server-side decorations. The client must also acknowledge the configure
119when committing the new content (see xdg_surface.ack_configure).
120
121The compositor can decide not to use the client's mode and enforce a
122different mode instead.
123
124Clients whose decoration mode depend on the xdg_toplevel state may send
125a set_mode request in response to a xdg_surface.configure event and wait
126for the next xdg_surface.configure event to prevent unwanted state.
127Such clients are responsible for preventing configure loops and must
128make sure not to send multiple successive set_mode requests with the
129same decoration mode.
130</description>131<arg name="mode" type="uint" enum="mode" summary="the decoration mode"/>132</request>133
134<request name="unset_mode">135<description summary="unset the decoration mode">136Unset the toplevel surface decoration mode. This informs the compositor
137that the client doesn't prefer a particular decoration mode.
138
139This request has the same semantics as set_mode.
140</description>141</request>142
143<event name="configure">144<description summary="suggest a surface change">145The configure event asks the client to change its decoration mode. The
146configured state should not be applied immediately. Clients must send an
147ack_configure in response to this event. See xdg_surface.configure and
148xdg_surface.ack_configure for details.
149
150A configure event can be sent at any time. The specified mode must be
151obeyed by the client.
152</description>153<arg name="mode" type="uint" enum="mode" summary="the decoration mode"/>154</event>155</interface>156</protocol>157