xdg-shell.xml 61 KB

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