From 7923e9799d3a5ce06f6ebe31fd208c8063b78122 Mon Sep 17 00:00:00 2001 From: Vitalii Vorobiov Date: Tue, 23 Feb 2016 18:07:12 +0000 Subject: [PATCH] Edje_Edit: ability to set size class into certain part's state API looks like this edje_edit_state_size_class_set --- src/lib/edje/Edje_Edit.h | 15 +++++++++++++++ src/lib/edje/edje_edit.c | 10 ++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h index 12af3d788e..e775f5654b 100644 --- a/src/lib/edje/Edje_Edit.h +++ b/src/lib/edje/Edje_Edit.h @@ -3759,6 +3759,21 @@ EAPI Eina_Bool edje_edit_state_align_x_set(Evas_Object *obj, const char *part, c */ EAPI Eina_Bool edje_edit_state_align_y_set(Evas_Object *obj, const char *part, const char *state, double value, double align); +/** Set the size class of the given part state. + * + * @param obj Object being edited. + * @param part Part that contain state. + * @param state The name of the state to set size class (not including the state value). + * @param value The state value. + * @param text_class The size class to assign. + * + * @return @c EINA_TRUE in case of success, @c EINA_FALSE otherwise. + * + * @since 1.18 + */ +EAPI Eina_Bool +edje_edit_state_text_class_set(Evas_Object *obj, const char *part, const char *state, double value, const char *size_class); + /** Get the minimum width value of a part state. * * @param obj Object being edited. diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index 913af781b0..582fff97c2 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c @@ -6328,6 +6328,16 @@ FUNC_STATE_DOUBLE(aspect, max); FUNC_STATE_DOUBLE(minmul, w); FUNC_STATE_DOUBLE(minmul, h); +EAPI Eina_Bool +edje_edit_state_size_class_set(Evas_Object *obj, const char *part, const char *state, double value, const char *size_class) +{ + GET_PD_OR_RETURN(EINA_FALSE); + + _edje_if_string_replace(ed, &pd->size_class, size_class); + + return EINA_TRUE; +} + EAPI Eina_Bool edje_edit_state_fill_smooth_get(Evas_Object *obj, const char *part, const char *state, double value) {