edje: Edje-Edit: edje_edit_state_map_on_xet()
authorIgor Gala <i.gala@samsung.com>
Thu, 3 Jul 2014 10:37:16 +0000 (19:37 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Thu, 3 Jul 2014 10:37:16 +0000 (19:37 +0900)
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
src/lib/edje/edje_edit.c

index 0740e29..8cd253e 100644 (file)
@@ -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.
index 7f9f17d..2f8c888 100644 (file)
@@ -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 */