Using Alpha Functions.

You may use a custom calculation callback, instead of a standard ClutterAnimationMode enum value such as CLUTTER_LINEAR, by using the clutter_actor_animate_with_alpha() function, providing a ClutterAlpha.

The ClutterAlpha object is constructed with a calculation callback and a ClutterTimeline which tells it when a new frame needs a new value to be calculated. Your alpha callback will need to call clutter_alpha_get_timeline() so it can return a value based on the timeline's current progress, using the clutter_timeline_get_progress() function.

Like actors, ClutterAlpha has a "floating references" so you don't need to unref it if you have added it to a behaviour. However, the behaviours do not have a floating reference, so you should unref them when you are finished with them. You might do this at the same time as you unref the timeline, for instance in a signal handler for the timeline's completed signal.

See the Behaviours chapter for an example that uses a ClutterAlpha.