From c5a7ab882d78c7301cc93eaee470ea4c977f7364 Mon Sep 17 00:00:00 2001 From: Vyacheslav Reutskiy Date: Mon, 21 Sep 2015 15:47:27 +0300 Subject: [PATCH] edje: edje_edit - add getters/setters for container padding This functions designed that make the edje edit API's more homogeneous. The all edje attribute setters and getters treated only ony attribute, besides container API's. Change-Id: I375bfa71abd18ba564138093d7cb016c5efb09d2 origin: upstream --- src/lib/edje/Edje_Edit.h | 70 +++++++++++++++++++++++++++++++++++++++++++----- src/lib/edje/edje_edit.c | 1 + 2 files changed, 64 insertions(+), 7 deletions(-) diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h index 56ce5ac..5d07bec 100644 --- a/src/lib/edje/Edje_Edit.h +++ b/src/lib/edje/Edje_Edit.h @@ -2101,13 +2101,40 @@ edje_edit_state_container_min_y_set(Evas_Object *obj, const char *part, const ch * @param x Variable to store x padding. * @param y Variable to store y padding. * + * @deprecated Use edje_edit_state_container_padding_x_get() and + * edje_edit_state_container_padding_y_get() instead. + * * @return @c EINA_TRUE in case of success, @c EINA_FALSE otherwise. * @since 1.14 */ -EAPI Eina_Bool -edje_edit_state_container_padding_get(Evas_Object *obj, const char *part, - const char *state, double value, - int *x, int *y); +EINA_DEPRECATED EAPI Eina_Bool +edje_edit_state_container_padding_get(Evas_Object *obj, const char *part, const char *state, double value, int *x, int *y); + +/** Get x padding for BOX or TABLE part. + * + * @param obj Object being edited. + * @param part Part that has BOX/TABLE type. + * @param state Name of the state. + * @param value Value of the state. + * + * @return The padding by x axis. + * @since 1.16 + */ +EAPI int +edje_edit_state_container_padding_x_get(Evas_Object *obj, const char *part, const char *state, double value); + +/** Get y padding for BOX or TABLE part. + * + * @param obj Object being edited. + * @param part Part that has BOX/TABLE type. + * @param state Name of the state. + * @param value Value of the state. + * + * @return The padding by y axis. + * @since 1.16 + */ +EAPI int +edje_edit_state_container_padding_y_get(Evas_Object *obj, const char *part, const char *state, double value); /** Set x and y paddings for BOX or TABLE part. * @@ -2118,13 +2145,42 @@ edje_edit_state_container_padding_get(Evas_Object *obj, const char *part, * @param x Value for setting x padding. * @param y Value for setting y padding. * + * @deprecated Use edje_edit_state_container_padding_x_set() and + * edje_edit_state_container_padding_y_set() instead. + * * @return @c EINA_TRUE in case of success, @c EINA_FALSE otherwise. * @since 1.14 */ +EINA_DEPRECATED EAPI Eina_Bool +edje_edit_state_container_padding_set(Evas_Object *obj, const char *part, const char *state, double value, int x, int y); + +/** Set x padding for BOX or TABLE part. + * + * @param obj Object being edited. + * @param part Part that has BOX/TABLE type. + * @param state Name of the state. + * @param value Value of the state. + * @param x New x padding value. + * + * @return @c EINA_TRUE in case of success, @c EINA_FALSE otherwise. + * @since 1.16 + */ EAPI Eina_Bool -edje_edit_state_container_padding_set(Evas_Object *obj, const char *part, - const char *state, double value, - int x, int y); +edje_edit_state_container_padding_x_set(Evas_Object *obj, const char *part, const char *state, double value, int x); + +/** Set y padding for BOX or TABLE part. + * + * @param obj Object being edited. + * @param part Part that has BOX/TABLE type. + * @param state Name of the state. + * @param value Value of the state. + * @param y New y padding value. + * + * @return @c EINA_TRUE in case of success, @c EINA_FALSE otherwise. + * @since 1.16 + */ +EAPI Eina_Bool +edje_edit_state_container_padding_y_set(Evas_Object *obj, const char *part, const char *state, double value, int y); /** Set x and y align for BOX or TABLE part. * diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index 9c931ae..49ccdea 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c @@ -4356,6 +4356,7 @@ FUNC_CONTAINER_INT(padding, y) #undef FUNC_CONTAINER_INT + #define FUNC_CONTAINER_DOUBLE(CLASS, VALUE) \ EAPI double \ edje_edit_state_container_##CLASS##_##VALUE##_get(Evas_Object *obj, const char *part, const char *state, double value) \ -- 2.7.4