forked from enlightenment/efl
edje: Edje_Edit - add edje_edit_program_transition functions.
Summary: Add getter and setter for functions with transition value. Next functions are prepared: - edje_edit_program_transition_value1_set - edje_edit_program_transition_value1_get - ... Functions are made for value1, value2, value3 and value4. Reviewers: cedric, Hermet, seoz, raster CC: reutskiy.v.v, cedric Differential Revision: https://phab.enlightenment.org/D999 Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
This commit is contained in:
parent
6f7233b473
commit
206722a6e9
|
@ -4409,6 +4409,52 @@ edje_edit_program_transition_value2_get(Evas_Object *obj, const char *prog);
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
edje_edit_program_transition_value2_set(Evas_Object *obj, const char *prog, double value);
|
edje_edit_program_transition_value2_set(Evas_Object *obj, const char *prog, double value);
|
||||||
|
|
||||||
|
/** Get the interpolation value 3 of the transition.
|
||||||
|
* Can be used with one of transition type: EDJE_TWEEN_MODE_CUBIC_BEZIER.
|
||||||
|
*
|
||||||
|
* @param obj Object being edited.
|
||||||
|
* @param prog The name of the program to get the interpolation value 3.
|
||||||
|
*
|
||||||
|
* @return interpolation value 3.
|
||||||
|
*/
|
||||||
|
EAPI double
|
||||||
|
edje_edit_program_transition_value3_get(Evas_Object *obj, const char *prog);
|
||||||
|
|
||||||
|
/** Set the interpolation value 3 of the transition.
|
||||||
|
* Can be used with one of transition type: EDJE_TWEEN_MODE_CUBIC_BEZIER.
|
||||||
|
*
|
||||||
|
* @param obj Object being edited.
|
||||||
|
* @param prog The name of the program to get the interpolation value 3.
|
||||||
|
* @param value The interpolation value 3 for the transition.
|
||||||
|
*
|
||||||
|
* @return EINA_TRUE if successful, EINA_FALSE otherwise.
|
||||||
|
*/
|
||||||
|
EAPI Eina_Bool
|
||||||
|
edje_edit_program_transition_value3_set(Evas_Object *obj, const char *prog, double value);
|
||||||
|
|
||||||
|
/** Get the interpolation value 4 of the transition.
|
||||||
|
* Can be used with one of transition type: EDJE_TWEEN_MODE_CUBIC_BEZIER.
|
||||||
|
*
|
||||||
|
* @param obj Object being edited.
|
||||||
|
* @param prog The name of the program to get the interpolation value 4.
|
||||||
|
*
|
||||||
|
* @return interpolation value 4.
|
||||||
|
*/
|
||||||
|
EAPI double
|
||||||
|
edje_edit_program_transition_value4_get(Evas_Object *obj, const char *prog);
|
||||||
|
|
||||||
|
/** Set the interpolation value 4 of the transition.
|
||||||
|
* Can be used with one of transition type: EDJE_TWEEN_MODE_CUBIC_BEZIER.
|
||||||
|
*
|
||||||
|
* @param obj Object being edited.
|
||||||
|
* @param prog The name of the program to get the interpolation value 4.
|
||||||
|
* @param value The interpolation value 4 for the transition.
|
||||||
|
*
|
||||||
|
* @return EINA_TRUE if successful, EINA_FALSE otherwise.
|
||||||
|
*/
|
||||||
|
EAPI Eina_Bool
|
||||||
|
edje_edit_program_transition_value4_set(Evas_Object *obj, const char *prog, double value);
|
||||||
|
|
||||||
/** Get the duration of the transition in seconds.
|
/** Get the duration of the transition in seconds.
|
||||||
*
|
*
|
||||||
* @param obj Object being edited.
|
* @param obj Object being edited.
|
||||||
|
|
|
@ -6948,47 +6948,33 @@ edje_edit_program_transition_set(Evas_Object *obj, const char *prog, Edje_Tween_
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI double
|
#define FUNC_PROGRAM_TRANSITION_VALUE(Num) \
|
||||||
edje_edit_program_transition_value1_get(Evas_Object *obj, const char *prog)
|
EAPI double \
|
||||||
{
|
edje_edit_program_transition_value##Num##_get(Evas_Object *obj, const char *prog) \
|
||||||
eina_error_set(0);
|
{ \
|
||||||
|
eina_error_set(0); \
|
||||||
|
\
|
||||||
|
GET_EPR_OR_RETURN(-1); \
|
||||||
|
\
|
||||||
|
return TO_DOUBLE(epr->tween.v##Num); \
|
||||||
|
} \
|
||||||
|
EAPI Eina_Bool \
|
||||||
|
edje_edit_program_transition_value##Num##_set(Evas_Object *obj, const char *prog, double value) \
|
||||||
|
{ \
|
||||||
|
eina_error_set(0); \
|
||||||
|
\
|
||||||
|
GET_EPR_OR_RETURN(EINA_FALSE); \
|
||||||
|
\
|
||||||
|
epr->tween.v##Num = FROM_DOUBLE(value); \
|
||||||
|
return EINA_TRUE; \
|
||||||
|
}
|
||||||
|
|
||||||
GET_EPR_OR_RETURN(-1);
|
FUNC_PROGRAM_TRANSITION_VALUE(1)
|
||||||
|
FUNC_PROGRAM_TRANSITION_VALUE(2)
|
||||||
|
FUNC_PROGRAM_TRANSITION_VALUE(3)
|
||||||
|
FUNC_PROGRAM_TRANSITION_VALUE(4)
|
||||||
|
|
||||||
return TO_DOUBLE(epr->tween.v1);
|
#undef FUNC_PROGRAM_TRANSITION_VALUE
|
||||||
}
|
|
||||||
|
|
||||||
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
|
EAPI double
|
||||||
edje_edit_program_transition_time_get(Evas_Object *obj, const char *prog)
|
edje_edit_program_transition_time_get(Evas_Object *obj, const char *prog)
|
||||||
|
|
Loading…
Reference in New Issue