diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h index 14c83b3477..6b87dbd9e9 100644 --- a/src/lib/edje/Edje_Edit.h +++ b/src/lib/edje/Edje_Edit.h @@ -1989,6 +1989,40 @@ edje_edit_state_table_homogeneous_get(Evas_Object *obj, const char *part, * are working both for TABLE and BOX at same time. */ //@{ +/** Get whether vertical or horizontal minimum size's of the box are equal + * to the minimum vertical or horizontal size of items + * (function for BOX or TABLE part. + * If EINA_TRUE - is equal, if EINA_FALSE - is not) + * + * @param obj Object being edited. + * @param part Part that have BOX/TABLE type. + * @param state Name of the state. + * @param value Value of the state. + * @param h Variable to store horizontal min value. + * @param v Variable to store vertical min value. + * + * @return @c EINA_TRUE in case of success, @c EINA_FALSE otherwise. + * @since 1.14 + */ +EAPI Eina_Bool edje_edit_state_container_min_get(Evas_Object *obj, const char *part, const char *state, double value, Eina_Bool *h, Eina_Bool *v); + +/** Set whether vertical or horizontal minimum size's of the box are equal + * to the minimum vertical or horizontal size of items + * (function for BOX or TABLE part. + * If EINA_TRUE - is equal, if EINA_FALSE - is not) + * + * @param obj Object being edited. + * @param part Part that have BOX/TABLE type. + * @param state Name of the state. + * @param value Value of the state. + * @param h horizontal min value. + * @param v vertical min value. + * + * @return @c EINA_TRUE in case of success, @c EINA_FALSE otherwise. + * @since 1.14 + */ +EAPI Eina_Bool edje_edit_state_container_min_set(Evas_Object *obj, const char *part, const char *state, double value, Eina_Bool h, Eina_Bool v); + /** Get x and y paddings for BOX or TABLE part. * * @param obj Object being edited. diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index e87c632879..6fcffcee02 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c @@ -4346,6 +4346,66 @@ edje_edit_state_container_padding_set(Evas_Object *obj, const char *part, } return EINA_TRUE; } + +EAPI Eina_Bool +edje_edit_state_container_min_get(Evas_Object *obj, const char *part, const char *state, double value, Eina_Bool *h, Eina_Bool *v) +{ + GET_PD_OR_RETURN(EINA_FALSE) + + switch (rp->part->type) + { + case EDJE_PART_TYPE_TABLE: + { + Edje_Part_Description_Table *table; + table = (Edje_Part_Description_Table*) pd; + if (h) *h = table->table.min.h; + if (v) *v = table->table.min.v; + break; + } + case EDJE_PART_TYPE_BOX: + { + Edje_Part_Description_Box *box; + box = (Edje_Part_Description_Box*) pd; + if (h) *h = box->box.min.h; + if (v) *v = box->box.min.v; + break; + } + default: + return EINA_FALSE; + } + + return EINA_TRUE; +} + +EAPI Eina_Bool +edje_edit_state_container_min_set(Evas_Object *obj, const char *part, const char *state, double value, Eina_Bool h, Eina_Bool v) +{ + GET_PD_OR_RETURN(EINA_FALSE) + + switch (rp->part->type) + { + case EDJE_PART_TYPE_TABLE: + { + Edje_Part_Description_Table *table; + table = (Edje_Part_Description_Table*) pd; + table->table.min.h = h; + table->table.min.v = v; + break; + } + case EDJE_PART_TYPE_BOX: + { + Edje_Part_Description_Box *box; + box = (Edje_Part_Description_Box*) pd; + box->box.min.h = h; + box->box.min.v = v; + break; + } + default: + return EINA_FALSE; + } + return EINA_TRUE; +} + /***************************/ /* BOX & TABLE ITEMS API */ /***************************/