summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_edit.c
diff options
context:
space:
mode:
authorm.biliavskyi <m.biliavskyi@samsung.com>2013-11-01 11:17:24 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-11-01 11:31:36 +0900
commit6f8b1c1b02e4b59da437e40acd2f3434e78d1c7a (patch)
tree94a2d96485077e997701daebb2b3e2c3dd8fd50d /src/lib/edje/edje_edit.c
parentcba1fa5dd525b72504ac7530454a71267b853e70 (diff)
edje: make functions "edje_edit_state_fill/aspect/align..." return Eina_Bool
Make the following function return Eina_Bool so the caller can detect errors : List of updated functions: edje_edit_state_align_x_set edje_edit_state_align_y_set edje_edit_state_aspect_min_set edje_edit_state_aspect_max_set edje_edit_state_aspect_pref_set edje_edit_state_fill_origin_relative_x_set edje_edit_state_fill_origin_relative_y_set edje_edit_state_fill_origin_offset_x_set edje_edit_state_fill_origin_offset_y_set edje_edit_state_fill_size_relative_x_set edje_edit_state_fill_size_relative_y_set edje_edit_state_fill_size_offset_x_set edje_edit_state_fill_size_offset_y_set Reviewers: cedric, seoz Reviewed By: cedric CC: reutskiy.v.v Differential Revision: https://phab.enlightenment.org/D300 Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
Diffstat (limited to '')
-rw-r--r--src/lib/edje/edje_edit.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 46ad74c97d..d75b55f707 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -3357,12 +3357,13 @@ edje_edit_state_color3_set(Evas_Object *obj, const char *part, const char *state
3357 GET_PD_OR_RETURN(0); \ 3357 GET_PD_OR_RETURN(0); \
3358 return TO_DOUBLE(pd->Class.Value); \ 3358 return TO_DOUBLE(pd->Class.Value); \
3359 } \ 3359 } \
3360 EAPI void \ 3360 EAPI Eina_Bool \
3361 edje_edit_state_##Class##_##Value##_set(Evas_Object *obj, const char *part, const char *state, double value, double v) \ 3361 edje_edit_state_##Class##_##Value##_set(Evas_Object *obj, const char *part, const char *state, double value, double v) \
3362 { \ 3362 { \
3363 GET_PD_OR_RETURN(); \ 3363 GET_PD_OR_RETURN(EINA_FALSE); \
3364 pd->Class.Value = FROM_DOUBLE(v); \ 3364 pd->Class.Value = FROM_DOUBLE(v); \
3365 edje_object_calc_force(obj); \ 3365 edje_object_calc_force(obj); \
3366 return EINA_TRUE; \
3366 } 3367 }
3367 3368
3368#define FUNC_STATE_INT(Class, Value, Min) \ 3369#define FUNC_STATE_INT(Class, Value, Min) \
@@ -3421,10 +3422,10 @@ FUNC_STATE_DOUBLE(aspect, max);
3421 \ 3422 \
3422 return 0; \ 3423 return 0; \
3423 } \ 3424 } \
3424 EAPI void \ 3425 EAPI Eina_Bool \
3425 edje_edit_state_fill_##Type##_relative_##Value##_set(Evas_Object *obj, const char *part, const char *state, double value, double v) \ 3426 edje_edit_state_fill_##Type##_relative_##Value##_set(Evas_Object *obj, const char *part, const char *state, double value, double v) \
3426 { \ 3427 { \
3427 GET_PD_OR_RETURN(); \ 3428 GET_PD_OR_RETURN(EINA_FALSE); \
3428 \ 3429 \
3429 switch (rp->part->type) \ 3430 switch (rp->part->type) \
3430 { \ 3431 { \
@@ -3449,10 +3450,11 @@ FUNC_STATE_DOUBLE(aspect, max);
3449 break; \ 3450 break; \
3450 } \ 3451 } \
3451 default: \ 3452 default: \
3452 return; \ 3453 return EINA_FALSE; \
3453 } \ 3454 } \
3454 \ 3455 \
3455 edje_object_calc_force(obj); \ 3456 edje_object_calc_force(obj); \
3457 return EINA_TRUE; \
3456 } 3458 }
3457 3459
3458#define FUNC_STATE_INT_FILL(Class, Type, Value) \ 3460#define FUNC_STATE_INT_FILL(Class, Type, Value) \
@@ -3482,10 +3484,10 @@ FUNC_STATE_DOUBLE(aspect, max);
3482 } \ 3484 } \
3483 return 0; \ 3485 return 0; \
3484 } \ 3486 } \
3485 EAPI void \ 3487 EAPI Eina_Bool \
3486 edje_edit_state_fill_##Type##_offset_##Value##_set(Evas_Object *obj, const char *part, const char *state, double value, double v) \ 3488 edje_edit_state_fill_##Type##_offset_##Value##_set(Evas_Object *obj, const char *part, const char *state, double value, double v) \
3487 { \ 3489 { \
3488 GET_PD_OR_RETURN(); \ 3490 GET_PD_OR_RETURN(EINA_FALSE); \
3489 \ 3491 \
3490 switch (rp->part->type) \ 3492 switch (rp->part->type) \
3491 { \ 3493 { \
@@ -3496,7 +3498,7 @@ FUNC_STATE_DOUBLE(aspect, max);
3496 img = (Edje_Part_Description_Image*) pd; \ 3498 img = (Edje_Part_Description_Image*) pd; \
3497 \ 3499 \
3498 img->image.fill.Class##abs_##Value = FROM_DOUBLE(v); \ 3500 img->image.fill.Class##abs_##Value = FROM_DOUBLE(v); \
3499 return; \ 3501 break; \
3500 } \ 3502 } \
3501 case EDJE_PART_TYPE_PROXY: \ 3503 case EDJE_PART_TYPE_PROXY: \
3502 { \ 3504 { \
@@ -3505,13 +3507,14 @@ FUNC_STATE_DOUBLE(aspect, max);
3505 pro = (Edje_Part_Description_Proxy*) pd; \ 3507 pro = (Edje_Part_Description_Proxy*) pd; \
3506 \ 3508 \
3507 pro->proxy.fill.Class##abs_##Value = FROM_DOUBLE(v); \ 3509 pro->proxy.fill.Class##abs_##Value = FROM_DOUBLE(v); \
3508 return; \ 3510 break; \
3509 } \ 3511 } \
3510 default: \ 3512 default: \
3511 return; \ 3513 return EINA_FALSE; \
3512 } \ 3514 } \
3513 \ 3515 \
3514 edje_object_calc_force(obj); \ 3516 edje_object_calc_force(obj); \
3517 return EINA_TRUE; \
3515 } 3518 }
3516 3519
3517FUNC_STATE_DOUBLE_FILL(pos_, origin, x); 3520FUNC_STATE_DOUBLE_FILL(pos_, origin, x);
@@ -3556,13 +3559,13 @@ edje_edit_state_aspect_pref_get(Evas_Object *obj, const char *part, const char *
3556 return pd->aspect.prefer; 3559 return pd->aspect.prefer;
3557} 3560}
3558 3561
3559EAPI void 3562EAPI Eina_Bool
3560edje_edit_state_aspect_pref_set(Evas_Object *obj, const char *part, const char *state, double value, unsigned char pref) 3563edje_edit_state_aspect_pref_set(Evas_Object *obj, const char *part, const char *state, double value, unsigned char pref)
3561{ 3564{
3562 GET_PD_OR_RETURN(); 3565 GET_PD_OR_RETURN(EINA_FALSE);
3563 3566 if ((!pref) || (pref > 3)) return EINA_FALSE;
3564 //printf("SET ASPECT_PREF of state '%s' [to: %d]\n", state, pref);
3565 pd->aspect.prefer = pref; 3567 pd->aspect.prefer = pref;
3568 return EINA_TRUE;
3566} 3569}
3567 3570
3568EAPI const char* 3571EAPI const char*