edje edit - api was broken with incorrect l r t b ordering for border
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sat, 9 Jul 2016 03:17:46 +0000 (12:17 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sat, 9 Jul 2016 03:17:46 +0000 (12:17 +0900)
this fixes ordering to match everywhere else ANd usage of the get
func. this was broken already where top/bottom border would swap -
plese see coverity scan CID 1355590 for an example of problems this
created.

src/lib/edje/edje_edit.c

index 4a74f0b..f1f9bb5 100644 (file)
@@ -9444,7 +9444,7 @@ FUNC_IMAGE_SET_API_SIZE(min);
 FUNC_IMAGE_SET_API_SIZE(max);
 
 EAPI Eina_Bool
-edje_edit_image_set_image_border_get(Evas_Object *obj, const char *set_name, unsigned int place, int *l, int *r, int *b, int *t)
+edje_edit_image_set_image_border_get(Evas_Object *obj, const char *set_name, unsigned int place, int *l, int *r, int *t, int *b)
 {
    Edje_Image_Directory_Set *de = NULL;
    Edje_Image_Directory_Set_Entry *dim = NULL;
@@ -9468,14 +9468,14 @@ edje_edit_image_set_image_border_get(Evas_Object *obj, const char *set_name, uns
 
    if (l) *l = dim->border.l;
    if (r) *r = dim->border.r;
-   if (b) *b = dim->border.b;
    if (t) *t = dim->border.t;
+   if (b) *b = dim->border.b;
 
    return EINA_TRUE;
 }
 
 EAPI Eina_Bool
-edje_edit_image_set_image_border_set(Evas_Object *obj, const char *set_name, unsigned int place, int l, int r, int b, int t)
+edje_edit_image_set_image_border_set(Evas_Object *obj, const char *set_name, unsigned int place, int l, int r, int t, int b)
 {
    Edje_Image_Directory_Set *de = NULL;
    Edje_Image_Directory_Set_Entry *dim = NULL;
@@ -9499,8 +9499,8 @@ edje_edit_image_set_image_border_set(Evas_Object *obj, const char *set_name, uns
 
    if (l >= 0) dim->border.l = l;
    if (r >= 0) dim->border.r = r;
-   if (b >= 0) dim->border.b = b;
    if (t >= 0) dim->border.t = t;
+   if (b >= 0) dim->border.b = b;
 
    return EINA_TRUE;
 }