ivi-shell: remove ivi_layout_layer_set_position API

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c
index 4daf7d2..86f7c50 100644
--- a/ivi-shell/hmi-controller.c
+++ b/ivi-shell/hmi-controller.c
@@ -1566,12 +1566,16 @@
 layer_set_pos(struct ivi_layout_layer *layer, wl_fixed_t pos_x,
 	      wl_fixed_t pos_y)
 {
+	const struct ivi_layout_layer_properties *prop;
 	int32_t layout_pos_x = 0;
 	int32_t layout_pos_y = 0;
 
+	prop = ivi_layout_interface->get_properties_of_layer(layer);
+
 	layout_pos_x = wl_fixed_to_int(pos_x);
 	layout_pos_y = wl_fixed_to_int(pos_y);
-	ivi_layout_interface->layer_set_position(layer, layout_pos_x, layout_pos_y);
+	ivi_layout_interface->layer_set_destination_rectangle(layer,
+			layout_pos_x, layout_pos_y, prop->dest_width, prop->dest_height);
 	ivi_layout_interface->commit_changes();
 }
 
diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h
index 5e5b305..1a16b44 100644
--- a/ivi-shell/ivi-layout-export.h
+++ b/ivi-shell/ivi-layout-export.h
@@ -518,15 +518,6 @@
 						   int32_t width, int32_t height);
 
 	/**
-	 * \brief Sets the horizontal and vertical position of the ivi_layer.
-	 *
-	 * \return IVI_SUCCEEDED if the method call was successful
-	 * \return IVI_FAILED if the method call was failed
-	 */
-	int32_t (*layer_set_position)(struct ivi_layout_layer *ivilayer,
-				      int32_t dest_x, int32_t dest_y);
-
-	/**
 	 * \brief Set the horizontal and vertical dimension of the layer.
 	 *
 	 * \return IVI_SUCCEEDED if the method call was successful
diff --git a/ivi-shell/ivi-layout-private.h b/ivi-shell/ivi-layout-private.h
index f0dba91..3a23ef4 100644
--- a/ivi-shell/ivi-layout-private.h
+++ b/ivi-shell/ivi-layout-private.h
@@ -200,8 +200,9 @@
 ivi_layout_layer_set_visibility(struct ivi_layout_layer *ivilayer,
 				bool newVisibility);
 int32_t
-ivi_layout_layer_set_position(struct ivi_layout_layer *ivilayer,
-			      int32_t dest_x, int32_t dest_y);
+ivi_layout_layer_set_destination_rectangle(struct ivi_layout_layer *ivilayer,
+					   int32_t x, int32_t y,
+					   int32_t width, int32_t height);
 int32_t
 ivi_layout_layer_set_render_order(struct ivi_layout_layer *ivilayer,
 				  struct ivi_layout_surface **pSurface,
diff --git a/ivi-shell/ivi-layout-transition.c b/ivi-shell/ivi-layout-transition.c
index df6112d..3b613a5 100644
--- a/ivi-shell/ivi-layout-transition.c
+++ b/ivi-shell/ivi-layout-transition.c
@@ -664,7 +664,8 @@
 	const int32_t dest_y = data->start_y +
 		(data->end_y - data->start_y) * current;
 
-	ivi_layout_layer_set_position(layer, dest_x, dest_y);
+	ivi_layout_layer_set_destination_rectangle(layer, dest_x, dest_y,
+			layer->prop.dest_width, layer->prop.dest_height);
 }
 
 static void
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index e60ee6d..ee98754 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -1838,7 +1838,7 @@
 	return IVI_SUCCEEDED;
 }
 
-static int32_t
+int32_t
 ivi_layout_layer_set_destination_rectangle(struct ivi_layout_layer *ivilayer,
 					   int32_t x, int32_t y,
 					   int32_t width, int32_t height)
@@ -1891,29 +1891,6 @@
 	return IVI_SUCCEEDED;
 }
 
-int32_t
-ivi_layout_layer_set_position(struct ivi_layout_layer *ivilayer,
-			      int32_t dest_x, int32_t dest_y)
-{
-	struct ivi_layout_layer_properties *prop = NULL;
-
-	if (ivilayer == NULL) {
-		weston_log("ivi_layout_layer_set_position: invalid argument\n");
-		return IVI_FAILED;
-	}
-
-	prop = &ivilayer->pending.prop;
-	prop->dest_x = dest_x;
-	prop->dest_y = dest_y;
-
-	if (ivilayer->prop.dest_x != dest_x || ivilayer->prop.dest_y != dest_y)
-		ivilayer->event_mask |= IVI_NOTIFICATION_POSITION;
-	else
-		ivilayer->event_mask &= ~IVI_NOTIFICATION_POSITION;
-
-	return IVI_SUCCEEDED;
-}
-
 static int32_t
 ivi_layout_layer_set_orientation(struct ivi_layout_layer *ivilayer,
 				 enum wl_output_transform orientation)
@@ -2627,7 +2604,6 @@
 	.layer_set_opacity			= ivi_layout_layer_set_opacity,
 	.layer_set_source_rectangle		= ivi_layout_layer_set_source_rectangle,
 	.layer_set_destination_rectangle	= ivi_layout_layer_set_destination_rectangle,
-	.layer_set_position			= ivi_layout_layer_set_position,
 	.layer_set_dimension			= ivi_layout_layer_set_dimension,
 	.layer_set_orientation			= ivi_layout_layer_set_orientation,
 	.layer_add_surface			= ivi_layout_layer_add_surface,