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>
dev
Ucan, Emre \(ADITG/SW1\) 9 years ago committed by Bryce Harrington
parent 161da40b06
commit e62bfd8d5e
  1. 6
      ivi-shell/hmi-controller.c
  2. 9
      ivi-shell/ivi-layout-export.h
  3. 5
      ivi-shell/ivi-layout-private.h
  4. 3
      ivi-shell/ivi-layout-transition.c
  5. 26
      ivi-shell/ivi-layout.c
  6. 35
      tests/ivi_layout-internal-test.c

@ -1566,12 +1566,16 @@ static void
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();
}

@ -517,15 +517,6 @@ struct ivi_layout_interface {
int32_t x, int32_t y,
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.
*

@ -200,8 +200,9 @@ int32_t
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,

@ -664,7 +664,8 @@ transition_move_layer_user_frame(struct ivi_layout_transition *transition)
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

@ -1838,7 +1838,7 @@ ivi_layout_layer_set_source_rectangle(struct ivi_layout_layer *ivilayer,
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 @@ ivi_layout_layer_set_dimension(struct ivi_layout_layer *ivilayer,
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 @@ static struct ivi_layout_interface ivi_layout_interface = {
.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,

@ -257,7 +257,8 @@ test_layer_position(struct test_context *ctx)
iassert(prop->dest_x == 0);
iassert(prop->dest_y == 0);
iassert(lyt->layer_set_position(ivilayer, 20, 30) == IVI_SUCCEEDED);
iassert(lyt->layer_set_destination_rectangle(ivilayer, 20, 30,
prop->dest_width, prop->dest_height) == IVI_SUCCEEDED);
iassert(prop->dest_x == 0);
iassert(prop->dest_y == 0);
@ -434,22 +435,6 @@ test_layer_bad_dimension(struct test_context *ctx)
lyt->layer_destroy(ivilayer);
}
static void
test_layer_bad_position(struct test_context *ctx)
{
const struct ivi_layout_interface *lyt = ctx->layout_interface;
struct ivi_layout_layer *ivilayer;
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
iassert(ivilayer != NULL);
iassert(lyt->layer_set_position(NULL, 20, 30) == IVI_FAILED);
lyt->commit_changes();
lyt->layer_destroy(ivilayer);
}
static void
test_layer_bad_source_rectangle(struct test_context *ctx)
{
@ -525,20 +510,6 @@ test_commit_changes_after_dimension_set_layer_destroy(struct test_context *ctx)
lyt->commit_changes();
}
static void
test_commit_changes_after_position_set_layer_destroy(struct test_context *ctx)
{
const struct ivi_layout_interface *lyt = ctx->layout_interface;
struct ivi_layout_layer *ivilayer;
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
iassert(ivilayer != NULL);
iassert(lyt->layer_set_position(ivilayer, 20, 30) == IVI_SUCCEEDED);
lyt->layer_destroy(ivilayer);
lyt->commit_changes();
}
static void
test_commit_changes_after_source_rectangle_set_layer_destroy(struct test_context *ctx)
{
@ -1048,14 +1019,12 @@ run_internal_tests(void *data)
test_layer_bad_destination_rectangle(ctx);
test_layer_bad_orientation(ctx);
test_layer_bad_dimension(ctx);
test_layer_bad_position(ctx);
test_layer_bad_source_rectangle(ctx);
test_layer_bad_properties(ctx);
test_commit_changes_after_visibility_set_layer_destroy(ctx);
test_commit_changes_after_opacity_set_layer_destroy(ctx);
test_commit_changes_after_orientation_set_layer_destroy(ctx);
test_commit_changes_after_dimension_set_layer_destroy(ctx);
test_commit_changes_after_position_set_layer_destroy(ctx);
test_commit_changes_after_source_rectangle_set_layer_destroy(ctx);
test_commit_changes_after_destination_rectangle_set_layer_destroy(ctx);
test_layer_create_duplicate(ctx);

Loading…
Cancel
Save