From 709c1d86c04c013cc87a3c5295c65f62a0ee5d22 Mon Sep 17 00:00:00 2001 From: "se.osadchy" Date: Fri, 25 Apr 2014 11:09:35 +0900 Subject: [PATCH] Edje/Edje_edit: corrected type of input parameter for offset value Summary: Input type for offset value must be Integer in the "edje_edit_rel1(2)_offset_x(y)_set" functions Reviewers: cedric, Hermet CC: cedric, Hermet, raster Differential Revision: https://phab.enlightenment.org/D562 --- src/lib/edje/Edje_Edit.h | 8 ++++---- src/lib/edje/edje_edit.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h index cd59288..1838e94 100644 --- a/src/lib/edje/Edje_Edit.h +++ b/src/lib/edje/Edje_Edit.h @@ -1505,7 +1505,7 @@ EAPI int edje_edit_state_rel2_offset_y_get(Evas_Object *obj, const char *part, c * * @return EINA_TRUE if successful, EINA_FALSE otherwise. */ -EAPI Eina_Bool edje_edit_state_rel1_offset_x_set(Evas_Object *obj, const char *part, const char *state, double value, double x); +EAPI Eina_Bool edje_edit_state_rel1_offset_x_set(Evas_Object *obj, const char *part, const char *state, double value, int x); /** Set the 'rel1 offset Y' value of state. * @@ -1517,7 +1517,7 @@ EAPI Eina_Bool edje_edit_state_rel1_offset_x_set(Evas_Object *obj, const char *p * * @return EINA_TRUE if successful, EINA_FALSE otherwise. */ -EAPI Eina_Bool edje_edit_state_rel1_offset_y_set(Evas_Object *obj, const char *part, const char *state, double value, double y); +EAPI Eina_Bool edje_edit_state_rel1_offset_y_set(Evas_Object *obj, const char *part, const char *state, double value, int y); /** Set the 'rel2 offset X' value of state. * @@ -1529,7 +1529,7 @@ EAPI Eina_Bool edje_edit_state_rel1_offset_y_set(Evas_Object *obj, const char *p * * @return EINA_TRUE if successful, EINA_FALSE otherwise. */ -EAPI Eina_Bool edje_edit_state_rel2_offset_x_set(Evas_Object *obj, const char *part, const char *state, double value, double x); +EAPI Eina_Bool edje_edit_state_rel2_offset_x_set(Evas_Object *obj, const char *part, const char *state, double value, int x); /** Set the 'rel2 offset Y' value of state. * @@ -1541,7 +1541,7 @@ EAPI Eina_Bool edje_edit_state_rel2_offset_x_set(Evas_Object *obj, const char *p * * @return EINA_TRUE if successful, EINA_FALSE otherwise. */ -EAPI Eina_Bool edje_edit_state_rel2_offset_y_set(Evas_Object *obj, const char *part, const char *state, double value, double y); +EAPI Eina_Bool edje_edit_state_rel2_offset_y_set(Evas_Object *obj, const char *part, const char *state, double value, int y); /** Get the part name rel1x is relative to. * diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index 1439904..e238509 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c @@ -3567,10 +3567,10 @@ FUNC_STATE_RELATIVE_DOUBLE(rel2, y); return pd->Sub.offset_##Value; \ } \ EAPI Eina_Bool \ - edje_edit_state_##Sub##_offset_##Value##_set(Evas_Object *obj, const char *part, const char *state, double value, double v) \ + edje_edit_state_##Sub##_offset_##Value##_set(Evas_Object *obj, const char *part, const char *state, double value, int v) \ { \ GET_PD_OR_RETURN(EINA_FALSE); \ - pd->Sub.offset_##Value = TO_INT(FROM_DOUBLE(v)); \ + pd->Sub.offset_##Value = v; \ edje_object_calc_force(obj); \ return EINA_TRUE; \ } @@ -3710,7 +3710,7 @@ edje_edit_state_color3_set(Evas_Object *obj, const char *part, const char *state EAPI double \ edje_edit_state_##Class##_##Value##_get(Evas_Object *obj, const char *part, const char *state, double value) \ { \ - GET_PD_OR_RETURN(0); \ + GET_PD_OR_RETURN(0); \ return TO_DOUBLE(pd->Class.Value); \ } \ EAPI Eina_Bool \ -- 2.7.4