2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com>

* clutter/clutter-alpha.h:
	* clutter/clutter-alpha.c:
	(clutter_alpha_set_mode): Use a lookup table to find the alpha
	function given the animation mode.

	(clutter_exp_in_func),
	(clutter_exp_out_func),
	(clutter_exp_in_out_func): Add new exponential functions.

	* clutter/clutter-script.c: Update the lookup table with the
	new animation modes; match "linear" to the ramp-inc alpha
	function.

	* clutter/clutter-types.h: Add new AnimationMode values.

	* tests/interactive/test-easing.c: Update the easing functions
	test.
This commit is contained in:
Emmanuele Bassi
2008-11-18 12:42:05 +00:00
parent 33a67bc299
commit 34cc7fe21c
6 changed files with 153 additions and 75 deletions

View File

@ -196,6 +196,10 @@ typedef enum {
* @CLUTTER_EASE_IN: ease-in progress
* @CLUTTER_EASE_OUT: ease-out progress
* @CLUTTER_EASE_IN_OUT: ease-in-out progress
* @CLUTTER_EXPO_IN: exponential in progress
* @CLUTTER_EXPO_OUT: exponential out progress
* @CLUTTER_EXPO_IN_OUT: exponential in-out progress
* @CLUTTER_SMOOTH_IN_OUT: smoothstep in-out progress
*
* The animation modes used by #ClutterAlpha and #ClutterAnimation. This
* enumeration can be expanded in later versions of Clutter.
@ -204,13 +208,18 @@ typedef enum {
*/
typedef enum {
CLUTTER_CUSTOM_MODE,
CLUTTER_LINEAR,
CLUTTER_SINE_IN,
CLUTTER_SINE_OUT,
CLUTTER_SINE_IN_OUT,
CLUTTER_EASE_IN,
CLUTTER_EASE_OUT,
CLUTTER_EASE_IN_OUT
CLUTTER_EASE_IN_OUT,
CLUTTER_EXPO_IN,
CLUTTER_EXPO_OUT,
CLUTTER_EXPO_IN_OUT,
CLUTTER_SMOOTH_IN_OUT,
} ClutterAnimationMode;
G_END_DECLS