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

1120 lines
48 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="1">
  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.ping.
  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="1">
  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. </interface>
  314. <interface name="xdg_surface" version="1">
  315. <description summary="desktop user interface surface base interface">
  316. An interface that may be implemented by a wl_surface, for
  317. implementations that provide a desktop-style user interface.
  318. It provides a base set of functionality required to construct user
  319. interface elements requiring management by the compositor, such as
  320. toplevel windows, menus, etc. The types of functionality are split into
  321. xdg_surface roles.
  322. Creating an xdg_surface does not set the role for a wl_surface. In order
  323. to map an xdg_surface, the client must create a role-specific object
  324. using, e.g., get_toplevel, get_popup. The wl_surface for any given
  325. xdg_surface can have at most one role, and may not be assigned any role
  326. not based on xdg_surface.
  327. A role must be assigned before any other requests are made to the
  328. xdg_surface object.
  329. The client must call wl_surface.commit on the corresponding wl_surface
  330. for the xdg_surface state to take effect.
  331. Creating an xdg_surface from a wl_surface which has a buffer attached or
  332. committed is a client error, and any attempts by a client to attach or
  333. manipulate a buffer prior to the first xdg_surface.configure call must
  334. also be treated as errors.
  335. Mapping an xdg_surface-based role surface is defined as making it
  336. possible for the surface to be shown by the compositor. Note that
  337. a mapped surface is not guaranteed to be visible once it is mapped.
  338. For an xdg_surface to be mapped by the compositor, the following
  339. conditions must be met:
  340. (1) the client has assigned an xdg_surface-based role to the surface
  341. (2) the client has set and committed the xdg_surface state and the
  342. role-dependent state to the surface
  343. (3) the client has committed a buffer to the surface
  344. A newly-unmapped surface is considered to have met condition (1) out
  345. of the 3 required conditions for mapping a surface if its role surface
  346. has not been destroyed.
  347. </description>
  348. <enum name="error">
  349. <entry name="not_constructed" value="1"/>
  350. <entry name="already_constructed" value="2"/>
  351. <entry name="unconfigured_buffer" value="3"/>
  352. </enum>
  353. <request name="destroy" type="destructor">
  354. <description summary="destroy the xdg_surface">
  355. Destroy the xdg_surface object. An xdg_surface must only be destroyed
  356. after its role object has been destroyed.
  357. </description>
  358. </request>
  359. <request name="get_toplevel">
  360. <description summary="assign the xdg_toplevel surface role">
  361. This creates an xdg_toplevel object for the given xdg_surface and gives
  362. the associated wl_surface the xdg_toplevel role.
  363. See the documentation of xdg_toplevel for more details about what an
  364. xdg_toplevel is and how it is used.
  365. </description>
  366. <arg name="id" type="new_id" interface="xdg_toplevel"/>
  367. </request>
  368. <request name="get_popup">
  369. <description summary="assign the xdg_popup surface role">
  370. This creates an xdg_popup object for the given xdg_surface and gives
  371. the associated wl_surface the xdg_popup role.
  372. If null is passed as a parent, a parent surface must be specified using
  373. some other protocol, before committing the initial state.
  374. See the documentation of xdg_popup for more details about what an
  375. xdg_popup is and how it is used.
  376. </description>
  377. <arg name="id" type="new_id" interface="xdg_popup"/>
  378. <arg name="parent" type="object" interface="xdg_surface" allow-null="true"/>
  379. <arg name="positioner" type="object" interface="xdg_positioner"/>
  380. </request>
  381. <request name="set_window_geometry">
  382. <description summary="set the new window geometry">
  383. The window geometry of a surface is its "visible bounds" from the
  384. user's perspective. Client-side decorations often have invisible
  385. portions like drop-shadows which should be ignored for the
  386. purposes of aligning, placing and constraining windows.
  387. The window geometry is double buffered, and will be applied at the
  388. time wl_surface.commit of the corresponding wl_surface is called.
  389. When maintaining a position, the compositor should treat the (x, y)
  390. coordinate of the window geometry as the top left corner of the window.
  391. A client changing the (x, y) window geometry coordinate should in
  392. general not alter the position of the window.
  393. Once the window geometry of the surface is set, it is not possible to
  394. unset it, and it will remain the same until set_window_geometry is
  395. called again, even if a new subsurface or buffer is attached.
  396. If never set, the value is the full bounds of the surface,
  397. including any subsurfaces. This updates dynamically on every
  398. commit. This unset is meant for extremely simple clients.
  399. The arguments are given in the surface-local coordinate space of
  400. the wl_surface associated with this xdg_surface.
  401. The width and height must be greater than zero. Setting an invalid size
  402. will raise an error. When applied, the effective window geometry will be
  403. the set window geometry clamped to the bounding rectangle of the
  404. combined geometry of the surface of the xdg_surface and the associated
  405. subsurfaces.
  406. </description>
  407. <arg name="x" type="int"/>
  408. <arg name="y" type="int"/>
  409. <arg name="width" type="int"/>
  410. <arg name="height" type="int"/>
  411. </request>
  412. <request name="ack_configure">
  413. <description summary="ack a configure event">
  414. When a configure event is received, if a client commits the
  415. surface in response to the configure event, then the client
  416. must make an ack_configure request sometime before the commit
  417. request, passing along the serial of the configure event.
  418. For instance, for toplevel surfaces the compositor might use this
  419. information to move a surface to the top left only when the client has
  420. drawn itself for the maximized or fullscreen state.
  421. If the client receives multiple configure events before it
  422. can respond to one, it only has to ack the last configure event.
  423. A client is not required to commit immediately after sending
  424. an ack_configure request - it may even ack_configure several times
  425. before its next surface commit.
  426. A client may send multiple ack_configure requests before committing, but
  427. only the last request sent before a commit indicates which configure
  428. event the client really is responding to.
  429. </description>
  430. <arg name="serial" type="uint" summary="the serial from the configure event"/>
  431. </request>
  432. <event name="configure">
  433. <description summary="suggest a surface change">
  434. The configure event marks the end of a configure sequence. A configure
  435. sequence is a set of one or more events configuring the state of the
  436. xdg_surface, including the final xdg_surface.configure event.
  437. Where applicable, xdg_surface surface roles will during a configure
  438. sequence extend this event as a latched state sent as events before the
  439. xdg_surface.configure event. Such events should be considered to make up
  440. a set of atomically applied configuration states, where the
  441. xdg_surface.configure commits the accumulated state.
  442. Clients should arrange their surface for the new states, and then send
  443. an ack_configure request with the serial sent in this configure event at
  444. some point before committing the new surface.
  445. If the client receives multiple configure events before it can respond
  446. to one, it is free to discard all but the last event it received.
  447. </description>
  448. <arg name="serial" type="uint" summary="serial of the configure event"/>
  449. </event>
  450. </interface>
  451. <interface name="xdg_toplevel" version="1">
  452. <description summary="toplevel surface">
  453. This interface defines an xdg_surface role which allows a surface to,
  454. among other things, set window-like properties such as maximize,
  455. fullscreen, and minimize, set application-specific metadata like title and
  456. id, and well as trigger user interactive operations such as interactive
  457. resize and move.
  458. Unmapping an xdg_toplevel means that the surface cannot be shown
  459. by the compositor until it is explicitly mapped again.
  460. All active operations (e.g., move, resize) are canceled and all
  461. attributes (e.g. title, state, stacking, ...) are discarded for
  462. an xdg_toplevel surface when it is unmapped.
  463. Attaching a null buffer to a toplevel unmaps the surface.
  464. </description>
  465. <request name="destroy" type="destructor">
  466. <description summary="destroy the xdg_toplevel">
  467. This request destroys the role surface and unmaps the surface;
  468. see "Unmapping" behavior in interface section for details.
  469. </description>
  470. </request>
  471. <request name="set_parent">
  472. <description summary="set the parent of this surface">
  473. Set the "parent" of this surface. This surface should be stacked
  474. above the parent surface and all other ancestor surfaces.
  475. Parent windows should be set on dialogs, toolboxes, or other
  476. "auxiliary" surfaces, so that the parent is raised when the dialog
  477. is raised.
  478. Setting a null parent for a child window removes any parent-child
  479. relationship for the child. Setting a null parent for a window which
  480. currently has no parent is a no-op.
  481. If the parent is unmapped then its children are managed as
  482. though the parent of the now-unmapped parent has become the
  483. parent of this surface. If no parent exists for the now-unmapped
  484. parent then the children are managed as though they have no
  485. parent surface.
  486. </description>
  487. <arg name="parent" type="object" interface="xdg_toplevel" allow-null="true"/>
  488. </request>
  489. <request name="set_title">
  490. <description summary="set surface title">
  491. Set a short title for the surface.
  492. This string may be used to identify the surface in a task bar,
  493. window list, or other user interface elements provided by the
  494. compositor.
  495. The string must be encoded in UTF-8.
  496. </description>
  497. <arg name="title" type="string"/>
  498. </request>
  499. <request name="set_app_id">
  500. <description summary="set application ID">
  501. Set an application identifier for the surface.
  502. The app ID identifies the general class of applications to which
  503. the surface belongs. The compositor can use this to group multiple
  504. surfaces together, or to determine how to launch a new application.
  505. For D-Bus activatable applications, the app ID is used as the D-Bus
  506. service name.
  507. The compositor shell will try to group application surfaces together
  508. by their app ID. As a best practice, it is suggested to select app
  509. ID's that match the basename of the application's .desktop file.
  510. For example, "org.freedesktop.FooViewer" where the .desktop file is
  511. "org.freedesktop.FooViewer.desktop".
  512. See the desktop-entry specification [0] for more details on
  513. application identifiers and how they relate to well-known D-Bus
  514. names and .desktop files.
  515. [0] http://standards.freedesktop.org/desktop-entry-spec/
  516. </description>
  517. <arg name="app_id" type="string"/>
  518. </request>
  519. <request name="show_window_menu">
  520. <description summary="show the window menu">
  521. Clients implementing client-side decorations might want to show
  522. a context menu when right-clicking on the decorations, giving the
  523. user a menu that they can use to maximize or minimize the window.
  524. This request asks the compositor to pop up such a window menu at
  525. the given position, relative to the local surface coordinates of
  526. the parent surface. There are no guarantees as to what menu items
  527. the window menu contains.
  528. This request must be used in response to some sort of user action
  529. like a button press, key press, or touch down event.
  530. </description>
  531. <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/>
  532. <arg name="serial" type="uint" summary="the serial of the user event"/>
  533. <arg name="x" type="int" summary="the x position to pop up the window menu at"/>
  534. <arg name="y" type="int" summary="the y position to pop up the window menu at"/>
  535. </request>
  536. <request name="move">
  537. <description summary="start an interactive move">
  538. Start an interactive, user-driven move of the surface.
  539. This request must be used in response to some sort of user action
  540. like a button press, key press, or touch down event. The passed
  541. serial is used to determine the type of interactive move (touch,
  542. pointer, etc).
  543. The server may ignore move requests depending on the state of
  544. the surface (e.g. fullscreen or maximized), or if the passed serial
  545. is no longer valid.
  546. If triggered, the surface will lose the focus of the device
  547. (wl_pointer, wl_touch, etc) used for the move. It is up to the
  548. compositor to visually indicate that the move is taking place, such as
  549. updating a pointer cursor, during the move. There is no guarantee
  550. that the device focus will return when the move is completed.
  551. </description>
  552. <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/>
  553. <arg name="serial" type="uint" summary="the serial of the user event"/>
  554. </request>
  555. <enum name="resize_edge">
  556. <description summary="edge values for resizing">
  557. These values are used to indicate which edge of a surface
  558. is being dragged in a resize operation.
  559. </description>
  560. <entry name="none" value="0"/>
  561. <entry name="top" value="1"/>
  562. <entry name="bottom" value="2"/>
  563. <entry name="left" value="4"/>
  564. <entry name="top_left" value="5"/>
  565. <entry name="bottom_left" value="6"/>
  566. <entry name="right" value="8"/>
  567. <entry name="top_right" value="9"/>
  568. <entry name="bottom_right" value="10"/>
  569. </enum>
  570. <request name="resize">
  571. <description summary="start an interactive resize">
  572. Start a user-driven, interactive resize of the surface.
  573. This request must be used in response to some sort of user action
  574. like a button press, key press, or touch down event. The passed
  575. serial is used to determine the type of interactive resize (touch,
  576. pointer, etc).
  577. The server may ignore resize requests depending on the state of
  578. the surface (e.g. fullscreen or maximized).
  579. If triggered, the client will receive configure events with the
  580. "resize" state enum value and the expected sizes. See the "resize"
  581. enum value for more details about what is required. The client
  582. must also acknowledge configure events using "ack_configure". After
  583. the resize is completed, the client will receive another "configure"
  584. event without the resize state.
  585. If triggered, the surface also will lose the focus of the device
  586. (wl_pointer, wl_touch, etc) used for the resize. It is up to the
  587. compositor to visually indicate that the resize is taking place,
  588. such as updating a pointer cursor, during the resize. There is no
  589. guarantee that the device focus will return when the resize is
  590. completed.
  591. The edges parameter specifies how the surface should be resized,
  592. and is one of the values of the resize_edge enum. The compositor
  593. may use this information to update the surface position for
  594. example when dragging the top left corner. The compositor may also
  595. use this information to adapt its behavior, e.g. choose an
  596. appropriate cursor image.
  597. </description>
  598. <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/>
  599. <arg name="serial" type="uint" summary="the serial of the user event"/>
  600. <arg name="edges" type="uint" summary="which edge or corner is being dragged"/>
  601. </request>
  602. <enum name="state">
  603. <description summary="types of state on the surface">
  604. The different state values used on the surface. This is designed for
  605. state values like maximized, fullscreen. It is paired with the
  606. configure event to ensure that both the client and the compositor
  607. setting the state can be synchronized.
  608. States set in this way are double-buffered. They will get applied on
  609. the next commit.
  610. </description>
  611. <entry name="maximized" value="1" summary="the surface is maximized">
  612. <description summary="the surface is maximized">
  613. The surface is maximized. The window geometry specified in the configure
  614. event must be obeyed by the client.
  615. </description>
  616. </entry>
  617. <entry name="fullscreen" value="2" summary="the surface is fullscreen">
  618. <description summary="the surface is fullscreen">
  619. The surface is fullscreen. The window geometry specified in the
  620. configure event is a maximum; the client cannot resize beyond it. For
  621. a surface to cover the whole fullscreened area, the geometry
  622. dimensions must be obeyed by the client. For more details, see
  623. xdg_toplevel.set_fullscreen.
  624. </description>
  625. </entry>
  626. <entry name="resizing" value="3" summary="the surface is being resized">
  627. <description summary="the surface is being resized">
  628. The surface is being resized. The window geometry specified in the
  629. configure event is a maximum; the client cannot resize beyond it.
  630. Clients that have aspect ratio or cell sizing configuration can use
  631. a smaller size, however.
  632. </description>
  633. </entry>
  634. <entry name="activated" value="4" summary="the surface is now activated">
  635. <description summary="the surface is now activated">
  636. Client window decorations should be painted as if the window is
  637. active. Do not assume this means that the window actually has
  638. keyboard or pointer focus.
  639. </description>
  640. </entry>
  641. </enum>
  642. <request name="set_max_size">
  643. <description summary="set the maximum size">
  644. Set a maximum size for the window.
  645. The client can specify a maximum size so that the compositor does
  646. not try to configure the window beyond this size.
  647. The width and height arguments are in window geometry coordinates.
  648. See xdg_surface.set_window_geometry.
  649. Values set in this way are double-buffered. They will get applied
  650. on the next commit.
  651. The compositor can use this information to allow or disallow
  652. different states like maximize or fullscreen and draw accurate
  653. animations.
  654. Similarly, a tiling window manager may use this information to
  655. place and resize client windows in a more effective way.
  656. The client should not rely on the compositor to obey the maximum
  657. size. The compositor may decide to ignore the values set by the
  658. client and request a larger size.
  659. If never set, or a value of zero in the request, means that the
  660. client has no expected maximum size in the given dimension.
  661. As a result, a client wishing to reset the maximum size
  662. to an unspecified state can use zero for width and height in the
  663. request.
  664. Requesting a maximum size to be smaller than the minimum size of
  665. a surface is illegal and will result in a protocol error.
  666. The width and height must be greater than or equal to zero. Using
  667. strictly negative values for width and height will result in a
  668. protocol error.
  669. </description>
  670. <arg name="width" type="int"/>
  671. <arg name="height" type="int"/>
  672. </request>
  673. <request name="set_min_size">
  674. <description summary="set the minimum size">
  675. Set a minimum size for the window.
  676. The client can specify a minimum size so that the compositor does
  677. not try to configure the window below this size.
  678. The width and height arguments are in window geometry coordinates.
  679. See xdg_surface.set_window_geometry.
  680. Values set in this way are double-buffered. They will get applied
  681. on the next commit.
  682. The compositor can use this information to allow or disallow
  683. different states like maximize or fullscreen and draw accurate
  684. animations.
  685. Similarly, a tiling window manager may use this information to
  686. place and resize client windows in a more effective way.
  687. The client should not rely on the compositor to obey the minimum
  688. size. The compositor may decide to ignore the values set by the
  689. client and request a smaller size.
  690. If never set, or a value of zero in the request, means that the
  691. client has no expected minimum size in the given dimension.
  692. As a result, a client wishing to reset the minimum size
  693. to an unspecified state can use zero for width and height in the
  694. request.
  695. Requesting a minimum size to be larger than the maximum size of
  696. a surface is illegal and will result in a protocol error.
  697. The width and height must be greater than or equal to zero. Using
  698. strictly negative values for width and height will result in a
  699. protocol error.
  700. </description>
  701. <arg name="width" type="int"/>
  702. <arg name="height" type="int"/>
  703. </request>
  704. <request name="set_maximized">
  705. <description summary="maximize the window">
  706. Maximize the surface.
  707. After requesting that the surface should be maximized, the compositor
  708. will respond by emitting a configure event with the "maximized" state
  709. and the required window geometry. The client should then update its
  710. content, drawing it in a maximized state, i.e. without shadow or other
  711. decoration outside of the window geometry. The client must also
  712. acknowledge the configure when committing the new content (see
  713. ack_configure).
  714. It is up to the compositor to decide how and where to maximize the
  715. surface, for example which output and what region of the screen should
  716. be used.
  717. If the surface was already maximized, the compositor will still emit
  718. a configure event with the "maximized" state.
  719. If the surface is in a fullscreen state, this request has no direct
  720. effect. It will alter the state the surface is returned to when
  721. unmaximized if not overridden by the compositor.
  722. </description>
  723. </request>
  724. <request name="unset_maximized">
  725. <description summary="unmaximize the window">
  726. Unmaximize the surface.
  727. After requesting that the surface should be unmaximized, the compositor
  728. will respond by emitting a configure event without the "maximized"
  729. state. If available, the compositor will include the window geometry
  730. dimensions the window had prior to being maximized in the configure
  731. event. The client must then update its content, drawing it in a
  732. regular state, i.e. potentially with shadow, etc. The client must also
  733. acknowledge the configure when committing the new content (see
  734. ack_configure).
  735. It is up to the compositor to position the surface after it was
  736. unmaximized; usually the position the surface had before maximizing, if
  737. applicable.
  738. If the surface was already not maximized, the compositor will still
  739. emit a configure event without the "maximized" state.
  740. If the surface is in a fullscreen state, this request has no direct
  741. effect. It will alter the state the surface is returned to when
  742. unmaximized if not overridden by the compositor.
  743. </description>
  744. </request>
  745. <request name="set_fullscreen">
  746. <description summary="set the window as fullscreen on an output">
  747. Make the surface fullscreen.
  748. After requesting that the surface should be fullscreened, the
  749. compositor will respond by emitting a configure event with the
  750. "fullscreen" state and the fullscreen window geometry. The client must
  751. also acknowledge the configure when committing the new content (see
  752. ack_configure).
  753. The output passed by the request indicates the client's preference as
  754. to which display it should be set fullscreen on. If this value is NULL,
  755. it's up to the compositor to choose which display will be used to map
  756. this surface.
  757. If the surface doesn't cover the whole output, the compositor will
  758. position the surface in the center of the output and compensate with
  759. with border fill covering the rest of the output. The content of the
  760. border fill is undefined, but should be assumed to be in some way that
  761. attempts to blend into the surrounding area (e.g. solid black).
  762. If the fullscreened surface is not opaque, the compositor must make
  763. sure that other screen content not part of the same surface tree (made
  764. up of subsurfaces, popups or similarly coupled surfaces) are not
  765. visible below the fullscreened surface.
  766. </description>
  767. <arg name="output" type="object" interface="wl_output" allow-null="true"/>
  768. </request>
  769. <request name="unset_fullscreen">
  770. <description summary="unset the window as fullscreen">
  771. Make the surface no longer fullscreen.
  772. After requesting that the surface should be unfullscreened, the
  773. compositor will respond by emitting a configure event without the
  774. "fullscreen" state.
  775. Making a surface unfullscreen sets states for the surface based on the following:
  776. * the state(s) it may have had before becoming fullscreen
  777. * any state(s) decided by the compositor
  778. * any state(s) requested by the client while the surface was fullscreen
  779. The compositor may include the previous window geometry dimensions in
  780. the configure event, if applicable.
  781. The client must also acknowledge the configure when committing the new
  782. content (see ack_configure).
  783. </description>
  784. </request>
  785. <request name="set_minimized">
  786. <description summary="set the window as minimized">
  787. Request that the compositor minimize your surface. There is no
  788. way to know if the surface is currently minimized, nor is there
  789. any way to unset minimization on this surface.
  790. If you are looking to throttle redrawing when minimized, please
  791. instead use the wl_surface.frame event for this, as this will
  792. also work with live previews on windows in Alt-Tab, Expose or
  793. similar compositor features.
  794. </description>
  795. </request>
  796. <event name="configure">
  797. <description summary="suggest a surface change">
  798. This configure event asks the client to resize its toplevel surface or
  799. to change its state. The configured state should not be applied
  800. immediately. See xdg_surface.configure for details.
  801. The width and height arguments specify a hint to the window
  802. about how its surface should be resized in window geometry
  803. coordinates. See set_window_geometry.
  804. If the width or height arguments are zero, it means the client
  805. should decide its own window dimension. This may happen when the
  806. compositor needs to configure the state of the surface but doesn't
  807. have any information about any previous or expected dimension.
  808. The states listed in the event specify how the width/height
  809. arguments should be interpreted, and possibly how it should be
  810. drawn.
  811. Clients must send an ack_configure in response to this event. See
  812. xdg_surface.configure and xdg_surface.ack_configure for details.
  813. </description>
  814. <arg name="width" type="int"/>
  815. <arg name="height" type="int"/>
  816. <arg name="states" type="array"/>
  817. </event>
  818. <event name="close">
  819. <description summary="surface wants to be closed">
  820. The close event is sent by the compositor when the user
  821. wants the surface to be closed. This should be equivalent to
  822. the user clicking the close button in client-side decorations,
  823. if your application has any.
  824. This is only a request that the user intends to close the
  825. window. The client may choose to ignore this request, or show
  826. a dialog to ask the user to save their data, etc.
  827. </description>
  828. </event>
  829. </interface>
  830. <interface name="xdg_popup" version="1">
  831. <description summary="short-lived, popup surfaces for menus">
  832. A popup surface is a short-lived, temporary surface. It can be used to
  833. implement for example menus, popovers, tooltips and other similar user
  834. interface concepts.
  835. A popup can be made to take an explicit grab. See xdg_popup.grab for
  836. details.
  837. When the popup is dismissed, a popup_done event will be sent out, and at
  838. the same time the surface will be unmapped. See the xdg_popup.popup_done
  839. event for details.
  840. Explicitly destroying the xdg_popup object will also dismiss the popup and
  841. unmap the surface. Clients that want to dismiss the popup when another
  842. surface of their own is clicked should dismiss the popup using the destroy
  843. request.
  844. The parent surface must have either the xdg_toplevel or xdg_popup surface
  845. role.
  846. A newly created xdg_popup will be stacked on top of all previously created
  847. xdg_popup surfaces associated with the same xdg_toplevel.
  848. The parent of an xdg_popup must be mapped (see the xdg_surface
  849. description) before the xdg_popup itself.
  850. The x and y arguments passed when creating the popup object specify
  851. where the top left of the popup should be placed, relative to the
  852. local surface coordinates of the parent surface. See
  853. xdg_surface.get_popup. An xdg_popup must intersect with or be at least
  854. partially adjacent to its parent surface.
  855. The client must call wl_surface.commit on the corresponding wl_surface
  856. for the xdg_popup state to take effect.
  857. </description>
  858. <enum name="error">
  859. <entry name="invalid_grab" value="0"
  860. summary="tried to grab after being mapped"/>
  861. </enum>
  862. <request name="destroy" type="destructor">
  863. <description summary="remove xdg_popup interface">
  864. This destroys the popup. Explicitly destroying the xdg_popup
  865. object will also dismiss the popup, and unmap the surface.
  866. If this xdg_popup is not the "topmost" popup, a protocol error
  867. will be sent.
  868. </description>
  869. </request>
  870. <request name="grab">
  871. <description summary="make the popup take an explicit grab">
  872. This request makes the created popup take an explicit grab. An explicit
  873. grab will be dismissed when the user dismisses the popup, or when the
  874. client destroys the xdg_popup. This can be done by the user clicking
  875. outside the surface, using the keyboard, or even locking the screen
  876. through closing the lid or a timeout.
  877. If the compositor denies the grab, the popup will be immediately
  878. dismissed.
  879. This request must be used in response to some sort of user action like a
  880. button press, key press, or touch down event. The serial number of the
  881. event should be passed as 'serial'.
  882. The parent of a grabbing popup must either be an xdg_toplevel surface or
  883. another xdg_popup with an explicit grab. If the parent is another
  884. xdg_popup it means that the popups are nested, with this popup now being
  885. the topmost popup.
  886. Nested popups must be destroyed in the reverse order they were created
  887. in, e.g. the only popup you are allowed to destroy at all times is the
  888. topmost one.
  889. When compositors choose to dismiss a popup, they may dismiss every
  890. nested grabbing popup as well. When a compositor dismisses popups, it
  891. will follow the same dismissing order as required from the client.
  892. The parent of a grabbing popup must either be another xdg_popup with an
  893. active explicit grab, or an xdg_popup or xdg_toplevel, if there are no
  894. explicit grabs already taken.
  895. If the topmost grabbing popup is destroyed, the grab will be returned to
  896. the parent of the popup, if that parent previously had an explicit grab.
  897. If the parent is a grabbing popup which has already been dismissed, this
  898. popup will be immediately dismissed. If the parent is a popup that did
  899. not take an explicit grab, an error will be raised.
  900. During a popup grab, the client owning the grab will receive pointer
  901. and touch events for all their surfaces as normal (similar to an
  902. "owner-events" grab in X11 parlance), while the top most grabbing popup
  903. will always have keyboard focus.
  904. </description>
  905. <arg name="seat" type="object" interface="wl_seat"
  906. summary="the wl_seat of the user event"/>
  907. <arg name="serial" type="uint" summary="the serial of the user event"/>
  908. </request>
  909. <event name="configure">
  910. <description summary="configure the popup surface">
  911. This event asks the popup surface to configure itself given the
  912. configuration. The configured state should not be applied immediately.
  913. See xdg_surface.configure for details.
  914. The x and y arguments represent the position the popup was placed at
  915. given the xdg_positioner rule, relative to the upper left corner of the
  916. window geometry of the parent surface.
  917. </description>
  918. <arg name="x" type="int"
  919. summary="x position relative to parent surface window geometry"/>
  920. <arg name="y" type="int"
  921. summary="y position relative to parent surface window geometry"/>
  922. <arg name="width" type="int" summary="window geometry width"/>
  923. <arg name="height" type="int" summary="window geometry height"/>
  924. </event>
  925. <event name="popup_done">
  926. <description summary="popup interaction is done">
  927. The popup_done event is sent out when a popup is dismissed by the
  928. compositor. The client should destroy the xdg_popup object at this
  929. point.
  930. </description>
  931. </event>
  932. </interface>
  933. </protocol>