Updated package changelog.
[profile/ivi/wayland.git] / protocol / wayland.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <protocol name="wayland">
3
4   <copyright>
5     Copyright © 2008-2011 Kristian Høgsberg
6     Copyright © 2010-2011 Intel Corporation
7
8     Permission to use, copy, modify, distribute, and sell this
9     software and its documentation for any purpose is hereby granted
10     without fee, provided that the above copyright notice appear in
11     all copies and that both that copyright notice and this permission
12     notice appear in supporting documentation, and that the name of
13     the copyright holders not be used in advertising or publicity
14     pertaining to distribution of the software without specific,
15     written prior permission.  The copyright holders make no
16     representations about the suitability of this software for any
17     purpose.  It is provided "as is" without express or implied
18     warranty.
19
20     THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
21     SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
22     FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
23     SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
24     WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
25     AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
26     ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
27     THIS SOFTWARE.
28   </copyright>
29
30   <interface name="wl_display" version="1">
31     <description summary="core global object">
32       The core global object.  This is a special singleton object.  It
33       is used for internal Wayland protocol features.
34     </description>
35
36     <request name="sync">
37       <description summary="asynchronous roundtrip">
38         The sync request asks the server to emit the 'done' event
39         on the provided wl_callback object.  Since requests are
40         handled in-order, this can be used as a barrier to ensure all
41         previous requests have been handled.
42       </description>
43       <arg name="callback" type="new_id" interface="wl_callback"/>
44     </request>
45
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       </description>
52       <arg name="callback" type="new_id" interface="wl_registry"/>
53     </request>
54
55     <event name="error">
56       <description summary="fatal error event">
57         The error event is sent out when a fatal (non-recoverable)
58         error has occurred.  The @object_id argument is the object
59         where the error occurred, most often in response to a request
60         to that object.  The @code identifies the error and is defined
61         by the object interface.  As such, each interface defines its
62         own set of error codes.  The @message is an brief description
63         of the error, for (debugging) convenience.
64       </description>
65       <arg name="object_id" type="object"/>
66       <arg name="code" type="uint"/>
67       <arg name="message" type="string"/>
68     </event>
69
70     <enum name="error">
71       <description summary="global error values">
72         These errors are global and can be emitted in response to any
73         server request.
74       </description>
75       <entry name="invalid_object" value="0"
76              summary="server couldn't find object"/>
77       <entry name="invalid_method" value="1"
78              summary="method doesn't exist on the specified interface"/>
79       <entry name="no_memory" value="2"
80              summary="server is out of memory"/>
81     </enum>
82
83     <event name="delete_id">
84       <description summary="acknowledge object id deletion">
85         This event is used internally by the object ID management
86         logic.  When a client deletes an object, the server will send
87         this event to acknowledge that it has seen the delete request.
88         When the client receive this event, it will know that it can
89         safely reuse the object ID
90       </description>
91       <arg name="id" type="uint" />
92     </event>
93   </interface>
94
95   <interface name="wl_registry" version="1">
96     <description summary="global registry object">
97       The global registry object.  The server has a number of global
98       objects that are available to all clients.  These objects
99       typically represent an actual object in the server (for example,
100       an input device) or they are singleton objects that provides
101       extension functionality.
102
103       When a client creates a registry object, the registry object
104       will emit a global event for each global currently in the
105       registry.  Globals come and go as a result of device hotplugs,
106       reconfiguration or other events, and the registry will send out
107       @global and @global_remove events to keep the client up to date
108       with the changes.  To mark the end of the initial burst of
109       events, the client can use the wl_display.sync request
110       immediately after calling wl_display.get_registry.
111
112       A client can 'bind' to a global object by using the bind
113       request.  This creates a client side handle that lets the object
114       emit events to the client and lets the client invoke requests on
115       the object.
116     </description>
117
118     <request name="bind">
119       <description summary="bind an object to the display">
120         Binds a new, client-created object to the server using @name as
121         the identifier.
122       </description>
123       <arg name="name" type="uint" summary="unique number id for object"/>
124       <arg name="id" type="new_id"/>
125     </request>
126
127     <event name="global">
128       <description summary="announce global object">
129         Notify the client of global objects.  
130       </description>
131       <arg name="name" type="uint"/>
132       <arg name="interface" type="string"/>
133       <arg name="version" type="uint"/>
134     </event>
135
136     <event name="global_remove">
137       <description summary="announce removal of global object">
138         Notify the client of removed global objects.  This event
139         notifies the client that the global identifies by @name is no
140         longer available.  If the client bound to the global using the
141         'bind' request, the client should now destroy that object.
142         The object remains valid and requests to the object will be
143         ignored until the client destroys it, to avoid races between
144         the global going away and a client sending a request to it.
145       </description>
146       <arg name="name" type="uint"/>
147     </event>
148   </interface>
149
150   <interface name="wl_callback" version="1">
151     <event name="done">
152       <arg name="serial" type="uint"/>
153     </event>
154   </interface>
155
156   <interface name="wl_compositor" version="1">
157     <description summary="the compositor singleton">
158       A compositor.  This object is a singleton global.  The
159       compositor is in charge of combining the contents of multiple
160       surfaces into one displayable output.
161     </description>
162
163     <request name="create_surface">
164       <description summary="create new surface">
165         Ask the compositor to create a new surface.
166       </description>
167       <arg name="id" type="new_id" interface="wl_surface"/>
168     </request>
169
170     <request name="create_region">
171       <description summary="create new region">
172         Ask the compositor to create a new region.
173       </description>
174       <arg name="id" type="new_id" interface="wl_region"/>
175     </request>
176   </interface>
177
178   <interface name="wl_shm_pool" version="1">
179     <description summary="a shared memory pool">
180       The wl_shm_pool object encapsulates a piece of memory shared
181       between the compositor and client.  Through the wl_shm_pool
182       object, the client can allocate shared memory wl_buffer objects.
183       The objects will share the same underlying mapped memory.
184       Reusing the mapped memory avoids the setup/teardown overhead and
185       is useful when interactively resizing a surface or for many
186       small buffers.
187     </description>
188
189     <request name="create_buffer">
190       <description summary="create wl_buffer from pool">
191         Create a wl_buffer from the pool.  The buffer is created a
192         offset bytes into the pool and has width and height as
193         specified.  The stride arguments specifies the number of bytes
194         from beginning of one row to the beginning of the next.  The
195         format is the pixel format of the buffer and must be one of
196         those advertised through the wl_shm.format event.
197
198         A buffer will keep a reference to the pool it was created from
199         so it is valid to destroy the pool immediately after creating
200         a buffer from it.
201       </description>
202
203       <arg name="id" type="new_id" interface="wl_buffer"/>
204       <arg name="offset" type="int"/>
205       <arg name="width" type="int"/>
206       <arg name="height" type="int"/>
207       <arg name="stride" type="int"/>
208       <arg name="format" type="uint"/>
209     </request>
210
211     <request name="destroy" type="destructor">
212       <description summary="destroy the pool">
213         Destroy the pool.
214       </description>
215     </request>
216
217     <request name="resize">
218       <description summary="change the size of the pool mapping">
219         This request will cause the server to remap the backing memory
220         for the pool from the fd passed when the pool was creating but
221         using the new size.
222       </description>
223
224       <arg name="size" type="int"/>
225     </request>
226   </interface>
227
228   <interface name="wl_shm" version="1">
229     <description summary="shared memory support">
230       Support for shared memory buffers.
231     </description>
232
233     <enum name="error">
234       <entry name="invalid_format" value="0"/>
235       <entry name="invalid_stride" value="1"/>
236       <entry name="invalid_fd" value="2"/>
237     </enum>
238
239     <enum name="format">
240       <entry name="argb8888" value="0"/>
241       <entry name="xrgb8888" value="1"/>
242     </enum>
243
244     <request name="create_pool">
245       <description summary="create a shm pool">
246         This creates wl_shm_pool object, which can be used to create
247         shared memory based wl_buffer objects.  The server will mmap
248         size bytes of the passed fd, to use as backing memory for then
249         pool.
250       </description>
251
252       <arg name="id" type="new_id" interface="wl_shm_pool"/>
253       <arg name="fd" type="fd"/>
254       <arg name="size" type="int"/>
255     </request>
256
257     <event name="format">
258       <arg name="format" type="uint"/>
259     </event>
260   </interface>
261
262   <interface name="wl_buffer" version="1">
263     <description summary="content for a wl_surface">
264       A buffer provides the content for a wl_surface. Buffers are
265       created through factory interfaces such as wl_drm, wl_shm or
266       similar. It has a width and a height and can be attached to a
267       wl_surface, but the mechanism by which a client provides and
268       updates the contents is defined by the buffer factory interface.
269     </description>
270
271     <request name="destroy" type="destructor">
272       <description summary="destroy a buffer">
273         Destroy a buffer. If and how you need to release the backing
274         storage is defined by the buffer factory interface.
275
276         For possible side-effects to a surface, see wl_surface.attach.
277       </description>
278     </request>
279
280     <event name="release">
281       <description summary="compositor releases buffer">
282         Sent when this wl_buffer is no longer used by the compositor.
283         The client is now free to re-use or destroy this buffer and its
284         backing storage.
285
286         If a client receives a release event before the frame callback
287         requested in the same wl_surface.commit that attaches this
288         wl_buffer to a surface, then the client is immediately free to
289         re-use the buffer and its backing storage, and does not need a
290         second buffer for the next surface content update. Typically
291         this is possible, when the compositor maintains a copy of the
292         wl_surface contents, e.g. as a GL texture. This is an important
293         optimization for GL(ES) compositors with wl_shm clients.
294       </description>
295     </event>
296   </interface>
297
298
299   <interface name="wl_data_offer" version="1">
300     <description summary="offer to transfer data">
301       A wl_data_offer represents a piece of data offered for transfer
302       by another client (the source client).  It is used by the
303       copy-and-paste and drag-and-drop mechanisms.  The offer
304       describes the different mime types that the data can be
305       converted to and provides the mechanism for transferring the
306       data directly from the source client.
307     </description>
308
309     <request name="accept">
310       <description summary="accept one of the offered mime-types">
311         Indicate that the client can accept the given mime-type, or
312         NULL for not accepted.  Use for feedback during drag and drop.
313       </description>
314
315       <arg name="serial" type="uint"/>
316       <arg name="type" type="string" allow-null="true"/>
317     </request>
318
319     <request name="receive">
320       <description summary="request that the data is transferred">
321         To transfer the offered data, the client issues this request
322         and indicates the mime-type it wants to receive.  The transfer
323         happens through the passed fd (typically a pipe(7) file
324         descriptor).  The source client writes the data in the
325         mime-type representation requested and then closes the fd.
326         The receiving client reads from the read end of the pipe until
327         EOF and the closes its end, at which point the transfer is
328         complete.
329       </description>
330       <arg name="mime_type" type="string"/>
331       <arg name="fd" type="fd"/>
332     </request>
333
334     <request name="destroy" type="destructor"/>
335
336     <event name="offer">
337       <description summary="advertise offered mime-type">
338         Sent immediately after creating the wl_data_offer object.  One
339         event per offered mime type.
340       </description>
341
342       <arg name="type" type="string"/>
343     </event>
344   </interface>
345
346   <interface name="wl_data_source" version="1">
347     <description summary="offer to transfer data">
348       The wl_data_source object is the source side of a wl_data_offer.
349       It is created by the source client in a data transfer and
350       provides a way to describe the offered data and a way to respond
351       to requests to transfer the data.
352     </description>
353
354     <request name="offer">
355       <description summary="add an offered mime type">
356         This request adds a mime-type to the set of mime-types
357         advertised to targets.  Can be called several times to offer
358         multiple types.
359       </description>
360       <arg name="type" type="string"/>
361     </request>
362
363     <request name="destroy" type="destructor">
364       <description summary="destroy the data source">
365         Destroy the data source.
366       </description>
367     </request>
368
369     <event name="target">
370       <description summary="a target accepts an offered mime-type">
371         Sent when a target accepts pointer_focus or motion events.  If
372         a target does not accept any of the offered types, type is NULL.
373       </description>
374
375       <arg name="mime_type" type="string" allow-null="true"/>
376     </event>
377
378     <event name="send">
379       <description summary="send the data">
380         Request for data from another client.  Send the data as the
381         specified mime-type over the passed fd, then close the fd.
382       </description>
383
384       <arg name="mime_type" type="string"/>
385       <arg name="fd" type="fd"/>
386     </event>
387
388     <event name="cancelled">
389       <description summary="selection was cancelled">
390         This data source has been replaced by another data source.
391         The client should clean up and destroy this data source.
392       </description>
393     </event>
394
395   </interface>
396
397   <interface name="wl_data_device" version="1">
398     <request name="start_drag">
399       <description summary="start drag and drop operation">
400         This request asks the compositor to start a drag and drop
401         operation on behalf of the client.
402
403         The source argument is the data source that provides the data
404         for the eventual data transfer. If source is NULL, enter, leave
405         and motion events are sent only to the client that initiated the
406         drag and the client is expected to handle the data passing
407         internally.
408
409         The origin surface is the surface where the drag originates and
410         the client must have an active implicit grab that matches the
411         serial.
412
413         The icon surface is an optional (can be nil) surface that
414         provides an icon to be moved around with the cursor.  Initially,
415         the top-left corner of the icon surface is placed at the cursor
416         hotspot, but subsequent wl_surface.attach request can move the
417         relative position. Attach requests must be confirmed with
418         wl_surface.commit as usual.
419
420         The current and pending input regions of the icon wl_surface are
421         cleared, and wl_surface.set_input_region is ignored until the
422         wl_surface is no longer used as the icon surface. When the use
423         as an icon ends, the the current and pending input regions
424         become undefined, and the wl_surface is unmapped.
425       </description>
426       <arg name="source" type="object" interface="wl_data_source" allow-null="true"/>
427       <arg name="origin" type="object" interface="wl_surface"/>
428       <arg name="icon" type="object" interface="wl_surface" allow-null="true"/>
429       <arg name="serial" type="uint"/>
430     </request>
431
432     <request name="set_selection">
433       <arg name="source" type="object" interface="wl_data_source" allow-null="true"/>
434       <arg name="serial" type="uint"/>
435     </request>
436
437     <event name="data_offer">
438       <description summary="introduce a new wl_data_offer">
439         The data_offer event introduces a new wl_data_offer object,
440         which will subsequently be used in either the
441         data_device.enter event (for drag and drop) or the
442         data_device.selection event (for selections).  Immediately
443         following the data_device_data_offer event, the new data_offer
444         object will send out data_offer.offer events to describe the
445         mime-types it offers.
446       </description>
447
448       <arg name="id" type="new_id" interface="wl_data_offer"/>
449     </event>
450
451     <event name="enter">
452       <description summary="initiate drag and drop session">
453         This event is sent when an active drag-and-drop pointer enters
454         a surface owned by the client.  The position of the pointer at
455         enter time is provided by the @x an @y arguments, in surface
456         local coordinates.
457       </description>
458
459       <arg name="serial" type="uint"/>
460       <arg name="surface" type="object" interface="wl_surface"/>
461       <arg name="x" type="fixed"/>
462       <arg name="y" type="fixed"/>
463       <arg name="id" type="object" interface="wl_data_offer" allow-null="true"/>
464     </event>
465
466     <event name="leave">
467       <description summary="end drag and drop session">
468         This event is sent when the drag-and-drop pointer leaves the
469         surface and the session ends.  The client must destroy the
470         wl_data_offer introduced at enter time at this point.
471       </description>
472     </event>
473
474     <event name="motion">
475       <description summary="drag and drop session motion">
476         This event is sent when the drag-and-drop pointer moves within
477         the currently focused surface. The new position of the pointer
478         is provided by the @x an @y arguments, in surface local
479         coordinates.
480       </description>
481       <arg name="time" type="uint"/>
482       <arg name="x" type="fixed"/>
483       <arg name="y" type="fixed"/>
484     </event>
485
486     <event name="drop"/>
487
488     <event name="selection">
489       <description summary="advertise new selection">
490         The selection event is sent out to notify the client of a new
491         wl_data_offer for the selection for this device.  The
492         data_device.data_offer and the data_offer.offer events are
493         sent out immediately before this event to introduce the data
494         offer object.  The selection event is sent to a client
495         immediately before receiving keyboard focus and when a new
496         selection is set while the client has keyboard focus.  The
497         data_offer is valid until a new data_offer or NULL is received
498         or until the client loses keyboard focus.
499       </description>
500       <arg name="id" type="object" interface="wl_data_offer" allow-null="true"/>
501     </event>
502   </interface>
503
504   <interface name="wl_data_device_manager" version="1">
505     <description summary="data transfer interface">
506       The wl_data_device_manager is a a singleton global object that
507       provides access to inter-client data transfer mechanisms such as
508       copy and paste and drag and drop.  These mechanisms are tied to
509       a wl_seat and this interface lets a client get a wl_data_device
510       corresponding to a wl_seat.
511     </description>
512
513     <request name="create_data_source">
514       <arg name="id" type="new_id" interface="wl_data_source"/>
515     </request>
516
517     <request name="get_data_device">
518       <arg name="id" type="new_id" interface="wl_data_device"/>
519       <arg name="seat" type="object" interface="wl_seat"/>
520     </request>
521   </interface>
522
523   <interface name="wl_shell" version="1">
524     <request name="get_shell_surface">
525       <arg name="id" type="new_id" interface="wl_shell_surface"/>
526       <arg name="surface" type="object" interface="wl_surface"/>
527     </request>
528   </interface>
529
530   <interface name="wl_shell_surface" version="1">
531
532     <description summary="desktop style meta data interface">
533       An interface implemented by a wl_surface.  On server side the
534       object is automatically destroyed when the related wl_surface is
535       destroyed.  On client side, wl_shell_surface_destroy() must be
536       called before destroying the wl_surface object.
537     </description>
538
539     <request name="pong">
540       <description summary="respond to a ping event">
541         A client must respond to a ping event with a pong request or
542         the client may be deemed unresponsive.
543       </description>
544       <arg name="serial" type="uint"/>
545     </request>
546
547     <request name="move">
548       <arg name="seat" type="object" interface="wl_seat"/>
549       <arg name="serial" type="uint"/>
550     </request>
551
552     <enum name="resize">
553       <entry name="none" value="0"/>
554       <entry name="top" value="1"/>
555       <entry name="bottom" value="2"/>
556       <entry name="left" value="4"/>
557       <entry name="top_left" value="5"/>
558       <entry name="bottom_left" value="6"/>
559       <entry name="right" value="8"/>
560       <entry name="top_right" value="9"/>
561       <entry name="bottom_right" value="10"/>
562     </enum>
563
564     <request name="resize">
565       <arg name="seat" type="object" interface="wl_seat"/>
566       <arg name="serial" type="uint"/>
567       <arg name="edges" type="uint"/>
568     </request>
569
570     <request name="set_toplevel">
571       <description summary="make the surface a top level surface">
572         Make the surface a toplevel window.
573       </description>
574     </request>
575
576     <enum name="transient">
577       <entry name="inactive" value="0x1" summary="do not set keyboard focus"/>
578     </enum>
579
580     <request name="set_transient">
581       <description summary="make the surface a transient surface">
582         Map the surface relative to an existing surface. The x and y
583         arguments specify the locations of the upper left corner of
584         the surface relative to the upper left corner of the parent
585         surface.  The flags argument controls overflow/clipping
586         behaviour when the surface would intersect a screen edge,
587         panel or such.  And possibly whether the offset only
588         determines the initial position or if the surface is locked to
589         that relative position during moves.
590       </description>
591
592       <arg name="parent" type="object" interface="wl_surface"/>
593       <arg name="x" type="int"/>
594       <arg name="y" type="int"/>
595       <arg name="flags" type="uint"/>
596     </request>
597
598     <request name="set_fullscreen">
599       <description summary="make the surface a fullscreen surface">
600         Map the surface as a fullscreen surface. If an output parameter is
601         given then the surface will be made fullscreen on that output. If the
602         client does not specify the output then the compositor will apply its
603         policy - usually choosing the output on which the surface has the
604         biggest surface area.
605
606         The client may specify a method to resolve a size conflict between the
607         output size and the surface size - this is provided through the
608         fullscreen_method parameter.
609
610         The framerate parameter is used only when the fullscreen_method is set
611         to "driver", to indicate the preferred framerate. framerate=0 indicates
612         that the app does not care about framerate.  The framerate is
613         specified in mHz, that is framerate of 60000 is 60Hz.
614
615         The compositor must reply to this request with a configure event with
616         the dimensions for the output on which the surface will be made fullscreen.
617       </description>
618       <arg name="method" type="uint"/>
619       <arg name="framerate" type="uint"/>
620       <arg name="output" type="object" interface="wl_output" allow-null="true"/>
621     </request>
622
623     <enum name="fullscreen_method">
624       <description summary="different method to set the surface fullscreen">
625         Hints to indicate compositor how to deal with a conflict between the
626         dimensions for the surface and the dimensions of the output. As a hint
627         the compositor is free to ignore this parameter.
628
629         "default" The client has no preference on fullscreen behavior,
630         policies are determined by compositor.
631
632         "scale" The client prefers scaling by the compositor. Scaling would
633         always preserve surface's aspect ratio with surface centered on the
634         output
635
636         "driver" The client wants to switch video mode to the smallest mode
637         that can fit the client buffer. If the sizes do not match the
638         compositor must add black borders.
639
640         "fill" The surface is centered on the output on the screen with no
641         scaling. If the surface is of insufficient size the compositor must
642         add black borders.
643       </description>
644       <entry name="default" value="0"/>
645       <entry name="scale" value="1"/>
646       <entry name="driver" value="2"/>
647       <entry name="fill" value="3"/>
648     </enum>
649
650     <request name="set_popup">
651       <description summary="make the surface a popup surface">
652         Popup surfaces.  Will switch an implicit grab into
653         owner-events mode, and grab will continue after the implicit
654         grab ends (button released).  Once the implicit grab is over,
655         the popup grab continues until the window is destroyed or a
656         mouse button is pressed in any other clients window.  A click
657         in any of the clients surfaces is reported as normal, however,
658         clicks in other clients surfaces will be discarded and trigger
659         the callback.
660
661         TODO: Grab keyboard too, maybe just terminate on any click
662         inside or outside the surface?
663       </description>
664
665       <arg name="seat" type="object" interface="wl_seat"/>
666       <arg name="serial" type="uint"/>
667       <arg name="parent" type="object" interface="wl_surface"/>
668       <arg name="x" type="int"/>
669       <arg name="y" type="int"/>
670       <arg name="flags" type="uint"/>
671     </request>
672
673     <request name="set_maximized">
674       <description summary="make the surface a maximized surface">
675         A request from the client to notify the compositor the maximized
676         operation. The compositor will reply with a configure event telling
677         the expected new surface size. The operation is completed on the
678         next buffer attach to this surface.
679         A maximized client will fill the fullscreen of the output it is bound
680         to, except the panel area. This is the main difference between
681         a maximized shell surface and a fullscreen shell surface.
682       </description>
683       <arg name="output" type="object" interface="wl_output" allow-null="true"/>
684     </request>
685
686     <request name="set_title">
687       <description summary="set surface title">
688       </description>
689       <arg name="title" type="string"/>
690     </request>
691
692     <request name="set_class">
693       <description summary="set surface class">
694         The surface class identifies the general class of applications
695         to which the surface belongs.  The class is the file name of
696         the applications .desktop file (absolute path if non-standard
697         location). 
698       </description>
699       <arg name="class_" type="string"/>
700     </request>
701
702     <request name="raise">
703       <description summary="raise surface">
704         Tell the compositor to raise the a shell surface.
705         WARNING: DO NOT USE!  THIS IS A TEMPORARY HACK NOT FOUND IN
706         THE UPSTREAM WAYLAND PROTOCOL.  THIS REQUEST WILL BE REMOVED!
707       </description>
708     </request>
709
710     <event name="ping">
711       <description summary="ping client">
712         Ping a client to check if it is receiving events and sending
713         requests. A client is expected to reply with a pong request.
714       </description>
715       <arg name="serial" type="uint"/>
716     </event>
717
718     <event name="configure">
719       <description summary="suggest resize">
720         The configure event asks the client to resize its surface.
721         The size is a hint, in the sense that the client is free to
722         ignore it if it doesn't resize, pick a smaller size (to
723         satisfy aspect ratio or resize in steps of NxM pixels).  The
724         client is free to dismiss all but the last configure event it
725         received.
726       </description>
727
728       <arg name="edges" type="uint"/>
729       <arg name="width" type="int"/>
730       <arg name="height" type="int"/>
731     </event>
732
733     <event name="popup_done">
734       <description summary="popup interaction is done">
735         The popup_done event is sent out when a popup grab is broken,
736         that is, when the users clicks a surface that doesn't belong
737         to the client owning the popup surface.
738       </description>
739     </event>
740   </interface>
741
742   <interface name="wl_surface" version="1">
743     <description summary="an onscreen surface">
744       A surface.  This is an image that is displayed on the screen.
745       It has a location, size and pixel contents.
746     </description>
747
748     <request name="destroy" type="destructor">
749       <description summary="delete surface">
750         Deletes the surface and invalidates its object id.
751       </description>
752     </request>
753
754     <request name="attach">
755       <description summary="set the surface contents">
756         Set the contents of a buffer into this surface. The x and y
757         arguments specify the location of the new pending buffer's upper
758         left corner, relative to the current buffer's upper left corner. In
759         other words, the x and y, and the width and height of the wl_buffer
760         together define in which directions the surface's size changes.
761
762         Surface contents are double-buffered state, see wl_surface.commit.
763
764         The initial surface contents are void; there is no content.
765         wl_surface.attach assigns the given wl_buffer as the pending wl_buffer.
766         wl_surface.commit makes the pending wl_buffer the new
767         surface contents, and the size of the surface becomes the size of
768         the wl_buffer. After commit, there is no pending buffer until the
769         next attach.
770
771         Committing a pending wl_buffer allows the compositor to read the
772         pixels in the wl_buffer. The compositor may access the pixels at any
773         time after the wl_surface.commit request. When the compositor will
774         not access the pixels anymore, it will send the wl_buffer.release
775         event. Only after receiving wl_buffer.release, the client may re-use
776         the wl_buffer. A wl_buffer, that has been attached and then replaced
777         by another attach instead of committed, will not receive a release
778         event, and is not used by the compositor.
779
780         Destroying the wl_buffer after wl_buffer.release does not change the
781         surface contents. However, if the client destroys the wl_buffer
782         before receiving wl_buffer.release, the surface contents become
783         undefined immediately.
784
785         Only if wl_surface.attach is sent with a nil wl_buffer, the
786         following wl_surface.commit will remove the surface content.
787       </description>
788
789       <arg name="buffer" type="object" interface="wl_buffer" allow-null="true"/>
790       <arg name="x" type="int"/>
791       <arg name="y" type="int"/>
792     </request>
793
794     <request name="damage">
795       <description summary="mark part of the surface damaged">
796         This request is used to describe the regions where the pending
797         buffer is different from the current surface contents, and where
798         the surface therefore needs to be repainted. The pending buffer must
799         be set by wl_surface.attach before sending damage. The compositor
800         ignores the parts of the damage that fall outside of the surface.
801
802         Damage is double-buffered state, see wl_surface.commit.
803
804         The initial value for pending damage is empty: no damage.
805         wl_surface.damage adds pending damage: the new pending damage is the
806         union of old pending damage and the given rectangle.
807         wl_surface.commit assigns pending damage as the current damage, and
808         clears pending damage. The server will clear the current damage as
809         it repaints the surface.
810       </description>
811
812       <arg name="x" type="int"/>
813       <arg name="y" type="int"/>
814       <arg name="width" type="int"/>
815       <arg name="height" type="int"/>
816     </request>
817
818     <request name="frame">
819       <description summary="request repaint feedback">
820         Request notification when the next frame is displayed. Useful
821         for throttling redrawing operations, and driving animations.
822         The frame request will take effect on the next wl_surface.commit.
823         The notification will only be posted for one frame unless
824         requested again.
825
826         A server should avoid signalling the frame callbacks if the
827         surface is not visible in any way, e.g. the surface is off-screen,
828         or completely obscured by other opaque surfaces.
829
830         A client can request a frame callback even without an attach,
831         damage, or any other state changes. wl_surface.commit triggers a
832         display update, so the callback event will arrive after the next
833         output refresh where the surface is visible.
834       </description>
835
836       <arg name="callback" type="new_id" interface="wl_callback"/>
837     </request>
838
839     <request name="set_opaque_region">
840       <description summary="set opaque region">
841         This request sets the region of the surface that contains
842         opaque content.  The opaque region is an optimization hint for
843         the compositor that lets it optimize out redrawing of content
844         behind opaque regions.  Setting an opaque region is not
845         required for correct behaviour, but marking transparent
846         content as opaque will result in repaint artifacts.
847         The compositor ignores the parts of the opaque region that fall
848         outside of the surface.
849
850         Opaque region is double-buffered state, see wl_surface.commit.
851
852         wl_surface.set_opaque_region changes the pending opaque region.
853         wl_surface.commit copies the pending region to the current region.
854         Otherwise the pending and current regions are never changed.
855
856         The initial value for opaque region is empty. Setting the pending
857         opaque region has copy semantics, and the wl_region object can be
858         destroyed immediately. A nil wl_region causes the pending opaque
859         region to be set to empty.
860       </description>
861
862       <arg name="region" type="object" interface="wl_region" allow-null="true"/>
863     </request>
864
865     <request name="set_input_region">
866       <description summary="set input region">
867         This request sets the region of the surface that can receive
868         pointer and touch events. Input events happening outside of
869         this region will try the next surface in the server surface
870         stack. The compositor ignores the parts of the input region that
871         fall outside of the surface.
872
873         Input region is double-buffered state, see wl_surface.commit.
874
875         wl_surface.set_input_region changes the pending input region.
876         wl_surface.commit copies the pending region to the current region.
877         Otherwise the pending and current regions are never changed,
878         except cursor and icon surfaces are special cases, see
879         wl_pointer.set_cursor and wl_data_device.start_drag.
880
881         The initial value for input region is infinite. That means the whole
882         surface will accept input. Setting the pending input region has copy
883         semantics, and the wl_region object can be destroyed immediately. A
884         nil wl_region causes the input region to be set to infinite.
885       </description>
886
887       <arg name="region" type="object" interface="wl_region" allow-null="true"/>
888     </request>
889
890     <request name="commit">
891       <description summary="commit pending surface state">
892         Surface state (input, opaque, and damage regions, attached buffers,
893         etc.) is double-buffered. Protocol requests modify the pending
894         state, as opposed to current state in use by the compositor. Commit
895         request atomically applies all pending state, replacing the current
896         state. After commit, the new pending state is as documented for each
897         related request.
898
899         On commit, a pending wl_buffer is applied first, all other state
900         second. This means that all coordinates in double-buffered state are
901         relative to the new wl_buffer coming into use, except for
902         wl_surface.attach itself. If there is no pending wl_buffer, the
903         coordinates are relative to the current surface contents.
904
905         All requests that need a commit to become effective are documented
906         to affect double-buffered state.
907
908         Other interfaces may add further double-buffered surface state.
909       </description>
910     </request>
911
912     <event name="enter">
913       <description summary="surface enters an output">
914         This is emitted whenever a surface's creation, movement, or resizing
915         results in some part of it being within the scanout region of an
916         output.
917       </description>
918       <arg name="output" type="object" interface="wl_output"/>
919     </event>
920
921     <event name="leave">
922       <description summary="surface leaves an output">
923         This is emitted whenever a surface's creation, movement, or resizing
924         results in it no longer having any part of it within the scanout region
925         of an output.
926       </description>
927       <arg name="output" type="object" interface="wl_output"/>
928     </event>
929   </interface>
930
931   <interface name="wl_seat" version="1">
932     <description summary="seat">
933       A group of keyboards, pointer (mice, for example) and touch
934       devices . This object is published as a global during start up,
935       or when such a device is hot plugged.  A seat typically has a
936       pointer and maintains a keyboard_focus and a pointer_focus.
937     </description>
938
939     <enum name="capability">
940       <description summary="seat capability bitmask">
941         This is a bitmask of capabilities this seat has; if a member is
942         set, then it is present on the seat.
943       </description>
944       <entry name="pointer" value="1" summary="wl_pointer"/>
945       <entry name="keyboard" value="2" summary="wl_keyboard"/>
946       <entry name="touch" value="4" summary="wl_touch"/>
947     </enum>
948
949
950     <event name="capabilities">
951       <description summary="seat capabilities changed">
952         This is emitted whenever a seat gains or loses the pointer,
953         keyboard or touch capabilities.  The argument is a wl_seat_caps_mask
954         enum containing the complete set of capabilities this seat has.
955       </description>
956       <arg name="capabilities" type="uint"/>
957     </event>
958
959     <request name="get_pointer">
960       <description summary="return pointer object">
961         The ID provided will be initialized to the wl_pointer interface
962         for this seat.
963       </description>
964       <arg name="id" type="new_id" interface="wl_pointer"/>
965     </request>
966
967     <request name="get_keyboard">
968       <description summary="return pointer object">
969         The ID provided will be initialized to the wl_keyboard interface
970         for this seat.
971       </description>
972       <arg name="id" type="new_id" interface="wl_keyboard"/>
973     </request>
974
975     <request name="get_touch">
976       <description summary="return pointer object">
977         The ID provided will be initialized to the wl_touch interface
978         for this seat.
979       </description>
980       <arg name="id" type="new_id" interface="wl_touch"/>
981     </request>
982   </interface>
983
984   <interface name="wl_pointer" version="1">
985     <request name="set_cursor">
986       <description summary="set the pointer surface">
987         Set the pointer surface, i.e., the surface that contains the
988         pointer image (cursor). This request only takes effect if the pointer
989         focus for this device is one of the requesting client's surfaces
990         or the surface parameter is the current pointer surface. If
991         there was a previous surface set with this request it is
992         replaced. If surface is NULL, the pointer image is hidden.
993
994         The parameters hotspot_x and hotspot_y define the position of
995         the pointer surface relative to the pointer location. Its
996         top-left corner is always at (x, y) - (hotspot_x, hotspot_y),
997         where (x, y) are the coordinates of the pointer location.
998
999         On surface.attach requests to the pointer surface, hotspot_x
1000         and hotspot_y are decremented by the x and y parameters
1001         passed to the request. Attach must be confirmed by
1002         wl_surface.commit as usual.
1003
1004         The hotspot can also be updated by passing the currently set
1005         pointer surface to this request with new values for hotspot_x
1006         and hotspot_y.
1007
1008         The current and pending input regions of the wl_surface are
1009         cleared, and wl_surface.set_input_region is ignored until the
1010         wl_surface is no longer used as the cursor. When the use as a
1011         cursor ends, the current and pending input regions become
1012         undefined, and the wl_surface is unmapped.
1013       </description>
1014
1015       <arg name="serial" type="uint"/>
1016       <arg name="surface" type="object" interface="wl_surface" allow-null="true"/>
1017       <arg name="hotspot_x" type="int"/>
1018       <arg name="hotspot_y" type="int"/>
1019     </request>
1020
1021     <event name="enter">
1022       <description summary="enter event">
1023         Notification that this seat's pointer is focused on a certain
1024         surface. When an seat's focus enters a surface, the pointer image
1025         is undefined and a client should respond to this event by setting
1026         an appropriate pointer image.
1027       </description>
1028
1029       <arg name="serial" type="uint"/>
1030       <arg name="surface" type="object" interface="wl_surface"/>
1031       <arg name="surface_x" type="fixed"/>
1032       <arg name="surface_y" type="fixed"/>
1033     </event>
1034
1035     <event name="leave">
1036       <description summary="leave event">
1037       </description>
1038       <arg name="serial" type="uint"/>
1039       <arg name="surface" type="object" interface="wl_surface"/>
1040     </event>
1041
1042     <event name="motion">
1043       <description summary="pointer motion event">
1044         Notification of pointer location change. The arguments surface_[xy]
1045         are the location relative to the focused surface.
1046       </description>
1047
1048       <arg name="time" type="uint"/>
1049       <arg name="surface_x" type="fixed"/>
1050       <arg name="surface_y" type="fixed"/>
1051     </event>
1052
1053     <enum name="button_state">
1054       <description summary="physical button state">
1055         Describes the physical state of a button which provoked the button
1056         event.
1057       </description>
1058       <entry name="released" value="0" summary="button is not pressed"/>
1059       <entry name="pressed" value="1" summary="button is pressed"/>
1060     </enum>
1061
1062     <event name="button">
1063       <description summary="pointer button event">
1064         Mouse button click and release notifications.  The location
1065         of the click is given by the last motion or pointer_focus event.
1066       </description>
1067
1068       <arg name="serial" type="uint"/>
1069       <arg name="time" type="uint"/>
1070       <arg name="button" type="uint"/>
1071       <arg name="state" type="uint"/>
1072     </event>
1073
1074     <enum name="axis">
1075       <description summary="axis types"/>
1076       <entry name="vertical_scroll" value="0"/>
1077       <entry name="horizontal_scroll" value="1"/>
1078     </enum>
1079
1080     <event name="axis">
1081       <description summary="axis event">
1082         Scroll and other axis notifications.
1083
1084         For scroll events (vertical and horizontal scroll axes), the
1085         value parameter is the length of a vector along the specified
1086         axis in a coordinate space identical to those of motion events,
1087         representing a relative movement along the specified axis.
1088
1089         For devices that support movements non-parallel to axes multiple
1090         axis events will be emitted.
1091
1092         When applicable, for example for touch pads, the server can
1093         choose to emit scroll events where the motion vector is
1094         equivalent to a motion event vector.
1095
1096         When applicable, clients can transform its view relative to the
1097         scroll distance.
1098       </description>
1099
1100       <arg name="time" type="uint"/>
1101       <arg name="axis" type="uint"/>
1102       <arg name="value" type="fixed"/>
1103     </event>
1104   </interface>
1105
1106   <interface name="wl_keyboard" version="1">
1107     <description summary="keyboard input device">
1108     </description>
1109
1110     <enum name="keymap_format">
1111       <description summary="keyboard mapping format">
1112         This enum specifies the format of the keymap provided to the client
1113         with the wl_keyboard::keymap event.
1114       </description>
1115       <entry name="xkb_v1" value="1" description="libxkbcommon compatible"/>
1116     </enum>
1117
1118     <event name="keymap">
1119       <description summary="keyboard mapping">
1120         This event provides a file descriptor to the client which can be
1121         memory-mapped to provide a keyboard mapping description.
1122       </description>
1123       <arg name="format" type="uint"/>
1124       <arg name="fd" type="fd"/>
1125       <arg name="size" type="uint"/>
1126     </event>
1127
1128     <event name="enter">
1129       <arg name="serial" type="uint"/>
1130       <arg name="surface" type="object" interface="wl_surface"/>
1131       <arg name="keys" type="array"/>
1132     </event>
1133
1134     <event name="leave">
1135       <arg name="serial" type="uint"/>
1136       <arg name="surface" type="object" interface="wl_surface"/>
1137     </event>
1138
1139     <enum name="key_state">
1140       <description summary="physical key state">
1141         Describes the physical state of a key which provoked the key event.
1142       </description>
1143       <entry name="released" value="0" summary="key is not pressed"/>
1144       <entry name="pressed" value="1" summary="key is pressed"/>
1145     </enum>
1146
1147     <event name="key">
1148       <description summary="key event">
1149         A key was pressed or released.
1150       </description>
1151
1152       <arg name="serial" type="uint"/>
1153       <arg name="time" type="uint"/>
1154       <arg name="key" type="uint"/>
1155       <arg name="state" type="uint"/>
1156     </event>
1157
1158     <event name="modifiers">
1159       <description summary="modifier and group state">
1160         Notifies clients that the modifier and/or group state has
1161         changed, and it should update its local state.
1162       </description>
1163
1164       <arg name="serial" type="uint"/>
1165       <arg name="mods_depressed" type="uint"/>
1166       <arg name="mods_latched" type="uint"/>
1167       <arg name="mods_locked" type="uint"/>
1168       <arg name="group" type="uint"/>
1169     </event>
1170   </interface>
1171
1172   <interface name="wl_touch" version="1">
1173     <description summary="touch screen input device">
1174     </description>
1175
1176     <event name="down">
1177       <arg name="serial" type="uint"/>
1178       <arg name="time" type="uint"/>
1179       <arg name="surface" type="object" interface="wl_surface"/>
1180       <arg name="id" type="int" />
1181       <arg name="x" type="fixed" />
1182       <arg name="y" type="fixed" />
1183     </event>
1184
1185     <event name="up">
1186       <arg name="serial" type="uint"/>
1187       <arg name="time" type="uint"/>
1188       <arg name="id" type="int" />
1189     </event>
1190
1191     <event name="motion">
1192       <arg name="time" type="uint"/>
1193       <arg name="id" type="int" />
1194       <arg name="x" type="fixed" />
1195       <arg name="y" type="fixed" />
1196     </event>
1197
1198     <event name="frame">
1199       <description summary="end of touch frame event">
1200         Indicates the end of a contact point list.
1201       </description>
1202     </event>
1203
1204     <event name="cancel">
1205       <description summary="touch session cancelled">
1206         Sent if the compositor decides the touch stream is a global
1207         gesture. No further events are sent to the clients from that
1208         particular gesture.
1209       </description>
1210     </event>
1211   </interface>
1212
1213
1214   <interface name="wl_output" version="1">
1215     <description summary="compositor output region">
1216       An output describes part of the compositor geometry.  The
1217       compositor work in the 'compositor coordinate system' and an
1218       output corresponds to rectangular area in that space that is
1219       actually visible.  This typically corresponds to a monitor that
1220       displays part of the compositor space.  This object is published
1221       as global during start up, or when a screen is hot plugged.
1222     </description>
1223
1224     <enum name="subpixel">
1225       <entry name="unknown" value="0"/>
1226       <entry name="none" value="1"/>
1227       <entry name="horizontal_rgb" value="2"/>
1228       <entry name="horizontal_bgr" value="3"/>
1229       <entry name="vertical_rgb" value="4"/>
1230       <entry name="vertical_bgr" value="5"/>
1231     </enum>
1232
1233     <enum name="transform">
1234       <description summary="transform from framebuffer to output">
1235         This describes the transform that a compositor will apply to a
1236         surface to compensate for the rotation or mirroring of an
1237         output device.
1238
1239         The flipped values correspond to an initial flip around a
1240         vertical axis followed by rotation.
1241
1242         The purpose is mainly to allow clients render accordingly and
1243         tell the compositor, so that for fullscreen surfaces, the
1244         compositor will still be able to scan out directly from client
1245         surfaces.
1246       </description>
1247
1248       <entry name="normal" value="0"/>
1249       <entry name="90" value="1"/>
1250       <entry name="180" value="2"/>
1251       <entry name="270" value="3"/>
1252       <entry name="flipped" value="4"/>
1253       <entry name="flipped_90" value="5"/>
1254       <entry name="flipped_180" value="6"/>
1255       <entry name="flipped_270" value="7"/>
1256     </enum>
1257
1258     <event name="geometry">
1259       <description summary="properties of the output"/>
1260       <arg name="x" type="int"
1261            summary="x position within the global compositor space"/>
1262       <arg name="y" type="int"
1263            summary="y position within the global compositor space"/>
1264       <arg name="physical_width" type="int"
1265            summary="width in millimeters of the output"/>
1266       <arg name="physical_height" type="int"
1267            summary="height in millimeters of the output"/>
1268       <arg name="subpixel" type="int"
1269            summary="subpixel orientation of the output"/>
1270       <arg name="make" type="string"
1271            summary="textual description of the manufacturer"/>
1272       <arg name="model" type="string"
1273            summary="textual description of the model"/>
1274       <arg name="transform" type="int"
1275            summary="transform that maps framebuffer to output"/>
1276     </event>
1277
1278     <enum name="mode">
1279       <description summary="values for the flags bitfield in the mode event"/>
1280       <entry name="current" value="0x1"
1281              summary="indicates this is the current mode"/>
1282       <entry name="preferred" value="0x2"
1283              summary="indicates this is the preferred mode"/>
1284     </enum>
1285       
1286     <event name="mode">
1287       <description summary="advertise available modes for the output">
1288         The mode event describes an available mode for the output.
1289         The event is sent when binding to the output object and there
1290         will always be one mode, the current mode.  The event is sent
1291         again if an output changes mode, for the mode that is now
1292         current.  In other words, the current mode is always the last
1293         mode that was received with the current flag set.
1294       </description>
1295       <arg name="flags" type="uint" summary="mask of wl_output_mode flags"/>
1296       <arg name="width" type="int" summary="width of the mode in pixels"/>
1297       <arg name="height" type="int" summary="height of the mode in pixels"/>
1298       <arg name="refresh" type="int" summary="vertical refresh rate in mHz"/>
1299     </event>
1300   </interface>
1301
1302   <interface name="wl_region" version="1">
1303     <description summary="region interface">
1304       Region.
1305     </description>
1306
1307     <request name="destroy" type="destructor">
1308       <description summary="destroy region">
1309         Destroy the region.  This will invalidate the object id.
1310       </description>
1311     </request>
1312
1313     <request name="add">
1314       <description summary="add rectangle to region">
1315         Add the specified rectangle to the region
1316       </description>
1317
1318       <arg name="x" type="int"/>
1319       <arg name="y" type="int"/>
1320       <arg name="width" type="int"/>
1321       <arg name="height" type="int"/>
1322     </request>
1323
1324     <request name="subtract">
1325       <description summary="subtract rectangle from region">
1326         Subtract the specified rectangle from the region
1327       </description>
1328
1329       <arg name="x" type="int"/>
1330       <arg name="y" type="int"/>
1331       <arg name="width" type="int"/>
1332       <arg name="height" type="int"/>
1333     </request>
1334
1335   </interface>
1336
1337 </protocol>