ivi-shell: remove ivi_layout_surface_set_position API
authorUcan, Emre \(ADITG/SW1\) <eucan@de.adit-jv.com>
Fri, 4 Mar 2016 12:50:43 +0000 (12:50 +0000)
committerBryce Harrington <bryce@osg.samsung.com>
Fri, 4 Mar 2016 18:33:34 +0000 (10:33 -0800)
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>
ivi-shell/ivi-layout-export.h
ivi-shell/ivi-layout.c
tests/ivi_layout-internal-test.c
tests/ivi_layout-test-plugin.c
tests/ivi_layout-test.c

index 86315f6..5e5b305 100644 (file)
@@ -312,15 +312,6 @@ struct ivi_layout_interface {
                                                     int32_t width, int32_t height);
 
        /**
-        * \brief Sets the horizontal and vertical position of the surface.
-        *
-        * \return IVI_SUCCEEDED if the method call was successful
-        * \return IVI_FAILED if the method call was failed
-        */
-       int32_t (*surface_set_position)(struct ivi_layout_surface *ivisurf,
-                                       int32_t dest_x, int32_t dest_y);
-
-       /**
         * \brief Set the horizontal and vertical dimension of the surface.
         *
         * \return IVI_SUCCEEDED if the method call was successful
index 74f0948..e60ee6d 100644 (file)
@@ -2077,29 +2077,6 @@ ivi_layout_surface_set_dimension(struct ivi_layout_surface *ivisurf,
 }
 
 static int32_t
-ivi_layout_surface_set_position(struct ivi_layout_surface *ivisurf,
-                               int32_t dest_x, int32_t dest_y)
-{
-       struct ivi_layout_surface_properties *prop = NULL;
-
-       if (ivisurf == NULL) {
-               weston_log("ivi_layout_surface_set_position: invalid argument\n");
-               return IVI_FAILED;
-       }
-
-       prop = &ivisurf->pending.prop;
-       prop->dest_x = dest_x;
-       prop->dest_y = dest_y;
-
-       if (ivisurf->prop.dest_x != dest_x || ivisurf->prop.dest_y != dest_y)
-               ivisurf->event_mask |= IVI_NOTIFICATION_POSITION;
-       else
-               ivisurf->event_mask &= ~IVI_NOTIFICATION_POSITION;
-
-       return IVI_SUCCEEDED;
-}
-
-static int32_t
 ivi_layout_surface_set_orientation(struct ivi_layout_surface *ivisurf,
                                   enum wl_output_transform orientation)
 {
@@ -2622,7 +2599,6 @@ static struct ivi_layout_interface ivi_layout_interface = {
        .surface_set_opacity                    = ivi_layout_surface_set_opacity,
        .surface_set_source_rectangle           = ivi_layout_surface_set_source_rectangle,
        .surface_set_destination_rectangle      = ivi_layout_surface_set_destination_rectangle,
-       .surface_set_position                   = ivi_layout_surface_set_position,
        .surface_set_dimension                  = ivi_layout_surface_set_dimension,
        .surface_set_orientation                = ivi_layout_surface_set_orientation,
        .surface_set_content_observer           = ivi_layout_surface_set_content_observer,
index 7ec2948..2c924e5 100644 (file)
@@ -101,16 +101,6 @@ test_surface_bad_dimension(struct test_context *ctx)
 }
 
 static void
-test_surface_bad_position(struct test_context *ctx)
-{
-       const struct ivi_layout_interface *lyt = ctx->layout_interface;
-
-       iassert(lyt->surface_set_position(NULL, 20, 30) == IVI_FAILED);
-
-       lyt->commit_changes();
-}
-
-static void
 test_surface_bad_source_rectangle(struct test_context *ctx)
 {
        const struct ivi_layout_interface *lyt = ctx->layout_interface;
@@ -1041,7 +1031,6 @@ run_internal_tests(void *data)
        test_surface_bad_destination_rectangle(ctx);
        test_surface_bad_orientation(ctx);
        test_surface_bad_dimension(ctx);
-       test_surface_bad_position(ctx);
        test_surface_bad_source_rectangle(ctx);
        test_surface_bad_properties(ctx);
 
index 8097563..00b1e87 100644 (file)
@@ -458,8 +458,9 @@ RUNNER_TEST(surface_position)
        runner_assert(prop->dest_x == 0);
        runner_assert(prop->dest_y == 0);
 
-       runner_assert(lyt->surface_set_position(
-                     ivisurf, 20, 30) == IVI_SUCCEEDED);
+       runner_assert(lyt->surface_set_destination_rectangle(
+                     ivisurf, 20, 30,
+                     prop->dest_width, prop->dest_height) == IVI_SUCCEEDED);
 
        runner_assert(prop->dest_x == 0);
        runner_assert(prop->dest_y == 0);
@@ -631,17 +632,6 @@ RUNNER_TEST(commit_changes_after_dimension_set_surface_destroy)
                      ivisurf, 200, 300) == IVI_SUCCEEDED);
 }
 
-RUNNER_TEST(commit_changes_after_position_set_surface_destroy)
-{
-       const struct ivi_layout_interface *lyt = ctx->layout_interface;
-       struct ivi_layout_surface *ivisurf;
-
-       ivisurf = lyt->get_surface_from_id(IVI_TEST_SURFACE_ID(0));
-       runner_assert(ivisurf != NULL);
-       runner_assert(lyt->surface_set_position(
-                     ivisurf, 20, 30) == IVI_SUCCEEDED);
-}
-
 RUNNER_TEST(commit_changes_after_source_rectangle_set_surface_destroy)
 {
        const struct ivi_layout_interface *lyt = ctx->layout_interface;
index 6c739da..196ef8f 100644 (file)
@@ -205,7 +205,6 @@ const char * const surface_property_commit_changes_test_names[] = {
        "commit_changes_after_opacity_set_surface_destroy",
        "commit_changes_after_orientation_set_surface_destroy",
        "commit_changes_after_dimension_set_surface_destroy",
-       "commit_changes_after_position_set_surface_destroy",
        "commit_changes_after_source_rectangle_set_surface_destroy",
        "commit_changes_after_destination_rectangle_set_surface_destroy",
 };