cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=806c81876bd210de62242e6a000253e74a41b3a0

commit 806c81876bd210de62242e6a000253e74a41b3a0
Author: m.biliavskyi <m.biliavs...@samsung.com>
Date:   Mon Oct 14 12:09:11 2013 +0900

    edje: add getters and setter for interpolation variables 1 and 2 in 
transition block of program.
    
    Reviewers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D253
    
    Signed-off-by: Cedric Bail <cedric.b...@samsung.com>
---
 src/lib/edje/Edje_Edit.h | 45 +++++++++++++++++++++++++++++++++++++++++++++
 src/lib/edje/edje_edit.c | 42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+)

diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h
index fe4bd03..131744b 100644
--- a/src/lib/edje/Edje_Edit.h
+++ b/src/lib/edje/Edje_Edit.h
@@ -3487,6 +3487,51 @@ EAPI Edje_Tween_Mode 
edje_edit_program_transition_get(Evas_Object *obj, const ch
  */
 EAPI Eina_Bool edje_edit_program_transition_set(Evas_Object *obj, const char 
*prog, Edje_Tween_Mode transition);
 
+/** Get the interpolation value 1 of the transition.
+ *  Can be used with one of transition type: 
EDJE_TWEEN_MODE_ACCELERATE_FACTOR, EDJE_TWEEN_MODE_DECELERATE_FACTOR, 
EDJE_TWEEN_MODE_SINUSOIDAL_FACTOR, EDJE_TWEEN_MODE_DIVISOR_INTERP, 
EDJE_TWEEN_MODE_BOUNCE or EDJE_TWEEN_MODE_SPRING.
+ *
+ * @param obj Object being edited.
+ * @param prog The name of the program to get the interpolation value 1.
+ *
+ * @return interpolation value 1.
+ */
+EAPI double
+edje_edit_program_transition_value1_get(Evas_Object *obj, const char *prog);
+
+/** Set the interpolation value 1 of the transition.
+ *  Can be used with one of transition type: 
EDJE_TWEEN_MODE_ACCELERATE_FACTOR, EDJE_TWEEN_MODE_DECELERATE_FACTOR, 
EDJE_TWEEN_MODE_SINUSOIDAL_FACTOR, EDJE_TWEEN_MODE_DIVISOR_INTERP, 
EDJE_TWEEN_MODE_BOUNCE or EDJE_TWEEN_MODE_SPRING.
+ *
+ * @param obj Object being edited.
+ * @param prog The name of the program to get the interpolation value 1.
+ * @param value The interpolation value 1 for the transition.
+ *
+ * @return EINA_TRUE if successful, EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool
+edje_edit_program_transition_value1_set(Evas_Object *obj, const char *prog, 
double value);
+
+/** Get the interpolation value 2 of the transition.
+ *  Can be used with one of transition type: EDJE_TWEEN_MODE_DIVISOR_INTERP, 
EDJE_TWEEN_MODE_BOUNCE or EDJE_TWEEN_MODE_SPRING.
+ * @param obj Object being edited.
+ * @param prog The name of the program to get the interpolation value 2.
+ *
+ * @return interpolation value 2.
+ */
+EAPI double
+edje_edit_program_transition_value2_get(Evas_Object *obj, const char *prog);
+
+/** Set the interpolation value 2 of the transition.
+ *  Can be used with one of transition type: EDJE_TWEEN_MODE_DIVISOR_INTERP, 
EDJE_TWEEN_MODE_BOUNCE or EDJE_TWEEN_MODE_SPRING.
+ *
+ * @param obj Object being edited.
+ * @param prog The name of the program to get the interpolation value 2.
+ * @param value The interpolation value 2 for the transition.
+ *
+ * @return EINA_TRUE if successful, EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool
+edje_edit_program_transition_value2_set(Evas_Object *obj, const char *prog, 
double value);
+
 /** Get the duration of the transition in seconds.
  *
  * @param obj Object being edited.
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 3ec5e87..e44c076 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -5299,6 +5299,48 @@ edje_edit_program_transition_set(Evas_Object *obj, const 
char *prog, Edje_Tween_
 }
 
 EAPI double
+edje_edit_program_transition_value1_get(Evas_Object *obj, const char *prog)
+{
+   eina_error_set(0);
+
+   GET_EPR_OR_RETURN(-1);
+
+   return TO_DOUBLE(epr->tween.v1);
+}
+
+EAPI Eina_Bool
+edje_edit_program_transition_value1_set(Evas_Object *obj, const char *prog, 
double value)
+{
+   eina_error_set(0);
+
+   GET_EPR_OR_RETURN(EINA_FALSE);
+
+   epr->tween.v1 = FROM_DOUBLE(value);
+   return EINA_TRUE;
+}
+
+EAPI double
+edje_edit_program_transition_value2_get(Evas_Object *obj, const char *prog)
+{
+   eina_error_set(0);
+
+   GET_EPR_OR_RETURN(-1);
+
+   return TO_DOUBLE(epr->tween.v2);
+}
+
+EAPI Eina_Bool
+edje_edit_program_transition_value2_set(Evas_Object *obj, const char *prog, 
double value)
+{
+   eina_error_set(0);
+
+   GET_EPR_OR_RETURN(EINA_FALSE);
+
+   epr->tween.v2 = FROM_DOUBLE(value);
+   return EINA_TRUE;
+}
+
+EAPI double
 edje_edit_program_transition_time_get(Evas_Object *obj, const char *prog)
 {
    GET_EPR_OR_RETURN(-1);

-- 


Reply via email to