forked from enlightenment/efl
edje: edje_edit - adding getter and setter for smooth parameter
This commit will add API for working with smooth for image and proxy part type. There are two functions will be added: 1. edje_edit_state_fill_smooth_get 2. edje_edit_state_fill_smooth_set Reviewers: cedric, raster, seoz Reviewed By: cedric CC: cedric Differential Revision: https://phab.enlightenment.org/D394 Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
This commit is contained in:
parent
067cbf6df8
commit
e69929321f
|
@ -1978,6 +1978,32 @@ EAPI unsigned char edje_edit_state_aspect_pref_get(Evas_Object *obj, const char
|
|||
*/
|
||||
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 smooth property for given part state.
|
||||
*
|
||||
* @param obj Object being edited.
|
||||
* @param part Part that contain state.
|
||||
* @param state The name of the state to get the fill horizontal origin relative to area (not including the state value).
|
||||
* @param value The state value.
|
||||
*
|
||||
* @return The smooth value.
|
||||
*/
|
||||
EAPI Eina_Bool
|
||||
edje_edit_state_fill_smooth_get(Evas_Object *obj, const char *part, const char *state, double value);
|
||||
|
||||
|
||||
/** Set the smooth property for given part state.
|
||||
*
|
||||
* @param obj Object being edited.
|
||||
* @param part Part that contain 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 smooth The smooth value.
|
||||
*
|
||||
* @return EINA_TRUE if the parameter was found, EINA_FALSE otherwise.
|
||||
*/
|
||||
EAPI Eina_Bool
|
||||
edje_edit_state_fill_smooth_set(Evas_Object *obj, const char *part, const char *state, double value, Eina_Bool smooth);
|
||||
|
||||
/** Get the fill horizontal origin relative value of a part state.
|
||||
*
|
||||
* @param obj Object being edited.
|
||||
|
|
|
@ -3770,6 +3770,56 @@ FUNC_STATE_BOOL(fixed, h);
|
|||
FUNC_STATE_DOUBLE(aspect, min);
|
||||
FUNC_STATE_DOUBLE(aspect, max);
|
||||
|
||||
EAPI Eina_Bool
|
||||
edje_edit_state_fill_smooth_get(Evas_Object *obj, const char *part, const char *state, double value)
|
||||
{
|
||||
GET_PD_OR_RETURN(EINA_FALSE)
|
||||
|
||||
switch (rp->part->type)
|
||||
{
|
||||
case EDJE_PART_TYPE_IMAGE:
|
||||
{
|
||||
Edje_Part_Description_Image *img;
|
||||
img = (Edje_Part_Description_Image*) pd;
|
||||
return img->image.fill.smooth;
|
||||
}
|
||||
case EDJE_PART_TYPE_PROXY:
|
||||
{
|
||||
Edje_Part_Description_Proxy *pro;
|
||||
pro = (Edje_Part_Description_Proxy*) pd;
|
||||
return pro->proxy.fill.smooth;
|
||||
}
|
||||
}
|
||||
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
edje_edit_state_fill_smooth_set(Evas_Object *obj, const char *part, const char *state, double value, Eina_Bool smooth)
|
||||
{
|
||||
GET_PD_OR_RETURN(EINA_FALSE)
|
||||
|
||||
switch (rp->part->type)
|
||||
{
|
||||
case EDJE_PART_TYPE_IMAGE:
|
||||
{
|
||||
Edje_Part_Description_Image *img;
|
||||
img = (Edje_Part_Description_Image*) pd;
|
||||
img->image.fill.smooth = smooth;
|
||||
return EINA_TRUE;
|
||||
}
|
||||
case EDJE_PART_TYPE_PROXY:
|
||||
{
|
||||
Edje_Part_Description_Proxy *pro;
|
||||
pro = (Edje_Part_Description_Proxy*) pd;
|
||||
pro->proxy.fill.smooth = smooth;
|
||||
return EINA_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
#define FUNC_STATE_DOUBLE_FILL(Class, Type, Value) \
|
||||
EAPI double \
|
||||
edje_edit_state_fill_##Type##_relative_##Value##_get(Evas_Object *obj, const char *part, const char *state, double value) \
|
||||
|
|
Loading…
Reference in New Issue