1 <?xml version="1.0" encoding="UTF-8"?>
2 <protocol name="ivi_controller">
5 Copyright (C) 2013 DENSO CORPORATION
6 Copyright (c) 2013 BMW Car IT GmbH
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:
15 The above copyright notice and this permission notice shall be included in
16 all copies or substantial portions of the Software.
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
27 <interface name="ivi_controller_surface" version="1">
28 <description summary="controller interface to surface in ivi compositor"/>
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.
35 <arg name="visibility" type="uint"/>
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).
42 <arg name="opacity" type="fixed"/>
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
55 <arg name="x" type="int"/>
56 <arg name="y" type="int"/>
57 <arg name="width" type="int"/>
58 <arg name="height" type="int"/>
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
70 <arg name="x" type="int"/>
71 <arg name="y" type="int"/>
72 <arg name="width" type="int"/>
73 <arg name="height" type="int"/>
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.
81 <arg name="width" type="int"/>
82 <arg name="height" type="int"/>
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.
90 <arg name="orientation" type="int"/>
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.
97 <arg name="filename" type="string"/>
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.
106 <arg name="visibility" type="int"/>
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).
114 <arg name="opacity" type="fixed"/>
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
126 <arg name="x" type="int"/>
127 <arg name="y" type="int"/>
128 <arg name="width" type="int"/>
129 <arg name="height" type="int"/>
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
140 <arg name="x" type="int"/>
141 <arg name="y" type="int"/>
142 <arg name="width" type="int"/>
143 <arg name="height" type="int"/>
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
152 <arg name="width" type="int"/>
153 <arg name="height" type="int"/>
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.
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"/>
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.
171 <arg name="orientation" type="int"/>
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.
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"/>
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.
196 <arg name="pixelformat" type="int"/>
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).
205 <arg name="layer" type="object" interface="ivi_controller_layer" allow-null="true"/>
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
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.
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"/>
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.
233 <arg name="destroy_scene_object" type="int"/>
236 <event name="destroyed">
237 <description summary="ivi_controller_surface was destroyed"/>
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.
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"/>
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.
259 <arg name="content_state" type="int"/>
264 <interface name="ivi_controller_layer" version="1">
265 <description summary="controller interface to layer in ivi compositor"/>
267 <request name="set_visibility">
268 <description summary="set visibility of layer in ivi compositor">
269 If visibility argument is 0, the layer in the ivi compositor is set to invisible.
270 If visibility argument is not 0, the layer in the ivi compositor is set to visible.
272 <arg name="visibility" type="uint"/>
275 <request name="set_opacity">
276 <description summary="set opacity of layer in ivi compositor">
277 The valid range for opacity is 0.0 (fully transparent) to 1.0 (fully opaque).
279 <arg name="opacity" type="fixed"/>
282 <request name="set_source_rectangle">
283 <description summary="set the scanout area of a layer in ivi compositor">
284 The source rectangle defines the part of the layer content, that is used for
285 compositing the screen. It can be used, if valid content of the layer is smaller
286 than the layer. Effectively it can be used to zoom the content of the layer.
287 x: horizontal start position of scanout area within the layer
288 y: vertical start position of scanout area within the layer
289 width: width of scanout area within the layer
290 height: height of scanout area within the layer
292 <arg name="x" type="int"/>
293 <arg name="y" type="int"/>
294 <arg name="width" type="int"/>
295 <arg name="height" type="int"/>
298 <request name="set_destination_rectangle">
299 <description summary="Set the destination area of a layer within a screen">
300 The destination rectangle defines the position and size of a layer on a screen.
301 The layer will be scaled to this rectangle for rendering.
302 x: horizontal start position of layer within the screen
303 y: vertical start position of layer within the screen
304 width : width of surface within the screen
305 height: height of surface within the screen
307 <arg name="x" type="int"/>
308 <arg name="y" type="int"/>
309 <arg name="width" type="int"/>
310 <arg name="height" type="int"/>
313 <request name="set_configuration">
314 <description summary="request new size for layer">
315 Layers are created with an initial size, but they can be resized at runtime.
316 This request changes the widht and height of a layer.
318 <arg name="width" type="int"/>
319 <arg name="height" type="int"/>
322 <request name="set_orientation">
323 <description summary="set the orientation of a layer in ivi compositor">
324 The orientation of a layer in ivi compositor can be rotated in 90 degree steps,
325 as defined in orientation enum.
327 <arg name="orientation" type="int"/>
330 <request name="screenshot">
331 <description summary="take screenshot of layer">
332 Store a screenshot of the layer content in the file provided by argument filename.
334 <arg name="filename" type="string"/>
337 <request name="clear_surfaces">
338 <description summary="remove all surfaces from layer render order">
339 A layer has no content assigned to itself, it is a container for surfaces.
340 This request removes all surfaces from the layer render order.
341 Note: the surfaces are not destroyed, they are just no longer contained by
346 <request name="add_surface">
347 <description summary="add a surface to layer render order at nearest z-position">
348 A layer has no content assigned to itself, it is a container for surfaces.
349 This request adds a surface to the topmost position of the layer render order.
350 The added surface will cover all other surfaces of the layer.
352 <arg name="surface" type="object" interface="ivi_controller_surface"/>
355 <request name="remove_surface">
356 <description summary="remove a surface from layer render order">
357 A layer has no content assigned to itself, it is a container for surfaces.
358 This request removes one surfaces from the layer render order.
359 Note: the surface is not destroyed, it is just no longer contained by
362 <arg name="surface" type="object" interface="ivi_controller_surface"/>
365 <request name="set_render_order">
366 <description summary="set render order of layer">
367 A layer has no content assigned to itself, it is a container for surfaces.
368 This request removes all surfaces from the layer render order and set a
369 completely new render order.
371 <arg name="id_surfaces" type="array"/>
374 <event name="visibility">
375 <description summary="the visibility of the layer in ivi compositor has changed">
376 The new visibility state is provided in argument visibility.
377 If visibility is 0, the layer has become invisible.
378 If visibility is not 0, the layer has become visible.
380 <arg name="visibility" type="int"/>
383 <event name="opacity">
384 <description summary="the opacity of layer in ivi compositor has changed">
385 The new opacity state is provided in argument opacity.
386 The valid range for opactiy is 0.0 (fully transparent) to 1.0 (fully opaque).
388 <arg name="opacity" type="fixed"/>
391 <event name="source_rectangle">
392 <description summary="the source rectangle of layer in ivi compositor has changed">
393 The scanout region of the layer content has changed.
394 The new values for source rectangle are provided by
395 x: new horizontal start position of scanout area within the layer
396 y: new vertical start position of scanout area within the layer
397 width: new width of scanout area within the layer
398 height: new height of scanout area within the layer
400 <arg name="x" type="int"/>
401 <arg name="y" type="int"/>
402 <arg name="width" type="int"/>
403 <arg name="height" type="int"/>
406 <event name="destination_rectangle">
407 <description summary="the destination rectangle of layer in ivi compositor has changed">
408 The new values for source rectangle are provided by
409 x: new horizontal start position of layer within the screen
410 y: new vertical start position of layer within the screen
411 width : new width of layer within the screen
412 height: new height of layer within the screen
414 <arg name="x" type="int"/>
415 <arg name="y" type="int"/>
416 <arg name="width" type="int"/>
417 <arg name="height" type="int"/>
420 <event name="configuration">
421 <description summary="the configuration of layer in ivi compositor has changed">
422 The layer was resized. The new layer size is provided by arguments
425 <arg name="width" type="int"/>
426 <arg name="height" type="int"/>
429 <event name="orientation">
430 <description summary="the orientation of layer in ivi compositor has changed">
431 The new orientation status is provided by argument orientation.
433 <arg name="orientation" type="int"/>
436 <event name="screen">
437 <description summary="layer in ivi compositor was added to a screen">
438 This layer was added to the render order of the screen defined by argument screen.
439 This is essential for a layer to become visible on screen, since ivi compositors
440 will only render screens (or more precise all layers in the render order of a screen).
442 <arg name="screen" type="object" interface="wl_output" allow-null="true"/>
445 <request name="destroy" type="destructor">
446 <description summary="destroy ivi_controller_layer">
447 Request to destroy the ivi_controller_layer. If argument
448 destroy_scene_object id not 0, the layer will be destroyed in
449 ivi compositor. If argument is 0, only the proxy object is destroyed.
451 <arg name="destroy_scene_object" type="int"/>
454 <event name="destroyed">
455 <description summary="destroyed layer event"/>
460 <interface name="ivi_controller_screen" version="1">
461 <description summary="controller interface to screen in ivi compositor"/>
463 <request name="destroy" type="destructor">
464 <description summary="destroy ivi_controller_screen"/>
467 <request name="clear">
468 <description summary="remove all layers from screen render order">
469 A screen has no content assigned to itself, it is a container for layers.
470 This request removes all layers from the screen render order.
471 Note: the layers are not destroyed, they are just no longer contained by
476 <request name="add_layer">
477 <description summary="add a layer to screen render order at nearest z-position">
478 A screen has no content assigned to itself, it is a container for layers.
479 This request adds a layers to the topmost position of the screen render order.
480 The added layer will cover all other layers of the screen.
482 <arg name="layer" type="object" interface="ivi_controller_layer"/>
485 <request name="screenshot">
486 <description summary="take screenshot of screen">
487 Store a screenshot of the screen content in the file provided by argument filename.
489 <arg name="filename" type="string"/>
492 <request name="set_render_order">
493 <description summary="set render order of screen">
494 A screen has no content assigned to itself, it is a container for layers.
495 This request removes all layers from the screen render order and set a
496 completely new render order.
498 <arg name="id_layers" type="array"/>
503 <interface name="ivi_controller" version="1">
504 <description summary="interface for ivi controllers to use ivi compositor features"/>
506 <request name="commit_changes">
507 <description summary="commit all changes requested by client">
508 All requests are not applied directly to scene object, so a controller
509 can set different properties and apply the changes all at once.
510 Note: there's an exception to this. Creation and destruction of
511 scene objects is executed immediately.
515 <event name="screen">
516 <description summary="new screen is available">
517 A new screen is announced to the controller. This is typically
518 the case in two cases:
519 1. controller was just started, ivi compositor announces existing screen
520 2. a new screen was added to the system at runtime
522 <arg name="id_screen" type="uint"/>
523 <arg name="screen" type="new_id" interface="ivi_controller_screen"/>
526 <request name="layer_create">
527 <description summary="create layer in ivi compositor">
528 layer_create will create a new layer with id_layer in ivi compositor,
529 if it does not yet exists. If the layer with id_layer already exists in
530 ivi compositor, a handle to the existing layer is returned and width and
531 height properties are ignored.
533 <arg name="id_layer" type="uint"/>
534 <arg name="width" type="int"/>
535 <arg name="height" type="int"/>
536 <arg name="id" type="new_id" interface="ivi_controller_layer"/>
540 <description summary="new layer is available">
541 A new layer is announced to the controller.
543 <arg name="id_layer" type="uint"/>
546 <request name="surface_create">
547 <description summary="create surface in ivi compositor">
548 surface_create will create a new surface with id_surface in ivi compositor,
549 if it does not yet exists. If the surface with id_surface already exists in
550 ivi compositor, a handle to the existing surface is returned.
552 <arg name="id_surface" type="uint"/>
553 <arg name="id" type="new_id" interface="ivi_controller_surface"/>
556 <event name="surface">
557 <description summary="new surface is available">
558 A new surface is announced to the controller.
560 <arg name="id_surface" type="uint"/>
563 <enum name="object_type">
564 <description summary="available object types in ivi compositor scene">
565 This enum defines all scene object available in ivi compositor.
567 <entry name="surface" value="1" summary="surface object type"/>
568 <entry name="layer" value="2" summary="layer object type"/>
569 <entry name="screen" value="3" summary="screen object type"/>
572 <enum name="error_code">
573 <description summary="possible error codes returned in error event">
574 These error codes define all possible error codes returned by ivi compositor
575 on server-side errors.
577 <entry name="unknown_error" value="1" summary="unknown error encountered"/>
578 <entry name="file_error" value="2" summary="file i/o error encountered"/>
582 <description summary="server-side error detected">
583 The ivi compositor encountered error while processing a request by this
584 controller. The error is defined by argument error_code and optional
585 error_text. Additionally the object type and id is contained in the error
586 event to provide some detailes to handle the error.
587 If the controller requires to associate this error event to a request,
590 2. force display roundtrip
591 3. check, if error event was received
592 but this restricts the controller to have only one open request at a time.
594 <arg name="object_id" type="int"/>
595 <arg name="object_type" type="int"/>
596 <arg name="error_code" type="int"/>
597 <arg name="error_text" type="string" allow-null="true"/>