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