* implement edje_edit_state_color_class_get/set
authordavemds <davemds@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 28 Sep 2008 22:23:43 +0000 (22:23 +0000)
committerdavemds <davemds@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 28 Sep 2008 22:23:43 +0000 (22:23 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@36298 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/Edje_Edit.h
src/lib/edje_edit.c

index c8bc16d..b748024 100644 (file)
@@ -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
+);
+
 
 //@}
 /******************************************************************************/
index c8e64b7..a2177c3 100644 (file)
@@ -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 */
 /**************/