cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=64a79017adffe610f8b57d0ef35bd4e8386cefe0

commit 64a79017adffe610f8b57d0ef35bd4e8386cefe0
Author: Vorobiov Vitalii <[email protected]>
Date:   Tue Jun 10 17:23:24 2014 +0200

    edje: Edje_Edit - add edje_edit_state_minmul functions.
    
    Summary:
    Add two main functions
    - edje_edit_state_minmul_w_set
    - edje_edit_state_minmul_h_set
    - edje_edit_state_minmul_w_get
    - edje_edit_state_minmul_h_get
    Also support minmul into state's source code generation.
    
    @feature
    
    Reviewers: cedric, Hermet, seoz, raster
    
    CC: reutskiy.v.v, cedric
    
    Differential Revision: https://phab.enlightenment.org/D958
    
    Signed-off-by: Cedric BAIL <[email protected]>
---
 src/lib/edje/Edje_Edit.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 src/lib/edje/edje_edit.c |  4 ++++
 2 files changed, 50 insertions(+)

diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h
index 5fbae8a..ce149e1 100644
--- a/src/lib/edje/Edje_Edit.h
+++ b/src/lib/edje/Edje_Edit.h
@@ -2148,6 +2148,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 multiplier (minmul) 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 multiplier width (not including 
the state value).
+ * @param value The state value.
+ *
+ * @return The maximum width value.
+ */
+EAPI double edje_edit_state_minmul_w_get(Evas_Object *obj, const char *part, 
const char *state, double value);
+
+/** Set the multiplier (minmul) 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 multiplier width (not including 
the state value).
+ * @param value The state value.
+ * @param minmul_w Multiplier width value.
+ *
+ * @return EINA_TRUE if successful, EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool edje_edit_state_minmul_w_set(Evas_Object *obj, const char 
*part, const char *state, double value, double minmul_w);
+
+/** Get the multiplier (minmul) 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 multiplier height (not including 
the state value).
+ * @param value The state value.
+ *
+ * @return The maximum height value.
+ */
+EAPI double edje_edit_state_minmul_h_get(Evas_Object *obj, const char *part, 
const char *state, double value);
+
+/** Set the multiplier (minmul) 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 multiplier height (not including 
the state value).
+ * @param value The state value.
+ * @param minmul_h Multiplier height value.
+ *
+ * @return EINA_TRUE if successful, EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool edje_edit_state_minmul_h_set(Evas_Object *obj, const char 
*part, const char *state, double value, double minmul_h);
+
 /** Get the fixed width 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 ea7bd39..7624894 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -4284,6 +4284,8 @@ FUNC_STATE_BOOL(fixed, w);
 FUNC_STATE_BOOL(fixed, h);
 FUNC_STATE_DOUBLE(aspect, min);
 FUNC_STATE_DOUBLE(aspect, max);
+FUNC_STATE_DOUBLE(minmul, w);
+FUNC_STATE_DOUBLE(minmul, h);
 
 EAPI Eina_Bool
 edje_edit_state_fill_smooth_get(Evas_Object *obj, const char *part, const char 
*state, double value)
@@ -8285,6 +8287,8 @@ _edje_generate_source_of_state(Evas_Object *obj, const 
char *part, const char *s
      BUF_APPENDF(I5"min: %d %d;\n", pd->min.w, pd->min.h);
    if (pd->max.w != -1 || pd->max.h != -1)
      BUF_APPENDF(I5"max: %d %d;\n", pd->max.w, pd->max.h);
+   if (pd->minmul.w != 0 || pd->minmul.h != 0)
+     BUF_APPENDF(I5"minmul: %g %g;\n", TO_DOUBLE(pd->minmul.w), 
TO_DOUBLE(pd->minmul.h));
 
    //TODO Support step
 

-- 


Reply via email to