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