summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVyacheslav Reutskiy <v.reutskiy@samsung.com>2013-12-19 22:48:03 +0900
committerCedric BAIL <cedric.bail@samsung.com>2013-12-20 14:43:23 +0900
commite69929321fae799b136b3749f0952604ab9a0baa (patch)
tree819d3b784426e77ba36e353c19e035623109321c /src
parent067cbf6df84943c86646b57d87c5ec3c3fd17fbb (diff)
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>
Diffstat (limited to '')
-rw-r--r--src/lib/edje/Edje_Edit.h26
-rw-r--r--src/lib/edje/edje_edit.c50
2 files changed, 76 insertions, 0 deletions
diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h
index 72d96f1a2c..0d0721126b 100644
--- a/src/lib/edje/Edje_Edit.h
+++ b/src/lib/edje/Edje_Edit.h
@@ -1978,6 +1978,32 @@ EAPI unsigned char edje_edit_state_aspect_pref_get(Evas_Object *obj, const char
1978 */ 1978 */
1979EAPI Eina_Bool edje_edit_state_aspect_pref_set(Evas_Object *obj, const char *part, const char *state, double value, unsigned char pref); 1979EAPI Eina_Bool edje_edit_state_aspect_pref_set(Evas_Object *obj, const char *part, const char *state, double value, unsigned char pref);
1980 1980
1981/** Get the smooth property for given part state.
1982 *
1983 * @param obj Object being edited.
1984 * @param part Part that contain state.
1985 * @param state The name of the state to get the fill horizontal origin relative to area (not including the state value).
1986 * @param value The state value.
1987 *
1988 * @return The smooth value.
1989 */
1990EAPI Eina_Bool
1991edje_edit_state_fill_smooth_get(Evas_Object *obj, const char *part, const char *state, double value);
1992
1993
1994/** Set the smooth property for given part state.
1995 *
1996 * @param obj Object being edited.
1997 * @param part Part that contain state.
1998 * @param state The name of the state to set fill horizontal origin relative to area (not including the state value).
1999 * @param value The state value.
2000 * @param smooth The smooth value.
2001 *
2002 * @return EINA_TRUE if the parameter was found, EINA_FALSE otherwise.
2003 */
2004EAPI Eina_Bool
2005edje_edit_state_fill_smooth_set(Evas_Object *obj, const char *part, const char *state, double value, Eina_Bool smooth);
2006
1981/** Get the fill horizontal origin relative value of a part state. 2007/** Get the fill horizontal origin relative value of a part state.
1982 * 2008 *
1983 * @param obj Object being edited. 2009 * @param obj Object being edited.
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 07a684ada7..1f7cddb572 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -3770,6 +3770,56 @@ FUNC_STATE_BOOL(fixed, h);
3770FUNC_STATE_DOUBLE(aspect, min); 3770FUNC_STATE_DOUBLE(aspect, min);
3771FUNC_STATE_DOUBLE(aspect, max); 3771FUNC_STATE_DOUBLE(aspect, max);
3772 3772
3773EAPI Eina_Bool
3774edje_edit_state_fill_smooth_get(Evas_Object *obj, const char *part, const char *state, double value)
3775{
3776 GET_PD_OR_RETURN(EINA_FALSE)
3777
3778 switch (rp->part->type)
3779 {
3780 case EDJE_PART_TYPE_IMAGE:
3781 {
3782 Edje_Part_Description_Image *img;
3783 img = (Edje_Part_Description_Image*) pd;
3784 return img->image.fill.smooth;
3785 }
3786 case EDJE_PART_TYPE_PROXY:
3787 {
3788 Edje_Part_Description_Proxy *pro;
3789 pro = (Edje_Part_Description_Proxy*) pd;
3790 return pro->proxy.fill.smooth;
3791 }
3792 }
3793
3794 return EINA_FALSE;
3795}
3796
3797EAPI Eina_Bool
3798edje_edit_state_fill_smooth_set(Evas_Object *obj, const char *part, const char *state, double value, Eina_Bool smooth)
3799{
3800 GET_PD_OR_RETURN(EINA_FALSE)
3801
3802 switch (rp->part->type)
3803 {
3804 case EDJE_PART_TYPE_IMAGE:
3805 {
3806 Edje_Part_Description_Image *img;
3807 img = (Edje_Part_Description_Image*) pd;
3808 img->image.fill.smooth = smooth;
3809 return EINA_TRUE;
3810 }
3811 case EDJE_PART_TYPE_PROXY:
3812 {
3813 Edje_Part_Description_Proxy *pro;
3814 pro = (Edje_Part_Description_Proxy*) pd;
3815 pro->proxy.fill.smooth = smooth;
3816 return EINA_TRUE;
3817 }
3818 }
3819
3820 return EINA_FALSE;
3821}
3822
3773#define FUNC_STATE_DOUBLE_FILL(Class, Type, Value) \ 3823#define FUNC_STATE_DOUBLE_FILL(Class, Type, Value) \
3774 EAPI double \ 3824 EAPI double \
3775 edje_edit_state_fill_##Type##_relative_##Value##_get(Evas_Object *obj, const char *part, const char *state, double value) \ 3825 edje_edit_state_fill_##Type##_relative_##Value##_get(Evas_Object *obj, const char *part, const char *state, double value) \