diff options
author | Igor Gala <i.gala@samsung.com> | 2014-07-03 19:37:16 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2014-07-03 19:37:16 +0900 |
commit | 6fbcf48fe054e7b9bfa50c8932ca49976567647b (patch) | |
tree | d81137c2b300a4c07fe63dfeb2b53f5f549dfe7b | |
parent | d8316bcc0757f604ede2af0891345d702d0442c4 (diff) | |
download | efl-6fbcf48fe054e7b9bfa50c8932ca49976567647b.tar.gz |
edje: Edje-Edit: edje_edit_state_map_on_xet()
Summary:
There are new 'get and set' API for block 'map'.
Those functions return or set flag which enables mapping for the part.
Default is 0.
@feature
Reviewers: seoz, cedric, raster, Hermet
CC: reutskiy.v.v, cedric
Differential Revision: https://phab.enlightenment.org/D1051
-rw-r--r-- | src/lib/edje/Edje_Edit.h | 27 | ||||
-rw-r--r-- | src/lib/edje/edje_edit.c | 25 |
2 files changed, 48 insertions, 4 deletions
diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h index 0740e2934b..8cd253e961 100644 --- a/src/lib/edje/Edje_Edit.h +++ b/src/lib/edje/Edje_Edit.h @@ -3430,6 +3430,33 @@ EAPI unsigned char edje_edit_state_limit_get(Evas_Object *obj, const char *part, * Functions to deal with objects with rotation properties (see @ref edcref). */ //@{ +/** Get the flag which enables mapping for the part. + * + * @param obj Object being edited. + * @param part The name of the part. + * @param state The name of the state (not including the state value). + * @param value The state value. + * + * @return @cEINA_TRUE in case if mapping allowed or @cEINA_FALSE otherwise. + * @since 1.11 + **/ +EAPI Eina_Bool +edje_edit_state_map_on_get(Evas_Object *obj, const char *part, const char *state, double value); + +/** This enables mapping for the part. Default is 0. + * + * @param obj Object being edited. + * @param part The name of the part. + * @param state The name of the state (not including the state value). + * @param value The state value. + * @param on The flag which allow mapping for the part. + * + * @return @cEINA_TRUE in case of success, @cEINA_FALSE otherwise. + * @since 1.11 + **/ +EAPI Eina_Bool +edje_edit_state_map_on_set(Evas_Object *obj, const char *part, const char *state, double value, Eina_Bool on); + /** Get the part's name that is used as the 'perspective point'. * * @param obj Object being edited. diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index 7f9f17db57..2f8c888e0f 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c @@ -6011,6 +6011,9 @@ edje_edit_state_limit_get(Evas_Object *obj, const char *part, const char *state, return pd->limit; } +/**************/ +/* MAP API */ +/**************/ EAPI const char * edje_edit_state_map_light_get(Evas_Object *obj, const char *part, const char *state, double value) @@ -6285,10 +6288,6 @@ edje_edit_state_map_point_color_set(Evas_Object *obj, const char *part, const ch return EINA_TRUE; } -/**************/ -/* MAP API */ -/**************/ - EAPI const char * edje_edit_state_map_perspective_get(Evas_Object *obj, const char *part, const char *state, double value) { @@ -6318,6 +6317,24 @@ edje_edit_state_map_perspective_set(Evas_Object *obj, const char *part, const ch return EINA_TRUE; } +EAPI Eina_Bool +edje_edit_state_map_on_get(Evas_Object *obj, const char *part, const char *state, double value) +{ + GET_PD_OR_RETURN(EINA_FALSE); + + return pd->map.on; +} + +EAPI Eina_Bool +edje_edit_state_map_on_set(Evas_Object *obj, const char *part, const char *state, double value, Eina_Bool on) +{ + GET_PD_OR_RETURN(EINA_FALSE); + + pd->map.on = on; + + edje_object_calc_force(obj); + return EINA_TRUE; +} /**************/ /* TEXT API */ |