ilmControl: destroy output objects, even w/o controller
[profile/ivi/wayland-ivi-extension.git] / protocol / ivi-controller.xml
1 <?xml version="1.2" encoding="UTF-8"?>
2 <protocol name="ivi_controller">
3
4     <copyright>
5     Copyright (C) 2013 DENSO CORPORATION
6     Copyright (c) 2013 BMW Car IT GmbH
7
8     Permission is hereby granted, free of charge, to any person obtaining a copy
9     of this software and associated documentation files (the "Software"), to deal
10     in the Software without restriction, including without limitation the rights
11     to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12     copies of the Software, and to permit persons to whom the Software is
13     furnished to do so, subject to the following conditions:
14
15     The above copyright notice and this permission notice shall be included in
16     all copies or substantial portions of the Software.
17
18     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21     AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24     THE SOFTWARE.
25     </copyright>
26
27     <interface name="ivi_controller_surface" version="1">
28         <description summary="controller interface to surface in ivi compositor"/>
29
30         <request name="set_visibility">
31             <description summary="set the visibility of a surface in ivi compositor">
32                  If visibility argument is 0, the surface in the ivi compositor is set to invisible.
33                  If visibility argument is not 0, the surface in the ivi compositor is set to visible.
34             </description>
35             <arg name="visibility" type="uint"/>
36         </request>
37
38         <request name="set_opacity">
39             <description summary="set the opacity of a surface in ivi compositor">
40                  The valid range for opacity is 0.0 (fully transparent) to 1.0 (fully opaque).
41             </description>
42             <arg name="opacity" type="fixed"/>
43         </request>
44
45         <request name="set_source_rectangle">
46             <description summary="set the scanout area of a surface in ivi compositor">
47                 The source rectangle defines the part of the surface content, that is used for
48                 compositing the surface. It can be used, if valid content of the surface is smaller
49                 than the surface. Effectively it can be used to zoom the content of the surface.
50                 x:      horizontal start position of scanout area within the surface
51                 y:      vertical start position of scanout area within the surface
52                 width:  width of scanout area within the surface
53                 height: height of scanout area within the surface
54             </description>
55             <arg name="x" type="int"/>
56             <arg name="y" type="int"/>
57             <arg name="width" type="int"/>
58             <arg name="height" type="int"/>
59         </request>
60
61         <request name="set_destination_rectangle">
62             <description summary="Set the destination area of a surface within a layer">
63                 The destination rectangle defines the position and size of a surface on a layer.
64                 The surface will be scaled to this rectangle for rendering.
65                 x:      horizontal start position of surface within the layer
66                 y:      vertical start position of surface within the layer
67                 width : width of surface within the layer
68                 height: height of surface within the layer
69             </description>
70             <arg name="x" type="int"/>
71             <arg name="y" type="int"/>
72             <arg name="width" type="int"/>
73             <arg name="height" type="int"/>
74         </request>
75
76         <request name="set_configuration">
77             <description summary="request new buffer size for application content">
78                 Request the client providing content for this surface, to resize of the buffers
79                 provided as surface content.
80             </description>
81             <arg name="width" type="int"/>
82             <arg name="height" type="int"/>
83         </request>
84
85         <request name="set_orientation">
86             <description summary="set the orientation of a surface in ivi compositor">
87                 The orientation of a surface in ivi compositor can be rotated in 90 degree steps,
88                 as defined in orientation enum.
89             </description>
90             <arg name="orientation" type="int"/>
91         </request>
92
93         <request name="screenshot">
94             <description summary="take screenshot of surface">
95                 Store a screenshot of the surface content in the file provided by argument filename.
96             </description>
97             <arg name="filename" type="string"/>
98         </request>
99
100         <event name="visibility">
101             <description summary="the visibility of the surface in ivi compositor has changed">
102                 The new visibility state is provided in argument visibility.
103                 If visibility is 0, the surface has become invisible.
104                 If visibility is not 0, the surface has become visible.
105             </description>
106             <arg name="visibility" type="int"/>
107         </event>
108
109         <event name="opacity">
110             <description summary="the opacity of surface in ivi compositor has changed">
111                 The new opacity state is provided in argument opacity.
112                 The valid range for opactiy is 0.0 (fully transparent) to 1.0 (fully opaque).
113             </description>
114             <arg name="opacity" type="fixed"/>
115         </event>
116
117         <event name="source_rectangle">
118             <description summary="the source rectangle of surface in ivi compositor has changed">
119                 The scanout region of the surface content has changed.
120                 The new values for source rectangle are provided by
121                 x:      new horizontal start position of scanout area within the surface
122                 y:      new vertical start position of scanout area within the surface
123                 width:  new width of scanout area within the surface
124                 height: new height of scanout area within the surface
125             </description>
126             <arg name="x" type="int"/>
127             <arg name="y" type="int"/>
128             <arg name="width" type="int"/>
129             <arg name="height" type="int"/>
130         </event>
131
132         <event name="destination_rectangle">
133             <description summary="the destination rectangle of surface in ivi compositor has changed">
134                 The new values for source rectangle are provided by
135                 x:      new horizontal start position of surface within the layer
136                 y:      new vertical start position of surface within the layer
137                 width : new width of surface within the layer
138                 height: new height of surface within the layer
139             </description>
140             <arg name="x" type="int"/>
141             <arg name="y" type="int"/>
142             <arg name="width" type="int"/>
143             <arg name="height" type="int"/>
144         </event>
145
146         <event name="configuration">
147             <description summary="the configuration of surface in ivi compositor has changed">
148                 The client providing content for this surface was requested to resize the buffer
149                 provided as surface content. The requested buffer size is provided by arguments
150                 width and height.
151             </description>
152             <arg name="width" type="int"/>
153             <arg name="height" type="int"/>
154         </event>
155
156         <enum name="orientation">
157             <description summary="orientation presets in degrees">
158                 The surfaces in ivi controller can be rotated in 90 degrees steps.
159                 This enum defines all valid orientations for surfaces.
160             </description>
161             <entry name="0_degrees"   value="0" summary="not rotated"/>
162             <entry name="90_degrees"  value="1" summary="rotated 90 degrees clockwise"/>
163             <entry name="180_degrees" value="2" summary="rotated 180 degrees clockwise"/>
164             <entry name="270_degrees" value="3" summary="rotated 270 degrees clockwise"/>
165         </enum>
166
167         <event name="orientation">
168             <description summary="the orientation of surface in ivi compositor has changed">
169                 The new orientation status is provided by argument orientation.
170             </description>
171             <arg name="orientation" type="int"/>
172         </event>
173
174         <enum name="pixelformat">
175             <description summary="pixel format values">
176                 Applications can provide buffers as surface content with differernt buffer
177                 properties. This enum defines all supported buffer configurations.
178             </description>
179             <entry name="r_8"       value="0" summary="8 bit luminance surface"/>
180             <entry name="rgb_888"   value="1" summary="24 bit rgb surface"/>
181             <entry name="rgba_8888" value="2" summary="24 bit rgb surface with 8 bit alpha"/>
182             <entry name="rgb_565"   value="3" summary="16 bit rgb surface"/>
183             <entry name="rgba_5551" value="4" summary="16 bit rgb surface with binary mask"/>
184             <entry name="rgba_6661" value="5" summary="18 bit rgb surface with binary mask"/>
185             <entry name="rgba_4444" value="6" summary="12 bit rgb surface with 4 bit alpha"/>
186             <entry name="unknown"   value="7" summary="unknown"/>
187         </enum>
188
189         <event name="pixelformat">
190             <description summary="pixelformat for surface in ivi compositor has changed">
191                 When client attach buffers as surface content, these buffers have a pixelformat
192                 configuration. If the pixelformat of a newly attached buffer is different from
193                 the previous buffer configuration, this event is raised.
194                 This is also done, when the first buffer is provided by application.
195             </description>
196             <arg name="pixelformat" type="int"/>
197         </event>
198
199         <event name="layer">
200             <description summary="surface in ivi compositor was added to a layer">
201                 This surface was added to the render order of the layer defined by argument layer.
202                 This is essential for a surface to become visible on screen, since ivi compositors
203                 will only render layers (or more precise all surfaces in the render order of a layer).
204             </description>
205             <arg name="layer" type="object" interface="ivi_controller_layer" allow-null="true"/>
206         </event>
207
208         <request name="send_stats">
209             <description summary="request statistics for surface in ivi compositor">
210                 These stats contain information required for monitoring, debugging, logging
211                 and tracing.
212             </description>
213         </request>
214
215         <event name="stats">
216             <description summary="receive updated statistics for surface in ivi compositor">
217                 The information contained in this event is essential for monitoring, debugging,
218                 logging and tracing support in IVI systems.
219             </description>
220             <arg name="redraw_count" type="uint"/>
221             <arg name="frame_count" type="uint"/>
222             <arg name="update_count" type="uint"/>
223             <arg name="pid" type="uint"/>
224             <arg name="process_name" type="string" allow-null="true"/>
225         </event>
226
227         <request name="destroy" type="destructor">
228             <description summary="destroy ivi_controller_surface">
229                 Request to destroy the ivi_controller_surface. If argument
230                 destroy_scene_object id not 0, the surface will be destroyed in
231                 ivi compositor. If argument is 0, only the proxy object is destroyed.
232             </description>
233             <arg name="destroy_scene_object" type="int"/>
234         </request>
235
236         <event name="destroyed">
237             <description summary="ivi_controller_surface was destroyed"/>
238         </event>
239
240         <enum name="content_state">
241             <description summary="all possible states of content for a surface">
242                 This enum defines all possible content states of a surface. This is
243                 required, since surfaces in ivi compositor can exist without applications
244                 providing content for them.
245             </description>
246             <entry name="content_available" value="1"
247                    summary="application provided wl_surface for this surface"/>
248             <entry name="content_removed" value="2"
249                    summary="wl_surface was removed for this surface"/>
250         </enum>
251
252         <event name="content">
253             <description summary="content state for surface has changed">
254                 Surfaces in ivi compositor can exist without any application or controller
255                 referencing it. All surfaces initially have no content. This event indicates
256                 when content state has changed. All possible content states are defined
257                 in enum content_state.
258             </description>
259             <arg name="content_state" type="int"/>
260         </event>
261
262         <request name="set_input_focus">
263             <description summary="set input focus to this surface">
264                 Set input focus state of surface in ivi compositor. If the surface has input
265                 focus, all non-graphical inputs (e.g. keyboard) are directed to the application
266                 providing the content for this surface.
267                 Only one surface can have input focus at a time, so if input focus is enabled
268                 for one surface, any other surface with input focus will loose focus.
269                 If argument enabled is 0, the input focus from this surface is removed, no
270                 surface will have input focus.
271                 If argument enabled is not 0, input focus for this surface is enabled.
272             </description>
273             <arg name="device" type="uint"/>
274             <arg name="enabled" type="int"/>
275         </request>
276
277         <event name="input_focus">
278             <description summary="input focus of surface in ivi compositor has changed">
279                 The new input focus state is provided in argument enabled: If enabled is 0,
280                 this surface has no longer the input focus. If enbaled is not 0, this surface
281                 now has input focus enabled.
282             </description>
283             <arg name="device" type="uint"/>
284             <arg name="enabled" type="int"/>
285         </event>
286
287         <enum name="input_device">
288             <description summary="brief Identifier of different input device types. Can be used as a bitmask.">
289             </description>
290             <entry name="keyboard" value="0x1"/>
291             <entry name="pointer" value="0x2"/>
292             <entry name="touch" value="0x4"/>
293             <entry name="all" value="~0x0"/>
294         </enum>
295
296     </interface>
297
298     <interface name="ivi_controller_layer" version="1">
299         <description summary="controller interface to layer in ivi compositor"/>
300
301         <request name="set_visibility">
302             <description summary="set visibility of layer in ivi compositor">
303                 If visibility argument is 0, the layer in the ivi compositor is set to invisible.
304                 If visibility argument is not 0, the layer in the ivi compositor is set to visible.
305             </description>
306             <arg name="visibility" type="uint"/>
307         </request>
308
309         <request name="set_opacity">
310             <description summary="set opacity of layer in ivi compositor">
311                 The valid range for opacity is 0.0 (fully transparent) to 1.0 (fully opaque).
312             </description>
313             <arg name="opacity" type="fixed"/>
314         </request>
315
316         <request name="set_source_rectangle">
317             <description summary="set the scanout area of a layer in ivi compositor">
318                 The source rectangle defines the part of the layer content, that is used for
319                 compositing the screen. It can be used, if valid content of the layer is smaller
320                 than the layer. Effectively it can be used to zoom the content of the layer.
321                 x:      horizontal start position of scanout area within the layer
322                 y:      vertical start position of scanout area within the layer
323                 width:  width of scanout area within the layer
324                 height: height of scanout area within the layer
325             </description>
326             <arg name="x" type="int"/>
327             <arg name="y" type="int"/>
328             <arg name="width" type="int"/>
329             <arg name="height" type="int"/>
330         </request>
331
332         <request name="set_destination_rectangle">
333            <description summary="Set the destination area of a layer within a screen">
334                 The destination rectangle defines the position and size of a layer on a screen.
335                 The layer will be scaled to this rectangle for rendering.
336                 x:      horizontal start position of layer within the screen
337                 y:      vertical start position of layer within the screen
338                 width : width of surface within the screen
339                 height: height of surface within the screen
340             </description>
341             <arg name="x" type="int"/>
342             <arg name="y" type="int"/>
343             <arg name="width" type="int"/>
344             <arg name="height" type="int"/>
345         </request>
346
347         <request name="set_configuration">
348             <description summary="request new size for layer">
349                 Layers are created with an initial size, but they can be resized at runtime.
350                 This request changes the widht and height of a layer.
351             </description>
352             <arg name="width" type="int"/>
353             <arg name="height" type="int"/>
354         </request>
355
356         <request name="set_orientation">
357             <description summary="set the orientation of a layer in ivi compositor">
358                 The orientation of a layer in ivi compositor can be rotated in 90 degree steps,
359                 as defined in orientation enum.
360             </description>
361             <arg name="orientation" type="int"/>
362         </request>
363
364         <request name="screenshot">
365             <description summary="take screenshot of layer">
366                 Store a screenshot of the layer content in the file provided by argument filename.
367             </description>
368             <arg name="filename" type="string"/>
369         </request>
370
371         <request name="clear_surfaces">
372             <description summary="remove all surfaces from layer render order">
373                 A layer has no content assigned to itself, it is a container for surfaces.
374                 This request removes all surfaces from the layer render order.
375                 Note: the surfaces are not destroyed, they are just no longer contained by
376                 the layer.
377             </description>
378         </request>
379
380         <request name="add_surface">
381             <description summary="add a surface to layer render order at nearest z-position">
382                 A layer has no content assigned to itself, it is a container for surfaces.
383                 This request adds a surface to the topmost position of the layer render order.
384                 The added surface will cover all other surfaces of the layer.
385             </description>
386             <arg name="surface" type="object" interface="ivi_controller_surface"/>
387         </request>
388
389         <request name="remove_surface">
390             <description summary="remove a surface from layer render order">
391                 A layer has no content assigned to itself, it is a container for surfaces.
392                 This request removes one surfaces from the layer render order.
393                 Note: the surface is not destroyed, it is just no longer contained by
394                 the layer.
395             </description>
396             <arg name="surface" type="object" interface="ivi_controller_surface"/>
397         </request>
398
399         <request name="set_render_order">
400             <description summary="set render order of layer">
401                 A layer has no content assigned to itself, it is a container for surfaces.
402                 This request removes all surfaces from the layer render order and set a
403                 completely new render order.
404             </description>
405             <arg name="id_surfaces" type="array"/>
406         </request>
407
408         <event name="visibility">
409             <description summary="the visibility of the layer in ivi compositor has changed">
410                 The new visibility state is provided in argument visibility.
411                 If visibility is 0, the layer has become invisible.
412                 If visibility is not 0, the layer has become visible.
413             </description>
414             <arg name="visibility" type="int"/>
415         </event>
416
417         <event name="opacity">
418             <description summary="the opacity of layer in ivi compositor has changed">
419                 The new opacity state is provided in argument opacity.
420                 The valid range for opactiy is 0.0 (fully transparent) to 1.0 (fully opaque).
421             </description>
422             <arg name="opacity" type="fixed"/>
423         </event>
424
425         <event name="source_rectangle">
426             <description summary="the source rectangle of layer in ivi compositor has changed">
427                 The scanout region of the layer content has changed.
428                 The new values for source rectangle are provided by
429                 x:      new horizontal start position of scanout area within the layer
430                 y:      new vertical start position of scanout area within the layer
431                 width:  new width of scanout area within the layer
432                 height: new height of scanout area within the layer
433             </description>
434             <arg name="x" type="int"/>
435             <arg name="y" type="int"/>
436             <arg name="width" type="int"/>
437             <arg name="height" type="int"/>
438         </event>
439
440         <event name="destination_rectangle">
441             <description summary="the destination rectangle of layer in ivi compositor has changed">
442                 The new values for source rectangle are provided by
443                 x:      new horizontal start position of layer within the screen
444                 y:      new vertical start position of layer within the screen
445                 width : new width of layer within the screen
446                 height: new height of layer within the screen
447             </description>
448             <arg name="x" type="int"/>
449             <arg name="y" type="int"/>
450             <arg name="width" type="int"/>
451             <arg name="height" type="int"/>
452         </event>
453
454         <event name="configuration">
455             <description summary="the configuration of layer in ivi compositor has changed">
456                 The layer was resized. The new layer size is provided by arguments
457                 width and height.
458             </description>
459             <arg name="width" type="int"/>
460             <arg name="height" type="int"/>
461         </event>
462
463         <event name="orientation">
464             <description summary="the orientation of layer in ivi compositor has changed">
465                 The new orientation status is provided by argument orientation.
466             </description>
467             <arg name="orientation" type="int"/>
468         </event>
469
470         <event name="screen">
471             <description summary="layer in ivi compositor was added to a screen">
472                 This layer was added to the render order of the screen defined by argument screen.
473                 This is essential for a layer to become visible on screen, since ivi compositors
474                 will only render screens (or more precise all layers in the render order of a screen).
475             </description>
476             <arg name="screen" type="object" interface="wl_output" allow-null="true"/>
477         </event>
478
479         <request name="destroy" type="destructor">
480             <description summary="destroy ivi_controller_layer">
481                 Request to destroy the ivi_controller_layer. If argument
482                 destroy_scene_object id not 0, the layer will be destroyed in
483                 ivi compositor. If argument is 0, only the proxy object is destroyed.
484             </description>
485             <arg name="destroy_scene_object" type="int"/>
486         </request>
487
488         <event name="destroyed">
489             <description summary="destroyed layer event"/>
490         </event>
491
492     </interface>
493
494     <interface name="ivi_controller_screen" version="1">
495         <description summary="controller interface to screen in ivi compositor"/>
496
497         <request name="destroy" type="destructor">
498             <description summary="destroy ivi_controller_screen"/>
499         </request>
500
501         <request name="clear">
502             <description summary="remove all layers from screen render order">
503                 A screen has no content assigned to itself, it is a container for layers.
504                 This request removes all layers from the screen render order.
505                 Note: the layers are not destroyed, they are just no longer contained by
506                 the screen.
507             </description>
508         </request>
509
510         <request name="add_layer">
511             <description summary="add a layer to screen render order at nearest z-position">
512                 A screen has no content assigned to itself, it is a container for layers.
513                 This request adds a layers to the topmost position of the screen render order.
514                 The added layer will cover all other layers of the screen.
515             </description>
516             <arg name="layer" type="object" interface="ivi_controller_layer"/>
517         </request>
518
519         <request name="screenshot">
520             <description summary="take screenshot of screen">
521                 Store a screenshot of the screen content in the file provided by argument filename.
522             </description>
523             <arg name="filename" type="string"/>
524         </request>
525
526         <request name="set_render_order">
527             <description summary="set render order of screen">
528                 A screen has no content assigned to itself, it is a container for layers.
529                 This request removes all layers from the screen render order and set a
530                 completely new render order.
531             </description>
532             <arg name="id_layers" type="array"/>
533         </request>
534
535     </interface>
536
537     <interface name="ivi_controller" version="1">
538         <description summary="interface for ivi controllers to use ivi compositor features"/>
539
540         <request name="commit_changes">
541             <description summary="commit all changes requested by client">
542                 All requests are not applied directly to scene object, so a controller
543                 can set different properties and apply the changes all at once.
544                 Note: there's an exception to this. Creation and destruction of
545                 scene objects is executed immediately.
546             </description>
547         </request>
548
549         <event name="screen">
550             <description summary="new screen is available">
551                 A new screen is announced to the controller. This is typically
552                 the case in two cases:
553                     1. controller was just started, ivi compositor announces existing screen
554                     2. a new screen was added to the system at runtime
555             </description>
556             <arg name="id_screen" type="uint"/>
557             <arg name="screen" type="new_id" interface="ivi_controller_screen"/>
558         </event>
559
560         <request name="layer_create">
561             <description summary="create layer in ivi compositor">
562                 layer_create will create a new layer with id_layer in ivi compositor,
563                 if it does not yet exists. If the layer with id_layer already exists in
564                 ivi compositor, a handle to the existing layer is returned and width and
565                 height properties are ignored.
566             </description>
567             <arg name="id_layer" type="uint"/>
568             <arg name="width" type="int"/>
569             <arg name="height" type="int"/>
570             <arg name="id" type="new_id" interface="ivi_controller_layer"/>
571         </request>
572
573         <event name="layer">
574             <description summary="new layer is available">
575                 A new layer is announced to the controller.
576             </description>
577             <arg name="id_layer" type="uint"/>
578         </event>
579
580         <request name="surface_create">
581             <description summary="create surface in ivi compositor">
582                 surface_create will create a new surface with id_surface in ivi compositor,
583                 if it does not yet exists. If the surface with id_surface already exists in
584                 ivi compositor, a handle to the existing surface is returned.
585             </description>
586             <arg name="id_surface" type="uint"/>
587             <arg name="id" type="new_id" interface="ivi_controller_surface"/>
588         </request>
589
590         <event name="surface">
591             <description summary="new surface is available">
592                 A new surface is announced to the controller.
593             </description>
594             <arg name="id_surface" type="uint"/>
595         </event>
596
597         <enum name="object_type">
598             <description summary="available object types in ivi compositor scene">
599                 This enum defines all scene object available in ivi compositor.
600             </description>
601             <entry name="surface" value="1" summary="surface object type"/>
602             <entry name="layer"   value="2" summary="layer object type"/>
603             <entry name="screen"  value="3" summary="screen object type"/>
604         </enum>
605
606         <enum name="error_code">
607             <description summary="possible error codes returned in error event">
608                 These error codes define all possible error codes returned by ivi compositor
609                 on server-side errors.
610             </description>
611             <entry name="unknown_error" value="1" summary="unknown error encountered"/>
612             <entry name="file_error"    value="2" summary="file i/o error encountered"/>
613         </enum>
614
615         <event name="error">
616             <description summary="server-side error detected">
617                 The ivi compositor encountered error while processing a request by this
618                 controller. The error is defined by argument error_code and optional
619                 error_text. Additionally the object type and id is contained in the error
620                 event to provide some detailes to handle the error.
621                 If the controller requires to associate this error event to a request,
622                 it can
623                     1. send request
624                     2. force display roundtrip
625                     3. check, if error event was received
626                  but this restricts the controller to have only one open request at a time.
627             </description>
628             <arg name="object_id" type="int"/>
629             <arg name="object_type" type="int"/>
630             <arg name="error_code" type="int"/>
631             <arg name="error_text" type="string" allow-null="true"/>
632         </event>
633
634     </interface>
635
636 </protocol>
637