From 6fbcf48fe054e7b9bfa50c8932ca49976567647b Mon Sep 17 00:00:00 2001 From: Igor Gala Date: Thu, 3 Jul 2014 19:37:16 +0900 Subject: [PATCH] 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 --- src/lib/edje/Edje_Edit.h | 27 +++++++++++++++++++++++++++ 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 0740e29..8cd253e 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 7f9f17d..2f8c888 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 */ -- 2.7.4