[PATCH weston 2/8] ivi-shell: remove ivi_layout_get_id_of_screen API

Ucan, Emre (ADITG/SW1) eucan at de.adit-jv.com
Thu Mar 17 15:30:32 UTC 2016


ivi-screen does not have an id. IVI layout implementation is using
id of weston output. Therefore, this API is unnecessary.

Signed-off-by: Emre Ucan <eucan at de.adit-jv.com>
---
 ivi-shell/ivi-layout-export.h    |    8 --------
 ivi-shell/ivi-layout.c           |   13 +------------
 tests/ivi_layout-internal-test.c |    6 +++---
 3 files changed, 4 insertions(+), 23 deletions(-)

diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h
index 1f75697..4fe0107 100644
--- a/ivi-shell/ivi-layout-export.h
+++ b/ivi-shell/ivi-layout-export.h
@@ -658,14 +658,6 @@ struct ivi_layout_interface {
 	void (*layer_remove_notification_by_callback)(struct ivi_layout_layer *ivilayer,
 						      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 383bd75..17a3fc9 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -1317,12 +1317,6 @@ 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->output->id;
-}
-
 static struct ivi_layout_layer *
 ivi_layout_get_layer_from_id(uint32_t id_layer)
 {
@@ -2504,12 +2498,7 @@ static struct ivi_layout_interface ivi_layout_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,
-
-	/**
-	 * screen controller interfaces part2
-	 */
-	.get_id_of_screen	= ivi_layout_get_id_of_screen
+	.layer_remove_notification_by_callback		= ivi_layout_layer_remove_notification_by_callback
 };
 
 int
diff --git a/tests/ivi_layout-internal-test.c b/tests/ivi_layout-internal-test.c
index 06abcaa..80492d8 100644
--- a/tests/ivi_layout-internal-test.c
+++ b/tests/ivi_layout-internal-test.c
@@ -548,16 +548,16 @@ test_screen_id(struct test_context *ctx)
 {
 	const struct ivi_layout_interface *lyt = ctx->layout_interface;
 	struct ivi_layout_screen **iviscrns;
+	struct weston_output *output;
 	int32_t screen_length = 0;
-	uint32_t id_screen;
 	int32_t i;
 
 	iassert(lyt->get_screens(&screen_length, &iviscrns) == IVI_SUCCEEDED);
 	iassert(screen_length > 0);
 
 	for (i = 0; i < screen_length; ++i) {
-		id_screen = lyt->get_id_of_screen(iviscrns[i]);
-		iassert(lyt->get_screen_from_id(id_screen) == iviscrns[i]);
+		output = lyt->screen_get_output(iviscrns[i]);
+		iassert(lyt->get_screen_from_id(output->id) == iviscrns[i]);
 	}
 
 	if (screen_length > 0)
-- 
1.7.9.5



More information about the wayland-devel mailing list