🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1240 lines
53 KiB

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