blob: e4edd3b4e61dfe72f6878af42d6d3e3dd9979ce5 [file] [log] [blame]
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +09001/*
2 * Copyright (C) 2013 DENSO CORPORATION
3 *
Bryce Harringtonaf637c22015-06-11 12:55:55 -07004 * 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:
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +090011 *
Bryce Harringtonaf637c22015-06-11 12:55:55 -070012 * 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.
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +090024 */
25
26/**
27 * The ivi-layout library supports API set of controlling properties of
28 * surface and layer which groups surfaces. An unique ID whose type is integer
29 * is required to create surface and layer. With the unique ID, surface and
30 * layer are identified to control them. The API set consists of APIs to control
31 * properties of surface and layers about followings,
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 * http://projects.genivi.org/wayland-ivi-extension/layer-manager-apis
49 */
50
51#ifndef _IVI_LAYOUT_EXPORT_H_
52#define _IVI_LAYOUT_EXPORT_H_
53
54#ifdef __cplusplus
55extern "C" {
56#endif /* __cplusplus */
57
58#include "stdbool.h"
59#include "compositor.h"
60
61#define IVI_SUCCEEDED (0)
62#define IVI_FAILED (-1)
63
64struct ivi_layout_layer;
65struct ivi_layout_screen;
66struct ivi_layout_surface;
67
68struct ivi_layout_surface_properties
69{
70 wl_fixed_t opacity;
71 int32_t source_x;
72 int32_t source_y;
73 int32_t source_width;
74 int32_t source_height;
75 int32_t start_x;
76 int32_t start_y;
77 int32_t start_width;
78 int32_t start_height;
79 int32_t dest_x;
80 int32_t dest_y;
81 int32_t dest_width;
82 int32_t dest_height;
83 enum wl_output_transform orientation;
84 bool visibility;
85 int32_t transition_type;
86 uint32_t transition_duration;
87};
88
89struct ivi_layout_layer_properties
90{
91 wl_fixed_t opacity;
92 int32_t source_x;
93 int32_t source_y;
94 int32_t source_width;
95 int32_t source_height;
96 int32_t dest_x;
97 int32_t dest_y;
98 int32_t dest_width;
99 int32_t dest_height;
100 enum wl_output_transform orientation;
101 uint32_t visibility;
102 int32_t transition_type;
103 uint32_t transition_duration;
104 double start_alpha;
105 double end_alpha;
106 uint32_t is_fade_in;
107};
108
109enum ivi_layout_notification_mask {
110 IVI_NOTIFICATION_NONE = 0,
111 IVI_NOTIFICATION_OPACITY = (1 << 1),
112 IVI_NOTIFICATION_SOURCE_RECT = (1 << 2),
113 IVI_NOTIFICATION_DEST_RECT = (1 << 3),
114 IVI_NOTIFICATION_DIMENSION = (1 << 4),
115 IVI_NOTIFICATION_POSITION = (1 << 5),
116 IVI_NOTIFICATION_ORIENTATION = (1 << 6),
117 IVI_NOTIFICATION_VISIBILITY = (1 << 7),
118 IVI_NOTIFICATION_PIXELFORMAT = (1 << 8),
119 IVI_NOTIFICATION_ADD = (1 << 9),
120 IVI_NOTIFICATION_REMOVE = (1 << 10),
121 IVI_NOTIFICATION_CONFIGURE = (1 << 11),
122 IVI_NOTIFICATION_ALL = 0xFFFF
123};
124
125enum ivi_layout_transition_type{
126 IVI_LAYOUT_TRANSITION_NONE,
127 IVI_LAYOUT_TRANSITION_VIEW_DEFAULT,
128 IVI_LAYOUT_TRANSITION_VIEW_DEST_RECT_ONLY,
129 IVI_LAYOUT_TRANSITION_VIEW_FADE_ONLY,
130 IVI_LAYOUT_TRANSITION_LAYER_FADE,
131 IVI_LAYOUT_TRANSITION_LAYER_MOVE,
132 IVI_LAYOUT_TRANSITION_LAYER_VIEW_ORDER,
133 IVI_LAYOUT_TRANSITION_VIEW_MOVE_RESIZE,
134 IVI_LAYOUT_TRANSITION_VIEW_RESIZE,
135 IVI_LAYOUT_TRANSITION_VIEW_FADE,
136 IVI_LAYOUT_TRANSITION_MAX,
137};
138
139typedef void (*layer_property_notification_func)(
140 struct ivi_layout_layer *ivilayer,
141 const struct ivi_layout_layer_properties *,
142 enum ivi_layout_notification_mask mask,
143 void *userdata);
144
145typedef void (*surface_property_notification_func)(
146 struct ivi_layout_surface *ivisurf,
147 const struct ivi_layout_surface_properties *,
148 enum ivi_layout_notification_mask mask,
149 void *userdata);
150
151typedef void (*layer_create_notification_func)(
152 struct ivi_layout_layer *ivilayer,
153 void *userdata);
154
155typedef void (*layer_remove_notification_func)(
156 struct ivi_layout_layer *ivilayer,
157 void *userdata);
158
159typedef void (*surface_create_notification_func)(
160 struct ivi_layout_surface *ivisurf,
161 void *userdata);
162
163typedef void (*surface_remove_notification_func)(
164 struct ivi_layout_surface *ivisurf,
165 void *userdata);
166
167typedef void (*surface_configure_notification_func)(
168 struct ivi_layout_surface *ivisurf,
169 void *userdata);
170
Ucan, Emre \(ADITG/SW1\)0c0e51e2015-10-15 14:51:41 +0000171struct ivi_layout_interface {
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900172
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900173 /**
174 * \brief Commit all changes and execute all enqueued commands since
175 * last commit.
176 *
177 * \return IVI_SUCCEEDED if the method call was successful
178 * \return IVI_FAILED if the method call was failed
179 */
180 int32_t (*commit_changes)(void);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900181
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900182 /**
183 * surface controller interface
184 */
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900185
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900186 /**
187 * \brief register/unregister for notification when ivi_surface is created
188 */
189 int32_t (*add_notification_create_surface)(
190 surface_create_notification_func callback,
191 void *userdata);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900192
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900193 void (*remove_notification_create_surface)(
194 surface_create_notification_func callback,
195 void *userdata);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900196
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900197 /**
198 * \brief register/unregister for notification when ivi_surface is removed
199 */
200 int32_t (*add_notification_remove_surface)(
201 surface_remove_notification_func callback,
202 void *userdata);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900203
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900204 void (*remove_notification_remove_surface)(
205 surface_remove_notification_func callback,
206 void *userdata);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900207
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900208 /**
209 * \brief register/unregister for notification when ivi_surface is configured
210 */
211 int32_t (*add_notification_configure_surface)(
212 surface_configure_notification_func callback,
213 void *userdata);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900214
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900215 void (*remove_notification_configure_surface)(
216 surface_configure_notification_func callback,
217 void *userdata);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900218
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900219 /**
220 * \brief Get all ivi_surfaces which are currently registered and managed
221 * by the services
222 *
223 * \return IVI_SUCCEEDED if the method call was successful
224 * \return IVI_FAILED if the method call was failed
225 */
226 int32_t (*get_surfaces)(int32_t *pLength, struct ivi_layout_surface ***ppArray);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900227
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900228 /**
229 * \brief get id of ivi_surface from ivi_layout_surface
230 *
231 * \return id of ivi_surface
232 */
233 uint32_t (*get_id_of_surface)(struct ivi_layout_surface *ivisurf);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900234
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900235 /**
236 * \brief get ivi_layout_surface from id of ivi_surface
237 *
238 * \return (struct ivi_layout_surface *)
239 * if the method call was successful
240 * \return NULL if the method call was failed
241 */
242 struct ivi_layout_surface *
243 (*get_surface_from_id)(uint32_t id_surface);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900244
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900245 /**
246 * \brief get ivi_layout_surface_properties from ivisurf
247 *
248 * \return (struct ivi_layout_surface_properties *)
249 * if the method call was successful
250 * \return NULL if the method call was failed
251 */
252 const struct ivi_layout_surface_properties *
253 (*get_properties_of_surface)(struct ivi_layout_surface *ivisurf);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900254
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900255 /**
256 * \brief Get all Surfaces which are currently registered to a given
257 * layer and are managed by the services
258 *
259 * \return IVI_SUCCEEDED if the method call was successful
260 * \return IVI_FAILED if the method call was failed
261 */
262 int32_t (*get_surfaces_on_layer)(struct ivi_layout_layer *ivilayer,
263 int32_t *pLength,
264 struct ivi_layout_surface ***ppArray);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900265
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900266 /**
267 * \brief Set the visibility of a ivi_surface.
268 *
269 * If a surface is not visible it will not be rendered.
270 *
271 * \return IVI_SUCCEEDED if the method call was successful
272 * \return IVI_FAILED if the method call was failed
273 */
274 int32_t (*surface_set_visibility)(struct ivi_layout_surface *ivisurf,
275 bool newVisibility);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900276
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900277 /**
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900278 * \brief Set the opacity of a surface.
279 *
280 * \return IVI_SUCCEEDED if the method call was successful
281 * \return IVI_FAILED if the method call was failed
282 */
283 int32_t (*surface_set_opacity)(struct ivi_layout_surface *ivisurf,
284 wl_fixed_t opacity);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900285
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900286 /**
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900287 * \brief Set the area of a ivi_surface which should be used for the rendering.
288 *
289 * \return IVI_SUCCEEDED if the method call was successful
290 * \return IVI_FAILED if the method call was failed
291 */
292 int32_t (*surface_set_source_rectangle)(struct ivi_layout_surface *ivisurf,
293 int32_t x, int32_t y,
294 int32_t width, int32_t height);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900295
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900296 /**
297 * \brief Set the destination area of a ivi_surface within a ivi_layer
298 * for rendering.
299 *
300 * The surface will be scaled to this rectangle for rendering.
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_set_destination_rectangle)(struct ivi_layout_surface *ivisurf,
306 int32_t x, int32_t y,
307 int32_t width, int32_t height);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900308
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900309 /**
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900310 * \brief Sets the orientation of a ivi_surface.
311 *
312 * \return IVI_SUCCEEDED if the method call was successful
313 * \return IVI_FAILED if the method call was failed
314 */
315 int32_t (*surface_set_orientation)(struct ivi_layout_surface *ivisurf,
316 enum wl_output_transform orientation);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900317
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900318 /**
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900319 * \brief register for notification on property changes of ivi_surface
320 *
321 * \return IVI_SUCCEEDED if the method call was successful
322 * \return IVI_FAILED if the method call was failed
323 */
324 int32_t (*surface_add_notification)(struct ivi_layout_surface *ivisurf,
325 surface_property_notification_func callback,
326 void *userdata);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900327
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900328 /**
329 * \brief remove notification on property changes of ivi_surface
330 */
331 void (*surface_remove_notification)(struct ivi_layout_surface *ivisurf);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900332
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900333 /**
334 * \brief get weston_surface of ivi_surface
335 */
336 struct weston_surface *
337 (*surface_get_weston_surface)(struct ivi_layout_surface *ivisurf);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900338
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900339 /**
340 * \brief set type of transition animation
341 */
342 int32_t (*surface_set_transition)(struct ivi_layout_surface *ivisurf,
343 enum ivi_layout_transition_type type,
344 uint32_t duration);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900345
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900346 /**
347 * \brief set duration of transition animation
348 */
349 int32_t (*surface_set_transition_duration)(
350 struct ivi_layout_surface *ivisurf,
351 uint32_t duration);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900352
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900353 /**
354 * layer controller interface
355 */
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900356
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900357 /**
358 * \brief register/unregister for notification when ivi_layer is created
359 */
360 int32_t (*add_notification_create_layer)(
361 layer_create_notification_func callback,
362 void *userdata);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900363
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900364 void (*remove_notification_create_layer)(
365 layer_create_notification_func callback,
366 void *userdata);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900367
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900368 /**
369 * \brief register/unregister for notification when ivi_layer is removed
370 */
371 int32_t (*add_notification_remove_layer)(
372 layer_remove_notification_func callback,
373 void *userdata);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900374
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900375 void (*remove_notification_remove_layer)(
376 layer_remove_notification_func callback,
377 void *userdata);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900378
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900379 /**
380 * \brief Create a ivi_layer which should be managed by the service
381 *
382 * \return (struct ivi_layout_layer *)
383 * if the method call was successful
384 * \return NULL if the method call was failed
385 */
386 struct ivi_layout_layer *
387 (*layer_create_with_dimension)(uint32_t id_layer,
388 int32_t width, int32_t height);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900389
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900390 /**
391 * \brief Removes a ivi_layer which is currently managed by the service
392 */
Nobuhiko Tanibata3aa8aed2015-06-22 15:32:23 +0900393 void (*layer_destroy)(struct ivi_layout_layer *ivilayer);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900394
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900395 /**
396 * \brief Get all ivi_layers which are currently registered and managed
397 * by the services
398 *
399 * \return IVI_SUCCEEDED if the method call was successful
400 * \return IVI_FAILED if the method call was failed
401 */
402 int32_t (*get_layers)(int32_t *pLength, struct ivi_layout_layer ***ppArray);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900403
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900404 /**
405 * \brief get id of ivi_layer from ivi_layout_layer
406 *
407 *
408 * \return id of ivi_layer
409 */
410 uint32_t (*get_id_of_layer)(struct ivi_layout_layer *ivilayer);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900411
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900412 /**
413 * \brief get ivi_layout_layer from id of layer
414 *
415 * \return (struct ivi_layout_layer *)
416 * if the method call was successful
417 * \return NULL if the method call was failed
418 */
419 struct ivi_layout_layer * (*get_layer_from_id)(uint32_t id_layer);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900420
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900421 /**
422 * \brief Get the ivi_layer properties
423 *
424 * \return (const struct ivi_layout_layer_properties *)
425 * if the method call was successful
426 * \return NULL if the method call was failed
427 */
428 const struct ivi_layout_layer_properties *
429 (*get_properties_of_layer)(struct ivi_layout_layer *ivilayer);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900430
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900431 /**
432 * \brief Get all ivi_ayers under the given ivi_surface
433 *
434 * \return IVI_SUCCEEDED if the method call was successful
435 * \return IVI_FAILED if the method call was failed
436 */
437 int32_t (*get_layers_under_surface)(struct ivi_layout_surface *ivisurf,
438 int32_t *pLength,
439 struct ivi_layout_layer ***ppArray);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900440
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900441 /**
Ucan, Emre (ADITG/SW1)273874e2016-03-17 15:30:42 +0000442 * \brief Get all Layers of the given weston_output
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900443 *
444 * \return IVI_SUCCEEDED if the method call was successful
445 * \return IVI_FAILED if the method call was failed
446 */
Ucan, Emre (ADITG/SW1)273874e2016-03-17 15:30:42 +0000447 int32_t (*get_layers_on_screen)(struct weston_output *output,
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900448 int32_t *pLength,
449 struct ivi_layout_layer ***ppArray);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900450
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900451 /**
452 * \brief Set the visibility of a ivi_layer. If a ivi_layer is not visible,
453 * the ivi_layer and its ivi_surfaces will not be rendered.
454 *
455 * \return IVI_SUCCEEDED if the method call was successful
456 * \return IVI_FAILED if the method call was failed
457 */
458 int32_t (*layer_set_visibility)(struct ivi_layout_layer *ivilayer,
459 bool newVisibility);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900460
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900461 /**
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900462 * \brief Set the opacity of a ivi_layer.
463 *
464 * \return IVI_SUCCEEDED if the method call was successful
465 * \return IVI_FAILED if the method call was failed
466 */
467 int32_t (*layer_set_opacity)(struct ivi_layout_layer *ivilayer,
468 wl_fixed_t opacity);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900469
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900470 /**
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900471 * \brief Set the area of a ivi_layer which should be used for the rendering.
472 *
473 * Only this part will be visible.
474 *
475 * \return IVI_SUCCEEDED if the method call was successful
476 * \return IVI_FAILED if the method call was failed
477 */
478 int32_t (*layer_set_source_rectangle)(struct ivi_layout_layer *ivilayer,
479 int32_t x, int32_t y,
480 int32_t width, int32_t height);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900481
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900482 /**
483 * \brief Set the destination area on the display for a ivi_layer.
484 *
485 * The ivi_layer will be scaled and positioned to this rectangle
486 * for rendering
487 *
488 * \return IVI_SUCCEEDED if the method call was successful
489 * \return IVI_FAILED if the method call was failed
490 */
491 int32_t (*layer_set_destination_rectangle)(struct ivi_layout_layer *ivilayer,
492 int32_t x, int32_t y,
493 int32_t width, int32_t height);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900494
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900495 /**
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900496 * \brief Sets the orientation of a ivi_layer.
497 *
498 * \return IVI_SUCCEEDED if the method call was successful
499 * \return IVI_FAILED if the method call was failed
500 */
501 int32_t (*layer_set_orientation)(struct ivi_layout_layer *ivilayer,
502 enum wl_output_transform orientation);
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900503
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900504 /**
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900505 * \brief Add a ivi_surface to a ivi_layer which is currently managed by the service
506 *
507 * \return IVI_SUCCEEDED if the method call was successful
508 * \return IVI_FAILED if the method call was failed
509 */
510 int32_t (*layer_add_surface)(struct ivi_layout_layer *ivilayer,
511 struct ivi_layout_surface *addsurf);
512
513 /**
514 * \brief Removes a surface from a layer which is currently managed by the service
515 */
516 void (*layer_remove_surface)(struct ivi_layout_layer *ivilayer,
517 struct ivi_layout_surface *remsurf);
518
519 /**
520 * \brief Sets render order of ivi_surfaces within a ivi_layer
521 *
522 * \return IVI_SUCCEEDED if the method call was successful
523 * \return IVI_FAILED if the method call was failed
524 */
525 int32_t (*layer_set_render_order)(struct ivi_layout_layer *ivilayer,
526 struct ivi_layout_surface **pSurface,
527 int32_t number);
528
529 /**
530 * \brief register for notification on property changes of ivi_layer
531 *
532 * \return IVI_SUCCEEDED if the method call was successful
533 * \return IVI_FAILED if the method call was failed
534 */
535 int32_t (*layer_add_notification)(struct ivi_layout_layer *ivilayer,
536 layer_property_notification_func callback,
537 void *userdata);
538
539 /**
540 * \brief remove notification on property changes of ivi_layer
541 */
542 void (*layer_remove_notification)(struct ivi_layout_layer *ivilayer);
543
544 /**
545 * \brief set type of transition animation
546 */
547 int32_t (*layer_set_transition)(struct ivi_layout_layer *ivilayer,
548 enum ivi_layout_transition_type type,
549 uint32_t duration);
550
551 /**
552 * screen controller interface
553 */
554
555 /**
Ucan, Emre (ADITG/SW1)273874e2016-03-17 15:30:42 +0000556 * \brief Get the weston_outputs under the given ivi_layer
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900557 *
558 * \return IVI_SUCCEEDED if the method call was successful
559 * \return IVI_FAILED if the method call was failed
560 */
561 int32_t (*get_screens_under_layer)(struct ivi_layout_layer *ivilayer,
562 int32_t *pLength,
Ucan, Emre (ADITG/SW1)273874e2016-03-17 15:30:42 +0000563 struct weston_output ***ppArray);
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900564
565 /**
Ucan, Emre (ADITG/SW1)273874e2016-03-17 15:30:42 +0000566 * \brief Add a ivi_layer to a weston_output which is currently managed
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900567 * by the service
568 *
569 * \return IVI_SUCCEEDED if the method call was successful
570 * \return IVI_FAILED if the method call was failed
571 */
Ucan, Emre (ADITG/SW1)273874e2016-03-17 15:30:42 +0000572 int32_t (*screen_add_layer)(struct weston_output *output,
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900573 struct ivi_layout_layer *addlayer);
574
575 /**
Ucan, Emre (ADITG/SW1)273874e2016-03-17 15:30:42 +0000576 * \brief Sets render order of ivi_layers on a weston_output
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900577 *
578 * \return IVI_SUCCEEDED if the method call was successful
579 * \return IVI_FAILED if the method call was failed
580 */
Ucan, Emre (ADITG/SW1)273874e2016-03-17 15:30:42 +0000581 int32_t (*screen_set_render_order)(struct weston_output *output,
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900582 struct ivi_layout_layer **pLayer,
583 const int32_t number);
584
585 /**
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900586 * transision animation for layer
587 */
588 void (*transition_move_layer_cancel)(struct ivi_layout_layer *layer);
589 int32_t (*layer_set_fade_info)(struct ivi_layout_layer* ivilayer,
590 uint32_t is_fade_in,
591 double start_alpha, double end_alpha);
592
Nobuhiko Tanibatac3fd6242015-04-21 02:13:15 +0900593 /**
594 * surface content dumping for debugging
595 */
596 int32_t (*surface_get_size)(struct ivi_layout_surface *ivisurf,
597 int32_t *width, int32_t *height,
598 int32_t *stride);
599
600 int32_t (*surface_dump)(struct weston_surface *surface,
601 void *target, size_t size,
602 int32_t x, int32_t y,
603 int32_t width, int32_t height);
604
Nobuhiko Tanibata82051702015-06-22 15:31:26 +0900605 /**
606 * remove notification by callback on property changes of ivi_surface
607 */
608 void (*surface_remove_notification_by_callback)(struct ivi_layout_surface *ivisurf,
609 surface_property_notification_func callback,
610 void *userdata);
611
Nobuhiko Tanibatadb8efd12015-06-22 15:31:39 +0900612 /**
613 * \brief remove notification by callback on property changes of ivi_layer
614 */
615 void (*layer_remove_notification_by_callback)(struct ivi_layout_layer *ivilayer,
616 layer_property_notification_func callback,
617 void *userdata);
Nobuhiko Tanibataee8e5832014-12-15 13:25:39 +0900618};
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900619
620#ifdef __cplusplus
621}
622#endif /* __cplusplus */
623
624#endif /* _IVI_LAYOUT_EXPORT_H_ */