1 /*
2 * Copyright (C) 2013 DENSO CORPORATION
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining
5 * a copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sublicense, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions:
11 *
12 * The above copyright notice and this permission notice (including the
13 * next paragraph) shall be included in all copies or substantial
14 * portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
20 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 * SOFTWARE.
24 */
25
26 /**
27 * The ivi-layout library supports API set of controlling properties of
28 * surface and layer which groups surfaces. A unique ID whose type is integer is
29 * required to create surface and layer. With the unique ID, surface and layer
30 * are identified to control them. The API set consists of APIs to control
31 * properties of surface and layers about the following:
32 * - visibility.
33 * - opacity.
34 * - clipping (x,y,width,height).
35 * - position and size of it to be displayed.
36 * - orientation per 90 degree.
37 * - add or remove surfaces to a layer.
38 * - order of surfaces/layers in layer/screen to be displayed.
39 * - commit to apply property changes.
40 * - notifications of property change.
41 *
42 * Management of surfaces and layers grouping these surfaces are common
43 * way in In-Vehicle Infotainment system, which integrate several domains
44 * in one system. A layer is allocated to a domain in order to control
45 * application surfaces grouped to the layer all together.
46 *
47 * This API and ABI follow following specifications.
48 * https://at.projects.genivi.org/wiki/display/PROJ/Wayland+IVI+Extension+Design
49 */
50
51 #ifndef _IVI_LAYOUT_EXPORT_H_
52 #define _IVI_LAYOUT_EXPORT_H_
53
54 #ifdef __cplusplus
55 extern "C" {
56 #endif /* __cplusplus */
57
58 #include <stdint.h>
59 #include <limits.h>
60
61 #include "stdbool.h"
62 #include <libweston/libweston.h>
63 #include <libweston/plugin-registry.h>
64
65 #define IVI_SUCCEEDED (0)
66 #define IVI_FAILED (-1)
67 #define IVI_INVALID_ID UINT_MAX
68
69
70 struct ivi_layout_layer;
71 struct ivi_layout_screen;
72 struct ivi_layout_surface;
73
74 struct ivi_layout_surface_properties
75 {
76 wl_fixed_t opacity;
77 int32_t source_x;
78 int32_t source_y;
79 int32_t source_width;
80 int32_t source_height;
81 int32_t start_x;
82 int32_t start_y;
83 int32_t start_width;
84 int32_t start_height;
85 int32_t dest_x;
86 int32_t dest_y;
87 int32_t dest_width;
88 int32_t dest_height;
89 enum wl_output_transform orientation;
90 bool visibility;
91 int32_t transition_type;
92 uint32_t transition_duration;
93 uint32_t event_mask;
94 };
95
96 struct ivi_layout_layer_properties
97 {
98 wl_fixed_t opacity;
99 int32_t source_x;
100 int32_t source_y;
101 int32_t source_width;
102 int32_t source_height;
103 int32_t dest_x;
104 int32_t dest_y;
105 int32_t dest_width;
106 int32_t dest_height;
107 enum wl_output_transform orientation;
108 bool visibility;
109 int32_t transition_type;
110 uint32_t transition_duration;
111 double start_alpha;
112 double end_alpha;
113 uint32_t is_fade_in;
114 uint32_t event_mask;
115 };
116
117 enum ivi_layout_notification_mask {
118 IVI_NOTIFICATION_NONE = 0,
119 IVI_NOTIFICATION_OPACITY = (1 << 1),
120 IVI_NOTIFICATION_SOURCE_RECT = (1 << 2),
121 IVI_NOTIFICATION_DEST_RECT = (1 << 3),
122 IVI_NOTIFICATION_DIMENSION = (1 << 4),
123 IVI_NOTIFICATION_POSITION = (1 << 5),
124 IVI_NOTIFICATION_ORIENTATION = (1 << 6),
125 IVI_NOTIFICATION_VISIBILITY = (1 << 7),
126 IVI_NOTIFICATION_PIXELFORMAT = (1 << 8),
127 IVI_NOTIFICATION_ADD = (1 << 9),
128 IVI_NOTIFICATION_REMOVE = (1 << 10),
129 IVI_NOTIFICATION_CONFIGURE = (1 << 11),
130 IVI_NOTIFICATION_ALL = 0xFFFF
131 };
132
133 enum ivi_layout_transition_type{
134 IVI_LAYOUT_TRANSITION_NONE,
135 IVI_LAYOUT_TRANSITION_VIEW_DEFAULT,
136 IVI_LAYOUT_TRANSITION_VIEW_DEST_RECT_ONLY,
137 IVI_LAYOUT_TRANSITION_VIEW_FADE_ONLY,
138 IVI_LAYOUT_TRANSITION_LAYER_FADE,
139 IVI_LAYOUT_TRANSITION_LAYER_MOVE,
140 IVI_LAYOUT_TRANSITION_LAYER_VIEW_ORDER,
141 IVI_LAYOUT_TRANSITION_VIEW_MOVE_RESIZE,
142 IVI_LAYOUT_TRANSITION_VIEW_RESIZE,
143 IVI_LAYOUT_TRANSITION_VIEW_FADE,
144 IVI_LAYOUT_TRANSITION_MAX,
145 };
146
147 #define IVI_LAYOUT_API_NAME "ivi_layout_api_v1"
148
149 struct ivi_layout_interface {
150
151 /**
152 * \brief Commit all changes and execute all enqueued commands since
153 * last commit.
154 *
155 * \return IVI_SUCCEEDED if the method call was successful
156 * \return IVI_FAILED if the method call was failed
157 */
158 int32_t (*commit_changes)(void);
159
160 /**
161 * surface controller interface
162 */
163
164 /**
165 * \brief add a listener for notification when ivi_surface is created
166 *
167 * When an ivi_surface is created, a signal is emitted
168 * to the listening controller plugins.
169 * The pointer of the created ivi_surface is sent as the void *data argument
170 * to the wl_listener::notify callback function of the listener.
171 */
172 int32_t (*add_listener_create_surface)(struct wl_listener *listener);
173
174 /**
175 * \brief add a listener for notification when ivi_surface is removed
176 *
177 * When an ivi_surface is removed, a signal is emitted
178 * to the listening controller plugins.
179 * The pointer of the removed ivi_surface is sent as the void *data argument
180 * to the wl_listener::notify callback function of the listener.
181 */
182 int32_t (*add_listener_remove_surface)(struct wl_listener *listener);
183
184 /**
185 * \brief add a listener for notification when ivi_surface is configured
186 *
187 * When an ivi_surface is configured, a signal is emitted
188 * to the listening controller plugins.
189 * The pointer of the configured ivi_surface is sent as the void *data argument
190 * to the wl_listener::notify callback function of the listener.
191 */
192 int32_t (*add_listener_configure_surface)(struct wl_listener *listener);
193
194 /**
195 * \brief add a listener for notification when desktop_surface is configured
196 *
197 * When an desktop_surface is configured, a signal is emitted
198 * to the listening controller plugins.
199 * The pointer of the configured desktop_surface is sent as the void *data argument
200 * to the wl_listener::notify callback function of the listener.
201 */
202 int32_t (*add_listener_configure_desktop_surface)(struct wl_listener *listener);
203
204 /**
205 * \brief Get all ivi_surfaces which are currently registered and managed
206 * by the services
207 *
208 * \return IVI_SUCCEEDED if the method call was successful
209 * \return IVI_FAILED if the method call was failed
210 */
211 int32_t (*get_surfaces)(int32_t *pLength, struct ivi_layout_surface ***ppArray);
212
213 /**
214 * \brief get id of ivi_surface from ivi_layout_surface
215 *
216 * \return id of ivi_surface
217 */
218 uint32_t (*get_id_of_surface)(struct ivi_layout_surface *ivisurf);
219
220 /**
221 * \brief get ivi_layout_surface from id of ivi_surface
222 *
223 * \return (struct ivi_layout_surface *)
224 * if the method call was successful
225 * \return NULL if the method call was failed
226 */
227 struct ivi_layout_surface *
228 (*get_surface_from_id)(uint32_t id_surface);
229
230 /**
231 * \brief get ivi_layout_surface_properties from ivisurf
232 *
233 * \return (struct ivi_layout_surface_properties *)
234 * if the method call was successful
235 * \return NULL if the method call was failed
236 */
237 const struct ivi_layout_surface_properties *
238 (*get_properties_of_surface)(struct ivi_layout_surface *ivisurf);
239
240 /**
241 * \brief Get all Surfaces which are currently registered to a given
242 * layer and are managed by the services
243 *
244 * \return IVI_SUCCEEDED if the method call was successful
245 * \return IVI_FAILED if the method call was failed
246 */
247 int32_t (*get_surfaces_on_layer)(struct ivi_layout_layer *ivilayer,
248 int32_t *pLength,
249 struct ivi_layout_surface ***ppArray);
250
251 /**
252 * \brief Set the visibility of a ivi_surface.
253 *
254 * If a surface is not visible it will not be rendered.
255 *
256 * \return IVI_SUCCEEDED if the method call was successful
257 * \return IVI_FAILED if the method call was failed
258 */
259 int32_t (*surface_set_visibility)(struct ivi_layout_surface *ivisurf,
260 bool newVisibility);
261
262 /**
263 * \brief Set the opacity of a surface.
264 *
265 * \return IVI_SUCCEEDED if the method call was successful
266 * \return IVI_FAILED if the method call was failed
267 */
268 int32_t (*surface_set_opacity)(struct ivi_layout_surface *ivisurf,
269 wl_fixed_t opacity);
270
271 /**
272 * \brief Set the area of a ivi_surface which should be used for the rendering.
273 *
274 * \return IVI_SUCCEEDED if the method call was successful
275 * \return IVI_FAILED if the method call was failed
276 */
277 int32_t (*surface_set_source_rectangle)(struct ivi_layout_surface *ivisurf,
278 int32_t x, int32_t y,
279 int32_t width, int32_t height);
280
281 /**
282 * \brief Set the destination area of a ivi_surface within a ivi_layer
283 * for rendering.
284 *
285 * The surface will be scaled to this rectangle for rendering.
286 *
287 * \return IVI_SUCCEEDED if the method call was successful
288 * \return IVI_FAILED if the method call was failed
289 */
290 int32_t (*surface_set_destination_rectangle)(struct ivi_layout_surface *ivisurf,
291 int32_t x, int32_t y,
292 int32_t width, int32_t height);
293
294 /**
295 * \brief add a listener to listen property changes of ivi_surface
296 *
297 * When a property of the ivi_surface is changed, the property_changed
298 * signal is emitted to the listening controller plugins.
299 * The pointer of the ivi_surface is sent as the void *data argument
300 * to the wl_listener::notify callback function of the listener.
301 *
302 * \return IVI_SUCCEEDED if the method call was successful
303 * \return IVI_FAILED if the method call was failed
304 */
305 int32_t (*surface_add_listener)(struct ivi_layout_surface *ivisurf,
306 struct wl_listener *listener);
307
308 /**
309 * \brief get weston_surface of ivi_surface
310 */
311 struct weston_surface *
312 (*surface_get_weston_surface)(struct ivi_layout_surface *ivisurf);
313
314 /**
315 * \brief set type of transition animation
316 */
317 int32_t (*surface_set_transition)(struct ivi_layout_surface *ivisurf,
318 enum ivi_layout_transition_type type,
319 uint32_t duration);
320
321 /**
322 * \brief set duration of transition animation
323 */
324 int32_t (*surface_set_transition_duration)(
325 struct ivi_layout_surface *ivisurf,
326 uint32_t duration);
327
328 /**
329 * \brief set id of ivi_layout_surface
330 */
331 int32_t (*surface_set_id)(struct ivi_layout_surface *ivisurf,
332 uint32_t id_surface);
333
334 /**
335 * layer controller interface
336 */
337
338 /**
339 * \brief add a listener for notification when ivi_layer is created
340 *
341 * When an ivi_layer is created, a signal is emitted
342 * to the listening controller plugins.
343 * The pointer of the created ivi_layer is sent as the void *data argument
344 * to the wl_listener::notify callback function of the listener.
345 */
346 int32_t (*add_listener_create_layer)(struct wl_listener *listener);
347
348 /**
349 * \brief add a listener for notification when ivi_layer is removed
350 *
351 * When an ivi_layer is removed, a signal is emitted
352 * to the listening controller plugins.
353 * The pointer of the removed ivi_layer is sent as the void *data argument
354 * to the wl_listener::notify callback function of the listener.
355 */
356 int32_t (*add_listener_remove_layer)(struct wl_listener *listener);
357
358 /**
359 * \brief Create a ivi_layer which should be managed by the service
360 *
361 * \return (struct ivi_layout_layer *)
362 * if the method call was successful
363 * \return NULL if the method call was failed
364 */
365 struct ivi_layout_layer *
366 (*layer_create_with_dimension)(uint32_t id_layer,
367 int32_t width, int32_t height);
368
369 /**
370 * \brief Removes a ivi_layer which is currently managed by the service
371 */
372 void (*layer_destroy)(struct ivi_layout_layer *ivilayer);
373
374 /**
375 * \brief Get all ivi_layers which are currently registered and managed
376 * by the services
377 *
378 * \return IVI_SUCCEEDED if the method call was successful
379 * \return IVI_FAILED if the method call was failed
380 */
381 int32_t (*get_layers)(int32_t *pLength, struct ivi_layout_layer ***ppArray);
382
383 /**
384 * \brief get id of ivi_layer from ivi_layout_layer
385 *
386 *
387 * \return id of ivi_layer
388 */
389 uint32_t (*get_id_of_layer)(struct ivi_layout_layer *ivilayer);
390
391 /**
392 * \brief get ivi_layout_layer from id of layer
393 *
394 * \return (struct ivi_layout_layer *)
395 * if the method call was successful
396 * \return NULL if the method call was failed
397 */
398 struct ivi_layout_layer * (*get_layer_from_id)(uint32_t id_layer);
399
400 /**
401 * \brief Get the ivi_layer properties
402 *
403 * \return (const struct ivi_layout_layer_properties *)
404 * if the method call was successful
405 * \return NULL if the method call was failed
406 */
407 const struct ivi_layout_layer_properties *
408 (*get_properties_of_layer)(struct ivi_layout_layer *ivilayer);
409
410 /**
411 * \brief Get all ivi-layers under the given ivi-surface
412 *
413 * This means all the ivi-layers the ivi-surface was added to. It has
414 * no relation to geometric overlaps.
415 *
416 * \return IVI_SUCCEEDED if the method call was successful
417 * \return IVI_FAILED if the method call was failed
418 */
419 int32_t (*get_layers_under_surface)(struct ivi_layout_surface *ivisurf,
420 int32_t *pLength,
421 struct ivi_layout_layer ***ppArray);
422
423 /**
424 * \brief Get all Layers of the given weston_output
425 *
426 * \return IVI_SUCCEEDED if the method call was successful
427 * \return IVI_FAILED if the method call was failed
428 */
429 int32_t (*get_layers_on_screen)(struct weston_output *output,
430 int32_t *pLength,
431 struct ivi_layout_layer ***ppArray);
432
433 /**
434 * \brief Set the visibility of a ivi_layer. If a ivi_layer is not visible,
435 * the ivi_layer and its ivi_surfaces will not be rendered.
436 *
437 * \return IVI_SUCCEEDED if the method call was successful
438 * \return IVI_FAILED if the method call was failed
439 */
440 int32_t (*layer_set_visibility)(struct ivi_layout_layer *ivilayer,
441 bool newVisibility);
442
443 /**
444 * \brief Set the opacity of a ivi_layer.
445 *
446 * \return IVI_SUCCEEDED if the method call was successful
447 * \return IVI_FAILED if the method call was failed
448 */
449 int32_t (*layer_set_opacity)(struct ivi_layout_layer *ivilayer,
450 wl_fixed_t opacity);
451
452 /**
453 * \brief Set the area of a ivi_layer which should be used for the rendering.
454 *
455 * Only this part will be visible.
456 *
457 * \return IVI_SUCCEEDED if the method call was successful
458 * \return IVI_FAILED if the method call was failed
459 */
460 int32_t (*layer_set_source_rectangle)(struct ivi_layout_layer *ivilayer,
461 int32_t x, int32_t y,
462 int32_t width, int32_t height);
463
464 /**
465 * \brief Set the destination area on the display for a ivi_layer.
466 *
467 * The ivi_layer will be scaled and positioned to this rectangle
468 * for rendering
469 *
470 * \return IVI_SUCCEEDED if the method call was successful
471 * \return IVI_FAILED if the method call was failed
472 */
473 int32_t (*layer_set_destination_rectangle)(struct ivi_layout_layer *ivilayer,
474 int32_t x, int32_t y,
475 int32_t width, int32_t height);
476
477 /**
478 * \brief Add a ivi_surface to a ivi_layer which is currently managed by the service
479 *
480 * \return IVI_SUCCEEDED if the method call was successful
481 * \return IVI_FAILED if the method call was failed
482 */
483 int32_t (*layer_add_surface)(struct ivi_layout_layer *ivilayer,
484 struct ivi_layout_surface *addsurf);
485
486 /**
487 * \brief Removes a surface from a layer which is currently managed by the service
488 */
489 void (*layer_remove_surface)(struct ivi_layout_layer *ivilayer,
490 struct ivi_layout_surface *remsurf);
491
492 /**
493 * \brief Sets render order of ivi_surfaces within a ivi_layer
494 *
495 * \return IVI_SUCCEEDED if the method call was successful
496 * \return IVI_FAILED if the method call was failed
497 */
498 int32_t (*layer_set_render_order)(struct ivi_layout_layer *ivilayer,
499 struct ivi_layout_surface **pSurface,
500 int32_t number);
501
502 /**
503 * \brief add a listener to listen property changes of ivi_layer
504 *
505 * When a property of the ivi_layer is changed, the property_changed
506 * signal is emitted to the listening controller plugins.
507 * The pointer of the ivi_layer is sent as the void *data argument
508 * to the wl_listener::notify callback function of the listener.
509 *
510 * \return IVI_SUCCEEDED if the method call was successful
511 * \return IVI_FAILED if the method call was failed
512 */
513 int32_t (*layer_add_listener)(struct ivi_layout_layer *ivilayer,
514 struct wl_listener *listener);
515
516 /**
517 * \brief set type of transition animation
518 */
519 int32_t (*layer_set_transition)(struct ivi_layout_layer *ivilayer,
520 enum ivi_layout_transition_type type,
521 uint32_t duration);
522
523 /**
524 * screen controller interface
525 */
526
527 /**
528 * \brief Get the weston_outputs under the given ivi_layer
529 *
530 * \return IVI_SUCCEEDED if the method call was successful
531 * \return IVI_FAILED if the method call was failed
532 */
533 int32_t (*get_screens_under_layer)(struct ivi_layout_layer *ivilayer,
534 int32_t *pLength,
535 struct weston_output ***ppArray);
536
537 /**
538 * \brief Add a ivi_layer to a weston_output which is currently managed
539 * by the service
540 *
541 * \return IVI_SUCCEEDED if the method call was successful
542 * \return IVI_FAILED if the method call was failed
543 */
544 int32_t (*screen_add_layer)(struct weston_output *output,
545 struct ivi_layout_layer *addlayer);
546
547 /**
548 * \brief Sets render order of ivi_layers on a weston_output
549 *
550 * \return IVI_SUCCEEDED if the method call was successful
551 * \return IVI_FAILED if the method call was failed
552 */
553 int32_t (*screen_set_render_order)(struct weston_output *output,
554 struct ivi_layout_layer **pLayer,
555 const int32_t number);
556
557 /**
558 * transition animation for layer
559 */
560 void (*transition_move_layer_cancel)(struct ivi_layout_layer *layer);
561 int32_t (*layer_set_fade_info)(struct ivi_layout_layer* ivilayer,
562 uint32_t is_fade_in,
563 double start_alpha, double end_alpha);
564
565 /**
566 * surface content dumping for debugging
567 */
568 int32_t (*surface_get_size)(struct ivi_layout_surface *ivisurf,
569 int32_t *width, int32_t *height,
570 int32_t *stride);
571
572 int32_t (*surface_dump)(struct weston_surface *surface,
573 void *target, size_t size,
574 int32_t x, int32_t y,
575 int32_t width, int32_t height);
576
577 /**
578 * Returns the ivi_layout_surface or NULL
579 *
580 * NULL is returned if there is no ivi_layout_surface corresponding
581 * to the given weston_surface.
582 */
583 struct ivi_layout_surface *
584 (*get_surface)(struct weston_surface *surface);
585
586 /**
587 * \brief Remove a ivi_layer to a weston_output which is currently managed
588 * by the service
589 *
590 * \return IVI_SUCCEEDED if the method call was successful
591 * \return IVI_FAILED if the method call was failed
592 */
593 int32_t (*screen_remove_layer)(struct weston_output *output,
594 struct ivi_layout_layer *removelayer);
595 };
596
597 static inline const struct ivi_layout_interface *
ivi_layout_get_api(struct weston_compositor * compositor)598 ivi_layout_get_api(struct weston_compositor *compositor)
599 {
600 const void *api;
601 api = weston_plugin_api_get(compositor, IVI_LAYOUT_API_NAME,
602 sizeof(struct ivi_layout_interface));
603
604 return (const struct ivi_layout_interface *)api;
605 }
606
607 #define IVI_LAYOUT_API_NAME_FOR_WMS "ivi_layout_api_for_wms"
608
609 struct ivi_layout_interface_for_wms {
610
611 struct ivi_layout_surface*
612 (*surface_create)(struct weston_surface *wl_surface,
613 uint32_t id_surface);
614 void
615 (*surface_destroy)(struct ivi_layout_surface *ivisurf);
616
617 const struct ivi_layout_surface_properties *
618 (*get_properties_of_surface)(struct ivi_layout_surface *ivisurf);
619
620 int32_t (*surface_set_transition)(struct ivi_layout_surface *ivisurf,
621 enum ivi_layout_transition_type type,
622 uint32_t duration);
623
624 int32_t (*surface_set_destination_rectangle)(struct ivi_layout_surface *ivisurf,
625 int32_t x, int32_t y,
626 int32_t width, int32_t height);
627 int32_t (*surface_set_source_rectangle)(struct ivi_layout_surface *ivisurf,
628 int32_t x, int32_t y,
629 int32_t width, int32_t height);
630 int32_t (*surface_set_visibility)(struct ivi_layout_surface *ivisurf,
631 bool newVisibility);
632 int32_t (*commit_changes)(void);
633 struct ivi_layout_layer * (*get_layer_from_id)(uint32_t id_layer);
634 struct ivi_layout_layer *
635 (*layer_create_with_dimension)(uint32_t id_layer,
636 int32_t width, int32_t height);
637 int32_t (*screen_add_layer)(struct weston_output *output,
638 struct ivi_layout_layer *addlayer);
639 int32_t (*layer_add_surface)(struct ivi_layout_layer *ivilayer,
640 struct ivi_layout_surface *addsurf);
641 void (*layer_remove_surface)(struct ivi_layout_layer *ivilayer,
642 struct ivi_layout_surface *remsurf);
643 uint32_t (*surface_change_top)(struct ivi_layout_surface *ivisurf);
644 int32_t (*layer_set_visibility)(struct ivi_layout_layer *ivilayer,
645 bool newVisibility);
646 int32_t (*layer_set_source_rectangle)(struct ivi_layout_layer *ivilayer,
647 int32_t x, int32_t y,
648 int32_t width, int32_t height);
649 int32_t (*screen_clone)(const uint32_t screen_id_from,
650 const uint32_t screen_id_to);
651 int32_t (*screen_clear)(const uint32_t screen_id);
652 int32_t (*surface_set_force_refresh)(struct ivi_layout_surface *ivisurf);
653 int32_t (*get_surfaces_on_layer)(struct ivi_layout_layer *ivilayer,
654 int32_t *pLength,
655 struct ivi_layout_surface ***ppArray);
656 int32_t (*get_layers_on_screen)(struct weston_output *output,
657 int32_t *pLength,
658 struct ivi_layout_layer ***ppArray);
659 uint32_t (*get_id_of_layer)(struct ivi_layout_layer *ivilayer);
660 uint32_t (*get_id_of_surface)(struct ivi_layout_surface *ivisurf);
661 struct weston_output* (*create_virtual_screen)(int32_t x, int32_t y,
662 int32_t width, int32_t height);
663 int32_t (*destroy_virtual_screen)(uint32_t screen_id);
664
665 };
666
667 static inline const struct ivi_layout_interface_for_wms *
ivi_layout_get_api_for_wms(struct weston_compositor * compositor)668 ivi_layout_get_api_for_wms(struct weston_compositor *compositor)
669 {
670 const void *api;
671 api = weston_plugin_api_get(compositor, IVI_LAYOUT_API_NAME_FOR_WMS,
672 sizeof(struct ivi_layout_interface_for_wms));
673
674 return (const struct ivi_layout_interface_for_wms *)api;
675 }
676
677 #ifdef __cplusplus
678 }
679 #endif /* __cplusplus */
680
681 #endif /* _IVI_LAYOUT_EXPORT_H_ */
682