🛠️🐜 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.

1044 lines
44 KiB

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