diff --git a/legacy/edje/src/lib/Edje_Edit.h b/legacy/edje/src/lib/Edje_Edit.h index c8bc16d6f8..b748024b9a 100644 --- a/legacy/edje/src/lib/Edje_Edit.h +++ b/legacy/edje/src/lib/Edje_Edit.h @@ -1149,6 +1149,23 @@ edje_edit_state_visible_set( unsigned char visible ///< TRUE to set the state visible ); +/**Get the color class of the given part state. Remember to free the string with edje_edit_string_free()*/ +EAPI const char* ///@return The current color_class of the part state +edje_edit_state_color_class_get( + Evas_Object *obj, ///< The edje object + const char *part, ///< The name of the part + const char *state ///< The name of the 'part state' (ex. "default 0.00") +); + +/**Set the color class for the given part state.*/ +EAPI void +edje_edit_state_color_class_set( + Evas_Object *obj, ///< The edje object + const char *part, ///< The name of the part + const char *state, ///< The name of the 'part state' (ex. "default 0.00") + const char *color_class ///< The new color_class to assign +); + //@} /******************************************************************************/ diff --git a/legacy/edje/src/lib/edje_edit.c b/legacy/edje/src/lib/edje_edit.c index c8e64b731f..a2177c3ba5 100644 --- a/legacy/edje/src/lib/edje_edit.c +++ b/legacy/edje/src/lib/edje_edit.c @@ -2661,6 +2661,23 @@ edje_edit_state_visible_set(Evas_Object *obj, const char *part, const char *stat edje_object_calc_force(obj); } +EAPI const char* +edje_edit_state_color_class_get(Evas_Object *obj, const char *part, const char *state) +{ + GET_PD_OR_RETURN(NULL); + printf("Get ColorClass of part: %s state: %s\n", part, state); + return evas_stringshare_add(pd->color_class); +} + +EAPI void +edje_edit_state_color_class_set(Evas_Object *obj, const char *part, const char *state, const char *color_class) +{ + GET_PD_OR_RETURN(); + printf("Set ColorClass of part: %s state: %s [to: %s]\n", part, state, color_class); + _edje_if_string_free(ed, pd->color_class); + pd->color_class = (char*)evas_stringshare_add(color_class); +} + /**************/ /* TEXT API */ /**************/