ivi-shell: add_screen_remove_layer API

It is analagous to layer_remove_surface API.
The API removes a layer from the render order
of the screen.

v3:
add the new vfunc at the end of
the ivi_layout_interface struct.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Eugen Friedrich <friedrix@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index 298e18e..8e4280b 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -1664,6 +1664,27 @@
 }
 
 static int32_t
+ivi_layout_screen_remove_layer(struct weston_output *output,
+			    struct ivi_layout_layer *removelayer)
+{
+	struct ivi_layout_screen *iviscrn;
+
+	if (output == NULL || removelayer == NULL) {
+		weston_log("ivi_layout_screen_remove_layer: invalid argument\n");
+		return IVI_FAILED;
+	}
+
+	iviscrn = get_screen_from_output(output);
+
+	wl_list_remove(&removelayer->pending.link);
+	wl_list_init(&removelayer->pending.link);
+
+	iviscrn->order.dirty = 1;
+
+	return IVI_SUCCEEDED;
+}
+
+static int32_t
 ivi_layout_screen_set_render_order(struct weston_output *output,
 				   struct ivi_layout_layer **pLayer,
 				   const int32_t number)
@@ -2088,6 +2109,7 @@
 	 */
 	.get_screens_under_layer	= ivi_layout_get_screens_under_layer,
 	.screen_add_layer		= ivi_layout_screen_add_layer,
+	.screen_remove_layer		= ivi_layout_screen_remove_layer,
 	.screen_set_render_order	= ivi_layout_screen_set_render_order,
 
 	/**