[PATCH 10/13] ivi-shell: add interface to get screen ID
Nobuhiko Tanibata
nobuhiko_tanibata at xddp.denso.co.jp
Sun Jun 21 23:31:57 PDT 2015
From: Nobuhiko Tanibata <NOBUHIKO_TANIBATA at xddp.denso.co.jp>
This interface is required for user to manage screens per IDs.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA at xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
ivi-shell/ivi-layout-export.h | 7 +++++++
ivi-shell/ivi-layout.c | 15 +++++++++++++--
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h
index 2f93811..68d3760 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 bfd9d32..a7f9e02 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
--
1.8.3.1
More information about the wayland-devel
mailing list