Edje/Edje_edit: corrected type of input parameter for offset value
authorse.osadchy <se.osadchy@samsung.com>
Fri, 25 Apr 2014 02:09:35 +0000 (11:09 +0900)
committerChunEon Park <hermet@hermet.pe.kr>
Fri, 25 Apr 2014 02:19:58 +0000 (11:19 +0900)
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
src/lib/edje/edje_edit.c

index cd59288..1838e94 100644 (file)
@@ -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.
  *
index 1439904..e238509 100644 (file)
@@ -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                                                               \