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"/>
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.
273 <arg name="enabled" type="int"/>
276 <event name="input_focus">
277 <description summary="input focus of surface in ivi compositor has changed">
278 The new input focus state is provided in argument enabled: If enabled is 0,
279 this surface has no longer the input focus. If enbaled is not 0, this surface
280 now has input focus enabled.
282 <arg name="enabled" type="int"/>
287 <interface name="ivi_controller_layer" version="1">
288 <description summary="controller interface to layer in ivi compositor"/>
290 <request name="set_visibility">
291 <description summary="set visibility of layer in ivi compositor">
292 If visibility argument is 0, the layer in the ivi compositor is set to invisible.
293 If visibility argument is not 0, the layer in the ivi compositor is set to visible.
295 <arg name="visibility" type="uint"/>
298 <request name="set_opacity">
299 <description summary="set opacity of layer in ivi compositor">
300 The valid range for opacity is 0.0 (fully transparent) to 1.0 (fully opaque).
302 <arg name="opacity" type="fixed"/>
305 <request name="set_source_rectangle">
306 <description summary="set the scanout area of a layer in ivi compositor">
307 The source rectangle defines the part of the layer content, that is used for
308 compositing the screen. It can be used, if valid content of the layer is smaller
309 than the layer. Effectively it can be used to zoom the content of the layer.
310 x: horizontal start position of scanout area within the layer
311 y: vertical start position of scanout area within the layer
312 width: width of scanout area within the layer
313 height: height of scanout area within the layer
315 <arg name="x" type="int"/>
316 <arg name="y" type="int"/>
317 <arg name="width" type="int"/>
318 <arg name="height" type="int"/>
321 <request name="set_destination_rectangle">
322 <description summary="Set the destination area of a layer within a screen">
323 The destination rectangle defines the position and size of a layer on a screen.
324 The layer will be scaled to this rectangle for rendering.
325 x: horizontal start position of layer within the screen
326 y: vertical start position of layer within the screen
327 width : width of surface within the screen
328 height: height of surface within the screen
330 <arg name="x" type="int"/>
331 <arg name="y" type="int"/>
332 <arg name="width" type="int"/>
333 <arg name="height" type="int"/>
336 <request name="set_configuration">
337 <description summary="request new size for layer">
338 Layers are created with an initial size, but they can be resized at runtime.
339 This request changes the widht and height of a layer.
341 <arg name="width" type="int"/>
342 <arg name="height" type="int"/>
345 <request name="set_orientation">
346 <description summary="set the orientation of a layer in ivi compositor">
347 The orientation of a layer in ivi compositor can be rotated in 90 degree steps,
348 as defined in orientation enum.
350 <arg name="orientation" type="int"/>
353 <request name="screenshot">
354 <description summary="take screenshot of layer">
355 Store a screenshot of the layer content in the file provided by argument filename.
357 <arg name="filename" type="string"/>
360 <request name="clear_surfaces">
361 <description summary="remove all surfaces from layer render order">
362 A layer has no content assigned to itself, it is a container for surfaces.
363 This request removes all surfaces from the layer render order.
364 Note: the surfaces are not destroyed, they are just no longer contained by
369 <request name="add_surface">
370 <description summary="add a surface to layer render order at nearest z-position">
371 A layer has no content assigned to itself, it is a container for surfaces.
372 This request adds a surface to the topmost position of the layer render order.
373 The added surface will cover all other surfaces of the layer.
375 <arg name="surface" type="object" interface="ivi_controller_surface"/>
378 <request name="remove_surface">
379 <description summary="remove a surface from layer render order">
380 A layer has no content assigned to itself, it is a container for surfaces.
381 This request removes one surfaces from the layer render order.
382 Note: the surface is not destroyed, it is just no longer contained by
385 <arg name="surface" type="object" interface="ivi_controller_surface"/>
388 <request name="set_render_order">
389 <description summary="set render order of layer">
390 A layer has no content assigned to itself, it is a container for surfaces.
391 This request removes all surfaces from the layer render order and set a
392 completely new render order.
394 <arg name="id_surfaces" type="array"/>
397 <event name="visibility">
398 <description summary="the visibility of the layer in ivi compositor has changed">
399 The new visibility state is provided in argument visibility.
400 If visibility is 0, the layer has become invisible.
401 If visibility is not 0, the layer has become visible.
403 <arg name="visibility" type="int"/>
406 <event name="opacity">
407 <description summary="the opacity of layer in ivi compositor has changed">
408 The new opacity state is provided in argument opacity.
409 The valid range for opactiy is 0.0 (fully transparent) to 1.0 (fully opaque).
411 <arg name="opacity" type="fixed"/>
414 <event name="source_rectangle">
415 <description summary="the source rectangle of layer in ivi compositor has changed">
416 The scanout region of the layer content has changed.
417 The new values for source rectangle are provided by
418 x: new horizontal start position of scanout area within the layer
419 y: new vertical start position of scanout area within the layer
420 width: new width of scanout area within the layer
421 height: new height of scanout area within the layer
423 <arg name="x" type="int"/>
424 <arg name="y" type="int"/>
425 <arg name="width" type="int"/>
426 <arg name="height" type="int"/>
429 <event name="destination_rectangle">
430 <description summary="the destination rectangle of layer in ivi compositor has changed">
431 The new values for source rectangle are provided by
432 x: new horizontal start position of layer within the screen
433 y: new vertical start position of layer within the screen
434 width : new width of layer within the screen
435 height: new height of layer within the screen
437 <arg name="x" type="int"/>
438 <arg name="y" type="int"/>
439 <arg name="width" type="int"/>
440 <arg name="height" type="int"/>
443 <event name="configuration">
444 <description summary="the configuration of layer in ivi compositor has changed">
445 The layer was resized. The new layer size is provided by arguments
448 <arg name="width" type="int"/>
449 <arg name="height" type="int"/>
452 <event name="orientation">
453 <description summary="the orientation of layer in ivi compositor has changed">
454 The new orientation status is provided by argument orientation.
456 <arg name="orientation" type="int"/>
459 <event name="screen">
460 <description summary="layer in ivi compositor was added to a screen">
461 This layer was added to the render order of the screen defined by argument screen.
462 This is essential for a layer to become visible on screen, since ivi compositors
463 will only render screens (or more precise all layers in the render order of a screen).
465 <arg name="screen" type="object" interface="wl_output" allow-null="true"/>
468 <request name="destroy" type="destructor">
469 <description summary="destroy ivi_controller_layer">
470 Request to destroy the ivi_controller_layer. If argument
471 destroy_scene_object id not 0, the layer will be destroyed in
472 ivi compositor. If argument is 0, only the proxy object is destroyed.
474 <arg name="destroy_scene_object" type="int"/>
477 <event name="destroyed">
478 <description summary="destroyed layer event"/>
483 <interface name="ivi_controller_screen" version="1">
484 <description summary="controller interface to screen in ivi compositor"/>
486 <request name="destroy" type="destructor">
487 <description summary="destroy ivi_controller_screen"/>
490 <request name="clear">
491 <description summary="remove all layers from screen render order">
492 A screen has no content assigned to itself, it is a container for layers.
493 This request removes all layers from the screen render order.
494 Note: the layers are not destroyed, they are just no longer contained by
499 <request name="add_layer">
500 <description summary="add a layer to screen render order at nearest z-position">
501 A screen has no content assigned to itself, it is a container for layers.
502 This request adds a layers to the topmost position of the screen render order.
503 The added layer will cover all other layers of the screen.
505 <arg name="layer" type="object" interface="ivi_controller_layer"/>
508 <request name="screenshot">
509 <description summary="take screenshot of screen">
510 Store a screenshot of the screen content in the file provided by argument filename.
512 <arg name="filename" type="string"/>
515 <request name="set_render_order">
516 <description summary="set render order of screen">
517 A screen has no content assigned to itself, it is a container for layers.
518 This request removes all layers from the screen render order and set a
519 completely new render order.
521 <arg name="id_layers" type="array"/>
526 <interface name="ivi_controller" version="1">
527 <description summary="interface for ivi controllers to use ivi compositor features"/>
529 <request name="commit_changes">
530 <description summary="commit all changes requested by client">
531 All requests are not applied directly to scene object, so a controller
532 can set different properties and apply the changes all at once.
533 Note: there's an exception to this. Creation and destruction of
534 scene objects is executed immediately.
538 <event name="screen">
539 <description summary="new screen is available">
540 A new screen is announced to the controller. This is typically
541 the case in two cases:
542 1. controller was just started, ivi compositor announces existing screen
543 2. a new screen was added to the system at runtime
545 <arg name="id_screen" type="uint"/>
546 <arg name="screen" type="new_id" interface="ivi_controller_screen"/>
549 <request name="layer_create">
550 <description summary="create layer in ivi compositor">
551 layer_create will create a new layer with id_layer in ivi compositor,
552 if it does not yet exists. If the layer with id_layer already exists in
553 ivi compositor, a handle to the existing layer is returned and width and
554 height properties are ignored.
556 <arg name="id_layer" type="uint"/>
557 <arg name="width" type="int"/>
558 <arg name="height" type="int"/>
559 <arg name="id" type="new_id" interface="ivi_controller_layer"/>
563 <description summary="new layer is available">
564 A new layer is announced to the controller.
566 <arg name="id_layer" type="uint"/>
569 <request name="surface_create">
570 <description summary="create surface in ivi compositor">
571 surface_create will create a new surface with id_surface in ivi compositor,
572 if it does not yet exists. If the surface with id_surface already exists in
573 ivi compositor, a handle to the existing surface is returned.
575 <arg name="id_surface" type="uint"/>
576 <arg name="id" type="new_id" interface="ivi_controller_surface"/>
579 <event name="surface">
580 <description summary="new surface is available">
581 A new surface is announced to the controller.
583 <arg name="id_surface" type="uint"/>
586 <enum name="object_type">
587 <description summary="available object types in ivi compositor scene">
588 This enum defines all scene object available in ivi compositor.
590 <entry name="surface" value="1" summary="surface object type"/>
591 <entry name="layer" value="2" summary="layer object type"/>
592 <entry name="screen" value="3" summary="screen object type"/>
595 <enum name="error_code">
596 <description summary="possible error codes returned in error event">
597 These error codes define all possible error codes returned by ivi compositor
598 on server-side errors.
600 <entry name="unknown_error" value="1" summary="unknown error encountered"/>
601 <entry name="file_error" value="2" summary="file i/o error encountered"/>
605 <description summary="server-side error detected">
606 The ivi compositor encountered error while processing a request by this
607 controller. The error is defined by argument error_code and optional
608 error_text. Additionally the object type and id is contained in the error
609 event to provide some detailes to handle the error.
610 If the controller requires to associate this error event to a request,
613 2. force display roundtrip
614 3. check, if error event was received
615 but this restricts the controller to have only one open request at a time.
617 <arg name="object_id" type="int"/>
618 <arg name="object_type" type="int"/>
619 <arg name="error_code" type="int"/>
620 <arg name="error_text" type="string" allow-null="true"/>