github.com/rajveermalviya/gamen@v0.1.2-0.20220930195403-9be15877c1aa/internal/wayland/protocols/xdg-shell.xml (about)

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