diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h index 2f93811e..68d37603 100644 --- a/ivi-shell/ivi-layout-export.h +++ b/ivi-shell/ivi-layout-export.h @@ -797,6 +797,13 @@ struct ivi_controller_interface { layer_property_notification_func callback, void *userdata); + /** + * \brief get id of ivi_screen from ivi_layout_screen + * + * + * \return id of ivi_screen + */ + uint32_t (*get_id_of_screen)(struct ivi_layout_screen *iviscrn); }; #ifdef __cplusplus diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index bfd9d326..a7f9e02c 100644 --- a/ivi-shell/ivi-layout.c +++ b/ivi-shell/ivi-layout.c @@ -1480,6 +1480,12 @@ ivi_layout_get_id_of_layer(struct ivi_layout_layer *ivilayer) return ivilayer->id_layer; } +static uint32_t +ivi_layout_get_id_of_screen(struct ivi_layout_screen *iviscrn) +{ + return iviscrn->id_screen; +} + static struct ivi_layout_layer * ivi_layout_get_layer_from_id(uint32_t id_layer) { @@ -2972,7 +2978,7 @@ static struct ivi_controller_interface ivi_controller_interface = { .layer_set_transition = ivi_layout_layer_set_transition, /** - * screen controller interfaces + * screen controller interfaces part1 */ .get_screen_from_id = ivi_layout_get_screen_from_id, .get_screen_resolution = ivi_layout_get_screen_resolution, @@ -2998,7 +3004,12 @@ static struct ivi_controller_interface ivi_controller_interface = { * remove notification by callback on property changes of ivi_surface/layer */ .surface_remove_notification_by_callback = ivi_layout_surface_remove_notification_by_callback, - .layer_remove_notification_by_callback = ivi_layout_layer_remove_notification_by_callback + .layer_remove_notification_by_callback = ivi_layout_layer_remove_notification_by_callback, + + /** + * screen controller interfaces part2 + */ + .get_id_of_screen = ivi_layout_get_id_of_screen }; int