1b877906bSopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
2b877906bSopenharmony_ci<protocol name="xdg_shell">
3b877906bSopenharmony_ci
4b877906bSopenharmony_ci  <copyright>
5b877906bSopenharmony_ci    Copyright © 2008-2013 Kristian Høgsberg
6b877906bSopenharmony_ci    Copyright © 2013      Rafael Antognolli
7b877906bSopenharmony_ci    Copyright © 2013      Jasper St. Pierre
8b877906bSopenharmony_ci    Copyright © 2010-2013 Intel Corporation
9b877906bSopenharmony_ci    Copyright © 2015-2017 Samsung Electronics Co., Ltd
10b877906bSopenharmony_ci    Copyright © 2015-2017 Red Hat Inc.
11b877906bSopenharmony_ci
12b877906bSopenharmony_ci    Permission is hereby granted, free of charge, to any person obtaining a
13b877906bSopenharmony_ci    copy of this software and associated documentation files (the "Software"),
14b877906bSopenharmony_ci    to deal in the Software without restriction, including without limitation
15b877906bSopenharmony_ci    the rights to use, copy, modify, merge, publish, distribute, sublicense,
16b877906bSopenharmony_ci    and/or sell copies of the Software, and to permit persons to whom the
17b877906bSopenharmony_ci    Software is furnished to do so, subject to the following conditions:
18b877906bSopenharmony_ci
19b877906bSopenharmony_ci    The above copyright notice and this permission notice (including the next
20b877906bSopenharmony_ci    paragraph) shall be included in all copies or substantial portions of the
21b877906bSopenharmony_ci    Software.
22b877906bSopenharmony_ci
23b877906bSopenharmony_ci    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24b877906bSopenharmony_ci    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25b877906bSopenharmony_ci    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
26b877906bSopenharmony_ci    THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27b877906bSopenharmony_ci    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28b877906bSopenharmony_ci    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29b877906bSopenharmony_ci    DEALINGS IN THE SOFTWARE.
30b877906bSopenharmony_ci  </copyright>
31b877906bSopenharmony_ci
32b877906bSopenharmony_ci  <interface name="xdg_wm_base" version="6">
33b877906bSopenharmony_ci    <description summary="create desktop-style surfaces">
34b877906bSopenharmony_ci      The xdg_wm_base interface is exposed as a global object enabling clients
35b877906bSopenharmony_ci      to turn their wl_surfaces into windows in a desktop environment. It
36b877906bSopenharmony_ci      defines the basic functionality needed for clients and the compositor to
37b877906bSopenharmony_ci      create windows that can be dragged, resized, maximized, etc, as well as
38b877906bSopenharmony_ci      creating transient windows such as popup menus.
39b877906bSopenharmony_ci    </description>
40b877906bSopenharmony_ci
41b877906bSopenharmony_ci    <enum name="error">
42b877906bSopenharmony_ci      <entry name="role" value="0" summary="given wl_surface has another role"/>
43b877906bSopenharmony_ci      <entry name="defunct_surfaces" value="1"
44b877906bSopenharmony_ci	     summary="xdg_wm_base was destroyed before children"/>
45b877906bSopenharmony_ci      <entry name="not_the_topmost_popup" value="2"
46b877906bSopenharmony_ci	     summary="the client tried to map or destroy a non-topmost popup"/>
47b877906bSopenharmony_ci      <entry name="invalid_popup_parent" value="3"
48b877906bSopenharmony_ci	     summary="the client specified an invalid popup parent surface"/>
49b877906bSopenharmony_ci      <entry name="invalid_surface_state" value="4"
50b877906bSopenharmony_ci	     summary="the client provided an invalid surface state"/>
51b877906bSopenharmony_ci      <entry name="invalid_positioner" value="5"
52b877906bSopenharmony_ci	     summary="the client provided an invalid positioner"/>
53b877906bSopenharmony_ci      <entry name="unresponsive" value="6"
54b877906bSopenharmony_ci	     summary="the client didn’t respond to a ping event in time"/>
55b877906bSopenharmony_ci    </enum>
56b877906bSopenharmony_ci
57b877906bSopenharmony_ci    <request name="destroy" type="destructor">
58b877906bSopenharmony_ci      <description summary="destroy xdg_wm_base">
59b877906bSopenharmony_ci	Destroy this xdg_wm_base object.
60b877906bSopenharmony_ci
61b877906bSopenharmony_ci	Destroying a bound xdg_wm_base object while there are surfaces
62b877906bSopenharmony_ci	still alive created by this xdg_wm_base object instance is illegal
63b877906bSopenharmony_ci	and will result in a defunct_surfaces error.
64b877906bSopenharmony_ci      </description>
65b877906bSopenharmony_ci    </request>
66b877906bSopenharmony_ci
67b877906bSopenharmony_ci    <request name="create_positioner">
68b877906bSopenharmony_ci      <description summary="create a positioner object">
69b877906bSopenharmony_ci	Create a positioner object. A positioner object is used to position
70b877906bSopenharmony_ci	surfaces relative to some parent surface. See the interface description
71b877906bSopenharmony_ci	and xdg_surface.get_popup for details.
72b877906bSopenharmony_ci      </description>
73b877906bSopenharmony_ci      <arg name="id" type="new_id" interface="xdg_positioner"/>
74b877906bSopenharmony_ci    </request>
75b877906bSopenharmony_ci
76b877906bSopenharmony_ci    <request name="get_xdg_surface">
77b877906bSopenharmony_ci      <description summary="create a shell surface from a surface">
78b877906bSopenharmony_ci	This creates an xdg_surface for the given surface. While xdg_surface
79b877906bSopenharmony_ci	itself is not a role, the corresponding surface may only be assigned
80b877906bSopenharmony_ci	a role extending xdg_surface, such as xdg_toplevel or xdg_popup. It is
81b877906bSopenharmony_ci	illegal to create an xdg_surface for a wl_surface which already has an
82b877906bSopenharmony_ci	assigned role and this will result in a role error.
83b877906bSopenharmony_ci
84b877906bSopenharmony_ci	This creates an xdg_surface for the given surface. An xdg_surface is
85b877906bSopenharmony_ci	used as basis to define a role to a given surface, such as xdg_toplevel
86b877906bSopenharmony_ci	or xdg_popup. It also manages functionality shared between xdg_surface
87b877906bSopenharmony_ci	based surface roles.
88b877906bSopenharmony_ci
89b877906bSopenharmony_ci	See the documentation of xdg_surface for more details about what an
90b877906bSopenharmony_ci	xdg_surface is and how it is used.
91b877906bSopenharmony_ci      </description>
92b877906bSopenharmony_ci      <arg name="id" type="new_id" interface="xdg_surface"/>
93b877906bSopenharmony_ci      <arg name="surface" type="object" interface="wl_surface"/>
94b877906bSopenharmony_ci    </request>
95b877906bSopenharmony_ci
96b877906bSopenharmony_ci    <request name="pong">
97b877906bSopenharmony_ci      <description summary="respond to a ping event">
98b877906bSopenharmony_ci	A client must respond to a ping event with a pong request or
99b877906bSopenharmony_ci	the client may be deemed unresponsive. See xdg_wm_base.ping
100b877906bSopenharmony_ci	and xdg_wm_base.error.unresponsive.
101b877906bSopenharmony_ci      </description>
102b877906bSopenharmony_ci      <arg name="serial" type="uint" summary="serial of the ping event"/>
103b877906bSopenharmony_ci    </request>
104b877906bSopenharmony_ci
105b877906bSopenharmony_ci    <event name="ping">
106b877906bSopenharmony_ci      <description summary="check if the client is alive">
107b877906bSopenharmony_ci	The ping event asks the client if it's still alive. Pass the
108b877906bSopenharmony_ci	serial specified in the event back to the compositor by sending
109b877906bSopenharmony_ci	a "pong" request back with the specified serial. See xdg_wm_base.pong.
110b877906bSopenharmony_ci
111b877906bSopenharmony_ci	Compositors can use this to determine if the client is still
112b877906bSopenharmony_ci	alive. It's unspecified what will happen if the client doesn't
113b877906bSopenharmony_ci	respond to the ping request, or in what timeframe. Clients should
114b877906bSopenharmony_ci	try to respond in a reasonable amount of time. The “unresponsive”
115b877906bSopenharmony_ci	error is provided for compositors that wish to disconnect unresponsive
116b877906bSopenharmony_ci	clients.
117b877906bSopenharmony_ci
118b877906bSopenharmony_ci	A compositor is free to ping in any way it wants, but a client must
119b877906bSopenharmony_ci	always respond to any xdg_wm_base object it created.
120b877906bSopenharmony_ci      </description>
121b877906bSopenharmony_ci      <arg name="serial" type="uint" summary="pass this to the pong request"/>
122b877906bSopenharmony_ci    </event>
123b877906bSopenharmony_ci  </interface>
124b877906bSopenharmony_ci
125b877906bSopenharmony_ci  <interface name="xdg_positioner" version="6">
126b877906bSopenharmony_ci    <description summary="child surface positioner">
127b877906bSopenharmony_ci      The xdg_positioner provides a collection of rules for the placement of a
128b877906bSopenharmony_ci      child surface relative to a parent surface. Rules can be defined to ensure
129b877906bSopenharmony_ci      the child surface remains within the visible area's borders, and to
130b877906bSopenharmony_ci      specify how the child surface changes its position, such as sliding along
131b877906bSopenharmony_ci      an axis, or flipping around a rectangle. These positioner-created rules are
132b877906bSopenharmony_ci      constrained by the requirement that a child surface must intersect with or
133b877906bSopenharmony_ci      be at least partially adjacent to its parent surface.
134b877906bSopenharmony_ci
135b877906bSopenharmony_ci      See the various requests for details about possible rules.
136b877906bSopenharmony_ci
137b877906bSopenharmony_ci      At the time of the request, the compositor makes a copy of the rules
138b877906bSopenharmony_ci      specified by the xdg_positioner. Thus, after the request is complete the
139b877906bSopenharmony_ci      xdg_positioner object can be destroyed or reused; further changes to the
140b877906bSopenharmony_ci      object will have no effect on previous usages.
141b877906bSopenharmony_ci
142b877906bSopenharmony_ci      For an xdg_positioner object to be considered complete, it must have a
143b877906bSopenharmony_ci      non-zero size set by set_size, and a non-zero anchor rectangle set by
144b877906bSopenharmony_ci      set_anchor_rect. Passing an incomplete xdg_positioner object when
145b877906bSopenharmony_ci      positioning a surface raises an invalid_positioner error.
146b877906bSopenharmony_ci    </description>
147b877906bSopenharmony_ci
148b877906bSopenharmony_ci    <enum name="error">
149b877906bSopenharmony_ci      <entry name="invalid_input" value="0" summary="invalid input provided"/>
150b877906bSopenharmony_ci    </enum>
151b877906bSopenharmony_ci
152b877906bSopenharmony_ci    <request name="destroy" type="destructor">
153b877906bSopenharmony_ci      <description summary="destroy the xdg_positioner object">
154b877906bSopenharmony_ci	Notify the compositor that the xdg_positioner will no longer be used.
155b877906bSopenharmony_ci      </description>
156b877906bSopenharmony_ci    </request>
157b877906bSopenharmony_ci
158b877906bSopenharmony_ci    <request name="set_size">
159b877906bSopenharmony_ci      <description summary="set the size of the to-be positioned rectangle">
160b877906bSopenharmony_ci	Set the size of the surface that is to be positioned with the positioner
161b877906bSopenharmony_ci	object. The size is in surface-local coordinates and corresponds to the
162b877906bSopenharmony_ci	window geometry. See xdg_surface.set_window_geometry.
163b877906bSopenharmony_ci
164b877906bSopenharmony_ci	If a zero or negative size is set the invalid_input error is raised.
165b877906bSopenharmony_ci      </description>
166b877906bSopenharmony_ci      <arg name="width" type="int" summary="width of positioned rectangle"/>
167b877906bSopenharmony_ci      <arg name="height" type="int" summary="height of positioned rectangle"/>
168b877906bSopenharmony_ci    </request>
169b877906bSopenharmony_ci
170b877906bSopenharmony_ci    <request name="set_anchor_rect">
171b877906bSopenharmony_ci      <description summary="set the anchor rectangle within the parent surface">
172b877906bSopenharmony_ci	Specify the anchor rectangle within the parent surface that the child
173b877906bSopenharmony_ci	surface will be placed relative to. The rectangle is relative to the
174b877906bSopenharmony_ci	window geometry as defined by xdg_surface.set_window_geometry of the
175b877906bSopenharmony_ci	parent surface.
176b877906bSopenharmony_ci
177b877906bSopenharmony_ci	When the xdg_positioner object is used to position a child surface, the
178b877906bSopenharmony_ci	anchor rectangle may not extend outside the window geometry of the
179b877906bSopenharmony_ci	positioned child's parent surface.
180b877906bSopenharmony_ci
181b877906bSopenharmony_ci	If a negative size is set the invalid_input error is raised.
182b877906bSopenharmony_ci      </description>
183b877906bSopenharmony_ci      <arg name="x" type="int" summary="x position of anchor rectangle"/>
184b877906bSopenharmony_ci      <arg name="y" type="int" summary="y position of anchor rectangle"/>
185b877906bSopenharmony_ci      <arg name="width" type="int" summary="width of anchor rectangle"/>
186b877906bSopenharmony_ci      <arg name="height" type="int" summary="height of anchor rectangle"/>
187b877906bSopenharmony_ci    </request>
188b877906bSopenharmony_ci
189b877906bSopenharmony_ci    <enum name="anchor">
190b877906bSopenharmony_ci      <entry name="none" value="0"/>
191b877906bSopenharmony_ci      <entry name="top" value="1"/>
192b877906bSopenharmony_ci      <entry name="bottom" value="2"/>
193b877906bSopenharmony_ci      <entry name="left" value="3"/>
194b877906bSopenharmony_ci      <entry name="right" value="4"/>
195b877906bSopenharmony_ci      <entry name="top_left" value="5"/>
196b877906bSopenharmony_ci      <entry name="bottom_left" value="6"/>
197b877906bSopenharmony_ci      <entry name="top_right" value="7"/>
198b877906bSopenharmony_ci      <entry name="bottom_right" value="8"/>
199b877906bSopenharmony_ci    </enum>
200b877906bSopenharmony_ci
201b877906bSopenharmony_ci    <request name="set_anchor">
202b877906bSopenharmony_ci      <description summary="set anchor rectangle anchor">
203b877906bSopenharmony_ci	Defines the anchor point for the anchor rectangle. The specified anchor
204b877906bSopenharmony_ci	is used derive an anchor point that the child surface will be
205b877906bSopenharmony_ci	positioned relative to. If a corner anchor is set (e.g. 'top_left' or
206b877906bSopenharmony_ci	'bottom_right'), the anchor point will be at the specified corner;
207b877906bSopenharmony_ci	otherwise, the derived anchor point will be centered on the specified
208b877906bSopenharmony_ci	edge, or in the center of the anchor rectangle if no edge is specified.
209b877906bSopenharmony_ci      </description>
210b877906bSopenharmony_ci      <arg name="anchor" type="uint" enum="anchor"
211b877906bSopenharmony_ci	   summary="anchor"/>
212b877906bSopenharmony_ci    </request>
213b877906bSopenharmony_ci
214b877906bSopenharmony_ci    <enum name="gravity">
215b877906bSopenharmony_ci      <entry name="none" value="0"/>
216b877906bSopenharmony_ci      <entry name="top" value="1"/>
217b877906bSopenharmony_ci      <entry name="bottom" value="2"/>
218b877906bSopenharmony_ci      <entry name="left" value="3"/>
219b877906bSopenharmony_ci      <entry name="right" value="4"/>
220b877906bSopenharmony_ci      <entry name="top_left" value="5"/>
221b877906bSopenharmony_ci      <entry name="bottom_left" value="6"/>
222b877906bSopenharmony_ci      <entry name="top_right" value="7"/>
223b877906bSopenharmony_ci      <entry name="bottom_right" value="8"/>
224b877906bSopenharmony_ci    </enum>
225b877906bSopenharmony_ci
226b877906bSopenharmony_ci    <request name="set_gravity">
227b877906bSopenharmony_ci      <description summary="set child surface gravity">
228b877906bSopenharmony_ci	Defines in what direction a surface should be positioned, relative to
229b877906bSopenharmony_ci	the anchor point of the parent surface. If a corner gravity is
230b877906bSopenharmony_ci	specified (e.g. 'bottom_right' or 'top_left'), then the child surface
231b877906bSopenharmony_ci	will be placed towards the specified gravity; otherwise, the child
232b877906bSopenharmony_ci	surface will be centered over the anchor point on any axis that had no
233b877906bSopenharmony_ci	gravity specified. If the gravity is not in the ‘gravity’ enum, an
234b877906bSopenharmony_ci	invalid_input error is raised.
235b877906bSopenharmony_ci      </description>
236b877906bSopenharmony_ci      <arg name="gravity" type="uint" enum="gravity"
237b877906bSopenharmony_ci	   summary="gravity direction"/>
238b877906bSopenharmony_ci    </request>
239b877906bSopenharmony_ci
240b877906bSopenharmony_ci    <enum name="constraint_adjustment" bitfield="true">
241b877906bSopenharmony_ci      <description summary="constraint adjustments">
242b877906bSopenharmony_ci	The constraint adjustment value define ways the compositor will adjust
243b877906bSopenharmony_ci	the position of the surface, if the unadjusted position would result
244b877906bSopenharmony_ci	in the surface being partly constrained.
245b877906bSopenharmony_ci
246b877906bSopenharmony_ci	Whether a surface is considered 'constrained' is left to the compositor
247b877906bSopenharmony_ci	to determine. For example, the surface may be partly outside the
248b877906bSopenharmony_ci	compositor's defined 'work area', thus necessitating the child surface's
249b877906bSopenharmony_ci	position be adjusted until it is entirely inside the work area.
250b877906bSopenharmony_ci
251b877906bSopenharmony_ci	The adjustments can be combined, according to a defined precedence: 1)
252b877906bSopenharmony_ci	Flip, 2) Slide, 3) Resize.
253b877906bSopenharmony_ci      </description>
254b877906bSopenharmony_ci      <entry name="none" value="0">
255b877906bSopenharmony_ci	<description summary="don't move the child surface when constrained">
256b877906bSopenharmony_ci	  Don't alter the surface position even if it is constrained on some
257b877906bSopenharmony_ci	  axis, for example partially outside the edge of an output.
258b877906bSopenharmony_ci	</description>
259b877906bSopenharmony_ci      </entry>
260b877906bSopenharmony_ci      <entry name="slide_x" value="1">
261b877906bSopenharmony_ci	<description summary="move along the x axis until unconstrained">
262b877906bSopenharmony_ci	  Slide the surface along the x axis until it is no longer constrained.
263b877906bSopenharmony_ci
264b877906bSopenharmony_ci	  First try to slide towards the direction of the gravity on the x axis
265b877906bSopenharmony_ci	  until either the edge in the opposite direction of the gravity is
266b877906bSopenharmony_ci	  unconstrained or the edge in the direction of the gravity is
267b877906bSopenharmony_ci	  constrained.
268b877906bSopenharmony_ci
269b877906bSopenharmony_ci	  Then try to slide towards the opposite direction of the gravity on the
270b877906bSopenharmony_ci	  x axis until either the edge in the direction of the gravity is
271b877906bSopenharmony_ci	  unconstrained or the edge in the opposite direction of the gravity is
272b877906bSopenharmony_ci	  constrained.
273b877906bSopenharmony_ci	</description>
274b877906bSopenharmony_ci      </entry>
275b877906bSopenharmony_ci      <entry name="slide_y" value="2">
276b877906bSopenharmony_ci	<description summary="move along the y axis until unconstrained">
277b877906bSopenharmony_ci	  Slide the surface along the y axis until it is no longer constrained.
278b877906bSopenharmony_ci
279b877906bSopenharmony_ci	  First try to slide towards the direction of the gravity on the y axis
280b877906bSopenharmony_ci	  until either the edge in the opposite direction of the gravity is
281b877906bSopenharmony_ci	  unconstrained or the edge in the direction of the gravity is
282b877906bSopenharmony_ci	  constrained.
283b877906bSopenharmony_ci
284b877906bSopenharmony_ci	  Then try to slide towards the opposite direction of the gravity on the
285b877906bSopenharmony_ci	  y axis until either the edge in the direction of the gravity is
286b877906bSopenharmony_ci	  unconstrained or the edge in the opposite direction of the gravity is
287b877906bSopenharmony_ci	  constrained.
288b877906bSopenharmony_ci	</description>
289b877906bSopenharmony_ci      </entry>
290b877906bSopenharmony_ci      <entry name="flip_x" value="4">
291b877906bSopenharmony_ci	<description summary="invert the anchor and gravity on the x axis">
292b877906bSopenharmony_ci	  Invert the anchor and gravity on the x axis if the surface is
293b877906bSopenharmony_ci	  constrained on the x axis. For example, if the left edge of the
294b877906bSopenharmony_ci	  surface is constrained, the gravity is 'left' and the anchor is
295b877906bSopenharmony_ci	  'left', change the gravity to 'right' and the anchor to 'right'.
296b877906bSopenharmony_ci
297b877906bSopenharmony_ci	  If the adjusted position also ends up being constrained, the resulting
298b877906bSopenharmony_ci	  position of the flip_x adjustment will be the one before the
299b877906bSopenharmony_ci	  adjustment.
300b877906bSopenharmony_ci	</description>
301b877906bSopenharmony_ci      </entry>
302b877906bSopenharmony_ci      <entry name="flip_y" value="8">
303b877906bSopenharmony_ci	<description summary="invert the anchor and gravity on the y axis">
304b877906bSopenharmony_ci	  Invert the anchor and gravity on the y axis if the surface is
305b877906bSopenharmony_ci	  constrained on the y axis. For example, if the bottom edge of the
306b877906bSopenharmony_ci	  surface is constrained, the gravity is 'bottom' and the anchor is
307b877906bSopenharmony_ci	  'bottom', change the gravity to 'top' and the anchor to 'top'.
308b877906bSopenharmony_ci
309b877906bSopenharmony_ci	  The adjusted position is calculated given the original anchor
310b877906bSopenharmony_ci	  rectangle and offset, but with the new flipped anchor and gravity
311b877906bSopenharmony_ci	  values.
312b877906bSopenharmony_ci
313b877906bSopenharmony_ci	  If the adjusted position also ends up being constrained, the resulting
314b877906bSopenharmony_ci	  position of the flip_y adjustment will be the one before the
315b877906bSopenharmony_ci	  adjustment.
316b877906bSopenharmony_ci	</description>
317b877906bSopenharmony_ci      </entry>
318b877906bSopenharmony_ci      <entry name="resize_x" value="16">
319b877906bSopenharmony_ci	<description summary="horizontally resize the surface">
320b877906bSopenharmony_ci	  Resize the surface horizontally so that it is completely
321b877906bSopenharmony_ci	  unconstrained.
322b877906bSopenharmony_ci	</description>
323b877906bSopenharmony_ci      </entry>
324b877906bSopenharmony_ci      <entry name="resize_y" value="32">
325b877906bSopenharmony_ci	<description summary="vertically resize the surface">
326b877906bSopenharmony_ci	  Resize the surface vertically so that it is completely unconstrained.
327b877906bSopenharmony_ci	</description>
328b877906bSopenharmony_ci      </entry>
329b877906bSopenharmony_ci    </enum>
330b877906bSopenharmony_ci
331b877906bSopenharmony_ci    <request name="set_constraint_adjustment">
332b877906bSopenharmony_ci      <description summary="set the adjustment to be done when constrained">
333b877906bSopenharmony_ci	Specify how the window should be positioned if the originally intended
334b877906bSopenharmony_ci	position caused the surface to be constrained, meaning at least
335b877906bSopenharmony_ci	partially outside positioning boundaries set by the compositor. The
336b877906bSopenharmony_ci	adjustment is set by constructing a bitmask describing the adjustment to
337b877906bSopenharmony_ci	be made when the surface is constrained on that axis.
338b877906bSopenharmony_ci
339b877906bSopenharmony_ci	If no bit for one axis is set, the compositor will assume that the child
340b877906bSopenharmony_ci	surface should not change its position on that axis when constrained.
341b877906bSopenharmony_ci
342b877906bSopenharmony_ci	If more than one bit for one axis is set, the order of how adjustments
343b877906bSopenharmony_ci	are applied is specified in the corresponding adjustment descriptions.
344b877906bSopenharmony_ci
345b877906bSopenharmony_ci	The default adjustment is none.
346b877906bSopenharmony_ci      </description>
347b877906bSopenharmony_ci      <arg name="constraint_adjustment" type="uint"
348b877906bSopenharmony_ci	   summary="bit mask of constraint adjustments"/>
349b877906bSopenharmony_ci    </request>
350b877906bSopenharmony_ci
351b877906bSopenharmony_ci    <request name="set_offset">
352b877906bSopenharmony_ci      <description summary="set surface position offset">
353b877906bSopenharmony_ci	Specify the surface position offset relative to the position of the
354b877906bSopenharmony_ci	anchor on the anchor rectangle and the anchor on the surface. For
355b877906bSopenharmony_ci	example if the anchor of the anchor rectangle is at (x, y), the surface
356b877906bSopenharmony_ci	has the gravity bottom|right, and the offset is (ox, oy), the calculated
357b877906bSopenharmony_ci	surface position will be (x + ox, y + oy). The offset position of the
358b877906bSopenharmony_ci	surface is the one used for constraint testing. See
359b877906bSopenharmony_ci	set_constraint_adjustment.
360b877906bSopenharmony_ci
361b877906bSopenharmony_ci	An example use case is placing a popup menu on top of a user interface
362b877906bSopenharmony_ci	element, while aligning the user interface element of the parent surface
363b877906bSopenharmony_ci	with some user interface element placed somewhere in the popup surface.
364b877906bSopenharmony_ci      </description>
365b877906bSopenharmony_ci      <arg name="x" type="int" summary="surface position x offset"/>
366b877906bSopenharmony_ci      <arg name="y" type="int" summary="surface position y offset"/>
367b877906bSopenharmony_ci    </request>
368b877906bSopenharmony_ci
369b877906bSopenharmony_ci    <!-- Version 3 additions -->
370b877906bSopenharmony_ci
371b877906bSopenharmony_ci    <request name="set_reactive" since="3">
372b877906bSopenharmony_ci      <description summary="continuously reconstrain the surface">
373b877906bSopenharmony_ci	When set reactive, the surface is reconstrained if the conditions used
374b877906bSopenharmony_ci	for constraining changed, e.g. the parent window moved.
375b877906bSopenharmony_ci
376b877906bSopenharmony_ci	If the conditions changed and the popup was reconstrained, an
377b877906bSopenharmony_ci	xdg_popup.configure event is sent with updated geometry, followed by an
378b877906bSopenharmony_ci	xdg_surface.configure event.
379b877906bSopenharmony_ci      </description>
380b877906bSopenharmony_ci    </request>
381b877906bSopenharmony_ci
382b877906bSopenharmony_ci    <request name="set_parent_size" since="3">
383b877906bSopenharmony_ci      <description summary="">
384b877906bSopenharmony_ci	Set the parent window geometry the compositor should use when
385b877906bSopenharmony_ci	positioning the popup. The compositor may use this information to
386b877906bSopenharmony_ci	determine the future state the popup should be constrained using. If
387b877906bSopenharmony_ci	this doesn't match the dimension of the parent the popup is eventually
388b877906bSopenharmony_ci	positioned against, the behavior is undefined.
389b877906bSopenharmony_ci
390b877906bSopenharmony_ci	The arguments are given in the surface-local coordinate space.
391b877906bSopenharmony_ci      </description>
392b877906bSopenharmony_ci      <arg name="parent_width" type="int"
393b877906bSopenharmony_ci	   summary="future window geometry width of parent"/>
394b877906bSopenharmony_ci      <arg name="parent_height" type="int"
395b877906bSopenharmony_ci	   summary="future window geometry height of parent"/>
396b877906bSopenharmony_ci    </request>
397b877906bSopenharmony_ci
398b877906bSopenharmony_ci    <request name="set_parent_configure" since="3">
399b877906bSopenharmony_ci      <description summary="set parent configure this is a response to">
400b877906bSopenharmony_ci	Set the serial of an xdg_surface.configure event this positioner will be
401b877906bSopenharmony_ci	used in response to. The compositor may use this information together
402b877906bSopenharmony_ci	with set_parent_size to determine what future state the popup should be
403b877906bSopenharmony_ci	constrained using.
404b877906bSopenharmony_ci      </description>
405b877906bSopenharmony_ci      <arg name="serial" type="uint"
406b877906bSopenharmony_ci	   summary="serial of parent configure event"/>
407b877906bSopenharmony_ci    </request>
408b877906bSopenharmony_ci  </interface>
409b877906bSopenharmony_ci
410b877906bSopenharmony_ci  <interface name="xdg_surface" version="6">
411b877906bSopenharmony_ci    <description summary="desktop user interface surface base interface">
412b877906bSopenharmony_ci      An interface that may be implemented by a wl_surface, for
413b877906bSopenharmony_ci      implementations that provide a desktop-style user interface.
414b877906bSopenharmony_ci
415b877906bSopenharmony_ci      It provides a base set of functionality required to construct user
416b877906bSopenharmony_ci      interface elements requiring management by the compositor, such as
417b877906bSopenharmony_ci      toplevel windows, menus, etc. The types of functionality are split into
418b877906bSopenharmony_ci      xdg_surface roles.
419b877906bSopenharmony_ci
420b877906bSopenharmony_ci      Creating an xdg_surface does not set the role for a wl_surface. In order
421b877906bSopenharmony_ci      to map an xdg_surface, the client must create a role-specific object
422b877906bSopenharmony_ci      using, e.g., get_toplevel, get_popup. The wl_surface for any given
423b877906bSopenharmony_ci      xdg_surface can have at most one role, and may not be assigned any role
424b877906bSopenharmony_ci      not based on xdg_surface.
425b877906bSopenharmony_ci
426b877906bSopenharmony_ci      A role must be assigned before any other requests are made to the
427b877906bSopenharmony_ci      xdg_surface object.
428b877906bSopenharmony_ci
429b877906bSopenharmony_ci      The client must call wl_surface.commit on the corresponding wl_surface
430b877906bSopenharmony_ci      for the xdg_surface state to take effect.
431b877906bSopenharmony_ci
432b877906bSopenharmony_ci      Creating an xdg_surface from a wl_surface which has a buffer attached or
433b877906bSopenharmony_ci      committed is a client error, and any attempts by a client to attach or
434b877906bSopenharmony_ci      manipulate a buffer prior to the first xdg_surface.configure call must
435b877906bSopenharmony_ci      also be treated as errors.
436b877906bSopenharmony_ci
437b877906bSopenharmony_ci      After creating a role-specific object and setting it up, the client must
438b877906bSopenharmony_ci      perform an initial commit without any buffer attached. The compositor
439b877906bSopenharmony_ci      will reply with initial wl_surface state such as
440b877906bSopenharmony_ci      wl_surface.preferred_buffer_scale followed by an xdg_surface.configure
441b877906bSopenharmony_ci      event. The client must acknowledge it and is then allowed to attach a
442b877906bSopenharmony_ci      buffer to map the surface.
443b877906bSopenharmony_ci
444b877906bSopenharmony_ci      Mapping an xdg_surface-based role surface is defined as making it
445b877906bSopenharmony_ci      possible for the surface to be shown by the compositor. Note that
446b877906bSopenharmony_ci      a mapped surface is not guaranteed to be visible once it is mapped.
447b877906bSopenharmony_ci
448b877906bSopenharmony_ci      For an xdg_surface to be mapped by the compositor, the following
449b877906bSopenharmony_ci      conditions must be met:
450b877906bSopenharmony_ci      (1) the client has assigned an xdg_surface-based role to the surface
451b877906bSopenharmony_ci      (2) the client has set and committed the xdg_surface state and the
452b877906bSopenharmony_ci	  role-dependent state to the surface
453b877906bSopenharmony_ci      (3) the client has committed a buffer to the surface
454b877906bSopenharmony_ci
455b877906bSopenharmony_ci      A newly-unmapped surface is considered to have met condition (1) out
456b877906bSopenharmony_ci      of the 3 required conditions for mapping a surface if its role surface
457b877906bSopenharmony_ci      has not been destroyed, i.e. the client must perform the initial commit
458b877906bSopenharmony_ci      again before attaching a buffer.
459b877906bSopenharmony_ci    </description>
460b877906bSopenharmony_ci
461b877906bSopenharmony_ci    <enum name="error">
462b877906bSopenharmony_ci      <entry name="not_constructed" value="1"
463b877906bSopenharmony_ci	     summary="Surface was not fully constructed"/>
464b877906bSopenharmony_ci      <entry name="already_constructed" value="2"
465b877906bSopenharmony_ci	     summary="Surface was already constructed"/>
466b877906bSopenharmony_ci      <entry name="unconfigured_buffer" value="3"
467b877906bSopenharmony_ci	     summary="Attaching a buffer to an unconfigured surface"/>
468b877906bSopenharmony_ci      <entry name="invalid_serial" value="4"
469b877906bSopenharmony_ci	     summary="Invalid serial number when acking a configure event"/>
470b877906bSopenharmony_ci      <entry name="invalid_size" value="5"
471b877906bSopenharmony_ci	     summary="Width or height was zero or negative"/>
472b877906bSopenharmony_ci      <entry name="defunct_role_object" value="6"
473b877906bSopenharmony_ci	     summary="Surface was destroyed before its role object"/>
474b877906bSopenharmony_ci    </enum>
475b877906bSopenharmony_ci
476b877906bSopenharmony_ci    <request name="destroy" type="destructor">
477b877906bSopenharmony_ci      <description summary="destroy the xdg_surface">
478b877906bSopenharmony_ci	Destroy the xdg_surface object. An xdg_surface must only be destroyed
479b877906bSopenharmony_ci	after its role object has been destroyed, otherwise
480b877906bSopenharmony_ci	a defunct_role_object error is raised.
481b877906bSopenharmony_ci      </description>
482b877906bSopenharmony_ci    </request>
483b877906bSopenharmony_ci
484b877906bSopenharmony_ci    <request name="get_toplevel">
485b877906bSopenharmony_ci      <description summary="assign the xdg_toplevel surface role">
486b877906bSopenharmony_ci	This creates an xdg_toplevel object for the given xdg_surface and gives
487b877906bSopenharmony_ci	the associated wl_surface the xdg_toplevel role.
488b877906bSopenharmony_ci
489b877906bSopenharmony_ci	See the documentation of xdg_toplevel for more details about what an
490b877906bSopenharmony_ci	xdg_toplevel is and how it is used.
491b877906bSopenharmony_ci      </description>
492b877906bSopenharmony_ci      <arg name="id" type="new_id" interface="xdg_toplevel"/>
493b877906bSopenharmony_ci    </request>
494b877906bSopenharmony_ci
495b877906bSopenharmony_ci    <request name="get_popup">
496b877906bSopenharmony_ci      <description summary="assign the xdg_popup surface role">
497b877906bSopenharmony_ci	This creates an xdg_popup object for the given xdg_surface and gives
498b877906bSopenharmony_ci	the associated wl_surface the xdg_popup role.
499b877906bSopenharmony_ci
500b877906bSopenharmony_ci	If null is passed as a parent, a parent surface must be specified using
501b877906bSopenharmony_ci	some other protocol, before committing the initial state.
502b877906bSopenharmony_ci
503b877906bSopenharmony_ci	See the documentation of xdg_popup for more details about what an
504b877906bSopenharmony_ci	xdg_popup is and how it is used.
505b877906bSopenharmony_ci      </description>
506b877906bSopenharmony_ci      <arg name="id" type="new_id" interface="xdg_popup"/>
507b877906bSopenharmony_ci      <arg name="parent" type="object" interface="xdg_surface" allow-null="true"/>
508b877906bSopenharmony_ci      <arg name="positioner" type="object" interface="xdg_positioner"/>
509b877906bSopenharmony_ci    </request>
510b877906bSopenharmony_ci
511b877906bSopenharmony_ci    <request name="set_window_geometry">
512b877906bSopenharmony_ci      <description summary="set the new window geometry">
513b877906bSopenharmony_ci	The window geometry of a surface is its "visible bounds" from the
514b877906bSopenharmony_ci	user's perspective. Client-side decorations often have invisible
515b877906bSopenharmony_ci	portions like drop-shadows which should be ignored for the
516b877906bSopenharmony_ci	purposes of aligning, placing and constraining windows.
517b877906bSopenharmony_ci
518b877906bSopenharmony_ci	The window geometry is double buffered, and will be applied at the
519b877906bSopenharmony_ci	time wl_surface.commit of the corresponding wl_surface is called.
520b877906bSopenharmony_ci
521b877906bSopenharmony_ci	When maintaining a position, the compositor should treat the (x, y)
522b877906bSopenharmony_ci	coordinate of the window geometry as the top left corner of the window.
523b877906bSopenharmony_ci	A client changing the (x, y) window geometry coordinate should in
524b877906bSopenharmony_ci	general not alter the position of the window.
525b877906bSopenharmony_ci
526b877906bSopenharmony_ci	Once the window geometry of the surface is set, it is not possible to
527b877906bSopenharmony_ci	unset it, and it will remain the same until set_window_geometry is
528b877906bSopenharmony_ci	called again, even if a new subsurface or buffer is attached.
529b877906bSopenharmony_ci
530b877906bSopenharmony_ci	If never set, the value is the full bounds of the surface,
531b877906bSopenharmony_ci	including any subsurfaces. This updates dynamically on every
532b877906bSopenharmony_ci	commit. This unset is meant for extremely simple clients.
533b877906bSopenharmony_ci
534b877906bSopenharmony_ci	The arguments are given in the surface-local coordinate space of
535b877906bSopenharmony_ci	the wl_surface associated with this xdg_surface, and may extend outside
536b877906bSopenharmony_ci	of the wl_surface itself to mark parts of the subsurface tree as part of
537b877906bSopenharmony_ci	the window geometry.
538b877906bSopenharmony_ci
539b877906bSopenharmony_ci	When applied, the effective window geometry will be the set window
540b877906bSopenharmony_ci	geometry clamped to the bounding rectangle of the combined
541b877906bSopenharmony_ci	geometry of the surface of the xdg_surface and the associated
542b877906bSopenharmony_ci	subsurfaces.
543b877906bSopenharmony_ci
544b877906bSopenharmony_ci	The effective geometry will not be recalculated unless a new call to
545b877906bSopenharmony_ci	set_window_geometry is done and the new pending surface state is
546b877906bSopenharmony_ci	subsequently applied.
547b877906bSopenharmony_ci
548b877906bSopenharmony_ci	The width and height of the effective window geometry must be
549b877906bSopenharmony_ci	greater than zero. Setting an invalid size will raise an
550b877906bSopenharmony_ci	invalid_size error.
551b877906bSopenharmony_ci      </description>
552b877906bSopenharmony_ci      <arg name="x" type="int"/>
553b877906bSopenharmony_ci      <arg name="y" type="int"/>
554b877906bSopenharmony_ci      <arg name="width" type="int"/>
555b877906bSopenharmony_ci      <arg name="height" type="int"/>
556b877906bSopenharmony_ci    </request>
557b877906bSopenharmony_ci
558b877906bSopenharmony_ci    <request name="ack_configure">
559b877906bSopenharmony_ci      <description summary="ack a configure event">
560b877906bSopenharmony_ci	When a configure event is received, if a client commits the
561b877906bSopenharmony_ci	surface in response to the configure event, then the client
562b877906bSopenharmony_ci	must make an ack_configure request sometime before the commit
563b877906bSopenharmony_ci	request, passing along the serial of the configure event.
564b877906bSopenharmony_ci
565b877906bSopenharmony_ci	For instance, for toplevel surfaces the compositor might use this
566b877906bSopenharmony_ci	information to move a surface to the top left only when the client has
567b877906bSopenharmony_ci	drawn itself for the maximized or fullscreen state.
568b877906bSopenharmony_ci
569b877906bSopenharmony_ci	If the client receives multiple configure events before it
570b877906bSopenharmony_ci	can respond to one, it only has to ack the last configure event.
571b877906bSopenharmony_ci	Acking a configure event that was never sent raises an invalid_serial
572b877906bSopenharmony_ci	error.
573b877906bSopenharmony_ci
574b877906bSopenharmony_ci	A client is not required to commit immediately after sending
575b877906bSopenharmony_ci	an ack_configure request - it may even ack_configure several times
576b877906bSopenharmony_ci	before its next surface commit.
577b877906bSopenharmony_ci
578b877906bSopenharmony_ci	A client may send multiple ack_configure requests before committing, but
579b877906bSopenharmony_ci	only the last request sent before a commit indicates which configure
580b877906bSopenharmony_ci	event the client really is responding to.
581b877906bSopenharmony_ci
582b877906bSopenharmony_ci	Sending an ack_configure request consumes the serial number sent with
583b877906bSopenharmony_ci	the request, as well as serial numbers sent by all configure events
584b877906bSopenharmony_ci	sent on this xdg_surface prior to the configure event referenced by
585b877906bSopenharmony_ci	the committed serial.
586b877906bSopenharmony_ci
587b877906bSopenharmony_ci	It is an error to issue multiple ack_configure requests referencing a
588b877906bSopenharmony_ci	serial from the same configure event, or to issue an ack_configure
589b877906bSopenharmony_ci	request referencing a serial from a configure event issued before the
590b877906bSopenharmony_ci	event identified by the last ack_configure request for the same
591b877906bSopenharmony_ci	xdg_surface. Doing so will raise an invalid_serial error.
592b877906bSopenharmony_ci      </description>
593b877906bSopenharmony_ci      <arg name="serial" type="uint" summary="the serial from the configure event"/>
594b877906bSopenharmony_ci    </request>
595b877906bSopenharmony_ci
596b877906bSopenharmony_ci    <event name="configure">
597b877906bSopenharmony_ci      <description summary="suggest a surface change">
598b877906bSopenharmony_ci	The configure event marks the end of a configure sequence. A configure
599b877906bSopenharmony_ci	sequence is a set of one or more events configuring the state of the
600b877906bSopenharmony_ci	xdg_surface, including the final xdg_surface.configure event.
601b877906bSopenharmony_ci
602b877906bSopenharmony_ci	Where applicable, xdg_surface surface roles will during a configure
603b877906bSopenharmony_ci	sequence extend this event as a latched state sent as events before the
604b877906bSopenharmony_ci	xdg_surface.configure event. Such events should be considered to make up
605b877906bSopenharmony_ci	a set of atomically applied configuration states, where the
606b877906bSopenharmony_ci	xdg_surface.configure commits the accumulated state.
607b877906bSopenharmony_ci
608b877906bSopenharmony_ci	Clients should arrange their surface for the new states, and then send
609b877906bSopenharmony_ci	an ack_configure request with the serial sent in this configure event at
610b877906bSopenharmony_ci	some point before committing the new surface.
611b877906bSopenharmony_ci
612b877906bSopenharmony_ci	If the client receives multiple configure events before it can respond
613b877906bSopenharmony_ci	to one, it is free to discard all but the last event it received.
614b877906bSopenharmony_ci      </description>
615b877906bSopenharmony_ci      <arg name="serial" type="uint" summary="serial of the configure event"/>
616b877906bSopenharmony_ci    </event>
617b877906bSopenharmony_ci
618b877906bSopenharmony_ci  </interface>
619b877906bSopenharmony_ci
620b877906bSopenharmony_ci  <interface name="xdg_toplevel" version="6">
621b877906bSopenharmony_ci    <description summary="toplevel surface">
622b877906bSopenharmony_ci      This interface defines an xdg_surface role which allows a surface to,
623b877906bSopenharmony_ci      among other things, set window-like properties such as maximize,
624b877906bSopenharmony_ci      fullscreen, and minimize, set application-specific metadata like title and
625b877906bSopenharmony_ci      id, and well as trigger user interactive operations such as interactive
626b877906bSopenharmony_ci      resize and move.
627b877906bSopenharmony_ci
628b877906bSopenharmony_ci      Unmapping an xdg_toplevel means that the surface cannot be shown
629b877906bSopenharmony_ci      by the compositor until it is explicitly mapped again.
630b877906bSopenharmony_ci      All active operations (e.g., move, resize) are canceled and all
631b877906bSopenharmony_ci      attributes (e.g. title, state, stacking, ...) are discarded for
632b877906bSopenharmony_ci      an xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to
633b877906bSopenharmony_ci      the state it had right after xdg_surface.get_toplevel. The client
634b877906bSopenharmony_ci      can re-map the toplevel by perfoming a commit without any buffer
635b877906bSopenharmony_ci      attached, waiting for a configure event and handling it as usual (see
636b877906bSopenharmony_ci      xdg_surface description).
637b877906bSopenharmony_ci
638b877906bSopenharmony_ci      Attaching a null buffer to a toplevel unmaps the surface.
639b877906bSopenharmony_ci    </description>
640b877906bSopenharmony_ci
641b877906bSopenharmony_ci    <request name="destroy" type="destructor">
642b877906bSopenharmony_ci      <description summary="destroy the xdg_toplevel">
643b877906bSopenharmony_ci	This request destroys the role surface and unmaps the surface;
644b877906bSopenharmony_ci	see "Unmapping" behavior in interface section for details.
645b877906bSopenharmony_ci      </description>
646b877906bSopenharmony_ci    </request>
647b877906bSopenharmony_ci
648b877906bSopenharmony_ci    <enum name="error">
649b877906bSopenharmony_ci      <entry name="invalid_resize_edge" value="0" summary="provided value is
650b877906bSopenharmony_ci        not a valid variant of the resize_edge enum"/>
651b877906bSopenharmony_ci      <entry name="invalid_parent" value="1"
652b877906bSopenharmony_ci        summary="invalid parent toplevel"/>
653b877906bSopenharmony_ci      <entry name="invalid_size" value="2"
654b877906bSopenharmony_ci	summary="client provided an invalid min or max size"/>
655b877906bSopenharmony_ci    </enum>
656b877906bSopenharmony_ci
657b877906bSopenharmony_ci    <request name="set_parent">
658b877906bSopenharmony_ci      <description summary="set the parent of this surface">
659b877906bSopenharmony_ci	Set the "parent" of this surface. This surface should be stacked
660b877906bSopenharmony_ci	above the parent surface and all other ancestor surfaces.
661b877906bSopenharmony_ci
662b877906bSopenharmony_ci	Parent surfaces should be set on dialogs, toolboxes, or other
663b877906bSopenharmony_ci	"auxiliary" surfaces, so that the parent is raised when the dialog
664b877906bSopenharmony_ci	is raised.
665b877906bSopenharmony_ci
666b877906bSopenharmony_ci	Setting a null parent for a child surface unsets its parent. Setting
667b877906bSopenharmony_ci	a null parent for a surface which currently has no parent is a no-op.
668b877906bSopenharmony_ci
669b877906bSopenharmony_ci	Only mapped surfaces can have child surfaces. Setting a parent which
670b877906bSopenharmony_ci	is not mapped is equivalent to setting a null parent. If a surface
671b877906bSopenharmony_ci	becomes unmapped, its children's parent is set to the parent of
672b877906bSopenharmony_ci	the now-unmapped surface. If the now-unmapped surface has no parent,
673b877906bSopenharmony_ci	its children's parent is unset. If the now-unmapped surface becomes
674b877906bSopenharmony_ci	mapped again, its parent-child relationship is not restored.
675b877906bSopenharmony_ci
676b877906bSopenharmony_ci	The parent toplevel must not be one of the child toplevel's
677b877906bSopenharmony_ci	descendants, and the parent must be different from the child toplevel,
678b877906bSopenharmony_ci	otherwise the invalid_parent protocol error is raised.
679b877906bSopenharmony_ci      </description>
680b877906bSopenharmony_ci      <arg name="parent" type="object" interface="xdg_toplevel" allow-null="true"/>
681b877906bSopenharmony_ci    </request>
682b877906bSopenharmony_ci
683b877906bSopenharmony_ci    <request name="set_title">
684b877906bSopenharmony_ci      <description summary="set surface title">
685b877906bSopenharmony_ci	Set a short title for the surface.
686b877906bSopenharmony_ci
687b877906bSopenharmony_ci	This string may be used to identify the surface in a task bar,
688b877906bSopenharmony_ci	window list, or other user interface elements provided by the
689b877906bSopenharmony_ci	compositor.
690b877906bSopenharmony_ci
691b877906bSopenharmony_ci	The string must be encoded in UTF-8.
692b877906bSopenharmony_ci      </description>
693b877906bSopenharmony_ci      <arg name="title" type="string"/>
694b877906bSopenharmony_ci    </request>
695b877906bSopenharmony_ci
696b877906bSopenharmony_ci    <request name="set_app_id">
697b877906bSopenharmony_ci      <description summary="set application ID">
698b877906bSopenharmony_ci	Set an application identifier for the surface.
699b877906bSopenharmony_ci
700b877906bSopenharmony_ci	The app ID identifies the general class of applications to which
701b877906bSopenharmony_ci	the surface belongs. The compositor can use this to group multiple
702b877906bSopenharmony_ci	surfaces together, or to determine how to launch a new application.
703b877906bSopenharmony_ci
704b877906bSopenharmony_ci	For D-Bus activatable applications, the app ID is used as the D-Bus
705b877906bSopenharmony_ci	service name.
706b877906bSopenharmony_ci
707b877906bSopenharmony_ci	The compositor shell will try to group application surfaces together
708b877906bSopenharmony_ci	by their app ID. As a best practice, it is suggested to select app
709b877906bSopenharmony_ci	ID's that match the basename of the application's .desktop file.
710b877906bSopenharmony_ci	For example, "org.freedesktop.FooViewer" where the .desktop file is
711b877906bSopenharmony_ci	"org.freedesktop.FooViewer.desktop".
712b877906bSopenharmony_ci
713b877906bSopenharmony_ci	Like other properties, a set_app_id request can be sent after the
714b877906bSopenharmony_ci	xdg_toplevel has been mapped to update the property.
715b877906bSopenharmony_ci
716b877906bSopenharmony_ci	See the desktop-entry specification [0] for more details on
717b877906bSopenharmony_ci	application identifiers and how they relate to well-known D-Bus
718b877906bSopenharmony_ci	names and .desktop files.
719b877906bSopenharmony_ci
720b877906bSopenharmony_ci	[0] https://standards.freedesktop.org/desktop-entry-spec/
721b877906bSopenharmony_ci      </description>
722b877906bSopenharmony_ci      <arg name="app_id" type="string"/>
723b877906bSopenharmony_ci    </request>
724b877906bSopenharmony_ci
725b877906bSopenharmony_ci    <request name="show_window_menu">
726b877906bSopenharmony_ci      <description summary="show the window menu">
727b877906bSopenharmony_ci	Clients implementing client-side decorations might want to show
728b877906bSopenharmony_ci	a context menu when right-clicking on the decorations, giving the
729b877906bSopenharmony_ci	user a menu that they can use to maximize or minimize the window.
730b877906bSopenharmony_ci
731b877906bSopenharmony_ci	This request asks the compositor to pop up such a window menu at
732b877906bSopenharmony_ci	the given position, relative to the local surface coordinates of
733b877906bSopenharmony_ci	the parent surface. There are no guarantees as to what menu items
734b877906bSopenharmony_ci	the window menu contains, or even if a window menu will be drawn
735b877906bSopenharmony_ci	at all.
736b877906bSopenharmony_ci
737b877906bSopenharmony_ci	This request must be used in response to some sort of user action
738b877906bSopenharmony_ci	like a button press, key press, or touch down event.
739b877906bSopenharmony_ci      </description>
740b877906bSopenharmony_ci      <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/>
741b877906bSopenharmony_ci      <arg name="serial" type="uint" summary="the serial of the user event"/>
742b877906bSopenharmony_ci      <arg name="x" type="int" summary="the x position to pop up the window menu at"/>
743b877906bSopenharmony_ci      <arg name="y" type="int" summary="the y position to pop up the window menu at"/>
744b877906bSopenharmony_ci    </request>
745b877906bSopenharmony_ci
746b877906bSopenharmony_ci    <request name="move">
747b877906bSopenharmony_ci      <description summary="start an interactive move">
748b877906bSopenharmony_ci	Start an interactive, user-driven move of the surface.
749b877906bSopenharmony_ci
750b877906bSopenharmony_ci	This request must be used in response to some sort of user action
751b877906bSopenharmony_ci	like a button press, key press, or touch down event. The passed
752b877906bSopenharmony_ci	serial is used to determine the type of interactive move (touch,
753b877906bSopenharmony_ci	pointer, etc).
754b877906bSopenharmony_ci
755b877906bSopenharmony_ci	The server may ignore move requests depending on the state of
756b877906bSopenharmony_ci	the surface (e.g. fullscreen or maximized), or if the passed serial
757b877906bSopenharmony_ci	is no longer valid.
758b877906bSopenharmony_ci
759b877906bSopenharmony_ci	If triggered, the surface will lose the focus of the device
760b877906bSopenharmony_ci	(wl_pointer, wl_touch, etc) used for the move. It is up to the
761b877906bSopenharmony_ci	compositor to visually indicate that the move is taking place, such as
762b877906bSopenharmony_ci	updating a pointer cursor, during the move. There is no guarantee
763b877906bSopenharmony_ci	that the device focus will return when the move is completed.
764b877906bSopenharmony_ci      </description>
765b877906bSopenharmony_ci      <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/>
766b877906bSopenharmony_ci      <arg name="serial" type="uint" summary="the serial of the user event"/>
767b877906bSopenharmony_ci    </request>
768b877906bSopenharmony_ci
769b877906bSopenharmony_ci    <enum name="resize_edge">
770b877906bSopenharmony_ci      <description summary="edge values for resizing">
771b877906bSopenharmony_ci	These values are used to indicate which edge of a surface
772b877906bSopenharmony_ci	is being dragged in a resize operation.
773b877906bSopenharmony_ci      </description>
774b877906bSopenharmony_ci      <entry name="none" value="0"/>
775b877906bSopenharmony_ci      <entry name="top" value="1"/>
776b877906bSopenharmony_ci      <entry name="bottom" value="2"/>
777b877906bSopenharmony_ci      <entry name="left" value="4"/>
778b877906bSopenharmony_ci      <entry name="top_left" value="5"/>
779b877906bSopenharmony_ci      <entry name="bottom_left" value="6"/>
780b877906bSopenharmony_ci      <entry name="right" value="8"/>
781b877906bSopenharmony_ci      <entry name="top_right" value="9"/>
782b877906bSopenharmony_ci      <entry name="bottom_right" value="10"/>
783b877906bSopenharmony_ci    </enum>
784b877906bSopenharmony_ci
785b877906bSopenharmony_ci    <request name="resize">
786b877906bSopenharmony_ci      <description summary="start an interactive resize">
787b877906bSopenharmony_ci	Start a user-driven, interactive resize of the surface.
788b877906bSopenharmony_ci
789b877906bSopenharmony_ci	This request must be used in response to some sort of user action
790b877906bSopenharmony_ci	like a button press, key press, or touch down event. The passed
791b877906bSopenharmony_ci	serial is used to determine the type of interactive resize (touch,
792b877906bSopenharmony_ci	pointer, etc).
793b877906bSopenharmony_ci
794b877906bSopenharmony_ci	The server may ignore resize requests depending on the state of
795b877906bSopenharmony_ci	the surface (e.g. fullscreen or maximized).
796b877906bSopenharmony_ci
797b877906bSopenharmony_ci	If triggered, the client will receive configure events with the
798b877906bSopenharmony_ci	"resize" state enum value and the expected sizes. See the "resize"
799b877906bSopenharmony_ci	enum value for more details about what is required. The client
800b877906bSopenharmony_ci	must also acknowledge configure events using "ack_configure". After
801b877906bSopenharmony_ci	the resize is completed, the client will receive another "configure"
802b877906bSopenharmony_ci	event without the resize state.
803b877906bSopenharmony_ci
804b877906bSopenharmony_ci	If triggered, the surface also will lose the focus of the device
805b877906bSopenharmony_ci	(wl_pointer, wl_touch, etc) used for the resize. It is up to the
806b877906bSopenharmony_ci	compositor to visually indicate that the resize is taking place,
807b877906bSopenharmony_ci	such as updating a pointer cursor, during the resize. There is no
808b877906bSopenharmony_ci	guarantee that the device focus will return when the resize is
809b877906bSopenharmony_ci	completed.
810b877906bSopenharmony_ci
811b877906bSopenharmony_ci	The edges parameter specifies how the surface should be resized, and
812b877906bSopenharmony_ci	is one of the values of the resize_edge enum. Values not matching
813b877906bSopenharmony_ci	a variant of the enum will cause the invalid_resize_edge protocol error.
814b877906bSopenharmony_ci	The compositor may use this information to update the surface position
815b877906bSopenharmony_ci	for example when dragging the top left corner. The compositor may also
816b877906bSopenharmony_ci	use this information to adapt its behavior, e.g. choose an appropriate
817b877906bSopenharmony_ci	cursor image.
818b877906bSopenharmony_ci      </description>
819b877906bSopenharmony_ci      <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/>
820b877906bSopenharmony_ci      <arg name="serial" type="uint" summary="the serial of the user event"/>
821b877906bSopenharmony_ci      <arg name="edges" type="uint" enum="resize_edge" summary="which edge or corner is being dragged"/>
822b877906bSopenharmony_ci    </request>
823b877906bSopenharmony_ci
824b877906bSopenharmony_ci    <enum name="state">
825b877906bSopenharmony_ci      <description summary="types of state on the surface">
826b877906bSopenharmony_ci	The different state values used on the surface. This is designed for
827b877906bSopenharmony_ci	state values like maximized, fullscreen. It is paired with the
828b877906bSopenharmony_ci	configure event to ensure that both the client and the compositor
829b877906bSopenharmony_ci	setting the state can be synchronized.
830b877906bSopenharmony_ci
831b877906bSopenharmony_ci	States set in this way are double-buffered. They will get applied on
832b877906bSopenharmony_ci	the next commit.
833b877906bSopenharmony_ci      </description>
834b877906bSopenharmony_ci      <entry name="maximized" value="1" summary="the surface is maximized">
835b877906bSopenharmony_ci	<description summary="the surface is maximized">
836b877906bSopenharmony_ci	  The surface is maximized. The window geometry specified in the configure
837b877906bSopenharmony_ci	  event must be obeyed by the client, or the xdg_wm_base.invalid_surface_state
838b877906bSopenharmony_ci	  error is raised.
839b877906bSopenharmony_ci
840b877906bSopenharmony_ci	  The client should draw without shadow or other
841b877906bSopenharmony_ci	  decoration outside of the window geometry.
842b877906bSopenharmony_ci	</description>
843b877906bSopenharmony_ci      </entry>
844b877906bSopenharmony_ci      <entry name="fullscreen" value="2" summary="the surface is fullscreen">
845b877906bSopenharmony_ci	<description summary="the surface is fullscreen">
846b877906bSopenharmony_ci	  The surface is fullscreen. The window geometry specified in the
847b877906bSopenharmony_ci	  configure event is a maximum; the client cannot resize beyond it. For
848b877906bSopenharmony_ci	  a surface to cover the whole fullscreened area, the geometry
849b877906bSopenharmony_ci	  dimensions must be obeyed by the client. For more details, see
850b877906bSopenharmony_ci	  xdg_toplevel.set_fullscreen.
851b877906bSopenharmony_ci	</description>
852b877906bSopenharmony_ci      </entry>
853b877906bSopenharmony_ci      <entry name="resizing" value="3" summary="the surface is being resized">
854b877906bSopenharmony_ci	<description summary="the surface is being resized">
855b877906bSopenharmony_ci	  The surface is being resized. The window geometry specified in the
856b877906bSopenharmony_ci	  configure event is a maximum; the client cannot resize beyond it.
857b877906bSopenharmony_ci	  Clients that have aspect ratio or cell sizing configuration can use
858b877906bSopenharmony_ci	  a smaller size, however.
859b877906bSopenharmony_ci	</description>
860b877906bSopenharmony_ci      </entry>
861b877906bSopenharmony_ci      <entry name="activated" value="4" summary="the surface is now activated">
862b877906bSopenharmony_ci	<description summary="the surface is now activated">
863b877906bSopenharmony_ci	  Client window decorations should be painted as if the window is
864b877906bSopenharmony_ci	  active. Do not assume this means that the window actually has
865b877906bSopenharmony_ci	  keyboard or pointer focus.
866b877906bSopenharmony_ci	</description>
867b877906bSopenharmony_ci      </entry>
868b877906bSopenharmony_ci      <entry name="tiled_left" value="5" since="2">
869b877906bSopenharmony_ci	<description summary="the surface’s left edge is tiled">
870b877906bSopenharmony_ci	  The window is currently in a tiled layout and the left edge is
871b877906bSopenharmony_ci	  considered to be adjacent to another part of the tiling grid.
872b877906bSopenharmony_ci	</description>
873b877906bSopenharmony_ci      </entry>
874b877906bSopenharmony_ci      <entry name="tiled_right" value="6" since="2">
875b877906bSopenharmony_ci	<description summary="the surface’s right edge is tiled">
876b877906bSopenharmony_ci	  The window is currently in a tiled layout and the right edge is
877b877906bSopenharmony_ci	  considered to be adjacent to another part of the tiling grid.
878b877906bSopenharmony_ci	</description>
879b877906bSopenharmony_ci      </entry>
880b877906bSopenharmony_ci      <entry name="tiled_top" value="7" since="2">
881b877906bSopenharmony_ci	<description summary="the surface’s top edge is tiled">
882b877906bSopenharmony_ci	  The window is currently in a tiled layout and the top edge is
883b877906bSopenharmony_ci	  considered to be adjacent to another part of the tiling grid.
884b877906bSopenharmony_ci	</description>
885b877906bSopenharmony_ci      </entry>
886b877906bSopenharmony_ci      <entry name="tiled_bottom" value="8" since="2">
887b877906bSopenharmony_ci	<description summary="the surface’s bottom edge is tiled">
888b877906bSopenharmony_ci	  The window is currently in a tiled layout and the bottom edge is
889b877906bSopenharmony_ci	  considered to be adjacent to another part of the tiling grid.
890b877906bSopenharmony_ci	</description>
891b877906bSopenharmony_ci      </entry>
892b877906bSopenharmony_ci      <entry name="suspended" value="9" since="6">
893b877906bSopenharmony_ci        <description summary="surface repaint is suspended">
894b877906bSopenharmony_ci	  The surface is currently not ordinarily being repainted; for
895b877906bSopenharmony_ci	  example because its content is occluded by another window, or its
896b877906bSopenharmony_ci	  outputs are switched off due to screen locking.
897b877906bSopenharmony_ci	</description>
898b877906bSopenharmony_ci      </entry>
899b877906bSopenharmony_ci    </enum>
900b877906bSopenharmony_ci
901b877906bSopenharmony_ci    <request name="set_max_size">
902b877906bSopenharmony_ci      <description summary="set the maximum size">
903b877906bSopenharmony_ci	Set a maximum size for the window.
904b877906bSopenharmony_ci
905b877906bSopenharmony_ci	The client can specify a maximum size so that the compositor does
906b877906bSopenharmony_ci	not try to configure the window beyond this size.
907b877906bSopenharmony_ci
908b877906bSopenharmony_ci	The width and height arguments are in window geometry coordinates.
909b877906bSopenharmony_ci	See xdg_surface.set_window_geometry.
910b877906bSopenharmony_ci
911b877906bSopenharmony_ci	Values set in this way are double-buffered. They will get applied
912b877906bSopenharmony_ci	on the next commit.
913b877906bSopenharmony_ci
914b877906bSopenharmony_ci	The compositor can use this information to allow or disallow
915b877906bSopenharmony_ci	different states like maximize or fullscreen and draw accurate
916b877906bSopenharmony_ci	animations.
917b877906bSopenharmony_ci
918b877906bSopenharmony_ci	Similarly, a tiling window manager may use this information to
919b877906bSopenharmony_ci	place and resize client windows in a more effective way.
920b877906bSopenharmony_ci
921b877906bSopenharmony_ci	The client should not rely on the compositor to obey the maximum
922b877906bSopenharmony_ci	size. The compositor may decide to ignore the values set by the
923b877906bSopenharmony_ci	client and request a larger size.
924b877906bSopenharmony_ci
925b877906bSopenharmony_ci	If never set, or a value of zero in the request, means that the
926b877906bSopenharmony_ci	client has no expected maximum size in the given dimension.
927b877906bSopenharmony_ci	As a result, a client wishing to reset the maximum size
928b877906bSopenharmony_ci	to an unspecified state can use zero for width and height in the
929b877906bSopenharmony_ci	request.
930b877906bSopenharmony_ci
931b877906bSopenharmony_ci	Requesting a maximum size to be smaller than the minimum size of
932b877906bSopenharmony_ci	a surface is illegal and will result in an invalid_size error.
933b877906bSopenharmony_ci
934b877906bSopenharmony_ci	The width and height must be greater than or equal to zero. Using
935b877906bSopenharmony_ci	strictly negative values for width or height will result in a
936b877906bSopenharmony_ci	invalid_size error.
937b877906bSopenharmony_ci      </description>
938b877906bSopenharmony_ci      <arg name="width" type="int"/>
939b877906bSopenharmony_ci      <arg name="height" type="int"/>
940b877906bSopenharmony_ci    </request>
941b877906bSopenharmony_ci
942b877906bSopenharmony_ci    <request name="set_min_size">
943b877906bSopenharmony_ci      <description summary="set the minimum size">
944b877906bSopenharmony_ci	Set a minimum size for the window.
945b877906bSopenharmony_ci
946b877906bSopenharmony_ci	The client can specify a minimum size so that the compositor does
947b877906bSopenharmony_ci	not try to configure the window below this size.
948b877906bSopenharmony_ci
949b877906bSopenharmony_ci	The width and height arguments are in window geometry coordinates.
950b877906bSopenharmony_ci	See xdg_surface.set_window_geometry.
951b877906bSopenharmony_ci
952b877906bSopenharmony_ci	Values set in this way are double-buffered. They will get applied
953b877906bSopenharmony_ci	on the next commit.
954b877906bSopenharmony_ci
955b877906bSopenharmony_ci	The compositor can use this information to allow or disallow
956b877906bSopenharmony_ci	different states like maximize or fullscreen and draw accurate
957b877906bSopenharmony_ci	animations.
958b877906bSopenharmony_ci
959b877906bSopenharmony_ci	Similarly, a tiling window manager may use this information to
960b877906bSopenharmony_ci	place and resize client windows in a more effective way.
961b877906bSopenharmony_ci
962b877906bSopenharmony_ci	The client should not rely on the compositor to obey the minimum
963b877906bSopenharmony_ci	size. The compositor may decide to ignore the values set by the
964b877906bSopenharmony_ci	client and request a smaller size.
965b877906bSopenharmony_ci
966b877906bSopenharmony_ci	If never set, or a value of zero in the request, means that the
967b877906bSopenharmony_ci	client has no expected minimum size in the given dimension.
968b877906bSopenharmony_ci	As a result, a client wishing to reset the minimum size
969b877906bSopenharmony_ci	to an unspecified state can use zero for width and height in the
970b877906bSopenharmony_ci	request.
971b877906bSopenharmony_ci
972b877906bSopenharmony_ci	Requesting a minimum size to be larger than the maximum size of
973b877906bSopenharmony_ci	a surface is illegal and will result in an invalid_size error.
974b877906bSopenharmony_ci
975b877906bSopenharmony_ci	The width and height must be greater than or equal to zero. Using
976b877906bSopenharmony_ci	strictly negative values for width and height will result in a
977b877906bSopenharmony_ci	invalid_size error.
978b877906bSopenharmony_ci      </description>
979b877906bSopenharmony_ci      <arg name="width" type="int"/>
980b877906bSopenharmony_ci      <arg name="height" type="int"/>
981b877906bSopenharmony_ci    </request>
982b877906bSopenharmony_ci
983b877906bSopenharmony_ci    <request name="set_maximized">
984b877906bSopenharmony_ci      <description summary="maximize the window">
985b877906bSopenharmony_ci	Maximize the surface.
986b877906bSopenharmony_ci
987b877906bSopenharmony_ci	After requesting that the surface should be maximized, the compositor
988b877906bSopenharmony_ci	will respond by emitting a configure event. Whether this configure
989b877906bSopenharmony_ci	actually sets the window maximized is subject to compositor policies.
990b877906bSopenharmony_ci	The client must then update its content, drawing in the configured
991b877906bSopenharmony_ci	state. The client must also acknowledge the configure when committing
992b877906bSopenharmony_ci	the new content (see ack_configure).
993b877906bSopenharmony_ci
994b877906bSopenharmony_ci	It is up to the compositor to decide how and where to maximize the
995b877906bSopenharmony_ci	surface, for example which output and what region of the screen should
996b877906bSopenharmony_ci	be used.
997b877906bSopenharmony_ci
998b877906bSopenharmony_ci	If the surface was already maximized, the compositor will still emit
999b877906bSopenharmony_ci	a configure event with the "maximized" state.
1000b877906bSopenharmony_ci
1001b877906bSopenharmony_ci	If the surface is in a fullscreen state, this request has no direct
1002b877906bSopenharmony_ci	effect. It may alter the state the surface is returned to when
1003b877906bSopenharmony_ci	unmaximized unless overridden by the compositor.
1004b877906bSopenharmony_ci      </description>
1005b877906bSopenharmony_ci    </request>
1006b877906bSopenharmony_ci
1007b877906bSopenharmony_ci    <request name="unset_maximized">
1008b877906bSopenharmony_ci      <description summary="unmaximize the window">
1009b877906bSopenharmony_ci	Unmaximize the surface.
1010b877906bSopenharmony_ci
1011b877906bSopenharmony_ci	After requesting that the surface should be unmaximized, the compositor
1012b877906bSopenharmony_ci	will respond by emitting a configure event. Whether this actually
1013b877906bSopenharmony_ci	un-maximizes the window is subject to compositor policies.
1014b877906bSopenharmony_ci	If available and applicable, the compositor will include the window
1015b877906bSopenharmony_ci	geometry dimensions the window had prior to being maximized in the
1016b877906bSopenharmony_ci	configure event. The client must then update its content, drawing it in
1017b877906bSopenharmony_ci	the configured state. The client must also acknowledge the configure
1018b877906bSopenharmony_ci	when committing the new content (see ack_configure).
1019b877906bSopenharmony_ci
1020b877906bSopenharmony_ci	It is up to the compositor to position the surface after it was
1021b877906bSopenharmony_ci	unmaximized; usually the position the surface had before maximizing, if
1022b877906bSopenharmony_ci	applicable.
1023b877906bSopenharmony_ci
1024b877906bSopenharmony_ci	If the surface was already not maximized, the compositor will still
1025b877906bSopenharmony_ci	emit a configure event without the "maximized" state.
1026b877906bSopenharmony_ci
1027b877906bSopenharmony_ci	If the surface is in a fullscreen state, this request has no direct
1028b877906bSopenharmony_ci	effect. It may alter the state the surface is returned to when
1029b877906bSopenharmony_ci	unmaximized unless overridden by the compositor.
1030b877906bSopenharmony_ci      </description>
1031b877906bSopenharmony_ci    </request>
1032b877906bSopenharmony_ci
1033b877906bSopenharmony_ci    <request name="set_fullscreen">
1034b877906bSopenharmony_ci      <description summary="set the window as fullscreen on an output">
1035b877906bSopenharmony_ci	Make the surface fullscreen.
1036b877906bSopenharmony_ci
1037b877906bSopenharmony_ci	After requesting that the surface should be fullscreened, the
1038b877906bSopenharmony_ci	compositor will respond by emitting a configure event. Whether the
1039b877906bSopenharmony_ci	client is actually put into a fullscreen state is subject to compositor
1040b877906bSopenharmony_ci	policies. The client must also acknowledge the configure when
1041b877906bSopenharmony_ci	committing the new content (see ack_configure).
1042b877906bSopenharmony_ci
1043b877906bSopenharmony_ci	The output passed by the request indicates the client's preference as
1044b877906bSopenharmony_ci	to which display it should be set fullscreen on. If this value is NULL,
1045b877906bSopenharmony_ci	it's up to the compositor to choose which display will be used to map
1046b877906bSopenharmony_ci	this surface.
1047b877906bSopenharmony_ci
1048b877906bSopenharmony_ci	If the surface doesn't cover the whole output, the compositor will
1049b877906bSopenharmony_ci	position the surface in the center of the output and compensate with
1050b877906bSopenharmony_ci	with border fill covering the rest of the output. The content of the
1051b877906bSopenharmony_ci	border fill is undefined, but should be assumed to be in some way that
1052b877906bSopenharmony_ci	attempts to blend into the surrounding area (e.g. solid black).
1053b877906bSopenharmony_ci
1054b877906bSopenharmony_ci	If the fullscreened surface is not opaque, the compositor must make
1055b877906bSopenharmony_ci	sure that other screen content not part of the same surface tree (made
1056b877906bSopenharmony_ci	up of subsurfaces, popups or similarly coupled surfaces) are not
1057b877906bSopenharmony_ci	visible below the fullscreened surface.
1058b877906bSopenharmony_ci      </description>
1059b877906bSopenharmony_ci      <arg name="output" type="object" interface="wl_output" allow-null="true"/>
1060b877906bSopenharmony_ci    </request>
1061b877906bSopenharmony_ci
1062b877906bSopenharmony_ci    <request name="unset_fullscreen">
1063b877906bSopenharmony_ci      <description summary="unset the window as fullscreen">
1064b877906bSopenharmony_ci	Make the surface no longer fullscreen.
1065b877906bSopenharmony_ci
1066b877906bSopenharmony_ci	After requesting that the surface should be unfullscreened, the
1067b877906bSopenharmony_ci	compositor will respond by emitting a configure event.
1068b877906bSopenharmony_ci	Whether this actually removes the fullscreen state of the client is
1069b877906bSopenharmony_ci	subject to compositor policies.
1070b877906bSopenharmony_ci
1071b877906bSopenharmony_ci	Making a surface unfullscreen sets states for the surface based on the following:
1072b877906bSopenharmony_ci	* the state(s) it may have had before becoming fullscreen
1073b877906bSopenharmony_ci	* any state(s) decided by the compositor
1074b877906bSopenharmony_ci	* any state(s) requested by the client while the surface was fullscreen
1075b877906bSopenharmony_ci
1076b877906bSopenharmony_ci	The compositor may include the previous window geometry dimensions in
1077b877906bSopenharmony_ci	the configure event, if applicable.
1078b877906bSopenharmony_ci
1079b877906bSopenharmony_ci	The client must also acknowledge the configure when committing the new
1080b877906bSopenharmony_ci	content (see ack_configure).
1081b877906bSopenharmony_ci      </description>
1082b877906bSopenharmony_ci    </request>
1083b877906bSopenharmony_ci
1084b877906bSopenharmony_ci    <request name="set_minimized">
1085b877906bSopenharmony_ci      <description summary="set the window as minimized">
1086b877906bSopenharmony_ci	Request that the compositor minimize your surface. There is no
1087b877906bSopenharmony_ci	way to know if the surface is currently minimized, nor is there
1088b877906bSopenharmony_ci	any way to unset minimization on this surface.
1089b877906bSopenharmony_ci
1090b877906bSopenharmony_ci	If you are looking to throttle redrawing when minimized, please
1091b877906bSopenharmony_ci	instead use the wl_surface.frame event for this, as this will
1092b877906bSopenharmony_ci	also work with live previews on windows in Alt-Tab, Expose or
1093b877906bSopenharmony_ci	similar compositor features.
1094b877906bSopenharmony_ci      </description>
1095b877906bSopenharmony_ci    </request>
1096b877906bSopenharmony_ci
1097b877906bSopenharmony_ci    <event name="configure">
1098b877906bSopenharmony_ci      <description summary="suggest a surface change">
1099b877906bSopenharmony_ci	This configure event asks the client to resize its toplevel surface or
1100b877906bSopenharmony_ci	to change its state. The configured state should not be applied
1101b877906bSopenharmony_ci	immediately. See xdg_surface.configure for details.
1102b877906bSopenharmony_ci
1103b877906bSopenharmony_ci	The width and height arguments specify a hint to the window
1104b877906bSopenharmony_ci	about how its surface should be resized in window geometry
1105b877906bSopenharmony_ci	coordinates. See set_window_geometry.
1106b877906bSopenharmony_ci
1107b877906bSopenharmony_ci	If the width or height arguments are zero, it means the client
1108b877906bSopenharmony_ci	should decide its own window dimension. This may happen when the
1109b877906bSopenharmony_ci	compositor needs to configure the state of the surface but doesn't
1110b877906bSopenharmony_ci	have any information about any previous or expected dimension.
1111b877906bSopenharmony_ci
1112b877906bSopenharmony_ci	The states listed in the event specify how the width/height
1113b877906bSopenharmony_ci	arguments should be interpreted, and possibly how it should be
1114b877906bSopenharmony_ci	drawn.
1115b877906bSopenharmony_ci
1116b877906bSopenharmony_ci	Clients must send an ack_configure in response to this event. See
1117b877906bSopenharmony_ci	xdg_surface.configure and xdg_surface.ack_configure for details.
1118b877906bSopenharmony_ci      </description>
1119b877906bSopenharmony_ci      <arg name="width" type="int"/>
1120b877906bSopenharmony_ci      <arg name="height" type="int"/>
1121b877906bSopenharmony_ci      <arg name="states" type="array"/>
1122b877906bSopenharmony_ci    </event>
1123b877906bSopenharmony_ci
1124b877906bSopenharmony_ci    <event name="close">
1125b877906bSopenharmony_ci      <description summary="surface wants to be closed">
1126b877906bSopenharmony_ci	The close event is sent by the compositor when the user
1127b877906bSopenharmony_ci	wants the surface to be closed. This should be equivalent to
1128b877906bSopenharmony_ci	the user clicking the close button in client-side decorations,
1129b877906bSopenharmony_ci	if your application has any.
1130b877906bSopenharmony_ci
1131b877906bSopenharmony_ci	This is only a request that the user intends to close the
1132b877906bSopenharmony_ci	window. The client may choose to ignore this request, or show
1133b877906bSopenharmony_ci	a dialog to ask the user to save their data, etc.
1134b877906bSopenharmony_ci      </description>
1135b877906bSopenharmony_ci    </event>
1136b877906bSopenharmony_ci
1137b877906bSopenharmony_ci    <!-- Version 4 additions -->
1138b877906bSopenharmony_ci
1139b877906bSopenharmony_ci    <event name="configure_bounds" since="4">
1140b877906bSopenharmony_ci      <description summary="recommended window geometry bounds">
1141b877906bSopenharmony_ci	The configure_bounds event may be sent prior to a xdg_toplevel.configure
1142b877906bSopenharmony_ci	event to communicate the bounds a window geometry size is recommended
1143b877906bSopenharmony_ci	to constrain to.
1144b877906bSopenharmony_ci
1145b877906bSopenharmony_ci	The passed width and height are in surface coordinate space. If width
1146b877906bSopenharmony_ci	and height are 0, it means bounds is unknown and equivalent to as if no
1147b877906bSopenharmony_ci	configure_bounds event was ever sent for this surface.
1148b877906bSopenharmony_ci
1149b877906bSopenharmony_ci	The bounds can for example correspond to the size of a monitor excluding
1150b877906bSopenharmony_ci	any panels or other shell components, so that a surface isn't created in
1151b877906bSopenharmony_ci	a way that it cannot fit.
1152b877906bSopenharmony_ci
1153b877906bSopenharmony_ci	The bounds may change at any point, and in such a case, a new
1154b877906bSopenharmony_ci	xdg_toplevel.configure_bounds will be sent, followed by
1155b877906bSopenharmony_ci	xdg_toplevel.configure and xdg_surface.configure.
1156b877906bSopenharmony_ci      </description>
1157b877906bSopenharmony_ci      <arg name="width" type="int"/>
1158b877906bSopenharmony_ci      <arg name="height" type="int"/>
1159b877906bSopenharmony_ci    </event>
1160b877906bSopenharmony_ci
1161b877906bSopenharmony_ci    <!-- Version 5 additions -->
1162b877906bSopenharmony_ci
1163b877906bSopenharmony_ci    <enum name="wm_capabilities" since="5">
1164b877906bSopenharmony_ci      <entry name="window_menu" value="1" summary="show_window_menu is available"/>
1165b877906bSopenharmony_ci      <entry name="maximize" value="2" summary="set_maximized and unset_maximized are available"/>
1166b877906bSopenharmony_ci      <entry name="fullscreen" value="3" summary="set_fullscreen and unset_fullscreen are available"/>
1167b877906bSopenharmony_ci      <entry name="minimize" value="4" summary="set_minimized is available"/>
1168b877906bSopenharmony_ci    </enum>
1169b877906bSopenharmony_ci
1170b877906bSopenharmony_ci    <event name="wm_capabilities" since="5">
1171b877906bSopenharmony_ci      <description summary="compositor capabilities">
1172b877906bSopenharmony_ci	This event advertises the capabilities supported by the compositor. If
1173b877906bSopenharmony_ci	a capability isn't supported, clients should hide or disable the UI
1174b877906bSopenharmony_ci	elements that expose this functionality. For instance, if the
1175b877906bSopenharmony_ci	compositor doesn't advertise support for minimized toplevels, a button
1176b877906bSopenharmony_ci	triggering the set_minimized request should not be displayed.
1177b877906bSopenharmony_ci
1178b877906bSopenharmony_ci	The compositor will ignore requests it doesn't support. For instance,
1179b877906bSopenharmony_ci	a compositor which doesn't advertise support for minimized will ignore
1180b877906bSopenharmony_ci	set_minimized requests.
1181b877906bSopenharmony_ci
1182b877906bSopenharmony_ci	Compositors must send this event once before the first
1183b877906bSopenharmony_ci	xdg_surface.configure event. When the capabilities change, compositors
1184b877906bSopenharmony_ci	must send this event again and then send an xdg_surface.configure
1185b877906bSopenharmony_ci	event.
1186b877906bSopenharmony_ci
1187b877906bSopenharmony_ci	The configured state should not be applied immediately. See
1188b877906bSopenharmony_ci	xdg_surface.configure for details.
1189b877906bSopenharmony_ci
1190b877906bSopenharmony_ci	The capabilities are sent as an array of 32-bit unsigned integers in
1191b877906bSopenharmony_ci	native endianness.
1192b877906bSopenharmony_ci      </description>
1193b877906bSopenharmony_ci      <arg name="capabilities" type="array" summary="array of 32-bit capabilities"/>
1194b877906bSopenharmony_ci    </event>
1195b877906bSopenharmony_ci  </interface>
1196b877906bSopenharmony_ci
1197b877906bSopenharmony_ci  <interface name="xdg_popup" version="6">
1198b877906bSopenharmony_ci    <description summary="short-lived, popup surfaces for menus">
1199b877906bSopenharmony_ci      A popup surface is a short-lived, temporary surface. It can be used to
1200b877906bSopenharmony_ci      implement for example menus, popovers, tooltips and other similar user
1201b877906bSopenharmony_ci      interface concepts.
1202b877906bSopenharmony_ci
1203b877906bSopenharmony_ci      A popup can be made to take an explicit grab. See xdg_popup.grab for
1204b877906bSopenharmony_ci      details.
1205b877906bSopenharmony_ci
1206b877906bSopenharmony_ci      When the popup is dismissed, a popup_done event will be sent out, and at
1207b877906bSopenharmony_ci      the same time the surface will be unmapped. See the xdg_popup.popup_done
1208b877906bSopenharmony_ci      event for details.
1209b877906bSopenharmony_ci
1210b877906bSopenharmony_ci      Explicitly destroying the xdg_popup object will also dismiss the popup and
1211b877906bSopenharmony_ci      unmap the surface. Clients that want to dismiss the popup when another
1212b877906bSopenharmony_ci      surface of their own is clicked should dismiss the popup using the destroy
1213b877906bSopenharmony_ci      request.
1214b877906bSopenharmony_ci
1215b877906bSopenharmony_ci      A newly created xdg_popup will be stacked on top of all previously created
1216b877906bSopenharmony_ci      xdg_popup surfaces associated with the same xdg_toplevel.
1217b877906bSopenharmony_ci
1218b877906bSopenharmony_ci      The parent of an xdg_popup must be mapped (see the xdg_surface
1219b877906bSopenharmony_ci      description) before the xdg_popup itself.
1220b877906bSopenharmony_ci
1221b877906bSopenharmony_ci      The client must call wl_surface.commit on the corresponding wl_surface
1222b877906bSopenharmony_ci      for the xdg_popup state to take effect.
1223b877906bSopenharmony_ci    </description>
1224b877906bSopenharmony_ci
1225b877906bSopenharmony_ci    <enum name="error">
1226b877906bSopenharmony_ci      <entry name="invalid_grab" value="0"
1227b877906bSopenharmony_ci	     summary="tried to grab after being mapped"/>
1228b877906bSopenharmony_ci    </enum>
1229b877906bSopenharmony_ci
1230b877906bSopenharmony_ci    <request name="destroy" type="destructor">
1231b877906bSopenharmony_ci      <description summary="remove xdg_popup interface">
1232b877906bSopenharmony_ci	This destroys the popup. Explicitly destroying the xdg_popup
1233b877906bSopenharmony_ci	object will also dismiss the popup, and unmap the surface.
1234b877906bSopenharmony_ci
1235b877906bSopenharmony_ci	If this xdg_popup is not the "topmost" popup, the
1236b877906bSopenharmony_ci	xdg_wm_base.not_the_topmost_popup protocol error will be sent.
1237b877906bSopenharmony_ci      </description>
1238b877906bSopenharmony_ci    </request>
1239b877906bSopenharmony_ci
1240b877906bSopenharmony_ci    <request name="grab">
1241b877906bSopenharmony_ci      <description summary="make the popup take an explicit grab">
1242b877906bSopenharmony_ci	This request makes the created popup take an explicit grab. An explicit
1243b877906bSopenharmony_ci	grab will be dismissed when the user dismisses the popup, or when the
1244b877906bSopenharmony_ci	client destroys the xdg_popup. This can be done by the user clicking
1245b877906bSopenharmony_ci	outside the surface, using the keyboard, or even locking the screen
1246b877906bSopenharmony_ci	through closing the lid or a timeout.
1247b877906bSopenharmony_ci
1248b877906bSopenharmony_ci	If the compositor denies the grab, the popup will be immediately
1249b877906bSopenharmony_ci	dismissed.
1250b877906bSopenharmony_ci
1251b877906bSopenharmony_ci	This request must be used in response to some sort of user action like a
1252b877906bSopenharmony_ci	button press, key press, or touch down event. The serial number of the
1253b877906bSopenharmony_ci	event should be passed as 'serial'.
1254b877906bSopenharmony_ci
1255b877906bSopenharmony_ci	The parent of a grabbing popup must either be an xdg_toplevel surface or
1256b877906bSopenharmony_ci	another xdg_popup with an explicit grab. If the parent is another
1257b877906bSopenharmony_ci	xdg_popup it means that the popups are nested, with this popup now being
1258b877906bSopenharmony_ci	the topmost popup.
1259b877906bSopenharmony_ci
1260b877906bSopenharmony_ci	Nested popups must be destroyed in the reverse order they were created
1261b877906bSopenharmony_ci	in, e.g. the only popup you are allowed to destroy at all times is the
1262b877906bSopenharmony_ci	topmost one.
1263b877906bSopenharmony_ci
1264b877906bSopenharmony_ci	When compositors choose to dismiss a popup, they may dismiss every
1265b877906bSopenharmony_ci	nested grabbing popup as well. When a compositor dismisses popups, it
1266b877906bSopenharmony_ci	will follow the same dismissing order as required from the client.
1267b877906bSopenharmony_ci
1268b877906bSopenharmony_ci	If the topmost grabbing popup is destroyed, the grab will be returned to
1269b877906bSopenharmony_ci	the parent of the popup, if that parent previously had an explicit grab.
1270b877906bSopenharmony_ci
1271b877906bSopenharmony_ci	If the parent is a grabbing popup which has already been dismissed, this
1272b877906bSopenharmony_ci	popup will be immediately dismissed. If the parent is a popup that did
1273b877906bSopenharmony_ci	not take an explicit grab, an error will be raised.
1274b877906bSopenharmony_ci
1275b877906bSopenharmony_ci	During a popup grab, the client owning the grab will receive pointer
1276b877906bSopenharmony_ci	and touch events for all their surfaces as normal (similar to an
1277b877906bSopenharmony_ci	"owner-events" grab in X11 parlance), while the top most grabbing popup
1278b877906bSopenharmony_ci	will always have keyboard focus.
1279b877906bSopenharmony_ci      </description>
1280b877906bSopenharmony_ci      <arg name="seat" type="object" interface="wl_seat"
1281b877906bSopenharmony_ci	   summary="the wl_seat of the user event"/>
1282b877906bSopenharmony_ci      <arg name="serial" type="uint" summary="the serial of the user event"/>
1283b877906bSopenharmony_ci    </request>
1284b877906bSopenharmony_ci
1285b877906bSopenharmony_ci    <event name="configure">
1286b877906bSopenharmony_ci      <description summary="configure the popup surface">
1287b877906bSopenharmony_ci	This event asks the popup surface to configure itself given the
1288b877906bSopenharmony_ci	configuration. The configured state should not be applied immediately.
1289b877906bSopenharmony_ci	See xdg_surface.configure for details.
1290b877906bSopenharmony_ci
1291b877906bSopenharmony_ci	The x and y arguments represent the position the popup was placed at
1292b877906bSopenharmony_ci	given the xdg_positioner rule, relative to the upper left corner of the
1293b877906bSopenharmony_ci	window geometry of the parent surface.
1294b877906bSopenharmony_ci
1295b877906bSopenharmony_ci	For version 2 or older, the configure event for an xdg_popup is only
1296b877906bSopenharmony_ci	ever sent once for the initial configuration. Starting with version 3,
1297b877906bSopenharmony_ci	it may be sent again if the popup is setup with an xdg_positioner with
1298b877906bSopenharmony_ci	set_reactive requested, or in response to xdg_popup.reposition requests.
1299b877906bSopenharmony_ci      </description>
1300b877906bSopenharmony_ci      <arg name="x" type="int"
1301b877906bSopenharmony_ci	   summary="x position relative to parent surface window geometry"/>
1302b877906bSopenharmony_ci      <arg name="y" type="int"
1303b877906bSopenharmony_ci	   summary="y position relative to parent surface window geometry"/>
1304b877906bSopenharmony_ci      <arg name="width" type="int" summary="window geometry width"/>
1305b877906bSopenharmony_ci      <arg name="height" type="int" summary="window geometry height"/>
1306b877906bSopenharmony_ci    </event>
1307b877906bSopenharmony_ci
1308b877906bSopenharmony_ci    <event name="popup_done">
1309b877906bSopenharmony_ci      <description summary="popup interaction is done">
1310b877906bSopenharmony_ci	The popup_done event is sent out when a popup is dismissed by the
1311b877906bSopenharmony_ci	compositor. The client should destroy the xdg_popup object at this
1312b877906bSopenharmony_ci	point.
1313b877906bSopenharmony_ci      </description>
1314b877906bSopenharmony_ci    </event>
1315b877906bSopenharmony_ci
1316b877906bSopenharmony_ci    <!-- Version 3 additions -->
1317b877906bSopenharmony_ci
1318b877906bSopenharmony_ci    <request name="reposition" since="3">
1319b877906bSopenharmony_ci      <description summary="recalculate the popup's location">
1320b877906bSopenharmony_ci	Reposition an already-mapped popup. The popup will be placed given the
1321b877906bSopenharmony_ci	details in the passed xdg_positioner object, and a
1322b877906bSopenharmony_ci	xdg_popup.repositioned followed by xdg_popup.configure and
1323b877906bSopenharmony_ci	xdg_surface.configure will be emitted in response. Any parameters set
1324b877906bSopenharmony_ci	by the previous positioner will be discarded.
1325b877906bSopenharmony_ci
1326b877906bSopenharmony_ci	The passed token will be sent in the corresponding
1327b877906bSopenharmony_ci	xdg_popup.repositioned event. The new popup position will not take
1328b877906bSopenharmony_ci	effect until the corresponding configure event is acknowledged by the
1329b877906bSopenharmony_ci	client. See xdg_popup.repositioned for details. The token itself is
1330b877906bSopenharmony_ci	opaque, and has no other special meaning.
1331b877906bSopenharmony_ci
1332b877906bSopenharmony_ci	If multiple reposition requests are sent, the compositor may skip all
1333b877906bSopenharmony_ci	but the last one.
1334b877906bSopenharmony_ci
1335b877906bSopenharmony_ci	If the popup is repositioned in response to a configure event for its
1336b877906bSopenharmony_ci	parent, the client should send an xdg_positioner.set_parent_configure
1337b877906bSopenharmony_ci	and possibly an xdg_positioner.set_parent_size request to allow the
1338b877906bSopenharmony_ci	compositor to properly constrain the popup.
1339b877906bSopenharmony_ci
1340b877906bSopenharmony_ci	If the popup is repositioned together with a parent that is being
1341b877906bSopenharmony_ci	resized, but not in response to a configure event, the client should
1342b877906bSopenharmony_ci	send an xdg_positioner.set_parent_size request.
1343b877906bSopenharmony_ci      </description>
1344b877906bSopenharmony_ci      <arg name="positioner" type="object" interface="xdg_positioner"/>
1345b877906bSopenharmony_ci      <arg name="token" type="uint" summary="reposition request token"/>
1346b877906bSopenharmony_ci    </request>
1347b877906bSopenharmony_ci
1348b877906bSopenharmony_ci    <event name="repositioned" since="3">
1349b877906bSopenharmony_ci      <description summary="signal the completion of a repositioned request">
1350b877906bSopenharmony_ci	The repositioned event is sent as part of a popup configuration
1351b877906bSopenharmony_ci	sequence, together with xdg_popup.configure and lastly
1352b877906bSopenharmony_ci	xdg_surface.configure to notify the completion of a reposition request.
1353b877906bSopenharmony_ci
1354b877906bSopenharmony_ci	The repositioned event is to notify about the completion of a
1355b877906bSopenharmony_ci	xdg_popup.reposition request. The token argument is the token passed
1356b877906bSopenharmony_ci	in the xdg_popup.reposition request.
1357b877906bSopenharmony_ci
1358b877906bSopenharmony_ci	Immediately after this event is emitted, xdg_popup.configure and
1359b877906bSopenharmony_ci	xdg_surface.configure will be sent with the updated size and position,
1360b877906bSopenharmony_ci	as well as a new configure serial.
1361b877906bSopenharmony_ci
1362b877906bSopenharmony_ci	The client should optionally update the content of the popup, but must
1363b877906bSopenharmony_ci	acknowledge the new popup configuration for the new position to take
1364b877906bSopenharmony_ci	effect. See xdg_surface.ack_configure for details.
1365b877906bSopenharmony_ci      </description>
1366b877906bSopenharmony_ci      <arg name="token" type="uint" summary="reposition request token"/>
1367b877906bSopenharmony_ci    </event>
1368b877906bSopenharmony_ci
1369b877906bSopenharmony_ci  </interface>
1370b877906bSopenharmony_ci</protocol>
1371