wayland.xml 138 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <protocol name="wayland">
  3. <copyright>
  4. Copyright © 2008-2011 Kristian Høgsberg
  5. Copyright © 2010-2011 Intel Corporation
  6. Copyright © 2012-2013 Collabora, Ltd.
  7. Permission is hereby granted, free of charge, to any person
  8. obtaining a copy of this software and associated documentation files
  9. (the "Software"), to deal in the Software without restriction,
  10. including without limitation the rights to use, copy, modify, merge,
  11. publish, distribute, sublicense, and/or sell copies of the Software,
  12. and to permit persons to whom the Software is furnished to do so,
  13. subject to the following conditions:
  14. The above copyright notice and this permission notice (including the
  15. next paragraph) shall be included in all copies or substantial
  16. portions of the Software.
  17. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  18. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  19. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  20. NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  21. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  22. ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  23. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  24. SOFTWARE.
  25. </copyright>
  26. <interface name="wl_display" version="1">
  27. <description summary="core global object">
  28. The core global object. This is a special singleton object. It
  29. is used for internal Wayland protocol features.
  30. </description>
  31. <request name="sync">
  32. <description summary="asynchronous roundtrip">
  33. The sync request asks the server to emit the 'done' event
  34. on the returned wl_callback object. Since requests are
  35. handled in-order and events are delivered in-order, this can
  36. be used as a barrier to ensure all previous requests and the
  37. resulting events have been handled.
  38. The object returned by this request will be destroyed by the
  39. compositor after the callback is fired and as such the client must not
  40. attempt to use it after that point.
  41. The callback_data passed in the callback is the event serial.
  42. </description>
  43. <arg name="callback" type="new_id" interface="wl_callback"
  44. summary="callback object for the sync request"/>
  45. </request>
  46. <request name="get_registry">
  47. <description summary="get global registry object">
  48. This request creates a registry object that allows the client
  49. to list and bind the global objects available from the
  50. compositor.
  51. It should be noted that the server side resources consumed in
  52. response to a get_registry request can only be released when the
  53. client disconnects, not when the client side proxy is destroyed.
  54. Therefore, clients should invoke get_registry as infrequently as
  55. possible to avoid wasting memory.
  56. </description>
  57. <arg name="registry" type="new_id" interface="wl_registry"
  58. summary="global registry object"/>
  59. </request>
  60. <event name="error">
  61. <description summary="fatal error event">
  62. The error event is sent out when a fatal (non-recoverable)
  63. error has occurred. The object_id argument is the object
  64. where the error occurred, most often in response to a request
  65. to that object. The code identifies the error and is defined
  66. by the object interface. As such, each interface defines its
  67. own set of error codes. The message is a brief description
  68. of the error, for (debugging) convenience.
  69. </description>
  70. <arg name="object_id" type="object" summary="object where the error occurred"/>
  71. <arg name="code" type="uint" summary="error code"/>
  72. <arg name="message" type="string" summary="error description"/>
  73. </event>
  74. <enum name="error">
  75. <description summary="global error values">
  76. These errors are global and can be emitted in response to any
  77. server request.
  78. </description>
  79. <entry name="invalid_object" value="0"
  80. summary="server couldn't find object"/>
  81. <entry name="invalid_method" value="1"
  82. summary="method doesn't exist on the specified interface or malformed request"/>
  83. <entry name="no_memory" value="2"
  84. summary="server is out of memory"/>
  85. <entry name="implementation" value="3"
  86. summary="implementation error in compositor"/>
  87. </enum>
  88. <event name="delete_id">
  89. <description summary="acknowledge object ID deletion">
  90. This event is used internally by the object ID management
  91. logic. When a client deletes an object that it had created,
  92. the server will send this event to acknowledge that it has
  93. seen the delete request. When the client receives this event,
  94. it will know that it can safely reuse the object ID.
  95. </description>
  96. <arg name="id" type="uint" summary="deleted object ID"/>
  97. </event>
  98. </interface>
  99. <interface name="wl_registry" version="1">
  100. <description summary="global registry object">
  101. The singleton global registry object. The server has a number of
  102. global objects that are available to all clients. These objects
  103. typically represent an actual object in the server (for example,
  104. an input device) or they are singleton objects that provide
  105. extension functionality.
  106. When a client creates a registry object, the registry object
  107. will emit a global event for each global currently in the
  108. registry. Globals come and go as a result of device or
  109. monitor hotplugs, reconfiguration or other events, and the
  110. registry will send out global and global_remove events to
  111. keep the client up to date with the changes. To mark the end
  112. of the initial burst of events, the client can use the
  113. wl_display.sync request immediately after calling
  114. wl_display.get_registry.
  115. A client can bind to a global object by using the bind
  116. request. This creates a client-side handle that lets the object
  117. emit events to the client and lets the client invoke requests on
  118. the object.
  119. </description>
  120. <request name="bind">
  121. <description summary="bind an object to the display">
  122. Binds a new, client-created object to the server using the
  123. specified name as the identifier.
  124. </description>
  125. <arg name="name" type="uint" summary="unique numeric name of the object"/>
  126. <arg name="id" type="new_id" summary="bounded object"/>
  127. </request>
  128. <event name="global">
  129. <description summary="announce global object">
  130. Notify the client of global objects.
  131. The event notifies the client that a global object with
  132. the given name is now available, and it implements the
  133. given version of the given interface.
  134. </description>
  135. <arg name="name" type="uint" summary="numeric name of the global object"/>
  136. <arg name="interface" type="string" summary="interface implemented by the object"/>
  137. <arg name="version" type="uint" summary="interface version"/>
  138. </event>
  139. <event name="global_remove">
  140. <description summary="announce removal of global object">
  141. Notify the client of removed global objects.
  142. This event notifies the client that the global identified
  143. by name is no longer available. If the client bound to
  144. the global using the bind request, the client should now
  145. destroy that object.
  146. The object remains valid and requests to the object will be
  147. ignored until the client destroys it, to avoid races between
  148. the global going away and a client sending a request to it.
  149. </description>
  150. <arg name="name" type="uint" summary="numeric name of the global object"/>
  151. </event>
  152. </interface>
  153. <interface name="wl_callback" version="1">
  154. <description summary="callback object">
  155. Clients can handle the 'done' event to get notified when
  156. the related request is done.
  157. </description>
  158. <event name="done" type="destructor">
  159. <description summary="done event">
  160. Notify the client when the related request is done.
  161. </description>
  162. <arg name="callback_data" type="uint" summary="request-specific data for the callback"/>
  163. </event>
  164. </interface>
  165. <interface name="wl_compositor" version="5">
  166. <description summary="the compositor singleton">
  167. A compositor. This object is a singleton global. The
  168. compositor is in charge of combining the contents of multiple
  169. surfaces into one displayable output.
  170. </description>
  171. <request name="create_surface">
  172. <description summary="create new surface">
  173. Ask the compositor to create a new surface.
  174. </description>
  175. <arg name="id" type="new_id" interface="wl_surface" summary="the new surface"/>
  176. </request>
  177. <request name="create_region">
  178. <description summary="create new region">
  179. Ask the compositor to create a new region.
  180. </description>
  181. <arg name="id" type="new_id" interface="wl_region" summary="the new region"/>
  182. </request>
  183. </interface>
  184. <interface name="wl_shm_pool" version="1">
  185. <description summary="a shared memory pool">
  186. The wl_shm_pool object encapsulates a piece of memory shared
  187. between the compositor and client. Through the wl_shm_pool
  188. object, the client can allocate shared memory wl_buffer objects.
  189. All objects created through the same pool share the same
  190. underlying mapped memory. Reusing the mapped memory avoids the
  191. setup/teardown overhead and is useful when interactively resizing
  192. a surface or for many small buffers.
  193. </description>
  194. <request name="create_buffer">
  195. <description summary="create a buffer from the pool">
  196. Create a wl_buffer object from the pool.
  197. The buffer is created offset bytes into the pool and has
  198. width and height as specified. The stride argument specifies
  199. the number of bytes from the beginning of one row to the beginning
  200. of the next. The format is the pixel format of the buffer and
  201. must be one of those advertised through the wl_shm.format event.
  202. A buffer will keep a reference to the pool it was created from
  203. so it is valid to destroy the pool immediately after creating
  204. a buffer from it.
  205. </description>
  206. <arg name="id" type="new_id" interface="wl_buffer" summary="buffer to create"/>
  207. <arg name="offset" type="int" summary="buffer byte offset within the pool"/>
  208. <arg name="width" type="int" summary="buffer width, in pixels"/>
  209. <arg name="height" type="int" summary="buffer height, in pixels"/>
  210. <arg name="stride" type="int" summary="number of bytes from the beginning of one row to the beginning of the next row"/>
  211. <arg name="format" type="uint" enum="wl_shm.format" summary="buffer pixel format"/>
  212. </request>
  213. <request name="destroy" type="destructor">
  214. <description summary="destroy the pool">
  215. Destroy the shared memory pool.
  216. The mmapped memory will be released when all
  217. buffers that have been created from this pool
  218. are gone.
  219. </description>
  220. </request>
  221. <request name="resize">
  222. <description summary="change the size of the pool mapping">
  223. This request will cause the server to remap the backing memory
  224. for the pool from the file descriptor passed when the pool was
  225. created, but using the new size. This request can only be
  226. used to make the pool bigger.
  227. This request only changes the amount of bytes that are mmapped
  228. by the server and does not touch the file corresponding to the
  229. file descriptor passed at creation time. It is the client's
  230. responsibility to ensure that the file is at least as big as
  231. the new pool size.
  232. </description>
  233. <arg name="size" type="int" summary="new size of the pool, in bytes"/>
  234. </request>
  235. </interface>
  236. <interface name="wl_shm" version="1">
  237. <description summary="shared memory support">
  238. A singleton global object that provides support for shared
  239. memory.
  240. Clients can create wl_shm_pool objects using the create_pool
  241. request.
  242. On binding the wl_shm object one or more format events
  243. are emitted to inform clients about the valid pixel formats
  244. that can be used for buffers.
  245. </description>
  246. <enum name="error">
  247. <description summary="wl_shm error values">
  248. These errors can be emitted in response to wl_shm requests.
  249. </description>
  250. <entry name="invalid_format" value="0" summary="buffer format is not known"/>
  251. <entry name="invalid_stride" value="1" summary="invalid size or stride during pool or buffer creation"/>
  252. <entry name="invalid_fd" value="2" summary="mmapping the file descriptor failed"/>
  253. </enum>
  254. <enum name="format">
  255. <description summary="pixel formats">
  256. This describes the memory layout of an individual pixel.
  257. All renderers should support argb8888 and xrgb8888 but any other
  258. formats are optional and may not be supported by the particular
  259. renderer in use.
  260. The drm format codes match the macros defined in drm_fourcc.h, except
  261. argb8888 and xrgb8888. The formats actually supported by the compositor
  262. will be reported by the format event.
  263. For all wl_shm formats and unless specified in another protocol
  264. extension, pre-multiplied alpha is used for pixel values.
  265. </description>
  266. <!-- Note to protocol writers: don't update this list manually, instead
  267. run the automated script that keeps it in sync with drm_fourcc.h. -->
  268. <entry name="argb8888" value="0" summary="32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian"/>
  269. <entry name="xrgb8888" value="1" summary="32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian"/>
  270. <entry name="c8" value="0x20203843" summary="8-bit color index format, [7:0] C"/>
  271. <entry name="rgb332" value="0x38424752" summary="8-bit RGB format, [7:0] R:G:B 3:3:2"/>
  272. <entry name="bgr233" value="0x38524742" summary="8-bit BGR format, [7:0] B:G:R 2:3:3"/>
  273. <entry name="xrgb4444" value="0x32315258" summary="16-bit xRGB format, [15:0] x:R:G:B 4:4:4:4 little endian"/>
  274. <entry name="xbgr4444" value="0x32314258" summary="16-bit xBGR format, [15:0] x:B:G:R 4:4:4:4 little endian"/>
  275. <entry name="rgbx4444" value="0x32315852" summary="16-bit RGBx format, [15:0] R:G:B:x 4:4:4:4 little endian"/>
  276. <entry name="bgrx4444" value="0x32315842" summary="16-bit BGRx format, [15:0] B:G:R:x 4:4:4:4 little endian"/>
  277. <entry name="argb4444" value="0x32315241" summary="16-bit ARGB format, [15:0] A:R:G:B 4:4:4:4 little endian"/>
  278. <entry name="abgr4444" value="0x32314241" summary="16-bit ABGR format, [15:0] A:B:G:R 4:4:4:4 little endian"/>
  279. <entry name="rgba4444" value="0x32314152" summary="16-bit RBGA format, [15:0] R:G:B:A 4:4:4:4 little endian"/>
  280. <entry name="bgra4444" value="0x32314142" summary="16-bit BGRA format, [15:0] B:G:R:A 4:4:4:4 little endian"/>
  281. <entry name="xrgb1555" value="0x35315258" summary="16-bit xRGB format, [15:0] x:R:G:B 1:5:5:5 little endian"/>
  282. <entry name="xbgr1555" value="0x35314258" summary="16-bit xBGR 1555 format, [15:0] x:B:G:R 1:5:5:5 little endian"/>
  283. <entry name="rgbx5551" value="0x35315852" summary="16-bit RGBx 5551 format, [15:0] R:G:B:x 5:5:5:1 little endian"/>
  284. <entry name="bgrx5551" value="0x35315842" summary="16-bit BGRx 5551 format, [15:0] B:G:R:x 5:5:5:1 little endian"/>
  285. <entry name="argb1555" value="0x35315241" summary="16-bit ARGB 1555 format, [15:0] A:R:G:B 1:5:5:5 little endian"/>
  286. <entry name="abgr1555" value="0x35314241" summary="16-bit ABGR 1555 format, [15:0] A:B:G:R 1:5:5:5 little endian"/>
  287. <entry name="rgba5551" value="0x35314152" summary="16-bit RGBA 5551 format, [15:0] R:G:B:A 5:5:5:1 little endian"/>
  288. <entry name="bgra5551" value="0x35314142" summary="16-bit BGRA 5551 format, [15:0] B:G:R:A 5:5:5:1 little endian"/>
  289. <entry name="rgb565" value="0x36314752" summary="16-bit RGB 565 format, [15:0] R:G:B 5:6:5 little endian"/>
  290. <entry name="bgr565" value="0x36314742" summary="16-bit BGR 565 format, [15:0] B:G:R 5:6:5 little endian"/>
  291. <entry name="rgb888" value="0x34324752" summary="24-bit RGB format, [23:0] R:G:B little endian"/>
  292. <entry name="bgr888" value="0x34324742" summary="24-bit BGR format, [23:0] B:G:R little endian"/>
  293. <entry name="xbgr8888" value="0x34324258" summary="32-bit xBGR format, [31:0] x:B:G:R 8:8:8:8 little endian"/>
  294. <entry name="rgbx8888" value="0x34325852" summary="32-bit RGBx format, [31:0] R:G:B:x 8:8:8:8 little endian"/>
  295. <entry name="bgrx8888" value="0x34325842" summary="32-bit BGRx format, [31:0] B:G:R:x 8:8:8:8 little endian"/>
  296. <entry name="abgr8888" value="0x34324241" summary="32-bit ABGR format, [31:0] A:B:G:R 8:8:8:8 little endian"/>
  297. <entry name="rgba8888" value="0x34324152" summary="32-bit RGBA format, [31:0] R:G:B:A 8:8:8:8 little endian"/>
  298. <entry name="bgra8888" value="0x34324142" summary="32-bit BGRA format, [31:0] B:G:R:A 8:8:8:8 little endian"/>
  299. <entry name="xrgb2101010" value="0x30335258" summary="32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian"/>
  300. <entry name="xbgr2101010" value="0x30334258" summary="32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian"/>
  301. <entry name="rgbx1010102" value="0x30335852" summary="32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian"/>
  302. <entry name="bgrx1010102" value="0x30335842" summary="32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian"/>
  303. <entry name="argb2101010" value="0x30335241" summary="32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian"/>
  304. <entry name="abgr2101010" value="0x30334241" summary="32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian"/>
  305. <entry name="rgba1010102" value="0x30334152" summary="32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian"/>
  306. <entry name="bgra1010102" value="0x30334142" summary="32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian"/>
  307. <entry name="yuyv" value="0x56595559" summary="packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian"/>
  308. <entry name="yvyu" value="0x55595659" summary="packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian"/>
  309. <entry name="uyvy" value="0x59565955" summary="packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian"/>
  310. <entry name="vyuy" value="0x59555956" summary="packed YCbCr format, [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian"/>
  311. <entry name="ayuv" value="0x56555941" summary="packed AYCbCr format, [31:0] A:Y:Cb:Cr 8:8:8:8 little endian"/>
  312. <entry name="nv12" value="0x3231564e" summary="2 plane YCbCr Cr:Cb format, 2x2 subsampled Cr:Cb plane"/>
  313. <entry name="nv21" value="0x3132564e" summary="2 plane YCbCr Cb:Cr format, 2x2 subsampled Cb:Cr plane"/>
  314. <entry name="nv16" value="0x3631564e" summary="2 plane YCbCr Cr:Cb format, 2x1 subsampled Cr:Cb plane"/>
  315. <entry name="nv61" value="0x3136564e" summary="2 plane YCbCr Cb:Cr format, 2x1 subsampled Cb:Cr plane"/>
  316. <entry name="yuv410" value="0x39565559" summary="3 plane YCbCr format, 4x4 subsampled Cb (1) and Cr (2) planes"/>
  317. <entry name="yvu410" value="0x39555659" summary="3 plane YCbCr format, 4x4 subsampled Cr (1) and Cb (2) planes"/>
  318. <entry name="yuv411" value="0x31315559" summary="3 plane YCbCr format, 4x1 subsampled Cb (1) and Cr (2) planes"/>
  319. <entry name="yvu411" value="0x31315659" summary="3 plane YCbCr format, 4x1 subsampled Cr (1) and Cb (2) planes"/>
  320. <entry name="yuv420" value="0x32315559" summary="3 plane YCbCr format, 2x2 subsampled Cb (1) and Cr (2) planes"/>
  321. <entry name="yvu420" value="0x32315659" summary="3 plane YCbCr format, 2x2 subsampled Cr (1) and Cb (2) planes"/>
  322. <entry name="yuv422" value="0x36315559" summary="3 plane YCbCr format, 2x1 subsampled Cb (1) and Cr (2) planes"/>
  323. <entry name="yvu422" value="0x36315659" summary="3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes"/>
  324. <entry name="yuv444" value="0x34325559" summary="3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes"/>
  325. <entry name="yvu444" value="0x34325659" summary="3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes"/>
  326. <entry name="r8" value="0x20203852" summary="[7:0] R"/>
  327. <entry name="r16" value="0x20363152" summary="[15:0] R little endian"/>
  328. <entry name="rg88" value="0x38384752" summary="[15:0] R:G 8:8 little endian"/>
  329. <entry name="gr88" value="0x38385247" summary="[15:0] G:R 8:8 little endian"/>
  330. <entry name="rg1616" value="0x32334752" summary="[31:0] R:G 16:16 little endian"/>
  331. <entry name="gr1616" value="0x32335247" summary="[31:0] G:R 16:16 little endian"/>
  332. <entry name="xrgb16161616f" value="0x48345258" summary="[63:0] x:R:G:B 16:16:16:16 little endian"/>
  333. <entry name="xbgr16161616f" value="0x48344258" summary="[63:0] x:B:G:R 16:16:16:16 little endian"/>
  334. <entry name="argb16161616f" value="0x48345241" summary="[63:0] A:R:G:B 16:16:16:16 little endian"/>
  335. <entry name="abgr16161616f" value="0x48344241" summary="[63:0] A:B:G:R 16:16:16:16 little endian"/>
  336. <entry name="xyuv8888" value="0x56555958" summary="[31:0] X:Y:Cb:Cr 8:8:8:8 little endian"/>
  337. <entry name="vuy888" value="0x34325556" summary="[23:0] Cr:Cb:Y 8:8:8 little endian"/>
  338. <entry name="vuy101010" value="0x30335556" summary="Y followed by U then V, 10:10:10. Non-linear modifier only"/>
  339. <entry name="y210" value="0x30313259" summary="[63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 10:6:10:6:10:6:10:6 little endian per 2 Y pixels"/>
  340. <entry name="y212" value="0x32313259" summary="[63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 12:4:12:4:12:4:12:4 little endian per 2 Y pixels"/>
  341. <entry name="y216" value="0x36313259" summary="[63:0] Cr0:Y1:Cb0:Y0 16:16:16:16 little endian per 2 Y pixels"/>
  342. <entry name="y410" value="0x30313459" summary="[31:0] A:Cr:Y:Cb 2:10:10:10 little endian"/>
  343. <entry name="y412" value="0x32313459" summary="[63:0] A:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian"/>
  344. <entry name="y416" value="0x36313459" summary="[63:0] A:Cr:Y:Cb 16:16:16:16 little endian"/>
  345. <entry name="xvyu2101010" value="0x30335658" summary="[31:0] X:Cr:Y:Cb 2:10:10:10 little endian"/>
  346. <entry name="xvyu12_16161616" value="0x36335658" summary="[63:0] X:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian"/>
  347. <entry name="xvyu16161616" value="0x38345658" summary="[63:0] X:Cr:Y:Cb 16:16:16:16 little endian"/>
  348. <entry name="y0l0" value="0x304c3059" summary="[63:0] A3:A2:Y3:0:Cr0:0:Y2:0:A1:A0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian"/>
  349. <entry name="x0l0" value="0x304c3058" summary="[63:0] X3:X2:Y3:0:Cr0:0:Y2:0:X1:X0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian"/>
  350. <entry name="y0l2" value="0x324c3059" summary="[63:0] A3:A2:Y3:Cr0:Y2:A1:A0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian"/>
  351. <entry name="x0l2" value="0x324c3058" summary="[63:0] X3:X2:Y3:Cr0:Y2:X1:X0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian"/>
  352. <entry name="yuv420_8bit" value="0x38305559"/>
  353. <entry name="yuv420_10bit" value="0x30315559"/>
  354. <entry name="xrgb8888_a8" value="0x38415258"/>
  355. <entry name="xbgr8888_a8" value="0x38414258"/>
  356. <entry name="rgbx8888_a8" value="0x38415852"/>
  357. <entry name="bgrx8888_a8" value="0x38415842"/>
  358. <entry name="rgb888_a8" value="0x38413852"/>
  359. <entry name="bgr888_a8" value="0x38413842"/>
  360. <entry name="rgb565_a8" value="0x38413552"/>
  361. <entry name="bgr565_a8" value="0x38413542"/>
  362. <entry name="nv24" value="0x3432564e" summary="non-subsampled Cr:Cb plane"/>
  363. <entry name="nv42" value="0x3234564e" summary="non-subsampled Cb:Cr plane"/>
  364. <entry name="p210" value="0x30313250" summary="2x1 subsampled Cr:Cb plane, 10 bit per channel"/>
  365. <entry name="p010" value="0x30313050" summary="2x2 subsampled Cr:Cb plane 10 bits per channel"/>
  366. <entry name="p012" value="0x32313050" summary="2x2 subsampled Cr:Cb plane 12 bits per channel"/>
  367. <entry name="p016" value="0x36313050" summary="2x2 subsampled Cr:Cb plane 16 bits per channel"/>
  368. <entry name="axbxgxrx106106106106" value="0x30314241" summary="[63:0] A:x:B:x:G:x:R:x 10:6:10:6:10:6:10:6 little endian"/>
  369. <entry name="nv15" value="0x3531564e" summary="2x2 subsampled Cr:Cb plane"/>
  370. <entry name="q410" value="0x30313451"/>
  371. <entry name="q401" value="0x31303451"/>
  372. <entry name="xrgb16161616" value="0x38345258" summary="[63:0] x:R:G:B 16:16:16:16 little endian"/>
  373. <entry name="xbgr16161616" value="0x38344258" summary="[63:0] x:B:G:R 16:16:16:16 little endian"/>
  374. <entry name="argb16161616" value="0x38345241" summary="[63:0] A:R:G:B 16:16:16:16 little endian"/>
  375. <entry name="abgr16161616" value="0x38344241" summary="[63:0] A:B:G:R 16:16:16:16 little endian"/>
  376. </enum>
  377. <request name="create_pool">
  378. <description summary="create a shm pool">
  379. Create a new wl_shm_pool object.
  380. The pool can be used to create shared memory based buffer
  381. objects. The server will mmap size bytes of the passed file
  382. descriptor, to use as backing memory for the pool.
  383. </description>
  384. <arg name="id" type="new_id" interface="wl_shm_pool" summary="pool to create"/>
  385. <arg name="fd" type="fd" summary="file descriptor for the pool"/>
  386. <arg name="size" type="int" summary="pool size, in bytes"/>
  387. </request>
  388. <event name="format">
  389. <description summary="pixel format description">
  390. Informs the client about a valid pixel format that
  391. can be used for buffers. Known formats include
  392. argb8888 and xrgb8888.
  393. </description>
  394. <arg name="format" type="uint" enum="format" summary="buffer pixel format"/>
  395. </event>
  396. </interface>
  397. <interface name="wl_buffer" version="1">
  398. <description summary="content for a wl_surface">
  399. A buffer provides the content for a wl_surface. Buffers are
  400. created through factory interfaces such as wl_shm, wp_linux_buffer_params
  401. (from the linux-dmabuf protocol extension) or similar. It has a width and
  402. a height and can be attached to a wl_surface, but the mechanism by which a
  403. client provides and updates the contents is defined by the buffer factory
  404. interface.
  405. If the buffer uses a format that has an alpha channel, the alpha channel
  406. is assumed to be premultiplied in the color channels unless otherwise
  407. specified.
  408. </description>
  409. <request name="destroy" type="destructor">
  410. <description summary="destroy a buffer">
  411. Destroy a buffer. If and how you need to release the backing
  412. storage is defined by the buffer factory interface.
  413. For possible side-effects to a surface, see wl_surface.attach.
  414. </description>
  415. </request>
  416. <event name="release">
  417. <description summary="compositor releases buffer">
  418. Sent when this wl_buffer is no longer used by the compositor.
  419. The client is now free to reuse or destroy this buffer and its
  420. backing storage.
  421. If a client receives a release event before the frame callback
  422. requested in the same wl_surface.commit that attaches this
  423. wl_buffer to a surface, then the client is immediately free to
  424. reuse the buffer and its backing storage, and does not need a
  425. second buffer for the next surface content update. Typically
  426. this is possible, when the compositor maintains a copy of the
  427. wl_surface contents, e.g. as a GL texture. This is an important
  428. optimization for GL(ES) compositors with wl_shm clients.
  429. </description>
  430. </event>
  431. </interface>
  432. <interface name="wl_data_offer" version="3">
  433. <description summary="offer to transfer data">
  434. A wl_data_offer represents a piece of data offered for transfer
  435. by another client (the source client). It is used by the
  436. copy-and-paste and drag-and-drop mechanisms. The offer
  437. describes the different mime types that the data can be
  438. converted to and provides the mechanism for transferring the
  439. data directly from the source client.
  440. </description>
  441. <enum name="error">
  442. <entry name="invalid_finish" value="0"
  443. summary="finish request was called untimely"/>
  444. <entry name="invalid_action_mask" value="1"
  445. summary="action mask contains invalid values"/>
  446. <entry name="invalid_action" value="2"
  447. summary="action argument has an invalid value"/>
  448. <entry name="invalid_offer" value="3"
  449. summary="offer doesn't accept this request"/>
  450. </enum>
  451. <request name="accept">
  452. <description summary="accept one of the offered mime types">
  453. Indicate that the client can accept the given mime type, or
  454. NULL for not accepted.
  455. For objects of version 2 or older, this request is used by the
  456. client to give feedback whether the client can receive the given
  457. mime type, or NULL if none is accepted; the feedback does not
  458. determine whether the drag-and-drop operation succeeds or not.
  459. For objects of version 3 or newer, this request determines the
  460. final result of the drag-and-drop operation. If the end result
  461. is that no mime types were accepted, the drag-and-drop operation
  462. will be cancelled and the corresponding drag source will receive
  463. wl_data_source.cancelled. Clients may still use this event in
  464. conjunction with wl_data_source.action for feedback.
  465. </description>
  466. <arg name="serial" type="uint" summary="serial number of the accept request"/>
  467. <arg name="mime_type" type="string" allow-null="true" summary="mime type accepted by the client"/>
  468. </request>
  469. <request name="receive">
  470. <description summary="request that the data is transferred">
  471. To transfer the offered data, the client issues this request
  472. and indicates the mime type it wants to receive. The transfer
  473. happens through the passed file descriptor (typically created
  474. with the pipe system call). The source client writes the data
  475. in the mime type representation requested and then closes the
  476. file descriptor.
  477. The receiving client reads from the read end of the pipe until
  478. EOF and then closes its end, at which point the transfer is
  479. complete.
  480. This request may happen multiple times for different mime types,
  481. both before and after wl_data_device.drop. Drag-and-drop destination
  482. clients may preemptively fetch data or examine it more closely to
  483. determine acceptance.
  484. </description>
  485. <arg name="mime_type" type="string" summary="mime type desired by receiver"/>
  486. <arg name="fd" type="fd" summary="file descriptor for data transfer"/>
  487. </request>
  488. <request name="destroy" type="destructor">
  489. <description summary="destroy data offer">
  490. Destroy the data offer.
  491. </description>
  492. </request>
  493. <event name="offer">
  494. <description summary="advertise offered mime type">
  495. Sent immediately after creating the wl_data_offer object. One
  496. event per offered mime type.
  497. </description>
  498. <arg name="mime_type" type="string" summary="offered mime type"/>
  499. </event>
  500. <!-- Version 3 additions -->
  501. <request name="finish" since="3">
  502. <description summary="the offer will no longer be used">
  503. Notifies the compositor that the drag destination successfully
  504. finished the drag-and-drop operation.
  505. Upon receiving this request, the compositor will emit
  506. wl_data_source.dnd_finished on the drag source client.
  507. It is a client error to perform other requests than
  508. wl_data_offer.destroy after this one. It is also an error to perform
  509. this request after a NULL mime type has been set in
  510. wl_data_offer.accept or no action was received through
  511. wl_data_offer.action.
  512. If wl_data_offer.finish request is received for a non drag and drop
  513. operation, the invalid_finish protocol error is raised.
  514. </description>
  515. </request>
  516. <request name="set_actions" since="3">
  517. <description summary="set the available/preferred drag-and-drop actions">
  518. Sets the actions that the destination side client supports for
  519. this operation. This request may trigger the emission of
  520. wl_data_source.action and wl_data_offer.action events if the compositor
  521. needs to change the selected action.
  522. This request can be called multiple times throughout the
  523. drag-and-drop operation, typically in response to wl_data_device.enter
  524. or wl_data_device.motion events.
  525. This request determines the final result of the drag-and-drop
  526. operation. If the end result is that no action is accepted,
  527. the drag source will receive wl_data_source.cancelled.
  528. The dnd_actions argument must contain only values expressed in the
  529. wl_data_device_manager.dnd_actions enum, and the preferred_action
  530. argument must only contain one of those values set, otherwise it
  531. will result in a protocol error.
  532. While managing an "ask" action, the destination drag-and-drop client
  533. may perform further wl_data_offer.receive requests, and is expected
  534. to perform one last wl_data_offer.set_actions request with a preferred
  535. action other than "ask" (and optionally wl_data_offer.accept) before
  536. requesting wl_data_offer.finish, in order to convey the action selected
  537. by the user. If the preferred action is not in the
  538. wl_data_offer.source_actions mask, an error will be raised.
  539. If the "ask" action is dismissed (e.g. user cancellation), the client
  540. is expected to perform wl_data_offer.destroy right away.
  541. This request can only be made on drag-and-drop offers, a protocol error
  542. will be raised otherwise.
  543. </description>
  544. <arg name="dnd_actions" type="uint" summary="actions supported by the destination client"
  545. enum="wl_data_device_manager.dnd_action"/>
  546. <arg name="preferred_action" type="uint" summary="action preferred by the destination client"
  547. enum="wl_data_device_manager.dnd_action"/>
  548. </request>
  549. <event name="source_actions" since="3">
  550. <description summary="notify the source-side available actions">
  551. This event indicates the actions offered by the data source. It
  552. will be sent right after wl_data_device.enter, or anytime the source
  553. side changes its offered actions through wl_data_source.set_actions.
  554. </description>
  555. <arg name="source_actions" type="uint" summary="actions offered by the data source"
  556. enum="wl_data_device_manager.dnd_action"/>
  557. </event>
  558. <event name="action" since="3">
  559. <description summary="notify the selected action">
  560. This event indicates the action selected by the compositor after
  561. matching the source/destination side actions. Only one action (or
  562. none) will be offered here.
  563. This event can be emitted multiple times during the drag-and-drop
  564. operation in response to destination side action changes through
  565. wl_data_offer.set_actions.
  566. This event will no longer be emitted after wl_data_device.drop
  567. happened on the drag-and-drop destination, the client must
  568. honor the last action received, or the last preferred one set
  569. through wl_data_offer.set_actions when handling an "ask" action.
  570. Compositors may also change the selected action on the fly, mainly
  571. in response to keyboard modifier changes during the drag-and-drop
  572. operation.
  573. The most recent action received is always the valid one. Prior to
  574. receiving wl_data_device.drop, the chosen action may change (e.g.
  575. due to keyboard modifiers being pressed). At the time of receiving
  576. wl_data_device.drop the drag-and-drop destination must honor the
  577. last action received.
  578. Action changes may still happen after wl_data_device.drop,
  579. especially on "ask" actions, where the drag-and-drop destination
  580. may choose another action afterwards. Action changes happening
  581. at this stage are always the result of inter-client negotiation, the
  582. compositor shall no longer be able to induce a different action.
  583. Upon "ask" actions, it is expected that the drag-and-drop destination
  584. may potentially choose a different action and/or mime type,
  585. based on wl_data_offer.source_actions and finally chosen by the
  586. user (e.g. popping up a menu with the available options). The
  587. final wl_data_offer.set_actions and wl_data_offer.accept requests
  588. must happen before the call to wl_data_offer.finish.
  589. </description>
  590. <arg name="dnd_action" type="uint" summary="action selected by the compositor"
  591. enum="wl_data_device_manager.dnd_action"/>
  592. </event>
  593. </interface>
  594. <interface name="wl_data_source" version="3">
  595. <description summary="offer to transfer data">
  596. The wl_data_source object is the source side of a wl_data_offer.
  597. It is created by the source client in a data transfer and
  598. provides a way to describe the offered data and a way to respond
  599. to requests to transfer the data.
  600. </description>
  601. <enum name="error">
  602. <entry name="invalid_action_mask" value="0"
  603. summary="action mask contains invalid values"/>
  604. <entry name="invalid_source" value="1"
  605. summary="source doesn't accept this request"/>
  606. </enum>
  607. <request name="offer">
  608. <description summary="add an offered mime type">
  609. This request adds a mime type to the set of mime types
  610. advertised to targets. Can be called several times to offer
  611. multiple types.
  612. </description>
  613. <arg name="mime_type" type="string" summary="mime type offered by the data source"/>
  614. </request>
  615. <request name="destroy" type="destructor">
  616. <description summary="destroy the data source">
  617. Destroy the data source.
  618. </description>
  619. </request>
  620. <event name="target">
  621. <description summary="a target accepts an offered mime type">
  622. Sent when a target accepts pointer_focus or motion events. If
  623. a target does not accept any of the offered types, type is NULL.
  624. Used for feedback during drag-and-drop.
  625. </description>
  626. <arg name="mime_type" type="string" allow-null="true" summary="mime type accepted by the target"/>
  627. </event>
  628. <event name="send">
  629. <description summary="send the data">
  630. Request for data from the client. Send the data as the
  631. specified mime type over the passed file descriptor, then
  632. close it.
  633. </description>
  634. <arg name="mime_type" type="string" summary="mime type for the data"/>
  635. <arg name="fd" type="fd" summary="file descriptor for the data"/>
  636. </event>
  637. <event name="cancelled">
  638. <description summary="selection was cancelled">
  639. This data source is no longer valid. There are several reasons why
  640. this could happen:
  641. - The data source has been replaced by another data source.
  642. - The drag-and-drop operation was performed, but the drop destination
  643. did not accept any of the mime types offered through
  644. wl_data_source.target.
  645. - The drag-and-drop operation was performed, but the drop destination
  646. did not select any of the actions present in the mask offered through
  647. wl_data_source.action.
  648. - The drag-and-drop operation was performed but didn't happen over a
  649. surface.
  650. - The compositor cancelled the drag-and-drop operation (e.g. compositor
  651. dependent timeouts to avoid stale drag-and-drop transfers).
  652. The client should clean up and destroy this data source.
  653. For objects of version 2 or older, wl_data_source.cancelled will
  654. only be emitted if the data source was replaced by another data
  655. source.
  656. </description>
  657. </event>
  658. <!-- Version 3 additions -->
  659. <request name="set_actions" since="3">
  660. <description summary="set the available drag-and-drop actions">
  661. Sets the actions that the source side client supports for this
  662. operation. This request may trigger wl_data_source.action and
  663. wl_data_offer.action events if the compositor needs to change the
  664. selected action.
  665. The dnd_actions argument must contain only values expressed in the
  666. wl_data_device_manager.dnd_actions enum, otherwise it will result
  667. in a protocol error.
  668. This request must be made once only, and can only be made on sources
  669. used in drag-and-drop, so it must be performed before
  670. wl_data_device.start_drag. Attempting to use the source other than
  671. for drag-and-drop will raise a protocol error.
  672. </description>
  673. <arg name="dnd_actions" type="uint" summary="actions supported by the data source"
  674. enum="wl_data_device_manager.dnd_action"/>
  675. </request>
  676. <event name="dnd_drop_performed" since="3">
  677. <description summary="the drag-and-drop operation physically finished">
  678. The user performed the drop action. This event does not indicate
  679. acceptance, wl_data_source.cancelled may still be emitted afterwards
  680. if the drop destination does not accept any mime type.
  681. However, this event might however not be received if the compositor
  682. cancelled the drag-and-drop operation before this event could happen.
  683. Note that the data_source may still be used in the future and should
  684. not be destroyed here.
  685. </description>
  686. </event>
  687. <event name="dnd_finished" since="3">
  688. <description summary="the drag-and-drop operation concluded">
  689. The drop destination finished interoperating with this data
  690. source, so the client is now free to destroy this data source and
  691. free all associated data.
  692. If the action used to perform the operation was "move", the
  693. source can now delete the transferred data.
  694. </description>
  695. </event>
  696. <event name="action" since="3">
  697. <description summary="notify the selected action">
  698. This event indicates the action selected by the compositor after
  699. matching the source/destination side actions. Only one action (or
  700. none) will be offered here.
  701. This event can be emitted multiple times during the drag-and-drop
  702. operation, mainly in response to destination side changes through
  703. wl_data_offer.set_actions, and as the data device enters/leaves
  704. surfaces.
  705. It is only possible to receive this event after
  706. wl_data_source.dnd_drop_performed if the drag-and-drop operation
  707. ended in an "ask" action, in which case the final wl_data_source.action
  708. event will happen immediately before wl_data_source.dnd_finished.
  709. Compositors may also change the selected action on the fly, mainly
  710. in response to keyboard modifier changes during the drag-and-drop
  711. operation.
  712. The most recent action received is always the valid one. The chosen
  713. action may change alongside negotiation (e.g. an "ask" action can turn
  714. into a "move" operation), so the effects of the final action must
  715. always be applied in wl_data_offer.dnd_finished.
  716. Clients can trigger cursor surface changes from this point, so
  717. they reflect the current action.
  718. </description>
  719. <arg name="dnd_action" type="uint" summary="action selected by the compositor"
  720. enum="wl_data_device_manager.dnd_action"/>
  721. </event>
  722. </interface>
  723. <interface name="wl_data_device" version="3">
  724. <description summary="data transfer device">
  725. There is one wl_data_device per seat which can be obtained
  726. from the global wl_data_device_manager singleton.
  727. A wl_data_device provides access to inter-client data transfer
  728. mechanisms such as copy-and-paste and drag-and-drop.
  729. </description>
  730. <enum name="error">
  731. <entry name="role" value="0" summary="given wl_surface has another role"/>
  732. </enum>
  733. <request name="start_drag">
  734. <description summary="start drag-and-drop operation">
  735. This request asks the compositor to start a drag-and-drop
  736. operation on behalf of the client.
  737. The source argument is the data source that provides the data
  738. for the eventual data transfer. If source is NULL, enter, leave
  739. and motion events are sent only to the client that initiated the
  740. drag and the client is expected to handle the data passing
  741. internally. If source is destroyed, the drag-and-drop session will be
  742. cancelled.
  743. The origin surface is the surface where the drag originates and
  744. the client must have an active implicit grab that matches the
  745. serial.
  746. The icon surface is an optional (can be NULL) surface that
  747. provides an icon to be moved around with the cursor. Initially,
  748. the top-left corner of the icon surface is placed at the cursor
  749. hotspot, but subsequent wl_surface.attach request can move the
  750. relative position. Attach requests must be confirmed with
  751. wl_surface.commit as usual. The icon surface is given the role of
  752. a drag-and-drop icon. If the icon surface already has another role,
  753. it raises a protocol error.
  754. The current and pending input regions of the icon wl_surface are
  755. cleared, and wl_surface.set_input_region is ignored until the
  756. wl_surface is no longer used as the icon surface. When the use
  757. as an icon ends, the current and pending input regions become
  758. undefined, and the wl_surface is unmapped.
  759. </description>
  760. <arg name="source" type="object" interface="wl_data_source" allow-null="true" summary="data source for the eventual transfer"/>
  761. <arg name="origin" type="object" interface="wl_surface" summary="surface where the drag originates"/>
  762. <arg name="icon" type="object" interface="wl_surface" allow-null="true" summary="drag-and-drop icon surface"/>
  763. <arg name="serial" type="uint" summary="serial number of the implicit grab on the origin"/>
  764. </request>
  765. <request name="set_selection">
  766. <description summary="copy data to the selection">
  767. This request asks the compositor to set the selection
  768. to the data from the source on behalf of the client.
  769. To unset the selection, set the source to NULL.
  770. </description>
  771. <arg name="source" type="object" interface="wl_data_source" allow-null="true" summary="data source for the selection"/>
  772. <arg name="serial" type="uint" summary="serial number of the event that triggered this request"/>
  773. </request>
  774. <event name="data_offer">
  775. <description summary="introduce a new wl_data_offer">
  776. The data_offer event introduces a new wl_data_offer object,
  777. which will subsequently be used in either the
  778. data_device.enter event (for drag-and-drop) or the
  779. data_device.selection event (for selections). Immediately
  780. following the data_device.data_offer event, the new data_offer
  781. object will send out data_offer.offer events to describe the
  782. mime types it offers.
  783. </description>
  784. <arg name="id" type="new_id" interface="wl_data_offer" summary="the new data_offer object"/>
  785. </event>
  786. <event name="enter">
  787. <description summary="initiate drag-and-drop session">
  788. This event is sent when an active drag-and-drop pointer enters
  789. a surface owned by the client. The position of the pointer at
  790. enter time is provided by the x and y arguments, in surface-local
  791. coordinates.
  792. </description>
  793. <arg name="serial" type="uint" summary="serial number of the enter event"/>
  794. <arg name="surface" type="object" interface="wl_surface" summary="client surface entered"/>
  795. <arg name="x" type="fixed" summary="surface-local x coordinate"/>
  796. <arg name="y" type="fixed" summary="surface-local y coordinate"/>
  797. <arg name="id" type="object" interface="wl_data_offer" allow-null="true"
  798. summary="source data_offer object"/>
  799. </event>
  800. <event name="leave">
  801. <description summary="end drag-and-drop session">
  802. This event is sent when the drag-and-drop pointer leaves the
  803. surface and the session ends. The client must destroy the
  804. wl_data_offer introduced at enter time at this point.
  805. </description>
  806. </event>
  807. <event name="motion">
  808. <description summary="drag-and-drop session motion">
  809. This event is sent when the drag-and-drop pointer moves within
  810. the currently focused surface. The new position of the pointer
  811. is provided by the x and y arguments, in surface-local
  812. coordinates.
  813. </description>
  814. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  815. <arg name="x" type="fixed" summary="surface-local x coordinate"/>
  816. <arg name="y" type="fixed" summary="surface-local y coordinate"/>
  817. </event>
  818. <event name="drop">
  819. <description summary="end drag-and-drop session successfully">
  820. The event is sent when a drag-and-drop operation is ended
  821. because the implicit grab is removed.
  822. The drag-and-drop destination is expected to honor the last action
  823. received through wl_data_offer.action, if the resulting action is
  824. "copy" or "move", the destination can still perform
  825. wl_data_offer.receive requests, and is expected to end all
  826. transfers with a wl_data_offer.finish request.
  827. If the resulting action is "ask", the action will not be considered
  828. final. The drag-and-drop destination is expected to perform one last
  829. wl_data_offer.set_actions request, or wl_data_offer.destroy in order
  830. to cancel the operation.
  831. </description>
  832. </event>
  833. <event name="selection">
  834. <description summary="advertise new selection">
  835. The selection event is sent out to notify the client of a new
  836. wl_data_offer for the selection for this device. The
  837. data_device.data_offer and the data_offer.offer events are
  838. sent out immediately before this event to introduce the data
  839. offer object. The selection event is sent to a client
  840. immediately before receiving keyboard focus and when a new
  841. selection is set while the client has keyboard focus. The
  842. data_offer is valid until a new data_offer or NULL is received
  843. or until the client loses keyboard focus. Switching surface with
  844. keyboard focus within the same client doesn't mean a new selection
  845. will be sent. The client must destroy the previous selection
  846. data_offer, if any, upon receiving this event.
  847. </description>
  848. <arg name="id" type="object" interface="wl_data_offer" allow-null="true"
  849. summary="selection data_offer object"/>
  850. </event>
  851. <!-- Version 2 additions -->
  852. <request name="release" type="destructor" since="2">
  853. <description summary="destroy data device">
  854. This request destroys the data device.
  855. </description>
  856. </request>
  857. </interface>
  858. <interface name="wl_data_device_manager" version="3">
  859. <description summary="data transfer interface">
  860. The wl_data_device_manager is a singleton global object that
  861. provides access to inter-client data transfer mechanisms such as
  862. copy-and-paste and drag-and-drop. These mechanisms are tied to
  863. a wl_seat and this interface lets a client get a wl_data_device
  864. corresponding to a wl_seat.
  865. Depending on the version bound, the objects created from the bound
  866. wl_data_device_manager object will have different requirements for
  867. functioning properly. See wl_data_source.set_actions,
  868. wl_data_offer.accept and wl_data_offer.finish for details.
  869. </description>
  870. <request name="create_data_source">
  871. <description summary="create a new data source">
  872. Create a new data source.
  873. </description>
  874. <arg name="id" type="new_id" interface="wl_data_source" summary="data source to create"/>
  875. </request>
  876. <request name="get_data_device">
  877. <description summary="create a new data device">
  878. Create a new data device for a given seat.
  879. </description>
  880. <arg name="id" type="new_id" interface="wl_data_device" summary="data device to create"/>
  881. <arg name="seat" type="object" interface="wl_seat" summary="seat associated with the data device"/>
  882. </request>
  883. <!-- Version 3 additions -->
  884. <enum name="dnd_action" bitfield="true" since="3">
  885. <description summary="drag and drop actions">
  886. This is a bitmask of the available/preferred actions in a
  887. drag-and-drop operation.
  888. In the compositor, the selected action is a result of matching the
  889. actions offered by the source and destination sides. "action" events
  890. with a "none" action will be sent to both source and destination if
  891. there is no match. All further checks will effectively happen on
  892. (source actions ∩ destination actions).
  893. In addition, compositors may also pick different actions in
  894. reaction to key modifiers being pressed. One common design that
  895. is used in major toolkits (and the behavior recommended for
  896. compositors) is:
  897. - If no modifiers are pressed, the first match (in bit order)
  898. will be used.
  899. - Pressing Shift selects "move", if enabled in the mask.
  900. - Pressing Control selects "copy", if enabled in the mask.
  901. Behavior beyond that is considered implementation-dependent.
  902. Compositors may for example bind other modifiers (like Alt/Meta)
  903. or drags initiated with other buttons than BTN_LEFT to specific
  904. actions (e.g. "ask").
  905. </description>
  906. <entry name="none" value="0" summary="no action"/>
  907. <entry name="copy" value="1" summary="copy action"/>
  908. <entry name="move" value="2" summary="move action"/>
  909. <entry name="ask" value="4" summary="ask action"/>
  910. </enum>
  911. </interface>
  912. <interface name="wl_shell" version="1">
  913. <description summary="create desktop-style surfaces">
  914. This interface is implemented by servers that provide
  915. desktop-style user interfaces.
  916. It allows clients to associate a wl_shell_surface with
  917. a basic surface.
  918. Note! This protocol is deprecated and not intended for production use.
  919. For desktop-style user interfaces, use xdg_shell. Compositors and clients
  920. should not implement this interface.
  921. </description>
  922. <enum name="error">
  923. <entry name="role" value="0" summary="given wl_surface has another role"/>
  924. </enum>
  925. <request name="get_shell_surface">
  926. <description summary="create a shell surface from a surface">
  927. Create a shell surface for an existing surface. This gives
  928. the wl_surface the role of a shell surface. If the wl_surface
  929. already has another role, it raises a protocol error.
  930. Only one shell surface can be associated with a given surface.
  931. </description>
  932. <arg name="id" type="new_id" interface="wl_shell_surface" summary="shell surface to create"/>
  933. <arg name="surface" type="object" interface="wl_surface" summary="surface to be given the shell surface role"/>
  934. </request>
  935. </interface>
  936. <interface name="wl_shell_surface" version="1">
  937. <description summary="desktop-style metadata interface">
  938. An interface that may be implemented by a wl_surface, for
  939. implementations that provide a desktop-style user interface.
  940. It provides requests to treat surfaces like toplevel, fullscreen
  941. or popup windows, move, resize or maximize them, associate
  942. metadata like title and class, etc.
  943. On the server side the object is automatically destroyed when
  944. the related wl_surface is destroyed. On the client side,
  945. wl_shell_surface_destroy() must be called before destroying
  946. the wl_surface object.
  947. </description>
  948. <request name="pong">
  949. <description summary="respond to a ping event">
  950. A client must respond to a ping event with a pong request or
  951. the client may be deemed unresponsive.
  952. </description>
  953. <arg name="serial" type="uint" summary="serial number of the ping event"/>
  954. </request>
  955. <request name="move">
  956. <description summary="start an interactive move">
  957. Start a pointer-driven move of the surface.
  958. This request must be used in response to a button press event.
  959. The server may ignore move requests depending on the state of
  960. the surface (e.g. fullscreen or maximized).
  961. </description>
  962. <arg name="seat" type="object" interface="wl_seat" summary="seat whose pointer is used"/>
  963. <arg name="serial" type="uint" summary="serial number of the implicit grab on the pointer"/>
  964. </request>
  965. <enum name="resize" bitfield="true">
  966. <description summary="edge values for resizing">
  967. These values are used to indicate which edge of a surface
  968. is being dragged in a resize operation. The server may
  969. use this information to adapt its behavior, e.g. choose
  970. an appropriate cursor image.
  971. </description>
  972. <entry name="none" value="0" summary="no edge"/>
  973. <entry name="top" value="1" summary="top edge"/>
  974. <entry name="bottom" value="2" summary="bottom edge"/>
  975. <entry name="left" value="4" summary="left edge"/>
  976. <entry name="top_left" value="5" summary="top and left edges"/>
  977. <entry name="bottom_left" value="6" summary="bottom and left edges"/>
  978. <entry name="right" value="8" summary="right edge"/>
  979. <entry name="top_right" value="9" summary="top and right edges"/>
  980. <entry name="bottom_right" value="10" summary="bottom and right edges"/>
  981. </enum>
  982. <request name="resize">
  983. <description summary="start an interactive resize">
  984. Start a pointer-driven resizing of the surface.
  985. This request must be used in response to a button press event.
  986. The server may ignore resize requests depending on the state of
  987. the surface (e.g. fullscreen or maximized).
  988. </description>
  989. <arg name="seat" type="object" interface="wl_seat" summary="seat whose pointer is used"/>
  990. <arg name="serial" type="uint" summary="serial number of the implicit grab on the pointer"/>
  991. <arg name="edges" type="uint" enum="resize" summary="which edge or corner is being dragged"/>
  992. </request>
  993. <request name="set_toplevel">
  994. <description summary="make the surface a toplevel surface">
  995. Map the surface as a toplevel surface.
  996. A toplevel surface is not fullscreen, maximized or transient.
  997. </description>
  998. </request>
  999. <enum name="transient" bitfield="true">
  1000. <description summary="details of transient behaviour">
  1001. These flags specify details of the expected behaviour
  1002. of transient surfaces. Used in the set_transient request.
  1003. </description>
  1004. <entry name="inactive" value="0x1" summary="do not set keyboard focus"/>
  1005. </enum>
  1006. <request name="set_transient">
  1007. <description summary="make the surface a transient surface">
  1008. Map the surface relative to an existing surface.
  1009. The x and y arguments specify the location of the upper left
  1010. corner of the surface relative to the upper left corner of the
  1011. parent surface, in surface-local coordinates.
  1012. The flags argument controls details of the transient behaviour.
  1013. </description>
  1014. <arg name="parent" type="object" interface="wl_surface" summary="parent surface"/>
  1015. <arg name="x" type="int" summary="surface-local x coordinate"/>
  1016. <arg name="y" type="int" summary="surface-local y coordinate"/>
  1017. <arg name="flags" type="uint" enum="transient" summary="transient surface behavior"/>
  1018. </request>
  1019. <enum name="fullscreen_method">
  1020. <description summary="different method to set the surface fullscreen">
  1021. Hints to indicate to the compositor how to deal with a conflict
  1022. between the dimensions of the surface and the dimensions of the
  1023. output. The compositor is free to ignore this parameter.
  1024. </description>
  1025. <entry name="default" value="0" summary="no preference, apply default policy"/>
  1026. <entry name="scale" value="1" summary="scale, preserve the surface's aspect ratio and center on output"/>
  1027. <entry name="driver" value="2" summary="switch output mode to the smallest mode that can fit the surface, add black borders to compensate size mismatch"/>
  1028. <entry name="fill" value="3" summary="no upscaling, center on output and add black borders to compensate size mismatch"/>
  1029. </enum>
  1030. <request name="set_fullscreen">
  1031. <description summary="make the surface a fullscreen surface">
  1032. Map the surface as a fullscreen surface.
  1033. If an output parameter is given then the surface will be made
  1034. fullscreen on that output. If the client does not specify the
  1035. output then the compositor will apply its policy - usually
  1036. choosing the output on which the surface has the biggest surface
  1037. area.
  1038. The client may specify a method to resolve a size conflict
  1039. between the output size and the surface size - this is provided
  1040. through the method parameter.
  1041. The framerate parameter is used only when the method is set
  1042. to "driver", to indicate the preferred framerate. A value of 0
  1043. indicates that the client does not care about framerate. The
  1044. framerate is specified in mHz, that is framerate of 60000 is 60Hz.
  1045. A method of "scale" or "driver" implies a scaling operation of
  1046. the surface, either via a direct scaling operation or a change of
  1047. the output mode. This will override any kind of output scaling, so
  1048. that mapping a surface with a buffer size equal to the mode can
  1049. fill the screen independent of buffer_scale.
  1050. A method of "fill" means we don't scale up the buffer, however
  1051. any output scale is applied. This means that you may run into
  1052. an edge case where the application maps a buffer with the same
  1053. size of the output mode but buffer_scale 1 (thus making a
  1054. surface larger than the output). In this case it is allowed to
  1055. downscale the results to fit the screen.
  1056. The compositor must reply to this request with a configure event
  1057. with the dimensions for the output on which the surface will
  1058. be made fullscreen.
  1059. </description>
  1060. <arg name="method" type="uint" enum="fullscreen_method" summary="method for resolving size conflict"/>
  1061. <arg name="framerate" type="uint" summary="framerate in mHz"/>
  1062. <arg name="output" type="object" interface="wl_output" allow-null="true"
  1063. summary="output on which the surface is to be fullscreen"/>
  1064. </request>
  1065. <request name="set_popup">
  1066. <description summary="make the surface a popup surface">
  1067. Map the surface as a popup.
  1068. A popup surface is a transient surface with an added pointer
  1069. grab.
  1070. An existing implicit grab will be changed to owner-events mode,
  1071. and the popup grab will continue after the implicit grab ends
  1072. (i.e. releasing the mouse button does not cause the popup to
  1073. be unmapped).
  1074. The popup grab continues until the window is destroyed or a
  1075. mouse button is pressed in any other client's window. A click
  1076. in any of the client's surfaces is reported as normal, however,
  1077. clicks in other clients' surfaces will be discarded and trigger
  1078. the callback.
  1079. The x and y arguments specify the location of the upper left
  1080. corner of the surface relative to the upper left corner of the
  1081. parent surface, in surface-local coordinates.
  1082. </description>
  1083. <arg name="seat" type="object" interface="wl_seat" summary="seat whose pointer is used"/>
  1084. <arg name="serial" type="uint" summary="serial number of the implicit grab on the pointer"/>
  1085. <arg name="parent" type="object" interface="wl_surface" summary="parent surface"/>
  1086. <arg name="x" type="int" summary="surface-local x coordinate"/>
  1087. <arg name="y" type="int" summary="surface-local y coordinate"/>
  1088. <arg name="flags" type="uint" enum="transient" summary="transient surface behavior"/>
  1089. </request>
  1090. <request name="set_maximized">
  1091. <description summary="make the surface a maximized surface">
  1092. Map the surface as a maximized surface.
  1093. If an output parameter is given then the surface will be
  1094. maximized on that output. If the client does not specify the
  1095. output then the compositor will apply its policy - usually
  1096. choosing the output on which the surface has the biggest surface
  1097. area.
  1098. The compositor will reply with a configure event telling
  1099. the expected new surface size. The operation is completed
  1100. on the next buffer attach to this surface.
  1101. A maximized surface typically fills the entire output it is
  1102. bound to, except for desktop elements such as panels. This is
  1103. the main difference between a maximized shell surface and a
  1104. fullscreen shell surface.
  1105. The details depend on the compositor implementation.
  1106. </description>
  1107. <arg name="output" type="object" interface="wl_output" allow-null="true"
  1108. summary="output on which the surface is to be maximized"/>
  1109. </request>
  1110. <request name="set_title">
  1111. <description summary="set surface title">
  1112. Set a short title for the surface.
  1113. This string may be used to identify the surface in a task bar,
  1114. window list, or other user interface elements provided by the
  1115. compositor.
  1116. The string must be encoded in UTF-8.
  1117. </description>
  1118. <arg name="title" type="string" summary="surface title"/>
  1119. </request>
  1120. <request name="set_class">
  1121. <description summary="set surface class">
  1122. Set a class for the surface.
  1123. The surface class identifies the general class of applications
  1124. to which the surface belongs. A common convention is to use the
  1125. file name (or the full path if it is a non-standard location) of
  1126. the application's .desktop file as the class.
  1127. </description>
  1128. <arg name="class_" type="string" summary="surface class"/>
  1129. </request>
  1130. <event name="ping">
  1131. <description summary="ping client">
  1132. Ping a client to check if it is receiving events and sending
  1133. requests. A client is expected to reply with a pong request.
  1134. </description>
  1135. <arg name="serial" type="uint" summary="serial number of the ping"/>
  1136. </event>
  1137. <event name="configure">
  1138. <description summary="suggest resize">
  1139. The configure event asks the client to resize its surface.
  1140. The size is a hint, in the sense that the client is free to
  1141. ignore it if it doesn't resize, pick a smaller size (to
  1142. satisfy aspect ratio or resize in steps of NxM pixels).
  1143. The edges parameter provides a hint about how the surface
  1144. was resized. The client may use this information to decide
  1145. how to adjust its content to the new size (e.g. a scrolling
  1146. area might adjust its content position to leave the viewable
  1147. content unmoved).
  1148. The client is free to dismiss all but the last configure
  1149. event it received.
  1150. The width and height arguments specify the size of the window
  1151. in surface-local coordinates.
  1152. </description>
  1153. <arg name="edges" type="uint" enum="resize" summary="how the surface was resized"/>
  1154. <arg name="width" type="int" summary="new width of the surface"/>
  1155. <arg name="height" type="int" summary="new height of the surface"/>
  1156. </event>
  1157. <event name="popup_done">
  1158. <description summary="popup interaction is done">
  1159. The popup_done event is sent out when a popup grab is broken,
  1160. that is, when the user clicks a surface that doesn't belong
  1161. to the client owning the popup surface.
  1162. </description>
  1163. </event>
  1164. </interface>
  1165. <interface name="wl_surface" version="5">
  1166. <description summary="an onscreen surface">
  1167. A surface is a rectangular area that may be displayed on zero
  1168. or more outputs, and shown any number of times at the compositor's
  1169. discretion. They can present wl_buffers, receive user input, and
  1170. define a local coordinate system.
  1171. The size of a surface (and relative positions on it) is described
  1172. in surface-local coordinates, which may differ from the buffer
  1173. coordinates of the pixel content, in case a buffer_transform
  1174. or a buffer_scale is used.
  1175. A surface without a "role" is fairly useless: a compositor does
  1176. not know where, when or how to present it. The role is the
  1177. purpose of a wl_surface. Examples of roles are a cursor for a
  1178. pointer (as set by wl_pointer.set_cursor), a drag icon
  1179. (wl_data_device.start_drag), a sub-surface
  1180. (wl_subcompositor.get_subsurface), and a window as defined by a
  1181. shell protocol (e.g. wl_shell.get_shell_surface).
  1182. A surface can have only one role at a time. Initially a
  1183. wl_surface does not have a role. Once a wl_surface is given a
  1184. role, it is set permanently for the whole lifetime of the
  1185. wl_surface object. Giving the current role again is allowed,
  1186. unless explicitly forbidden by the relevant interface
  1187. specification.
  1188. Surface roles are given by requests in other interfaces such as
  1189. wl_pointer.set_cursor. The request should explicitly mention
  1190. that this request gives a role to a wl_surface. Often, this
  1191. request also creates a new protocol object that represents the
  1192. role and adds additional functionality to wl_surface. When a
  1193. client wants to destroy a wl_surface, they must destroy this 'role
  1194. object' before the wl_surface.
  1195. Destroying the role object does not remove the role from the
  1196. wl_surface, but it may stop the wl_surface from "playing the role".
  1197. For instance, if a wl_subsurface object is destroyed, the wl_surface
  1198. it was created for will be unmapped and forget its position and
  1199. z-order. It is allowed to create a wl_subsurface for the same
  1200. wl_surface again, but it is not allowed to use the wl_surface as
  1201. a cursor (cursor is a different role than sub-surface, and role
  1202. switching is not allowed).
  1203. </description>
  1204. <enum name="error">
  1205. <description summary="wl_surface error values">
  1206. These errors can be emitted in response to wl_surface requests.
  1207. </description>
  1208. <entry name="invalid_scale" value="0" summary="buffer scale value is invalid"/>
  1209. <entry name="invalid_transform" value="1" summary="buffer transform value is invalid"/>
  1210. <entry name="invalid_size" value="2" summary="buffer size is invalid"/>
  1211. <entry name="invalid_offset" value="3" summary="buffer offset is invalid"/>
  1212. </enum>
  1213. <request name="destroy" type="destructor">
  1214. <description summary="delete surface">
  1215. Deletes the surface and invalidates its object ID.
  1216. </description>
  1217. </request>
  1218. <request name="attach">
  1219. <description summary="set the surface contents">
  1220. Set a buffer as the content of this surface.
  1221. The new size of the surface is calculated based on the buffer
  1222. size transformed by the inverse buffer_transform and the
  1223. inverse buffer_scale. This means that at commit time the supplied
  1224. buffer size must be an integer multiple of the buffer_scale. If
  1225. that's not the case, an invalid_size error is sent.
  1226. The x and y arguments specify the location of the new pending
  1227. buffer's upper left corner, relative to the current buffer's upper
  1228. left corner, in surface-local coordinates. In other words, the
  1229. x and y, combined with the new surface size define in which
  1230. directions the surface's size changes. Setting anything other than 0
  1231. as x and y arguments is discouraged, and should instead be replaced
  1232. with using the separate wl_surface.offset request.
  1233. When the bound wl_surface version is 5 or higher, passing any
  1234. non-zero x or y is a protocol violation, and will result in an
  1235. 'invalid_offset' error being raised. To achieve equivalent semantics,
  1236. use wl_surface.offset.
  1237. Surface contents are double-buffered state, see wl_surface.commit.
  1238. The initial surface contents are void; there is no content.
  1239. wl_surface.attach assigns the given wl_buffer as the pending
  1240. wl_buffer. wl_surface.commit makes the pending wl_buffer the new
  1241. surface contents, and the size of the surface becomes the size
  1242. calculated from the wl_buffer, as described above. After commit,
  1243. there is no pending buffer until the next attach.
  1244. Committing a pending wl_buffer allows the compositor to read the
  1245. pixels in the wl_buffer. The compositor may access the pixels at
  1246. any time after the wl_surface.commit request. When the compositor
  1247. will not access the pixels anymore, it will send the
  1248. wl_buffer.release event. Only after receiving wl_buffer.release,
  1249. the client may reuse the wl_buffer. A wl_buffer that has been
  1250. attached and then replaced by another attach instead of committed
  1251. will not receive a release event, and is not used by the
  1252. compositor.
  1253. If a pending wl_buffer has been committed to more than one wl_surface,
  1254. the delivery of wl_buffer.release events becomes undefined. A well
  1255. behaved client should not rely on wl_buffer.release events in this
  1256. case. Alternatively, a client could create multiple wl_buffer objects
  1257. from the same backing storage or use wp_linux_buffer_release.
  1258. Destroying the wl_buffer after wl_buffer.release does not change
  1259. the surface contents. Destroying the wl_buffer before wl_buffer.release
  1260. is allowed as long as the underlying buffer storage isn't re-used (this
  1261. can happen e.g. on client process termination). However, if the client
  1262. destroys the wl_buffer before receiving the wl_buffer.release event and
  1263. mutates the underlying buffer storage, the surface contents become
  1264. undefined immediately.
  1265. If wl_surface.attach is sent with a NULL wl_buffer, the
  1266. following wl_surface.commit will remove the surface content.
  1267. </description>
  1268. <arg name="buffer" type="object" interface="wl_buffer" allow-null="true"
  1269. summary="buffer of surface contents"/>
  1270. <arg name="x" type="int" summary="surface-local x coordinate"/>
  1271. <arg name="y" type="int" summary="surface-local y coordinate"/>
  1272. </request>
  1273. <request name="damage">
  1274. <description summary="mark part of the surface damaged">
  1275. This request is used to describe the regions where the pending
  1276. buffer is different from the current surface contents, and where
  1277. the surface therefore needs to be repainted. The compositor
  1278. ignores the parts of the damage that fall outside of the surface.
  1279. Damage is double-buffered state, see wl_surface.commit.
  1280. The damage rectangle is specified in surface-local coordinates,
  1281. where x and y specify the upper left corner of the damage rectangle.
  1282. The initial value for pending damage is empty: no damage.
  1283. wl_surface.damage adds pending damage: the new pending damage
  1284. is the union of old pending damage and the given rectangle.
  1285. wl_surface.commit assigns pending damage as the current damage,
  1286. and clears pending damage. The server will clear the current
  1287. damage as it repaints the surface.
  1288. Note! New clients should not use this request. Instead damage can be
  1289. posted with wl_surface.damage_buffer which uses buffer coordinates
  1290. instead of surface coordinates.
  1291. </description>
  1292. <arg name="x" type="int" summary="surface-local x coordinate"/>
  1293. <arg name="y" type="int" summary="surface-local y coordinate"/>
  1294. <arg name="width" type="int" summary="width of damage rectangle"/>
  1295. <arg name="height" type="int" summary="height of damage rectangle"/>
  1296. </request>
  1297. <request name="frame">
  1298. <description summary="request a frame throttling hint">
  1299. Request a notification when it is a good time to start drawing a new
  1300. frame, by creating a frame callback. This is useful for throttling
  1301. redrawing operations, and driving animations.
  1302. When a client is animating on a wl_surface, it can use the 'frame'
  1303. request to get notified when it is a good time to draw and commit the
  1304. next frame of animation. If the client commits an update earlier than
  1305. that, it is likely that some updates will not make it to the display,
  1306. and the client is wasting resources by drawing too often.
  1307. The frame request will take effect on the next wl_surface.commit.
  1308. The notification will only be posted for one frame unless
  1309. requested again. For a wl_surface, the notifications are posted in
  1310. the order the frame requests were committed.
  1311. The server must send the notifications so that a client
  1312. will not send excessive updates, while still allowing
  1313. the highest possible update rate for clients that wait for the reply
  1314. before drawing again. The server should give some time for the client
  1315. to draw and commit after sending the frame callback events to let it
  1316. hit the next output refresh.
  1317. A server should avoid signaling the frame callbacks if the
  1318. surface is not visible in any way, e.g. the surface is off-screen,
  1319. or completely obscured by other opaque surfaces.
  1320. The object returned by this request will be destroyed by the
  1321. compositor after the callback is fired and as such the client must not
  1322. attempt to use it after that point.
  1323. The callback_data passed in the callback is the current time, in
  1324. milliseconds, with an undefined base.
  1325. </description>
  1326. <arg name="callback" type="new_id" interface="wl_callback" summary="callback object for the frame request"/>
  1327. </request>
  1328. <request name="set_opaque_region">
  1329. <description summary="set opaque region">
  1330. This request sets the region of the surface that contains
  1331. opaque content.
  1332. The opaque region is an optimization hint for the compositor
  1333. that lets it optimize the redrawing of content behind opaque
  1334. regions. Setting an opaque region is not required for correct
  1335. behaviour, but marking transparent content as opaque will result
  1336. in repaint artifacts.
  1337. The opaque region is specified in surface-local coordinates.
  1338. The compositor ignores the parts of the opaque region that fall
  1339. outside of the surface.
  1340. Opaque region is double-buffered state, see wl_surface.commit.
  1341. wl_surface.set_opaque_region changes the pending opaque region.
  1342. wl_surface.commit copies the pending region to the current region.
  1343. Otherwise, the pending and current regions are never changed.
  1344. The initial value for an opaque region is empty. Setting the pending
  1345. opaque region has copy semantics, and the wl_region object can be
  1346. destroyed immediately. A NULL wl_region causes the pending opaque
  1347. region to be set to empty.
  1348. </description>
  1349. <arg name="region" type="object" interface="wl_region" allow-null="true"
  1350. summary="opaque region of the surface"/>
  1351. </request>
  1352. <request name="set_input_region">
  1353. <description summary="set input region">
  1354. This request sets the region of the surface that can receive
  1355. pointer and touch events.
  1356. Input events happening outside of this region will try the next
  1357. surface in the server surface stack. The compositor ignores the
  1358. parts of the input region that fall outside of the surface.
  1359. The input region is specified in surface-local coordinates.
  1360. Input region is double-buffered state, see wl_surface.commit.
  1361. wl_surface.set_input_region changes the pending input region.
  1362. wl_surface.commit copies the pending region to the current region.
  1363. Otherwise the pending and current regions are never changed,
  1364. except cursor and icon surfaces are special cases, see
  1365. wl_pointer.set_cursor and wl_data_device.start_drag.
  1366. The initial value for an input region is infinite. That means the
  1367. whole surface will accept input. Setting the pending input region
  1368. has copy semantics, and the wl_region object can be destroyed
  1369. immediately. A NULL wl_region causes the input region to be set
  1370. to infinite.
  1371. </description>
  1372. <arg name="region" type="object" interface="wl_region" allow-null="true"
  1373. summary="input region of the surface"/>
  1374. </request>
  1375. <request name="commit">
  1376. <description summary="commit pending surface state">
  1377. Surface state (input, opaque, and damage regions, attached buffers,
  1378. etc.) is double-buffered. Protocol requests modify the pending state,
  1379. as opposed to the current state in use by the compositor. A commit
  1380. request atomically applies all pending state, replacing the current
  1381. state. After commit, the new pending state is as documented for each
  1382. related request.
  1383. On commit, a pending wl_buffer is applied first, and all other state
  1384. second. This means that all coordinates in double-buffered state are
  1385. relative to the new wl_buffer coming into use, except for
  1386. wl_surface.attach itself. If there is no pending wl_buffer, the
  1387. coordinates are relative to the current surface contents.
  1388. All requests that need a commit to become effective are documented
  1389. to affect double-buffered state.
  1390. Other interfaces may add further double-buffered surface state.
  1391. </description>
  1392. </request>
  1393. <event name="enter">
  1394. <description summary="surface enters an output">
  1395. This is emitted whenever a surface's creation, movement, or resizing
  1396. results in some part of it being within the scanout region of an
  1397. output.
  1398. Note that a surface may be overlapping with zero or more outputs.
  1399. </description>
  1400. <arg name="output" type="object" interface="wl_output" summary="output entered by the surface"/>
  1401. </event>
  1402. <event name="leave">
  1403. <description summary="surface leaves an output">
  1404. This is emitted whenever a surface's creation, movement, or resizing
  1405. results in it no longer having any part of it within the scanout region
  1406. of an output.
  1407. Clients should not use the number of outputs the surface is on for frame
  1408. throttling purposes. The surface might be hidden even if no leave event
  1409. has been sent, and the compositor might expect new surface content
  1410. updates even if no enter event has been sent. The frame event should be
  1411. used instead.
  1412. </description>
  1413. <arg name="output" type="object" interface="wl_output" summary="output left by the surface"/>
  1414. </event>
  1415. <!-- Version 2 additions -->
  1416. <request name="set_buffer_transform" since="2">
  1417. <description summary="sets the buffer transformation">
  1418. This request sets an optional transformation on how the compositor
  1419. interprets the contents of the buffer attached to the surface. The
  1420. accepted values for the transform parameter are the values for
  1421. wl_output.transform.
  1422. Buffer transform is double-buffered state, see wl_surface.commit.
  1423. A newly created surface has its buffer transformation set to normal.
  1424. wl_surface.set_buffer_transform changes the pending buffer
  1425. transformation. wl_surface.commit copies the pending buffer
  1426. transformation to the current one. Otherwise, the pending and current
  1427. values are never changed.
  1428. The purpose of this request is to allow clients to render content
  1429. according to the output transform, thus permitting the compositor to
  1430. use certain optimizations even if the display is rotated. Using
  1431. hardware overlays and scanning out a client buffer for fullscreen
  1432. surfaces are examples of such optimizations. Those optimizations are
  1433. highly dependent on the compositor implementation, so the use of this
  1434. request should be considered on a case-by-case basis.
  1435. Note that if the transform value includes 90 or 270 degree rotation,
  1436. the width of the buffer will become the surface height and the height
  1437. of the buffer will become the surface width.
  1438. If transform is not one of the values from the
  1439. wl_output.transform enum the invalid_transform protocol error
  1440. is raised.
  1441. </description>
  1442. <arg name="transform" type="int" enum="wl_output.transform"
  1443. summary="transform for interpreting buffer contents"/>
  1444. </request>
  1445. <!-- Version 3 additions -->
  1446. <request name="set_buffer_scale" since="3">
  1447. <description summary="sets the buffer scaling factor">
  1448. This request sets an optional scaling factor on how the compositor
  1449. interprets the contents of the buffer attached to the window.
  1450. Buffer scale is double-buffered state, see wl_surface.commit.
  1451. A newly created surface has its buffer scale set to 1.
  1452. wl_surface.set_buffer_scale changes the pending buffer scale.
  1453. wl_surface.commit copies the pending buffer scale to the current one.
  1454. Otherwise, the pending and current values are never changed.
  1455. The purpose of this request is to allow clients to supply higher
  1456. resolution buffer data for use on high resolution outputs. It is
  1457. intended that you pick the same buffer scale as the scale of the
  1458. output that the surface is displayed on. This means the compositor
  1459. can avoid scaling when rendering the surface on that output.
  1460. Note that if the scale is larger than 1, then you have to attach
  1461. a buffer that is larger (by a factor of scale in each dimension)
  1462. than the desired surface size.
  1463. If scale is not positive the invalid_scale protocol error is
  1464. raised.
  1465. </description>
  1466. <arg name="scale" type="int"
  1467. summary="positive scale for interpreting buffer contents"/>
  1468. </request>
  1469. <!-- Version 4 additions -->
  1470. <request name="damage_buffer" since="4">
  1471. <description summary="mark part of the surface damaged using buffer coordinates">
  1472. This request is used to describe the regions where the pending
  1473. buffer is different from the current surface contents, and where
  1474. the surface therefore needs to be repainted. The compositor
  1475. ignores the parts of the damage that fall outside of the surface.
  1476. Damage is double-buffered state, see wl_surface.commit.
  1477. The damage rectangle is specified in buffer coordinates,
  1478. where x and y specify the upper left corner of the damage rectangle.
  1479. The initial value for pending damage is empty: no damage.
  1480. wl_surface.damage_buffer adds pending damage: the new pending
  1481. damage is the union of old pending damage and the given rectangle.
  1482. wl_surface.commit assigns pending damage as the current damage,
  1483. and clears pending damage. The server will clear the current
  1484. damage as it repaints the surface.
  1485. This request differs from wl_surface.damage in only one way - it
  1486. takes damage in buffer coordinates instead of surface-local
  1487. coordinates. While this generally is more intuitive than surface
  1488. coordinates, it is especially desirable when using wp_viewport
  1489. or when a drawing library (like EGL) is unaware of buffer scale
  1490. and buffer transform.
  1491. Note: Because buffer transformation changes and damage requests may
  1492. be interleaved in the protocol stream, it is impossible to determine
  1493. the actual mapping between surface and buffer damage until
  1494. wl_surface.commit time. Therefore, compositors wishing to take both
  1495. kinds of damage into account will have to accumulate damage from the
  1496. two requests separately and only transform from one to the other
  1497. after receiving the wl_surface.commit.
  1498. </description>
  1499. <arg name="x" type="int" summary="buffer-local x coordinate"/>
  1500. <arg name="y" type="int" summary="buffer-local y coordinate"/>
  1501. <arg name="width" type="int" summary="width of damage rectangle"/>
  1502. <arg name="height" type="int" summary="height of damage rectangle"/>
  1503. </request>
  1504. <!-- Version 5 additions -->
  1505. <request name="offset" since="5">
  1506. <description summary="set the surface contents offset">
  1507. The x and y arguments specify the location of the new pending
  1508. buffer's upper left corner, relative to the current buffer's upper
  1509. left corner, in surface-local coordinates. In other words, the
  1510. x and y, combined with the new surface size define in which
  1511. directions the surface's size changes.
  1512. Surface location offset is double-buffered state, see
  1513. wl_surface.commit.
  1514. This request is semantically equivalent to and the replaces the x and y
  1515. arguments in the wl_surface.attach request in wl_surface versions prior
  1516. to 5. See wl_surface.attach for details.
  1517. </description>
  1518. <arg name="x" type="int" summary="surface-local x coordinate"/>
  1519. <arg name="y" type="int" summary="surface-local y coordinate"/>
  1520. </request>
  1521. </interface>
  1522. <interface name="wl_seat" version="8">
  1523. <description summary="group of input devices">
  1524. A seat is a group of keyboards, pointer and touch devices. This
  1525. object is published as a global during start up, or when such a
  1526. device is hot plugged. A seat typically has a pointer and
  1527. maintains a keyboard focus and a pointer focus.
  1528. </description>
  1529. <enum name="capability" bitfield="true">
  1530. <description summary="seat capability bitmask">
  1531. This is a bitmask of capabilities this seat has; if a member is
  1532. set, then it is present on the seat.
  1533. </description>
  1534. <entry name="pointer" value="1" summary="the seat has pointer devices"/>
  1535. <entry name="keyboard" value="2" summary="the seat has one or more keyboards"/>
  1536. <entry name="touch" value="4" summary="the seat has touch devices"/>
  1537. </enum>
  1538. <enum name="error">
  1539. <description summary="wl_seat error values">
  1540. These errors can be emitted in response to wl_seat requests.
  1541. </description>
  1542. <entry name="missing_capability" value="0"
  1543. summary="get_pointer, get_keyboard or get_touch called on seat without the matching capability"/>
  1544. </enum>
  1545. <event name="capabilities">
  1546. <description summary="seat capabilities changed">
  1547. This is emitted whenever a seat gains or loses the pointer,
  1548. keyboard or touch capabilities. The argument is a capability
  1549. enum containing the complete set of capabilities this seat has.
  1550. When the pointer capability is added, a client may create a
  1551. wl_pointer object using the wl_seat.get_pointer request. This object
  1552. will receive pointer events until the capability is removed in the
  1553. future.
  1554. When the pointer capability is removed, a client should destroy the
  1555. wl_pointer objects associated with the seat where the capability was
  1556. removed, using the wl_pointer.release request. No further pointer
  1557. events will be received on these objects.
  1558. In some compositors, if a seat regains the pointer capability and a
  1559. client has a previously obtained wl_pointer object of version 4 or
  1560. less, that object may start sending pointer events again. This
  1561. behavior is considered a misinterpretation of the intended behavior
  1562. and must not be relied upon by the client. wl_pointer objects of
  1563. version 5 or later must not send events if created before the most
  1564. recent event notifying the client of an added pointer capability.
  1565. The above behavior also applies to wl_keyboard and wl_touch with the
  1566. keyboard and touch capabilities, respectively.
  1567. </description>
  1568. <arg name="capabilities" type="uint" enum="capability" summary="capabilities of the seat"/>
  1569. </event>
  1570. <request name="get_pointer">
  1571. <description summary="return pointer object">
  1572. The ID provided will be initialized to the wl_pointer interface
  1573. for this seat.
  1574. This request only takes effect if the seat has the pointer
  1575. capability, or has had the pointer capability in the past.
  1576. It is a protocol violation to issue this request on a seat that has
  1577. never had the pointer capability. The missing_capability error will
  1578. be sent in this case.
  1579. </description>
  1580. <arg name="id" type="new_id" interface="wl_pointer" summary="seat pointer"/>
  1581. </request>
  1582. <request name="get_keyboard">
  1583. <description summary="return keyboard object">
  1584. The ID provided will be initialized to the wl_keyboard interface
  1585. for this seat.
  1586. This request only takes effect if the seat has the keyboard
  1587. capability, or has had the keyboard capability in the past.
  1588. It is a protocol violation to issue this request on a seat that has
  1589. never had the keyboard capability. The missing_capability error will
  1590. be sent in this case.
  1591. </description>
  1592. <arg name="id" type="new_id" interface="wl_keyboard" summary="seat keyboard"/>
  1593. </request>
  1594. <request name="get_touch">
  1595. <description summary="return touch object">
  1596. The ID provided will be initialized to the wl_touch interface
  1597. for this seat.
  1598. This request only takes effect if the seat has the touch
  1599. capability, or has had the touch capability in the past.
  1600. It is a protocol violation to issue this request on a seat that has
  1601. never had the touch capability. The missing_capability error will
  1602. be sent in this case.
  1603. </description>
  1604. <arg name="id" type="new_id" interface="wl_touch" summary="seat touch interface"/>
  1605. </request>
  1606. <!-- Version 2 additions -->
  1607. <event name="name" since="2">
  1608. <description summary="unique identifier for this seat">
  1609. In a multi-seat configuration the seat name can be used by clients to
  1610. help identify which physical devices the seat represents.
  1611. The seat name is a UTF-8 string with no convention defined for its
  1612. contents. Each name is unique among all wl_seat globals. The name is
  1613. only guaranteed to be unique for the current compositor instance.
  1614. The same seat names are used for all clients. Thus, the name can be
  1615. shared across processes to refer to a specific wl_seat global.
  1616. The name event is sent after binding to the seat global. This event is
  1617. only sent once per seat object, and the name does not change over the
  1618. lifetime of the wl_seat global.
  1619. Compositors may re-use the same seat name if the wl_seat global is
  1620. destroyed and re-created later.
  1621. </description>
  1622. <arg name="name" type="string" summary="seat identifier"/>
  1623. </event>
  1624. <!-- Version 5 additions -->
  1625. <request name="release" type="destructor" since="5">
  1626. <description summary="release the seat object">
  1627. Using this request a client can tell the server that it is not going to
  1628. use the seat object anymore.
  1629. </description>
  1630. </request>
  1631. </interface>
  1632. <interface name="wl_pointer" version="8">
  1633. <description summary="pointer input device">
  1634. The wl_pointer interface represents one or more input devices,
  1635. such as mice, which control the pointer location and pointer_focus
  1636. of a seat.
  1637. The wl_pointer interface generates motion, enter and leave
  1638. events for the surfaces that the pointer is located over,
  1639. and button and axis events for button presses, button releases
  1640. and scrolling.
  1641. </description>
  1642. <enum name="error">
  1643. <entry name="role" value="0" summary="given wl_surface has another role"/>
  1644. </enum>
  1645. <request name="set_cursor">
  1646. <description summary="set the pointer surface">
  1647. Set the pointer surface, i.e., the surface that contains the
  1648. pointer image (cursor). This request gives the surface the role
  1649. of a cursor. If the surface already has another role, it raises
  1650. a protocol error.
  1651. The cursor actually changes only if the pointer
  1652. focus for this device is one of the requesting client's surfaces
  1653. or the surface parameter is the current pointer surface. If
  1654. there was a previous surface set with this request it is
  1655. replaced. If surface is NULL, the pointer image is hidden.
  1656. The parameters hotspot_x and hotspot_y define the position of
  1657. the pointer surface relative to the pointer location. Its
  1658. top-left corner is always at (x, y) - (hotspot_x, hotspot_y),
  1659. where (x, y) are the coordinates of the pointer location, in
  1660. surface-local coordinates.
  1661. On surface.attach requests to the pointer surface, hotspot_x
  1662. and hotspot_y are decremented by the x and y parameters
  1663. passed to the request. Attach must be confirmed by
  1664. wl_surface.commit as usual.
  1665. The hotspot can also be updated by passing the currently set
  1666. pointer surface to this request with new values for hotspot_x
  1667. and hotspot_y.
  1668. The current and pending input regions of the wl_surface are
  1669. cleared, and wl_surface.set_input_region is ignored until the
  1670. wl_surface is no longer used as the cursor. When the use as a
  1671. cursor ends, the current and pending input regions become
  1672. undefined, and the wl_surface is unmapped.
  1673. The serial parameter must match the latest wl_pointer.enter
  1674. serial number sent to the client. Otherwise the request will be
  1675. ignored.
  1676. </description>
  1677. <arg name="serial" type="uint" summary="serial number of the enter event"/>
  1678. <arg name="surface" type="object" interface="wl_surface" allow-null="true"
  1679. summary="pointer surface"/>
  1680. <arg name="hotspot_x" type="int" summary="surface-local x coordinate"/>
  1681. <arg name="hotspot_y" type="int" summary="surface-local y coordinate"/>
  1682. </request>
  1683. <event name="enter">
  1684. <description summary="enter event">
  1685. Notification that this seat's pointer is focused on a certain
  1686. surface.
  1687. When a seat's focus enters a surface, the pointer image
  1688. is undefined and a client should respond to this event by setting
  1689. an appropriate pointer image with the set_cursor request.
  1690. </description>
  1691. <arg name="serial" type="uint" summary="serial number of the enter event"/>
  1692. <arg name="surface" type="object" interface="wl_surface" summary="surface entered by the pointer"/>
  1693. <arg name="surface_x" type="fixed" summary="surface-local x coordinate"/>
  1694. <arg name="surface_y" type="fixed" summary="surface-local y coordinate"/>
  1695. </event>
  1696. <event name="leave">
  1697. <description summary="leave event">
  1698. Notification that this seat's pointer is no longer focused on
  1699. a certain surface.
  1700. The leave notification is sent before the enter notification
  1701. for the new focus.
  1702. </description>
  1703. <arg name="serial" type="uint" summary="serial number of the leave event"/>
  1704. <arg name="surface" type="object" interface="wl_surface" summary="surface left by the pointer"/>
  1705. </event>
  1706. <event name="motion">
  1707. <description summary="pointer motion event">
  1708. Notification of pointer location change. The arguments
  1709. surface_x and surface_y are the location relative to the
  1710. focused surface.
  1711. </description>
  1712. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  1713. <arg name="surface_x" type="fixed" summary="surface-local x coordinate"/>
  1714. <arg name="surface_y" type="fixed" summary="surface-local y coordinate"/>
  1715. </event>
  1716. <enum name="button_state">
  1717. <description summary="physical button state">
  1718. Describes the physical state of a button that produced the button
  1719. event.
  1720. </description>
  1721. <entry name="released" value="0" summary="the button is not pressed"/>
  1722. <entry name="pressed" value="1" summary="the button is pressed"/>
  1723. </enum>
  1724. <event name="button">
  1725. <description summary="pointer button event">
  1726. Mouse button click and release notifications.
  1727. The location of the click is given by the last motion or
  1728. enter event.
  1729. The time argument is a timestamp with millisecond
  1730. granularity, with an undefined base.
  1731. The button is a button code as defined in the Linux kernel's
  1732. linux/input-event-codes.h header file, e.g. BTN_LEFT.
  1733. Any 16-bit button code value is reserved for future additions to the
  1734. kernel's event code list. All other button codes above 0xFFFF are
  1735. currently undefined but may be used in future versions of this
  1736. protocol.
  1737. </description>
  1738. <arg name="serial" type="uint" summary="serial number of the button event"/>
  1739. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  1740. <arg name="button" type="uint" summary="button that produced the event"/>
  1741. <arg name="state" type="uint" enum="button_state" summary="physical state of the button"/>
  1742. </event>
  1743. <enum name="axis">
  1744. <description summary="axis types">
  1745. Describes the axis types of scroll events.
  1746. </description>
  1747. <entry name="vertical_scroll" value="0" summary="vertical axis"/>
  1748. <entry name="horizontal_scroll" value="1" summary="horizontal axis"/>
  1749. </enum>
  1750. <event name="axis">
  1751. <description summary="axis event">
  1752. Scroll and other axis notifications.
  1753. For scroll events (vertical and horizontal scroll axes), the
  1754. value parameter is the length of a vector along the specified
  1755. axis in a coordinate space identical to those of motion events,
  1756. representing a relative movement along the specified axis.
  1757. For devices that support movements non-parallel to axes multiple
  1758. axis events will be emitted.
  1759. When applicable, for example for touch pads, the server can
  1760. choose to emit scroll events where the motion vector is
  1761. equivalent to a motion event vector.
  1762. When applicable, a client can transform its content relative to the
  1763. scroll distance.
  1764. </description>
  1765. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  1766. <arg name="axis" type="uint" enum="axis" summary="axis type"/>
  1767. <arg name="value" type="fixed" summary="length of vector in surface-local coordinate space"/>
  1768. </event>
  1769. <!-- Version 3 additions -->
  1770. <request name="release" type="destructor" since="3">
  1771. <description summary="release the pointer object">
  1772. Using this request a client can tell the server that it is not going to
  1773. use the pointer object anymore.
  1774. This request destroys the pointer proxy object, so clients must not call
  1775. wl_pointer_destroy() after using this request.
  1776. </description>
  1777. </request>
  1778. <!-- Version 5 additions -->
  1779. <event name="frame" since="5">
  1780. <description summary="end of a pointer event sequence">
  1781. Indicates the end of a set of events that logically belong together.
  1782. A client is expected to accumulate the data in all events within the
  1783. frame before proceeding.
  1784. All wl_pointer events before a wl_pointer.frame event belong
  1785. logically together. For example, in a diagonal scroll motion the
  1786. compositor will send an optional wl_pointer.axis_source event, two
  1787. wl_pointer.axis events (horizontal and vertical) and finally a
  1788. wl_pointer.frame event. The client may use this information to
  1789. calculate a diagonal vector for scrolling.
  1790. When multiple wl_pointer.axis events occur within the same frame,
  1791. the motion vector is the combined motion of all events.
  1792. When a wl_pointer.axis and a wl_pointer.axis_stop event occur within
  1793. the same frame, this indicates that axis movement in one axis has
  1794. stopped but continues in the other axis.
  1795. When multiple wl_pointer.axis_stop events occur within the same
  1796. frame, this indicates that these axes stopped in the same instance.
  1797. A wl_pointer.frame event is sent for every logical event group,
  1798. even if the group only contains a single wl_pointer event.
  1799. Specifically, a client may get a sequence: motion, frame, button,
  1800. frame, axis, frame, axis_stop, frame.
  1801. The wl_pointer.enter and wl_pointer.leave events are logical events
  1802. generated by the compositor and not the hardware. These events are
  1803. also grouped by a wl_pointer.frame. When a pointer moves from one
  1804. surface to another, a compositor should group the
  1805. wl_pointer.leave event within the same wl_pointer.frame.
  1806. However, a client must not rely on wl_pointer.leave and
  1807. wl_pointer.enter being in the same wl_pointer.frame.
  1808. Compositor-specific policies may require the wl_pointer.leave and
  1809. wl_pointer.enter event being split across multiple wl_pointer.frame
  1810. groups.
  1811. </description>
  1812. </event>
  1813. <enum name="axis_source">
  1814. <description summary="axis source types">
  1815. Describes the source types for axis events. This indicates to the
  1816. client how an axis event was physically generated; a client may
  1817. adjust the user interface accordingly. For example, scroll events
  1818. from a "finger" source may be in a smooth coordinate space with
  1819. kinetic scrolling whereas a "wheel" source may be in discrete steps
  1820. of a number of lines.
  1821. The "continuous" axis source is a device generating events in a
  1822. continuous coordinate space, but using something other than a
  1823. finger. One example for this source is button-based scrolling where
  1824. the vertical motion of a device is converted to scroll events while
  1825. a button is held down.
  1826. The "wheel tilt" axis source indicates that the actual device is a
  1827. wheel but the scroll event is not caused by a rotation but a
  1828. (usually sideways) tilt of the wheel.
  1829. </description>
  1830. <entry name="wheel" value="0" summary="a physical wheel rotation" />
  1831. <entry name="finger" value="1" summary="finger on a touch surface" />
  1832. <entry name="continuous" value="2" summary="continuous coordinate space"/>
  1833. <entry name="wheel_tilt" value="3" summary="a physical wheel tilt" since="6"/>
  1834. </enum>
  1835. <event name="axis_source" since="5">
  1836. <description summary="axis source event">
  1837. Source information for scroll and other axes.
  1838. This event does not occur on its own. It is sent before a
  1839. wl_pointer.frame event and carries the source information for
  1840. all events within that frame.
  1841. The source specifies how this event was generated. If the source is
  1842. wl_pointer.axis_source.finger, a wl_pointer.axis_stop event will be
  1843. sent when the user lifts the finger off the device.
  1844. If the source is wl_pointer.axis_source.wheel,
  1845. wl_pointer.axis_source.wheel_tilt or
  1846. wl_pointer.axis_source.continuous, a wl_pointer.axis_stop event may
  1847. or may not be sent. Whether a compositor sends an axis_stop event
  1848. for these sources is hardware-specific and implementation-dependent;
  1849. clients must not rely on receiving an axis_stop event for these
  1850. scroll sources and should treat scroll sequences from these scroll
  1851. sources as unterminated by default.
  1852. This event is optional. If the source is unknown for a particular
  1853. axis event sequence, no event is sent.
  1854. Only one wl_pointer.axis_source event is permitted per frame.
  1855. The order of wl_pointer.axis_discrete and wl_pointer.axis_source is
  1856. not guaranteed.
  1857. </description>
  1858. <arg name="axis_source" type="uint" enum="axis_source" summary="source of the axis event"/>
  1859. </event>
  1860. <event name="axis_stop" since="5">
  1861. <description summary="axis stop event">
  1862. Stop notification for scroll and other axes.
  1863. For some wl_pointer.axis_source types, a wl_pointer.axis_stop event
  1864. is sent to notify a client that the axis sequence has terminated.
  1865. This enables the client to implement kinetic scrolling.
  1866. See the wl_pointer.axis_source documentation for information on when
  1867. this event may be generated.
  1868. Any wl_pointer.axis events with the same axis_source after this
  1869. event should be considered as the start of a new axis motion.
  1870. The timestamp is to be interpreted identical to the timestamp in the
  1871. wl_pointer.axis event. The timestamp value may be the same as a
  1872. preceding wl_pointer.axis event.
  1873. </description>
  1874. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  1875. <arg name="axis" type="uint" enum="axis" summary="the axis stopped with this event"/>
  1876. </event>
  1877. <event name="axis_discrete" since="5">
  1878. <description summary="axis click event">
  1879. Discrete step information for scroll and other axes.
  1880. This event carries the axis value of the wl_pointer.axis event in
  1881. discrete steps (e.g. mouse wheel clicks).
  1882. This event is deprecated with wl_pointer version 8 - this event is not
  1883. sent to clients supporting version 8 or later.
  1884. This event does not occur on its own, it is coupled with a
  1885. wl_pointer.axis event that represents this axis value on a
  1886. continuous scale. The protocol guarantees that each axis_discrete
  1887. event is always followed by exactly one axis event with the same
  1888. axis number within the same wl_pointer.frame. Note that the protocol
  1889. allows for other events to occur between the axis_discrete and
  1890. its coupled axis event, including other axis_discrete or axis
  1891. events. A wl_pointer.frame must not contain more than one axis_discrete
  1892. event per axis type.
  1893. This event is optional; continuous scrolling devices
  1894. like two-finger scrolling on touchpads do not have discrete
  1895. steps and do not generate this event.
  1896. The discrete value carries the directional information. e.g. a value
  1897. of -2 is two steps towards the negative direction of this axis.
  1898. The axis number is identical to the axis number in the associated
  1899. axis event.
  1900. The order of wl_pointer.axis_discrete and wl_pointer.axis_source is
  1901. not guaranteed.
  1902. </description>
  1903. <arg name="axis" type="uint" enum="axis" summary="axis type"/>
  1904. <arg name="discrete" type="int" summary="number of steps"/>
  1905. </event>
  1906. <event name="axis_value120" since="8">
  1907. <description summary="axis high-resolution scroll event">
  1908. Discrete high-resolution scroll information.
  1909. This event carries high-resolution wheel scroll information,
  1910. with each multiple of 120 representing one logical scroll step
  1911. (a wheel detent). For example, an axis_value120 of 30 is one quarter of
  1912. a logical scroll step in the positive direction, a value120 of
  1913. -240 are two logical scroll steps in the negative direction within the
  1914. same hardware event.
  1915. Clients that rely on discrete scrolling should accumulate the
  1916. value120 to multiples of 120 before processing the event.
  1917. The value120 must not be zero.
  1918. This event replaces the wl_pointer.axis_discrete event in clients
  1919. supporting wl_pointer version 8 or later.
  1920. Where a wl_pointer.axis_source event occurs in the same
  1921. wl_pointer.frame, the axis source applies to this event.
  1922. The order of wl_pointer.axis_value120 and wl_pointer.axis_source is
  1923. not guaranteed.
  1924. </description>
  1925. <arg name="axis" type="uint" enum="axis" summary="axis type"/>
  1926. <arg name="value120" type="int" summary="scroll distance as fraction of 120"/>
  1927. </event>
  1928. </interface>
  1929. <interface name="wl_keyboard" version="8">
  1930. <description summary="keyboard input device">
  1931. The wl_keyboard interface represents one or more keyboards
  1932. associated with a seat.
  1933. </description>
  1934. <enum name="keymap_format">
  1935. <description summary="keyboard mapping format">
  1936. This specifies the format of the keymap provided to the
  1937. client with the wl_keyboard.keymap event.
  1938. </description>
  1939. <entry name="no_keymap" value="0"
  1940. summary="no keymap; client must understand how to interpret the raw keycode"/>
  1941. <entry name="xkb_v1" value="1"
  1942. summary="libxkbcommon compatible, null-terminated string; to determine the xkb keycode, clients must add 8 to the key event keycode"/>
  1943. </enum>
  1944. <event name="keymap">
  1945. <description summary="keyboard mapping">
  1946. This event provides a file descriptor to the client which can be
  1947. memory-mapped in read-only mode to provide a keyboard mapping
  1948. description.
  1949. From version 7 onwards, the fd must be mapped with MAP_PRIVATE by
  1950. the recipient, as MAP_SHARED may fail.
  1951. </description>
  1952. <arg name="format" type="uint" enum="keymap_format" summary="keymap format"/>
  1953. <arg name="fd" type="fd" summary="keymap file descriptor"/>
  1954. <arg name="size" type="uint" summary="keymap size, in bytes"/>
  1955. </event>
  1956. <event name="enter">
  1957. <description summary="enter event">
  1958. Notification that this seat's keyboard focus is on a certain
  1959. surface.
  1960. The compositor must send the wl_keyboard.modifiers event after this
  1961. event.
  1962. </description>
  1963. <arg name="serial" type="uint" summary="serial number of the enter event"/>
  1964. <arg name="surface" type="object" interface="wl_surface" summary="surface gaining keyboard focus"/>
  1965. <arg name="keys" type="array" summary="the currently pressed keys"/>
  1966. </event>
  1967. <event name="leave">
  1968. <description summary="leave event">
  1969. Notification that this seat's keyboard focus is no longer on
  1970. a certain surface.
  1971. The leave notification is sent before the enter notification
  1972. for the new focus.
  1973. After this event client must assume that all keys, including modifiers,
  1974. are lifted and also it must stop key repeating if there's some going on.
  1975. </description>
  1976. <arg name="serial" type="uint" summary="serial number of the leave event"/>
  1977. <arg name="surface" type="object" interface="wl_surface" summary="surface that lost keyboard focus"/>
  1978. </event>
  1979. <enum name="key_state">
  1980. <description summary="physical key state">
  1981. Describes the physical state of a key that produced the key event.
  1982. </description>
  1983. <entry name="released" value="0" summary="key is not pressed"/>
  1984. <entry name="pressed" value="1" summary="key is pressed"/>
  1985. </enum>
  1986. <event name="key">
  1987. <description summary="key event">
  1988. A key was pressed or released.
  1989. The time argument is a timestamp with millisecond
  1990. granularity, with an undefined base.
  1991. The key is a platform-specific key code that can be interpreted
  1992. by feeding it to the keyboard mapping (see the keymap event).
  1993. If this event produces a change in modifiers, then the resulting
  1994. wl_keyboard.modifiers event must be sent after this event.
  1995. </description>
  1996. <arg name="serial" type="uint" summary="serial number of the key event"/>
  1997. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  1998. <arg name="key" type="uint" summary="key that produced the event"/>
  1999. <arg name="state" type="uint" enum="key_state" summary="physical state of the key"/>
  2000. </event>
  2001. <event name="modifiers">
  2002. <description summary="modifier and group state">
  2003. Notifies clients that the modifier and/or group state has
  2004. changed, and it should update its local state.
  2005. </description>
  2006. <arg name="serial" type="uint" summary="serial number of the modifiers event"/>
  2007. <arg name="mods_depressed" type="uint" summary="depressed modifiers"/>
  2008. <arg name="mods_latched" type="uint" summary="latched modifiers"/>
  2009. <arg name="mods_locked" type="uint" summary="locked modifiers"/>
  2010. <arg name="group" type="uint" summary="keyboard layout"/>
  2011. </event>
  2012. <!-- Version 3 additions -->
  2013. <request name="release" type="destructor" since="3">
  2014. <description summary="release the keyboard object"/>
  2015. </request>
  2016. <!-- Version 4 additions -->
  2017. <event name="repeat_info" since="4">
  2018. <description summary="repeat rate and delay">
  2019. Informs the client about the keyboard's repeat rate and delay.
  2020. This event is sent as soon as the wl_keyboard object has been created,
  2021. and is guaranteed to be received by the client before any key press
  2022. event.
  2023. Negative values for either rate or delay are illegal. A rate of zero
  2024. will disable any repeating (regardless of the value of delay).
  2025. This event can be sent later on as well with a new value if necessary,
  2026. so clients should continue listening for the event past the creation
  2027. of wl_keyboard.
  2028. </description>
  2029. <arg name="rate" type="int"
  2030. summary="the rate of repeating keys in characters per second"/>
  2031. <arg name="delay" type="int"
  2032. summary="delay in milliseconds since key down until repeating starts"/>
  2033. </event>
  2034. </interface>
  2035. <interface name="wl_touch" version="8">
  2036. <description summary="touchscreen input device">
  2037. The wl_touch interface represents a touchscreen
  2038. associated with a seat.
  2039. Touch interactions can consist of one or more contacts.
  2040. For each contact, a series of events is generated, starting
  2041. with a down event, followed by zero or more motion events,
  2042. and ending with an up event. Events relating to the same
  2043. contact point can be identified by the ID of the sequence.
  2044. </description>
  2045. <event name="down">
  2046. <description summary="touch down event and beginning of a touch sequence">
  2047. A new touch point has appeared on the surface. This touch point is
  2048. assigned a unique ID. Future events from this touch point reference
  2049. this ID. The ID ceases to be valid after a touch up event and may be
  2050. reused in the future.
  2051. </description>
  2052. <arg name="serial" type="uint" summary="serial number of the touch down event"/>
  2053. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  2054. <arg name="surface" type="object" interface="wl_surface" summary="surface touched"/>
  2055. <arg name="id" type="int" summary="the unique ID of this touch point"/>
  2056. <arg name="x" type="fixed" summary="surface-local x coordinate"/>
  2057. <arg name="y" type="fixed" summary="surface-local y coordinate"/>
  2058. </event>
  2059. <event name="up">
  2060. <description summary="end of a touch event sequence">
  2061. The touch point has disappeared. No further events will be sent for
  2062. this touch point and the touch point's ID is released and may be
  2063. reused in a future touch down event.
  2064. </description>
  2065. <arg name="serial" type="uint" summary="serial number of the touch up event"/>
  2066. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  2067. <arg name="id" type="int" summary="the unique ID of this touch point"/>
  2068. </event>
  2069. <event name="motion">
  2070. <description summary="update of touch point coordinates">
  2071. A touch point has changed coordinates.
  2072. </description>
  2073. <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
  2074. <arg name="id" type="int" summary="the unique ID of this touch point"/>
  2075. <arg name="x" type="fixed" summary="surface-local x coordinate"/>
  2076. <arg name="y" type="fixed" summary="surface-local y coordinate"/>
  2077. </event>
  2078. <event name="frame">
  2079. <description summary="end of touch frame event">
  2080. Indicates the end of a set of events that logically belong together.
  2081. A client is expected to accumulate the data in all events within the
  2082. frame before proceeding.
  2083. A wl_touch.frame terminates at least one event but otherwise no
  2084. guarantee is provided about the set of events within a frame. A client
  2085. must assume that any state not updated in a frame is unchanged from the
  2086. previously known state.
  2087. </description>
  2088. </event>
  2089. <event name="cancel">
  2090. <description summary="touch session cancelled">
  2091. Sent if the compositor decides the touch stream is a global
  2092. gesture. No further events are sent to the clients from that
  2093. particular gesture. Touch cancellation applies to all touch points
  2094. currently active on this client's surface. The client is
  2095. responsible for finalizing the touch points, future touch points on
  2096. this surface may reuse the touch point ID.
  2097. </description>
  2098. </event>
  2099. <!-- Version 3 additions -->
  2100. <request name="release" type="destructor" since="3">
  2101. <description summary="release the touch object"/>
  2102. </request>
  2103. <!-- Version 6 additions -->
  2104. <event name="shape" since="6">
  2105. <description summary="update shape of touch point">
  2106. Sent when a touchpoint has changed its shape.
  2107. This event does not occur on its own. It is sent before a
  2108. wl_touch.frame event and carries the new shape information for
  2109. any previously reported, or new touch points of that frame.
  2110. Other events describing the touch point such as wl_touch.down,
  2111. wl_touch.motion or wl_touch.orientation may be sent within the
  2112. same wl_touch.frame. A client should treat these events as a single
  2113. logical touch point update. The order of wl_touch.shape,
  2114. wl_touch.orientation and wl_touch.motion is not guaranteed.
  2115. A wl_touch.down event is guaranteed to occur before the first
  2116. wl_touch.shape event for this touch ID but both events may occur within
  2117. the same wl_touch.frame.
  2118. A touchpoint shape is approximated by an ellipse through the major and
  2119. minor axis length. The major axis length describes the longer diameter
  2120. of the ellipse, while the minor axis length describes the shorter
  2121. diameter. Major and minor are orthogonal and both are specified in
  2122. surface-local coordinates. The center of the ellipse is always at the
  2123. touchpoint location as reported by wl_touch.down or wl_touch.move.
  2124. This event is only sent by the compositor if the touch device supports
  2125. shape reports. The client has to make reasonable assumptions about the
  2126. shape if it did not receive this event.
  2127. </description>
  2128. <arg name="id" type="int" summary="the unique ID of this touch point"/>
  2129. <arg name="major" type="fixed" summary="length of the major axis in surface-local coordinates"/>
  2130. <arg name="minor" type="fixed" summary="length of the minor axis in surface-local coordinates"/>
  2131. </event>
  2132. <event name="orientation" since="6">
  2133. <description summary="update orientation of touch point">
  2134. Sent when a touchpoint has changed its orientation.
  2135. This event does not occur on its own. It is sent before a
  2136. wl_touch.frame event and carries the new shape information for
  2137. any previously reported, or new touch points of that frame.
  2138. Other events describing the touch point such as wl_touch.down,
  2139. wl_touch.motion or wl_touch.shape may be sent within the
  2140. same wl_touch.frame. A client should treat these events as a single
  2141. logical touch point update. The order of wl_touch.shape,
  2142. wl_touch.orientation and wl_touch.motion is not guaranteed.
  2143. A wl_touch.down event is guaranteed to occur before the first
  2144. wl_touch.orientation event for this touch ID but both events may occur
  2145. within the same wl_touch.frame.
  2146. The orientation describes the clockwise angle of a touchpoint's major
  2147. axis to the positive surface y-axis and is normalized to the -180 to
  2148. +180 degree range. The granularity of orientation depends on the touch
  2149. device, some devices only support binary rotation values between 0 and
  2150. 90 degrees.
  2151. This event is only sent by the compositor if the touch device supports
  2152. orientation reports.
  2153. </description>
  2154. <arg name="id" type="int" summary="the unique ID of this touch point"/>
  2155. <arg name="orientation" type="fixed" summary="angle between major axis and positive surface y-axis in degrees"/>
  2156. </event>
  2157. </interface>
  2158. <interface name="wl_output" version="4">
  2159. <description summary="compositor output region">
  2160. An output describes part of the compositor geometry. The
  2161. compositor works in the 'compositor coordinate system' and an
  2162. output corresponds to a rectangular area in that space that is
  2163. actually visible. This typically corresponds to a monitor that
  2164. displays part of the compositor space. This object is published
  2165. as global during start up, or when a monitor is hotplugged.
  2166. </description>
  2167. <enum name="subpixel">
  2168. <description summary="subpixel geometry information">
  2169. This enumeration describes how the physical
  2170. pixels on an output are laid out.
  2171. </description>
  2172. <entry name="unknown" value="0" summary="unknown geometry"/>
  2173. <entry name="none" value="1" summary="no geometry"/>
  2174. <entry name="horizontal_rgb" value="2" summary="horizontal RGB"/>
  2175. <entry name="horizontal_bgr" value="3" summary="horizontal BGR"/>
  2176. <entry name="vertical_rgb" value="4" summary="vertical RGB"/>
  2177. <entry name="vertical_bgr" value="5" summary="vertical BGR"/>
  2178. </enum>
  2179. <enum name="transform">
  2180. <description summary="transform from framebuffer to output">
  2181. This describes the transform that a compositor will apply to a
  2182. surface to compensate for the rotation or mirroring of an
  2183. output device.
  2184. The flipped values correspond to an initial flip around a
  2185. vertical axis followed by rotation.
  2186. The purpose is mainly to allow clients to render accordingly and
  2187. tell the compositor, so that for fullscreen surfaces, the
  2188. compositor will still be able to scan out directly from client
  2189. surfaces.
  2190. </description>
  2191. <entry name="normal" value="0" summary="no transform"/>
  2192. <entry name="90" value="1" summary="90 degrees counter-clockwise"/>
  2193. <entry name="180" value="2" summary="180 degrees counter-clockwise"/>
  2194. <entry name="270" value="3" summary="270 degrees counter-clockwise"/>
  2195. <entry name="flipped" value="4" summary="180 degree flip around a vertical axis"/>
  2196. <entry name="flipped_90" value="5" summary="flip and rotate 90 degrees counter-clockwise"/>
  2197. <entry name="flipped_180" value="6" summary="flip and rotate 180 degrees counter-clockwise"/>
  2198. <entry name="flipped_270" value="7" summary="flip and rotate 270 degrees counter-clockwise"/>
  2199. </enum>
  2200. <event name="geometry">
  2201. <description summary="properties of the output">
  2202. The geometry event describes geometric properties of the output.
  2203. The event is sent when binding to the output object and whenever
  2204. any of the properties change.
  2205. The physical size can be set to zero if it doesn't make sense for this
  2206. output (e.g. for projectors or virtual outputs).
  2207. The geometry event will be followed by a done event (starting from
  2208. version 2).
  2209. Note: wl_output only advertises partial information about the output
  2210. position and identification. Some compositors, for instance those not
  2211. implementing a desktop-style output layout or those exposing virtual
  2212. outputs, might fake this information. Instead of using x and y, clients
  2213. should use xdg_output.logical_position. Instead of using make and model,
  2214. clients should use name and description.
  2215. </description>
  2216. <arg name="x" type="int"
  2217. summary="x position within the global compositor space"/>
  2218. <arg name="y" type="int"
  2219. summary="y position within the global compositor space"/>
  2220. <arg name="physical_width" type="int"
  2221. summary="width in millimeters of the output"/>
  2222. <arg name="physical_height" type="int"
  2223. summary="height in millimeters of the output"/>
  2224. <arg name="subpixel" type="int" enum="subpixel"
  2225. summary="subpixel orientation of the output"/>
  2226. <arg name="make" type="string"
  2227. summary="textual description of the manufacturer"/>
  2228. <arg name="model" type="string"
  2229. summary="textual description of the model"/>
  2230. <arg name="transform" type="int" enum="transform"
  2231. summary="transform that maps framebuffer to output"/>
  2232. </event>
  2233. <enum name="mode" bitfield="true">
  2234. <description summary="mode information">
  2235. These flags describe properties of an output mode.
  2236. They are used in the flags bitfield of the mode event.
  2237. </description>
  2238. <entry name="current" value="0x1"
  2239. summary="indicates this is the current mode"/>
  2240. <entry name="preferred" value="0x2"
  2241. summary="indicates this is the preferred mode"/>
  2242. </enum>
  2243. <event name="mode">
  2244. <description summary="advertise available modes for the output">
  2245. The mode event describes an available mode for the output.
  2246. The event is sent when binding to the output object and there
  2247. will always be one mode, the current mode. The event is sent
  2248. again if an output changes mode, for the mode that is now
  2249. current. In other words, the current mode is always the last
  2250. mode that was received with the current flag set.
  2251. Non-current modes are deprecated. A compositor can decide to only
  2252. advertise the current mode and never send other modes. Clients
  2253. should not rely on non-current modes.
  2254. The size of a mode is given in physical hardware units of
  2255. the output device. This is not necessarily the same as
  2256. the output size in the global compositor space. For instance,
  2257. the output may be scaled, as described in wl_output.scale,
  2258. or transformed, as described in wl_output.transform. Clients
  2259. willing to retrieve the output size in the global compositor
  2260. space should use xdg_output.logical_size instead.
  2261. The vertical refresh rate can be set to zero if it doesn't make
  2262. sense for this output (e.g. for virtual outputs).
  2263. The mode event will be followed by a done event (starting from
  2264. version 2).
  2265. Clients should not use the refresh rate to schedule frames. Instead,
  2266. they should use the wl_surface.frame event or the presentation-time
  2267. protocol.
  2268. Note: this information is not always meaningful for all outputs. Some
  2269. compositors, such as those exposing virtual outputs, might fake the
  2270. refresh rate or the size.
  2271. </description>
  2272. <arg name="flags" type="uint" enum="mode" summary="bitfield of mode flags"/>
  2273. <arg name="width" type="int" summary="width of the mode in hardware units"/>
  2274. <arg name="height" type="int" summary="height of the mode in hardware units"/>
  2275. <arg name="refresh" type="int" summary="vertical refresh rate in mHz"/>
  2276. </event>
  2277. <!-- Version 2 additions -->
  2278. <event name="done" since="2">
  2279. <description summary="sent all information about output">
  2280. This event is sent after all other properties have been
  2281. sent after binding to the output object and after any
  2282. other property changes done after that. This allows
  2283. changes to the output properties to be seen as
  2284. atomic, even if they happen via multiple events.
  2285. </description>
  2286. </event>
  2287. <event name="scale" since="2">
  2288. <description summary="output scaling properties">
  2289. This event contains scaling geometry information
  2290. that is not in the geometry event. It may be sent after
  2291. binding the output object or if the output scale changes
  2292. later. If it is not sent, the client should assume a
  2293. scale of 1.
  2294. A scale larger than 1 means that the compositor will
  2295. automatically scale surface buffers by this amount
  2296. when rendering. This is used for very high resolution
  2297. displays where applications rendering at the native
  2298. resolution would be too small to be legible.
  2299. It is intended that scaling aware clients track the
  2300. current output of a surface, and if it is on a scaled
  2301. output it should use wl_surface.set_buffer_scale with
  2302. the scale of the output. That way the compositor can
  2303. avoid scaling the surface, and the client can supply
  2304. a higher detail image.
  2305. The scale event will be followed by a done event.
  2306. </description>
  2307. <arg name="factor" type="int" summary="scaling factor of output"/>
  2308. </event>
  2309. <!-- Version 3 additions -->
  2310. <request name="release" type="destructor" since="3">
  2311. <description summary="release the output object">
  2312. Using this request a client can tell the server that it is not going to
  2313. use the output object anymore.
  2314. </description>
  2315. </request>
  2316. <!-- Version 4 additions -->
  2317. <event name="name" since="4">
  2318. <description summary="name of this output">
  2319. Many compositors will assign user-friendly names to their outputs, show
  2320. them to the user, allow the user to refer to an output, etc. The client
  2321. may wish to know this name as well to offer the user similar behaviors.
  2322. The name is a UTF-8 string with no convention defined for its contents.
  2323. Each name is unique among all wl_output globals. The name is only
  2324. guaranteed to be unique for the compositor instance.
  2325. The same output name is used for all clients for a given wl_output
  2326. global. Thus, the name can be shared across processes to refer to a
  2327. specific wl_output global.
  2328. The name is not guaranteed to be persistent across sessions, thus cannot
  2329. be used to reliably identify an output in e.g. configuration files.
  2330. Examples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc. However, do
  2331. not assume that the name is a reflection of an underlying DRM connector,
  2332. X11 connection, etc.
  2333. The name event is sent after binding the output object. This event is
  2334. only sent once per output object, and the name does not change over the
  2335. lifetime of the wl_output global.
  2336. Compositors may re-use the same output name if the wl_output global is
  2337. destroyed and re-created later. Compositors should avoid re-using the
  2338. same name if possible.
  2339. The name event will be followed by a done event.
  2340. </description>
  2341. <arg name="name" type="string" summary="output name"/>
  2342. </event>
  2343. <event name="description" since="4">
  2344. <description summary="human-readable description of this output">
  2345. Many compositors can produce human-readable descriptions of their
  2346. outputs. The client may wish to know this description as well, e.g. for
  2347. output selection purposes.
  2348. The description is a UTF-8 string with no convention defined for its
  2349. contents. The description is not guaranteed to be unique among all
  2350. wl_output globals. Examples might include 'Foocorp 11" Display' or
  2351. 'Virtual X11 output via :1'.
  2352. The description event is sent after binding the output object and
  2353. whenever the description changes. The description is optional, and may
  2354. not be sent at all.
  2355. The description event will be followed by a done event.
  2356. </description>
  2357. <arg name="description" type="string" summary="output description"/>
  2358. </event>
  2359. </interface>
  2360. <interface name="wl_region" version="1">
  2361. <description summary="region interface">
  2362. A region object describes an area.
  2363. Region objects are used to describe the opaque and input
  2364. regions of a surface.
  2365. </description>
  2366. <request name="destroy" type="destructor">
  2367. <description summary="destroy region">
  2368. Destroy the region. This will invalidate the object ID.
  2369. </description>
  2370. </request>
  2371. <request name="add">
  2372. <description summary="add rectangle to region">
  2373. Add the specified rectangle to the region.
  2374. </description>
  2375. <arg name="x" type="int" summary="region-local x coordinate"/>
  2376. <arg name="y" type="int" summary="region-local y coordinate"/>
  2377. <arg name="width" type="int" summary="rectangle width"/>
  2378. <arg name="height" type="int" summary="rectangle height"/>
  2379. </request>
  2380. <request name="subtract">
  2381. <description summary="subtract rectangle from region">
  2382. Subtract the specified rectangle from the region.
  2383. </description>
  2384. <arg name="x" type="int" summary="region-local x coordinate"/>
  2385. <arg name="y" type="int" summary="region-local y coordinate"/>
  2386. <arg name="width" type="int" summary="rectangle width"/>
  2387. <arg name="height" type="int" summary="rectangle height"/>
  2388. </request>
  2389. </interface>
  2390. <interface name="wl_subcompositor" version="1">
  2391. <description summary="sub-surface compositing">
  2392. The global interface exposing sub-surface compositing capabilities.
  2393. A wl_surface, that has sub-surfaces associated, is called the
  2394. parent surface. Sub-surfaces can be arbitrarily nested and create
  2395. a tree of sub-surfaces.
  2396. The root surface in a tree of sub-surfaces is the main
  2397. surface. The main surface cannot be a sub-surface, because
  2398. sub-surfaces must always have a parent.
  2399. A main surface with its sub-surfaces forms a (compound) window.
  2400. For window management purposes, this set of wl_surface objects is
  2401. to be considered as a single window, and it should also behave as
  2402. such.
  2403. The aim of sub-surfaces is to offload some of the compositing work
  2404. within a window from clients to the compositor. A prime example is
  2405. a video player with decorations and video in separate wl_surface
  2406. objects. This should allow the compositor to pass YUV video buffer
  2407. processing to dedicated overlay hardware when possible.
  2408. </description>
  2409. <request name="destroy" type="destructor">
  2410. <description summary="unbind from the subcompositor interface">
  2411. Informs the server that the client will not be using this
  2412. protocol object anymore. This does not affect any other
  2413. objects, wl_subsurface objects included.
  2414. </description>
  2415. </request>
  2416. <enum name="error">
  2417. <entry name="bad_surface" value="0"
  2418. summary="the to-be sub-surface is invalid"/>
  2419. </enum>
  2420. <request name="get_subsurface">
  2421. <description summary="give a surface the role sub-surface">
  2422. Create a sub-surface interface for the given surface, and
  2423. associate it with the given parent surface. This turns a
  2424. plain wl_surface into a sub-surface.
  2425. The to-be sub-surface must not already have another role, and it
  2426. must not have an existing wl_subsurface object. Otherwise a protocol
  2427. error is raised.
  2428. Adding sub-surfaces to a parent is a double-buffered operation on the
  2429. parent (see wl_surface.commit). The effect of adding a sub-surface
  2430. becomes visible on the next time the state of the parent surface is
  2431. applied.
  2432. This request modifies the behaviour of wl_surface.commit request on
  2433. the sub-surface, see the documentation on wl_subsurface interface.
  2434. </description>
  2435. <arg name="id" type="new_id" interface="wl_subsurface"
  2436. summary="the new sub-surface object ID"/>
  2437. <arg name="surface" type="object" interface="wl_surface"
  2438. summary="the surface to be turned into a sub-surface"/>
  2439. <arg name="parent" type="object" interface="wl_surface"
  2440. summary="the parent surface"/>
  2441. </request>
  2442. </interface>
  2443. <interface name="wl_subsurface" version="1">
  2444. <description summary="sub-surface interface to a wl_surface">
  2445. An additional interface to a wl_surface object, which has been
  2446. made a sub-surface. A sub-surface has one parent surface. A
  2447. sub-surface's size and position are not limited to that of the parent.
  2448. Particularly, a sub-surface is not automatically clipped to its
  2449. parent's area.
  2450. A sub-surface becomes mapped, when a non-NULL wl_buffer is applied
  2451. and the parent surface is mapped. The order of which one happens
  2452. first is irrelevant. A sub-surface is hidden if the parent becomes
  2453. hidden, or if a NULL wl_buffer is applied. These rules apply
  2454. recursively through the tree of surfaces.
  2455. The behaviour of a wl_surface.commit request on a sub-surface
  2456. depends on the sub-surface's mode. The possible modes are
  2457. synchronized and desynchronized, see methods
  2458. wl_subsurface.set_sync and wl_subsurface.set_desync. Synchronized
  2459. mode caches the wl_surface state to be applied when the parent's
  2460. state gets applied, and desynchronized mode applies the pending
  2461. wl_surface state directly. A sub-surface is initially in the
  2462. synchronized mode.
  2463. Sub-surfaces also have another kind of state, which is managed by
  2464. wl_subsurface requests, as opposed to wl_surface requests. This
  2465. state includes the sub-surface position relative to the parent
  2466. surface (wl_subsurface.set_position), and the stacking order of
  2467. the parent and its sub-surfaces (wl_subsurface.place_above and
  2468. .place_below). This state is applied when the parent surface's
  2469. wl_surface state is applied, regardless of the sub-surface's mode.
  2470. As the exception, set_sync and set_desync are effective immediately.
  2471. The main surface can be thought to be always in desynchronized mode,
  2472. since it does not have a parent in the sub-surfaces sense.
  2473. Even if a sub-surface is in desynchronized mode, it will behave as
  2474. in synchronized mode, if its parent surface behaves as in
  2475. synchronized mode. This rule is applied recursively throughout the
  2476. tree of surfaces. This means, that one can set a sub-surface into
  2477. synchronized mode, and then assume that all its child and grand-child
  2478. sub-surfaces are synchronized, too, without explicitly setting them.
  2479. If the wl_surface associated with the wl_subsurface is destroyed, the
  2480. wl_subsurface object becomes inert. Note, that destroying either object
  2481. takes effect immediately. If you need to synchronize the removal
  2482. of a sub-surface to the parent surface update, unmap the sub-surface
  2483. first by attaching a NULL wl_buffer, update parent, and then destroy
  2484. the sub-surface.
  2485. If the parent wl_surface object is destroyed, the sub-surface is
  2486. unmapped.
  2487. </description>
  2488. <request name="destroy" type="destructor">
  2489. <description summary="remove sub-surface interface">
  2490. The sub-surface interface is removed from the wl_surface object
  2491. that was turned into a sub-surface with a
  2492. wl_subcompositor.get_subsurface request. The wl_surface's association
  2493. to the parent is deleted, and the wl_surface loses its role as
  2494. a sub-surface. The wl_surface is unmapped immediately.
  2495. </description>
  2496. </request>
  2497. <enum name="error">
  2498. <entry name="bad_surface" value="0"
  2499. summary="wl_surface is not a sibling or the parent"/>
  2500. </enum>
  2501. <request name="set_position">
  2502. <description summary="reposition the sub-surface">
  2503. This schedules a sub-surface position change.
  2504. The sub-surface will be moved so that its origin (top left
  2505. corner pixel) will be at the location x, y of the parent surface
  2506. coordinate system. The coordinates are not restricted to the parent
  2507. surface area. Negative values are allowed.
  2508. The scheduled coordinates will take effect whenever the state of the
  2509. parent surface is applied. When this happens depends on whether the
  2510. parent surface is in synchronized mode or not. See
  2511. wl_subsurface.set_sync and wl_subsurface.set_desync for details.
  2512. If more than one set_position request is invoked by the client before
  2513. the commit of the parent surface, the position of a new request always
  2514. replaces the scheduled position from any previous request.
  2515. The initial position is 0, 0.
  2516. </description>
  2517. <arg name="x" type="int" summary="x coordinate in the parent surface"/>
  2518. <arg name="y" type="int" summary="y coordinate in the parent surface"/>
  2519. </request>
  2520. <request name="place_above">
  2521. <description summary="restack the sub-surface">
  2522. This sub-surface is taken from the stack, and put back just
  2523. above the reference surface, changing the z-order of the sub-surfaces.
  2524. The reference surface must be one of the sibling surfaces, or the
  2525. parent surface. Using any other surface, including this sub-surface,
  2526. will cause a protocol error.
  2527. The z-order is double-buffered. Requests are handled in order and
  2528. applied immediately to a pending state. The final pending state is
  2529. copied to the active state the next time the state of the parent
  2530. surface is applied. When this happens depends on whether the parent
  2531. surface is in synchronized mode or not. See wl_subsurface.set_sync and
  2532. wl_subsurface.set_desync for details.
  2533. A new sub-surface is initially added as the top-most in the stack
  2534. of its siblings and parent.
  2535. </description>
  2536. <arg name="sibling" type="object" interface="wl_surface"
  2537. summary="the reference surface"/>
  2538. </request>
  2539. <request name="place_below">
  2540. <description summary="restack the sub-surface">
  2541. The sub-surface is placed just below the reference surface.
  2542. See wl_subsurface.place_above.
  2543. </description>
  2544. <arg name="sibling" type="object" interface="wl_surface"
  2545. summary="the reference surface"/>
  2546. </request>
  2547. <request name="set_sync">
  2548. <description summary="set sub-surface to synchronized mode">
  2549. Change the commit behaviour of the sub-surface to synchronized
  2550. mode, also described as the parent dependent mode.
  2551. In synchronized mode, wl_surface.commit on a sub-surface will
  2552. accumulate the committed state in a cache, but the state will
  2553. not be applied and hence will not change the compositor output.
  2554. The cached state is applied to the sub-surface immediately after
  2555. the parent surface's state is applied. This ensures atomic
  2556. updates of the parent and all its synchronized sub-surfaces.
  2557. Applying the cached state will invalidate the cache, so further
  2558. parent surface commits do not (re-)apply old state.
  2559. See wl_subsurface for the recursive effect of this mode.
  2560. </description>
  2561. </request>
  2562. <request name="set_desync">
  2563. <description summary="set sub-surface to desynchronized mode">
  2564. Change the commit behaviour of the sub-surface to desynchronized
  2565. mode, also described as independent or freely running mode.
  2566. In desynchronized mode, wl_surface.commit on a sub-surface will
  2567. apply the pending state directly, without caching, as happens
  2568. normally with a wl_surface. Calling wl_surface.commit on the
  2569. parent surface has no effect on the sub-surface's wl_surface
  2570. state. This mode allows a sub-surface to be updated on its own.
  2571. If cached state exists when wl_surface.commit is called in
  2572. desynchronized mode, the pending state is added to the cached
  2573. state, and applied as a whole. This invalidates the cache.
  2574. Note: even if a sub-surface is set to desynchronized, a parent
  2575. sub-surface may override it to behave as synchronized. For details,
  2576. see wl_subsurface.
  2577. If a surface's parent surface behaves as desynchronized, then
  2578. the cached state is applied on set_desync.
  2579. </description>
  2580. </request>
  2581. </interface>
  2582. </protocol>