* @param state The name of the state to set visibility (not including the state value).
* @param value The state value.
* @param visible To set state visible (EINA_TRUE if the state is visible, EINA_FALSE otherwise)
+ *
+ * @return EINA_TRUE if successful, EINA_FALSE otherwise.
*/
-EAPI void edje_edit_state_visible_set(Evas_Object *obj, const char *part, const char *state, double value, Eina_Bool visible);
+EAPI Eina_Bool edje_edit_state_visible_set(Evas_Object *obj, const char *part, const char *state, double value, Eina_Bool visible);
/** Get the color class of the given part state.
*
* @param state The name of the state to set color class (not including the state value).
* @param value The state value.
* @param color_class The color class to assign.
+ *
+ * @return EINA_TRUE if successful, EINA_FALSE otherwise.
*/
-EAPI void edje_edit_state_color_class_set(Evas_Object *obj, const char *part, const char *state, double value, const char *color_class);
+EAPI Eina_Bool edje_edit_state_color_class_set(Evas_Object *obj, const char *part, const char *state, double value, const char *color_class);
/** Get the list of parameters for an external part.
*
return pd->visible;
}
-EAPI void
+EAPI Eina_Bool
edje_edit_state_visible_set(Evas_Object *obj, const char *part, const char *state, double value, Eina_Bool visible)
{
- GET_PD_OR_RETURN();
- //printf("Set state visible flag of part: %s state: %s to: %d\n", part, state, visible);
+ if ((!obj) || (!part) || (!state))
+ return EINA_FALSE;
+ GET_PD_OR_RETURN(EINA_FALSE);
+
if (visible) pd->visible = 1;
else pd->visible = 0;
+
edje_object_calc_force(obj);
+ return EINA_TRUE;
}
EAPI unsigned char
return eina_stringshare_add(pd->color_class);
}
-EAPI void
+EAPI Eina_Bool
edje_edit_state_color_class_set(Evas_Object *obj, const char *part, const char *state, double value, const char *color_class)
{
- GET_PD_OR_RETURN();
- //printf("Set ColorClass of part: %s state: %s [to: %s]\n", part, state, color_class);
+ if ((!obj) || (!part) || (!state))
+ return EINA_FALSE;
+ GET_PD_OR_RETURN(EINA_FALSE);
+
_edje_if_string_free(ed, pd->color_class);
- pd->color_class = (char*)eina_stringshare_add(color_class);
+
+ pd->color_class = (char *)eina_stringshare_add(color_class);
+ return EINA_TRUE;
}
EAPI const Eina_List *
if ((!obj) || (!part) || (!state))
return EINA_FALSE;
- if ((fill < 0) || (fill > 2))
+ if (fill > 2)
return EINA_FALSE;
eina_error_set(0);