* @param state The name of the state to get horizontal align (not including the state value).
* @param value The state value.
* @param align The new vertical align value.
+ *
+ * @return EINA_TRUE if the parameter was found, EINA_FALSE otherwise.
*/
-EAPI void edje_edit_state_align_x_set(Evas_Object *obj, const char *part, const char *state, double value, double align);
+EAPI Eina_Bool edje_edit_state_align_x_set(Evas_Object *obj, const char *part, const char *state, double value, double align);
/** Set the vertical align value of a part state.
*
* @param state The name of the state to get vertical align (not including the state value).
* @param value The state value.
* @param align The new vertical align value.
+ *
+ * @return EINA_TRUE if the parameter was found, EINA_FALSE otherwise.
*/
-EAPI void edje_edit_state_align_y_set(Evas_Object *obj, const char *part, const char *state, double value, double align);
+EAPI Eina_Bool edje_edit_state_align_y_set(Evas_Object *obj, const char *part, const char *state, double value, double align);
/** Get the minimum width value of a part state.
*
* @param state The name of the state to set minimum aspect (not including the state value).
* @param value The state value.
* @param aspect Minimum aspect value.
+ *
+ * @return EINA_TRUE if the parameter was found, EINA_FALSE otherwise.
*/
-EAPI void edje_edit_state_aspect_min_set(Evas_Object *obj, const char *part, const char *state, double value, double aspect);
+EAPI Eina_Bool edje_edit_state_aspect_min_set(Evas_Object *obj, const char *part, const char *state, double value, double aspect);
/** Set the maximum aspect value of a part state.
*
* @param state The name of the state to set maximum aspect (not including the state value).
* @param value The state value.
* @param aspect Maximum aspect value.
+ *
+ * @return EINA_TRUE if the parameter was found, EINA_FALSE otherwise.
*/
-EAPI void edje_edit_state_aspect_max_set(Evas_Object *obj, const char *part, const char *state, double value, double aspect);
+EAPI Eina_Bool edje_edit_state_aspect_max_set(Evas_Object *obj, const char *part, const char *state, double value, double aspect);
/** Get the aspect preference of a part state.
*
* @param value The state value.
* @param pref The aspect preference to set (0 = None, 1 = Vertical, 2
* = Horizontal, 3 = Both)
+ *
+ * @return EINA_TRUE if the parameter was found, EINA_FALSE otherwise.
*/
-EAPI void edje_edit_state_aspect_pref_set(Evas_Object *obj, const char *part, const char *state, double value, unsigned char pref);
+EAPI Eina_Bool edje_edit_state_aspect_pref_set(Evas_Object *obj, const char *part, const char *state, double value, unsigned char pref);
/** Get the fill horizontal origin relative value of a part state.
*
* @param state The name of the state to set fill horizontal origin relative to area (not including the state value).
* @param value The state value.
* @param x The fill horizontal origin value.
+ *
+ * @return EINA_TRUE if the parameter was found, EINA_FALSE otherwise.
*/
-EAPI void edje_edit_state_fill_origin_relative_x_set(Evas_Object *obj, const char *part, const char *state, double value, double x);
+EAPI Eina_Bool edje_edit_state_fill_origin_relative_x_set(Evas_Object *obj, const char *part, const char *state, double value, double x);
/** Set the fill horizontal origin relative value of a part state.
*
* @param state The name of the state to set fill vertical origin relative to area (not including the state value).
* @param value The state value.
* @param y The fill vertical origin value.
+ *
+ * @return EINA_TRUE if the parameter was found, EINA_FALSE otherwise.
*/
-EAPI void edje_edit_state_fill_origin_relative_y_set(Evas_Object *obj, const char *part, const char *state, double value, double y);
+EAPI Eina_Bool edje_edit_state_fill_origin_relative_y_set(Evas_Object *obj, const char *part, const char *state, double value, double y);
/** Set the fill horizontal origin offset value of a part state.
*
* @param state The name of the state to set fill horizontal origin offset relative to area (not including the state value).
* @param value The state value.
* @param x The fill horizontal origin offset value.
+ *
+ * @return EINA_TRUE if the parameter was found, EINA_FALSE otherwise.
*/
-EAPI void edje_edit_state_fill_origin_offset_x_set(Evas_Object *obj, const char *part, const char *state, double value, double x);
+EAPI Eina_Bool edje_edit_state_fill_origin_offset_x_set(Evas_Object *obj, const char *part, const char *state, double value, double x);
/** Set the fill vertical origin offset value of a part state.
*
* @param state The name of the state to set fill vertical origin offset relative to area (not including the state value).
* @param value The state value.
* @param y The fill vertical origin offset value.
+ *
+ * @return EINA_TRUE if the parameter was found, EINA_FALSE otherwise.
*/
-EAPI void edje_edit_state_fill_origin_offset_y_set(Evas_Object *obj, const char *part, const char *state, double value, double y);
+EAPI Eina_Bool edje_edit_state_fill_origin_offset_y_set(Evas_Object *obj, const char *part, const char *state, double value, double y);
/** Get the fill horizontal size relative value of a part state.
*
* relative value (not including the state value).
* @param value The state value.
* @param x The horizontal size relative value.
+ *
+ * @return EINA_TRUE if the parameter was found, EINA_FALSE otherwise.
*/
-EAPI void edje_edit_state_fill_size_relative_x_set(Evas_Object *obj, const char *part, const char *state, double value, double x);
+EAPI Eina_Bool edje_edit_state_fill_size_relative_x_set(Evas_Object *obj, const char *part, const char *state, double value, double x);
/** Set the fill vertical size relative value of a part state.
*
* relative value (not including the state value).
* @param value The state value.
* @param x The vertical size relative value.
+ *
+ * @return EINA_TRUE if the parameter was found, EINA_FALSE otherwise.
*/
-EAPI void edje_edit_state_fill_size_relative_y_set(Evas_Object *obj, const char *part, const char *state, double value, double x);
+EAPI Eina_Bool edje_edit_state_fill_size_relative_y_set(Evas_Object *obj, const char *part, const char *state, double value, double x);
/** Set the fill horizontal size offset value of a part state.
*
* offset relative value (not including the state value).
* @param value The state value.
* @param x The horizontal size offset value.
+ *
+ * @return EINA_TRUE if the parameter was found, EINA_FALSE otherwise.
*/
-EAPI void edje_edit_state_fill_size_offset_x_set(Evas_Object *obj, const char *part, const char *state, double value, double x);
+EAPI Eina_Bool edje_edit_state_fill_size_offset_x_set(Evas_Object *obj, const char *part, const char *state, double value, double x);
/** Set the fill vertical size offset value of a part state.
*
* relative value (not including the state value).
* @param value The state value.
* @param y The vertical size offset value.
+ *
+ * @return EINA_TRUE if the parameter was found, EINA_FALSE otherwise.
*/
-EAPI void edje_edit_state_fill_size_offset_y_set(Evas_Object *obj, const char *part, const char *state, double value, double y);
+EAPI Eina_Bool edje_edit_state_fill_size_offset_y_set(Evas_Object *obj, const char *part, const char *state, double value, double y);
/** Get the visibility of a part state.
*
GET_PD_OR_RETURN(0); \
return TO_DOUBLE(pd->Class.Value); \
} \
- EAPI void \
+ EAPI Eina_Bool \
edje_edit_state_##Class##_##Value##_set(Evas_Object *obj, const char *part, const char *state, double value, double v) \
{ \
- GET_PD_OR_RETURN(); \
- pd->Class.Value = FROM_DOUBLE(v); \
+ GET_PD_OR_RETURN(EINA_FALSE); \
+ pd->Class.Value = FROM_DOUBLE(v); \
edje_object_calc_force(obj); \
+ return EINA_TRUE; \
}
#define FUNC_STATE_INT(Class, Value, Min) \
\
return 0; \
} \
- EAPI void \
+ EAPI Eina_Bool \
edje_edit_state_fill_##Type##_relative_##Value##_set(Evas_Object *obj, const char *part, const char *state, double value, double v) \
{ \
- GET_PD_OR_RETURN(); \
+ GET_PD_OR_RETURN(EINA_FALSE); \
\
switch (rp->part->type) \
{ \
break; \
} \
default: \
- return; \
+ return EINA_FALSE; \
} \
\
edje_object_calc_force(obj); \
+ return EINA_TRUE; \
}
#define FUNC_STATE_INT_FILL(Class, Type, Value) \
} \
return 0; \
} \
- EAPI void \
+ EAPI Eina_Bool \
edje_edit_state_fill_##Type##_offset_##Value##_set(Evas_Object *obj, const char *part, const char *state, double value, double v) \
{ \
- GET_PD_OR_RETURN(); \
+ GET_PD_OR_RETURN(EINA_FALSE); \
\
switch (rp->part->type) \
{ \
img = (Edje_Part_Description_Image*) pd; \
\
img->image.fill.Class##abs_##Value = FROM_DOUBLE(v); \
- return; \
+ break; \
} \
case EDJE_PART_TYPE_PROXY: \
{ \
pro = (Edje_Part_Description_Proxy*) pd; \
\
pro->proxy.fill.Class##abs_##Value = FROM_DOUBLE(v); \
- return; \
+ break; \
} \
default: \
- return; \
+ return EINA_FALSE; \
} \
\
edje_object_calc_force(obj); \
+ return EINA_TRUE; \
}
FUNC_STATE_DOUBLE_FILL(pos_, origin, x);
return pd->aspect.prefer;
}
-EAPI void
+EAPI Eina_Bool
edje_edit_state_aspect_pref_set(Evas_Object *obj, const char *part, const char *state, double value, unsigned char pref)
{
- GET_PD_OR_RETURN();
-
- //printf("SET ASPECT_PREF of state '%s' [to: %d]\n", state, pref);
+ GET_PD_OR_RETURN(EINA_FALSE);
+ if ((!pref) || (pref > 3)) return EINA_FALSE;
pd->aspect.prefer = pref;
+ return EINA_TRUE;
}
EAPI const char*