Move map functionality into shell
[profile/ivi/wayland.git] / protocol / wayland.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <protocol name="wayland">
3
4   <!-- The core global object. This is a special singleton object.
5        It is used for internal wayland protocol features. -->
6   <interface name="wl_display" version="1">
7     <request name="bind">
8       <arg name="id" type="uint"/>
9       <arg name="interface" type="string"/>
10       <arg name="version" type="uint"/>
11     </request>
12
13     <!-- sync is an just an echo, which will reply with a sync event.
14          Since requests are handled in-order, this can be used as a
15          barrier to ensure all previous requests have ben handled.
16          The key argument can be used to correlate between multiple
17          sync invocations. -->
18     <request name="sync">
19       <arg name="key" type="uint"/>
20     </request>
21
22     <!-- Request notification when the next frame is displayed.
23          Useful for throttling redrawing operations, and driving
24          animations.  The notification will only be posted for one
25          frame unless requested again. -->
26     <request name="frame">
27       <arg name="surface" type="object" interface="wl_surface"/>
28       <arg name="key" type="uint"/>
29     </request>
30
31     <!-- A fatal error has occurred. -->
32     <event name="error">
33       <arg name="object_id" type="object" interface="wl_object"/>
34       <arg name="code" type="uint"/>
35       <arg name="message" type="string"/>
36     </event>
37
38     <enum name="error">
39       <entry name="invalid_object" value="0"/>
40       <entry name="invalid_method" value="1"/>
41       <entry name="no_memory" value="2"/>
42     </enum>
43
44     <!-- Notify the client of global objects. These are objects that
45          are created by the server. Globals are published on the
46          initial client connection sequence, upon device hotplugs,
47          device disconnects, reconfiguration or other events.  The
48          server will always announce an object before the object sends
49          out events. -->
50     <event name="global">
51       <arg name="id" type="new_id" interface="wl_object"/>
52       <arg name="name" type="string"/>
53       <arg name="version" type="uint"/>
54     </event>
55
56     <!-- Internal, deprecated, and will be changed.  This is an object
57          IDs range that is used by the client to allocate object IDs
58          in "new_id" type arguments.  The server sends range
59          allocations to the client before the next range is about to
60          be depleted. -->
61     <event name="range">
62       <arg name="base" type="uint"/>
63     </event>
64
65     <!-- A reply to the frame or sync request.  The key is the one
66          used in the request.  time is in millisecond units, and
67          denotes the time when the frame was posted on the
68          display. time can be used to estimaate frame rate, determine
69          how much to advance animations and compensate for jitter. -->
70     <event name="key">
71       <arg name="key" type="uint"/>
72       <arg name="time" type="uint"/>
73     </event>
74   </interface>
75
76
77   <!-- A compositor. This object is a global.  The compositor is in
78        charge of combining the contents of multiple surfaces into one
79        displayable output. -->
80   <interface name="wl_compositor" version="1">
81     <!-- Factory request for a surface objects. A surface is akin to a
82          window. -->
83     <request name="create_surface">
84       <arg name="id" type="new_id" interface="wl_surface"/>
85     </request>
86
87     <enum name="visual">
88       <entry name="argb32" value="0"/>
89       <entry name="premultiplied_argb32" value="1"/>
90       <entry name="xrgb32" value="2"/>
91     </enum>
92
93     <event name="token_visual">
94       <arg name="id" type="new_id" interface="wl_object"/>
95       <arg name="token" type="uint"/>
96     </event>
97   </interface>
98
99   <!-- Shared memory support -->
100   <interface name="wl_shm" version="1">
101     <enum name="error">
102       <entry name="invalid_visual" value="0"/>
103       <entry name="invalid_stride" value="1"/>
104       <entry name="invalid_fd" value="2"/>
105     </enum>
106
107     <!-- Transfer a shm buffer to the server.  The allocated buffer
108          would include at least stride * height bytes starting at the
109          beginning of fd.  The file descriptor is transferred over the
110          socket using AF_UNIX magical features. width, height, stride
111          and visual describe the respective properties of the pixel
112          data contained in the buffer. -->
113     <request name="create_buffer">
114       <arg name="id" type="new_id" interface="wl_buffer"/>
115       <arg name="fd" type="fd"/>
116       <arg name="width" type="int"/>
117       <arg name="height" type="int"/>
118       <arg name="stride" type="uint"/>
119       <arg name="visual" type="object" interface="wl_visual"/>
120     </request>
121   </interface>
122
123
124   <!-- A pixel buffer. Created using the drm, shm or similar objects.
125        It has a size, visual and contents, but not a location on the
126        screen. -->
127   <interface name="wl_buffer" version="1">
128     <!-- Notify the server that the specified area of the buffers
129          contents have changed.  To describe a more complicated area
130          of damage, break down the region into rectangles and use this
131          request several times.
132     -->
133     <request name="damage">
134       <arg name="x" type="int"/>
135       <arg name="y" type="int"/>
136       <arg name="width" type="int"/>
137       <arg name="height" type="int"/>
138     </request>
139
140     <!-- Destroy a buffer.  This will invalidate the object id. -->
141     <request name="destroy" type="destructor"/>
142   </interface>
143
144   <interface name="wl_shell" version="1">
145     <request name="move">
146       <arg name="surface" type="object" interface="wl_surface"/>
147       <arg name="input_device" type="object" interface="wl_input_device"/>
148       <arg name="time" type="uint"/>
149     </request>
150
151     <enum name="resize">
152       <entry name="none" value="0"/>
153       <entry name="top" value="1"/>
154       <entry name="bottom" value="2"/>
155       <entry name="left" value="4"/>
156       <entry name="top_left" value="5"/>
157       <entry name="bottom_left" value="6"/>
158       <entry name="right" value="8"/>
159       <entry name="top_right" value="9"/>
160       <entry name="bottom_right" value="10"/>
161     </enum>
162
163     <request name="resize">
164       <arg name="surface" type="object" interface="wl_surface"/>
165       <arg name="input_device" type="object" interface="wl_input_device"/>
166       <arg name="time" type="uint"/>
167       <!-- edges is an enum, need to get the values in here -->
168       <arg name="edges" type="uint"/>
169     </request>
170
171     <request name="create_drag">
172       <arg name="id" type="new_id" interface="wl_drag"/>
173     </request>
174
175     <request name="create_selection">
176       <arg name="id" type="new_id" interface="wl_selection"/>
177     </request>
178
179     <!-- Make the surface visible as a toplevel window. -->
180     <request name="set_toplevel">
181       <arg name="surface" type="object" interface="wl_surface"/>
182     </request>
183
184     <!-- Map the surface relative to an existing surface. The x and y
185          arguments specify the locations of the upper left corner of
186          the surface relative to the upper left corner of the parent
187          surface.  The flags argument controls overflow/clipping
188          behaviour when the surface would intersect a screen edge,
189          panel or such.  And possibly whether the offset only
190          determines the initial position or if the surface is locked
191          to that relative position during moves. -->
192     <request name="set_transient">
193       <arg name="surface" type="object" interface="wl_surface"/>
194       <arg name="parent" type="object" interface="wl_surface"/>
195       <arg name="x" type="int"/>
196       <arg name="y" type="int"/>
197       <arg name="flags" type="uint"/>
198     </request>
199
200     <!-- Map the surface as a fullscreen surface.  There are a number
201          of options here: on which output? if the surface size doesn't
202          match the output size, do we scale, change resolution, or add
203          black borders? is that something the client controls?  what
204          about transient surfaces, do they float on top of the
205          fullscreen? what if there's already a fullscreen surface on
206          the output, maybe you can only go fullscreen if you're
207          active?  -->
208     <request name="set_fullscreen">
209       <arg name="surface" type="object" interface="wl_surface"/>
210     </request>
211
212     <!-- The configure event asks the client to resize its surface.
213          The size is a hint, in the sense that the client is free to
214          ignore it if it doesn't resize, pick a smaller size (to
215          satisfy aspect ration or resize in steps of NxM pixels).  The
216          client is free to dismiss all but the last configure event it
217          received. -->
218     <event name="configure">
219       <arg name="time" type="uint"/>
220       <arg name="edges" type="uint"/>
221       <arg name="surface" type="object" interface="wl_surface"/>
222       <arg name="width" type="int"/>
223       <arg name="height" type="int"/>
224     </event>
225   </interface>
226
227   <interface name="wl_selection" version="1">
228     <!-- Add an offered mime type.  Can be called several times to
229          offer multiple types, but must be called before 'activate'. -->
230     <request name="offer">
231       <arg name="type" type="string"/>
232     </request>
233
234     <!-- Can the selection be activated for multiple devices? -->
235     <request name="activate">
236       <arg name="input_device" type="object" interface="wl_input_device"/>
237       <arg name="time" type="uint"/>
238     </request>
239
240     <!-- Destroy the selection. -->
241     <request name="destroy" type="destructor"/>
242
243     <!-- Another client pasted the selection, send the mime-type over
244          the passed fd. -->
245     <event name="send">
246       <arg name="mime_type" type="string"/>
247       <arg name="fd" type="fd"/>
248     </event>
249
250     <!-- Another selection became active. -->
251     <event name="cancelled"/>
252   </interface>
253
254   <interface name="wl_selection_offer" version="1">
255     <!-- Called to receive the selection data as the specified type.
256          Sends the pipe fd to the compositor, which forwards it to the
257          source in the 'send' event -->
258     <request name="receive">
259       <arg name="mime_type" type="string"/>
260       <arg name="fd" type="fd"/>
261     </request>
262
263     <!-- Sent before the keyboard_focus event to announce the types
264          offered.  One event per offered mime type.  A mime type of
265          NULL means the selection offer is going away.  -->
266     <event name="offer">
267       <arg name="type" type="string"/>
268     </event>
269
270     <event name="keyboard_focus">
271       <arg name="input_device" type="object" interface="wl_input_device"/>
272     </event>
273   </interface>
274
275   <interface name="wl_drag" version="1">
276     <!-- Add an offered mime type.  Can be called several times to
277          offer multiple types, but must be called before 'activate'. -->
278     <request name="offer">
279       <arg name="type" type="string"/>
280     </request>
281
282     <request name="activate">
283       <arg name="surface" type="object" interface="wl_surface"/>
284       <arg name="input_device" type="object" interface="wl_input_device"/>
285       <arg name="time" type="uint"/>
286     </request>
287
288     <!-- Destroy the drag and cancel the session. -->
289     <request name="destroy" type="destructor"/>
290
291     <!-- Sent when a target accepts pointer_focus or motion events.
292          If a target does not accept any of the offered types, type is
293          NULL -->
294     <event name="target">
295       <arg name="mime_type" type="string"/>
296     </event>
297
298     <!-- Sent when the drag is finished.  The final mime type is that
299          of the last target event.  If that was NULL, no drag target
300          was valid when the drag finished, fd is undefined and the
301          source should not send data.  The event is also sent in case
302          a drag source tries to activate a drag after the grab was
303          released, in which case mime_type will also be NULL. -->
304     <event name="finish">
305       <arg name="fd" type="fd"/>
306     </event>
307
308     <event name="reject"/>
309   </interface>
310
311
312   <interface name="wl_drag_offer" version="1">
313     <!-- Call to accept the offer of the given type -->
314     <request name="accept">
315       <arg name="time" type="uint"/>
316       <arg name="type" type="string"/>
317     </request>
318
319     <!-- Called to initiate the drag finish sequence.  Sends the pipe
320          fd to the compositor, which forwards it to the source in the
321          'finish' event -->
322     <request name="receive">
323       <arg name="fd" type="fd"/>
324     </request>
325
326     <!-- Called to reject a drop  -->
327     <request name="reject"/>
328
329     <!-- Sent before the pointer_focus event to announce the types
330          offered.  One event per offered mime type. -->
331     <event name="offer">
332       <arg name="type" type="string"/>
333     </event>
334
335     <!-- Similar to device::pointer_focus.  Sent to potential target
336          surfaces to offer drag data.  If the device leaves the
337          window, the drag stops or the originator cancels the drag,
338          this event is sent with the NULL surface, at which point the
339          drag object may no longer be valid. -->
340     <event name="pointer_focus">
341       <arg name="time" type="uint"/>
342       <arg name="surface" type="object" interface="wl_surface"/>
343       <arg name="x" type="int"/>
344       <arg name="y" type="int"/>
345       <arg name="surface_x" type="int"/>
346       <arg name="surface_y" type="int"/>
347     </event>
348
349     <!-- Similar to device::motion.  Sent to potential target surfaces
350          as the drag pointer moves around in the surface. -->
351     <event name="motion">
352       <arg name="time" type="uint"/>
353       <arg name="x" type="int"/>
354       <arg name="y" type="int"/>
355       <arg name="surface_x" type="int"/>
356       <arg name="surface_y" type="int"/>
357     </event>
358
359     <!-- Sent to indicate that the drag is finishing.  The last
360          motion/pointer_focus event gives the location of the drop.
361          Target must respond with the 'receive' request, which sends
362          an fd to the source for writing the drag data. -->
363     <event name="drop"/>
364   </interface>
365
366
367   <!-- A surface. This is an image that is displayed on the screen.
368        It has a location, size and pixel contents. Similar to a window. -->
369   <interface name="wl_surface" version="1">
370     <!-- Deletes the surface and invalidates its object id. -->
371     <request name="destroy" type="destructor"/>
372
373     <!-- Copy the contents of a buffer into this surface. The x and y
374          arguments specify the location of the new buffers upper left
375          corner, relative to the old buffers upper left corner. -->
376     <request name="attach">
377       <arg name="buffer" type="object" interface="wl_buffer"/>
378       <arg name="x" type="int"/>
379       <arg name="y" type="int"/>
380     </request>
381
382     <!-- After attaching a new buffer, this request is used to
383          describe the regions where the new buffer is different from
384          the previous buffer and needs to be repainted.  Coordinates
385          are relative to the new buffer. -->
386     <request name="damage">
387       <arg name="x" type="int"/>
388       <arg name="y" type="int"/>
389       <arg name="width" type="int"/>
390       <arg name="height" type="int"/>
391     </request>
392   </interface>
393
394
395   <!-- A group of keyboards and pointer devices (mice, for
396        example). This object is published as a global during start up,
397        or when such a device is hot plugged.  A input_device group
398        typically has a pointer and maintains a keyboard_focus and a
399        pointer_focus.  -->
400   <interface name="wl_input_device" version="1">
401     <!-- Set the pointer's image.  This request only takes effect if
402          the pointer focus for this device is one of the requesting
403          clients surfaces.  -->
404     <request name="attach">
405       <arg name="time" type="uint"/>
406       <arg name="buffer" type="object" interface="wl_buffer"/>
407       <arg name="hotspot_x" type="int"/>
408       <arg name="hotspot_y" type="int"/>
409     </request>
410
411     <!-- Notification of pointer location change.
412          x,y are the absolute location on the screen.
413          surface_[xy] are the location relative to the focused surface. -->
414     <event name="motion">
415       <arg name="time" type="uint"/>
416       <arg name="x" type="int"/>
417       <arg name="y" type="int"/>
418       <arg name="surface_x" type="int"/>
419       <arg name="surface_y" type="int"/>
420     </event>
421
422     <!-- Mouse button click and release notifications.  The location
423          of the click is given by the last motion or pointer_focus
424          event. -->
425     <event name="button">
426       <arg name="time" type="uint"/>
427       <arg name="button" type="uint"/>
428       <arg name="state" type="uint"/>
429     </event>
430
431     <!-- Keyboard press. -->
432     <event name="key">
433       <arg name="time" type="uint"/>
434       <arg name="key" type="uint"/>
435       <arg name="state" type="uint"/>
436     </event>
437
438     <!-- Notification that this input device's pointer is focused on
439          certain surface. When an input_device enters a surface, the
440          pointer image is undefined and a client should respond to
441          this event by setting an apropriate pointer image. -->
442     <event name="pointer_focus">
443       <arg name="time" type="uint"/>
444       <arg name="surface" type="object" interface="wl_surface"/>
445       <arg name="x" type="int"/>
446       <arg name="y" type="int"/>
447       <arg name="surface_x" type="int"/>
448       <arg name="surface_y" type="int"/>
449     </event>
450
451     <event name="keyboard_focus">
452       <arg name="time" type="uint"/>
453       <arg name="surface" type="object" interface="wl_surface"/>
454       <arg name="keys" type="array"/>
455     </event>
456   </interface>
457
458
459   <!-- An output describes part of the compositor geometry.  The
460        compositor work in the 'compositor coordinate system' and an
461        output corresponds to rectangular area in that space that is
462        actually visible.  This typically corresponds to a monitor that
463        displays part of the compositor space.  This object is
464        published as global during start up, or when a screen is hot
465        plugged.  -->
466   <interface name="wl_output" version="1">
467     <!-- Notification about the screen size. -->
468     <event name="geometry">
469       <arg name="x" type="int"/>
470       <arg name="y" type="int"/>
471       <arg name="width" type="int"/>
472       <arg name="height" type="int"/>
473     </event>
474   </interface>
475
476
477   <!-- A visual is the pixel format.  The different visuals are
478        currently only identified by the order they are advertised by
479        the 'global' events.  We need something better.  -->
480   <interface name="wl_visual" version="1"/>
481
482 </protocol>