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