diff options
author | Ucan, Emre \(ADITG/SW1\) <eucan@de.adit-jv.com> | 2016-03-04 12:50:46 +0000 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2016-03-04 10:33:34 -0800 |
commit | e62bfd8d5e440fcdc23f42077d7e3096d8335d82 (patch) | |
tree | a8c57bafecdb2677820e9cabaeffac0edc15dee2 /ivi-shell | |
parent | 161da40b068cdf7d9daca0762f0180789bfe3ec5 (diff) | |
download | weston-e62bfd8d5e440fcdc23f42077d7e3096d8335d82.tar.gz |
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>
Diffstat (limited to 'ivi-shell')
-rw-r--r-- | ivi-shell/hmi-controller.c | 6 | ||||
-rw-r--r-- | ivi-shell/ivi-layout-export.h | 9 | ||||
-rw-r--r-- | ivi-shell/ivi-layout-private.h | 5 | ||||
-rw-r--r-- | ivi-shell/ivi-layout-transition.c | 3 | ||||
-rw-r--r-- | ivi-shell/ivi-layout.c | 26 |
5 files changed, 11 insertions, 38 deletions
diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c index 4daf7d2c..86f7c50e 100644 --- a/ivi-shell/hmi-controller.c +++ b/ivi-shell/hmi-controller.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(); } diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h index 5e5b305f..1a16b449 100644 --- a/ivi-shell/ivi-layout-export.h +++ b/ivi-shell/ivi-layout-export.h @@ -518,15 +518,6 @@ struct ivi_layout_interface { 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 f0dba913..3a23ef47 100644 --- a/ivi-shell/ivi-layout-private.h +++ b/ivi-shell/ivi-layout-private.h @@ -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, diff --git a/ivi-shell/ivi-layout-transition.c b/ivi-shell/ivi-layout-transition.c index df6112d2..3b613a5e 100644 --- a/ivi-shell/ivi-layout-transition.c +++ b/ivi-shell/ivi-layout-transition.c @@ -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 diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index e60ee6d7..ee987547 100644 --- a/ivi-shell/ivi-layout.c +++ b/ivi-shell/ivi-layout.c @@ -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, |