raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=40d4acd77edb2ade0a03f66b7c7d4af94787b4f6

commit 40d4acd77edb2ade0a03f66b7c7d4af94787b4f6
Author: Vyacheslav Reutskiy <[email protected]>
Date:   Mon Dec 2 14:54:28 2013 +0900

    edje_edit: Add getters and setters for fixed param
    
    Reviewers: cedric, seoz, raster
    
    Reviewed By: raster
    
    CC: cedric
    
    Differential Revision: https://phab.enlightenment.org/D339
---
 src/lib/edje/Edje_Edit.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 src/lib/edje/edje_edit.c | 20 ++++++++++++++++++++
 2 files changed, 66 insertions(+)

diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h
index 23611da..542a05d 100644
--- a/src/lib/edje/Edje_Edit.h
+++ b/src/lib/edje/Edje_Edit.h
@@ -1773,6 +1773,52 @@ EAPI int edje_edit_state_max_h_get(Evas_Object *obj, 
const char *part, const cha
  */
 EAPI Eina_Bool edje_edit_state_max_h_set(Evas_Object *obj, const char *part, 
const char *state, double value, int max_h);
 
+/** Get the fixed width value of a part state.
+ *
+ * @param obj Object being edited.
+ * @param part Part that contain state.
+ * @param state The name of the state to get fixed width value (not including 
the state value).
+ * @param value The state value.
+ *
+ * @return The fixed width value.
+ */
+EAPI Eina_Bool edje_edit_state_fixed_w_get(Evas_Object *obj, const char *part, 
const char *state, double value);
+
+/** Set the fixed width value of a part state.
+ *
+ * @param obj Object being edited.
+ * @param part Part that contain state.
+ * @param state The name of the state to set fixed width value (not including 
the state value).
+ * @param value The state value.
+ * @param fixed Fixed width value.
+ *
+ * @return EINA_TRUE if successful, EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool edje_edit_state_fixed_w_set(Evas_Object *obj, const char *part, 
const char *state, double value, Eina_Bool fixed);
+
+/** Get the fixed height value of a part state.
+ *
+ * @param obj Object being edited.
+ * @param part Part that contain state.
+ * @param state The name of the state to get fixed height value (not including 
the state value).
+ * @param value The state value.
+ *
+ * @return The fixed height value.
+ */
+EAPI Eina_Bool edje_edit_state_fixed_h_get(Evas_Object *obj, const char *part, 
const char *state, double value);
+
+/** Set the fixed height value of a part state.
+ *
+ * @param obj Object being edited.
+ * @param part Part that contain state.
+ * @param state The name of the state to set maximum height (not including the 
state value).
+ * @param value The state value.
+ * @param fixed Fixed height value.
+ *
+ * @return EINA_TRUE if successful, EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool edje_edit_state_fixed_h_set(Evas_Object *obj, const char *part, 
const char *state, double value, Eina_Bool fixed);
+
 /** Get the minimum aspect value of a part state.
  *
  * @param obj Object being edited.
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index b97f03f..68d9561 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -3387,12 +3387,32 @@ edje_edit_state_color3_set(Evas_Object *obj, const char 
*part, const char *state
      return EINA_TRUE;                                                  \
   }
 
+#define FUNC_STATE_BOOL(Class, Value)                                   \
+  EAPI Eina_Bool                                                        \
+  edje_edit_state_##Class##_##Value##_get(Evas_Object *obj, const char *part, 
const char *state, double value) \
+  {                                                                     \
+     GET_PD_OR_RETURN(0);                                               \
+     return pd->Class.Value;                                            \
+  }                                                                     \
+  EAPI Eina_Bool \
+  edje_edit_state_##Class##_##Value##_set(Evas_Object *obj, const char *part, 
const char *state, double value, Eina_Bool v) \
+  {                                                                     \
+     if ((!obj) || (!part) || (!state))                                 \
+       return EINA_FALSE;                                               \
+     GET_PD_OR_RETURN(EINA_FALSE);                                      \
+     pd->Class.Value = v;                                               \
+     edje_object_calc_force(obj);                                       \
+     return EINA_TRUE;                                                  \
+  }
+
 FUNC_STATE_DOUBLE(align, x);
 FUNC_STATE_DOUBLE(align, y);
 FUNC_STATE_INT(min, w, 0);
 FUNC_STATE_INT(min, h, 0);
 FUNC_STATE_INT(max, w, -1);
 FUNC_STATE_INT(max, h, -1);
+FUNC_STATE_BOOL(fixed, w);
+FUNC_STATE_BOOL(fixed, h);
 FUNC_STATE_DOUBLE(aspect, min);
 FUNC_STATE_DOUBLE(aspect, max);
 

-- 


Reply via email to