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