EAPI Eina_Bool
edje_edit_state_text_source_set(Evas_Object *obj, const char *part, const char *state, double value, const char *source);
+/** Get the text 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 get text class (not including the state value).
+ * @param value The state value.
+ *
+ * @return The current text class.
+ */
+EAPI const char *
+edje_edit_state_text_class_get(Evas_Object *obj, const char *part, const char *state, double value);
+
+/** Set the text 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 text class (not including the state value).
+ * @param value The state value.
+ * @param color_class The text class to assign.
+ *
+ * @return EINA_TRUE if successful, EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool
+edje_edit_state_text_class_set(Evas_Object *obj, const char *part, const char *state, double value, const char *text_class);
+
/** Get the list of all the fonts in the given edje.
*
* Use edje_edit_string_list_free() when you don't need the list anymore.
edje_edit_state_text_set(Evas_Object *obj, const char *part, const char *state, double value, const char *text)
{
Edje_Part_Description_Text *txt;
-
if ((!obj) || (!part) || (!state) || (!text))
return EINA_FALSE;
GET_PD_OR_RETURN(EINA_FALSE);
return EINA_TRUE;
}
+EAPI const char*
+edje_edit_state_text_class_get(Evas_Object *obj, const char *part, const char *state, double value)
+{
+ Edje_Part_Description_Text *txt;
+ GET_PD_OR_RETURN(NULL);
+
+ if ((rp->part->type != EDJE_PART_TYPE_TEXT) &&
+ (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK))
+ return NULL;
+ txt = (Edje_Part_Description_Text *) pd;
+
+ return eina_stringshare_add(txt->text.text_class);
+}
+
+EAPI Eina_Bool
+edje_edit_state_text_class_set(Evas_Object *obj, const char *part, const char *state, double value, const char *text_class)
+{
+ Edje_Part_Description_Text *txt;
+ if (!text_class) return EINA_FALSE;
+ GET_PD_OR_RETURN(EINA_FALSE);
+
+ if ((rp->part->type != EDJE_PART_TYPE_TEXT) &&
+ (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK))
+ return EINA_FALSE;
+ txt = (Edje_Part_Description_Text *) pd;
+
+ txt->text.text_class = (char *) eina_stringshare_add(text_class);
+ return EINA_TRUE;
+}
+
/****************/
/* IMAGES API */
/****************/