2011-07-12 11:32:18 +00:00
|
|
|
#ifndef __CLUTTER_EASING_H__
|
|
|
|
#define __CLUTTER_EASING_H__
|
|
|
|
|
|
|
|
#include <clutter/clutter-types.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
/*< private >
|
|
|
|
* ClutterEasingFunc:
|
|
|
|
* @t: elapsed time
|
|
|
|
* @d: total duration
|
|
|
|
*
|
|
|
|
* Internal type for the easing functions used by Clutter.
|
|
|
|
*
|
|
|
|
* Return value: the interpolated value, between -1.0 and 2.0
|
|
|
|
*/
|
|
|
|
typedef double (* ClutterEasingFunc) (double t, double d);
|
|
|
|
|
2012-04-11 13:11:28 +00:00
|
|
|
G_GNUC_INTERNAL
|
|
|
|
ClutterEasingFunc clutter_get_easing_func_for_mode (ClutterAnimationMode mode);
|
|
|
|
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
const char * clutter_get_easing_name_for_mode (ClutterAnimationMode mode);
|
|
|
|
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_easing_for_mode (ClutterAnimationMode mode,
|
|
|
|
double t,
|
|
|
|
double d);
|
|
|
|
|
2011-07-12 11:32:18 +00:00
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_linear (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_in_quad (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_out_quad (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_in_out_quad (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_in_cubic (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_out_cubic (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_in_out_cubic (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_in_quart (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_out_quart (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_in_out_quart (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_in_quint (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_out_quint (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_in_out_quint (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_in_sine (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_out_sine (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_in_out_sine (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_in_expo (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_out_expo (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_in_out_expo (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_in_circ (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_out_circ (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_in_out_circ (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_in_elastic (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_out_elastic (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_in_out_elastic (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_in_back (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_out_back (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_in_out_back (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_in_bounce (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_out_bounce (double t,
|
|
|
|
double d);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_in_out_bounce (double t,
|
|
|
|
double d);
|
|
|
|
|
timeline: Add support for step() progress
The CSS3 Transitions specification from the W3C defines the possibility
of using a parametrized step() timing function, with the following
prototype:
steps(n_steps, [ start | end ])
where @n_steps represents the number of steps used to divide an interval
between 0 and 1; the 'start' and 'end' tokens describe whether the value
change should happen at the start of the transition, or at the end.
For instance, the "steps(3, start)" timing function has the following
profile:
1 | x
| |
| x---|
| ' |
| x---' |
| ' |
0 |---' |
Whereas the "steps(3, end)" timing function has the following profile:
1 | x---|
| ' |
| x---' |
| ' |
x---' |
| |
0 | |
Since ClutterTimeline uses an enumeration for controlling the progress
mode, we need additional API to define the parameters of the steps()
progress; for this reason, we need a CLUTTER_STEPS enumeration value,
and a method for setting the number of steps and the value transition
policy.
The CSS3 Transitions spec helpfully also defines a step-start and a
step-end shorthands, which expand to step(1, start) and step(1, end)
respectively; we can provide a CLUTTER_STEP_START and CLUTTER_STEP_END
enumeration values for those.
2012-07-19 23:47:48 +00:00
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_steps_start (double t,
|
|
|
|
double d,
|
|
|
|
int steps);
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_steps_end (double t,
|
|
|
|
double d,
|
|
|
|
int steps);
|
2012-07-20 01:55:35 +00:00
|
|
|
G_GNUC_INTERNAL
|
|
|
|
double clutter_ease_cubic_bezier (double t,
|
|
|
|
double d,
|
|
|
|
double x_1,
|
|
|
|
double y_1,
|
|
|
|
double x_2,
|
|
|
|
double y_2);
|
timeline: Add support for step() progress
The CSS3 Transitions specification from the W3C defines the possibility
of using a parametrized step() timing function, with the following
prototype:
steps(n_steps, [ start | end ])
where @n_steps represents the number of steps used to divide an interval
between 0 and 1; the 'start' and 'end' tokens describe whether the value
change should happen at the start of the transition, or at the end.
For instance, the "steps(3, start)" timing function has the following
profile:
1 | x
| |
| x---|
| ' |
| x---' |
| ' |
0 |---' |
Whereas the "steps(3, end)" timing function has the following profile:
1 | x---|
| ' |
| x---' |
| ' |
x---' |
| |
0 | |
Since ClutterTimeline uses an enumeration for controlling the progress
mode, we need additional API to define the parameters of the steps()
progress; for this reason, we need a CLUTTER_STEPS enumeration value,
and a method for setting the number of steps and the value transition
policy.
The CSS3 Transitions spec helpfully also defines a step-start and a
step-end shorthands, which expand to step(1, start) and step(1, end)
respectively; we can provide a CLUTTER_STEP_START and CLUTTER_STEP_END
enumeration values for those.
2012-07-19 23:47:48 +00:00
|
|
|
|
2011-07-12 11:32:18 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __CLUTTER_EASING_H__ */
|