wayland.xml 142 KB

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