Clutter Effects

Clutter Effects — Utility Class for basic visual effects

Synopsis

                    ClutterEffectTemplate;
                    ClutterEffectTemplateClass;
ClutterEffectTemplate* clutter_effect_template_new      (ClutterTimeline *timeline,
                                                         ClutterAlphaFunc alpha_func);
ClutterEffectTemplate* clutter_effect_template_new_full (ClutterTimeline *timeline,
                                                         ClutterAlphaFunc alpha_func,
                                                         gpointer user_data,
                                                         GDestroyNotify notify);
ClutterEffectTemplate* clutter_effect_template_new_for_duration
                                                        (guint msecs,
                                                         ClutterAlphaFunc alpha_func);
void                clutter_effect_template_construct   (ClutterEffectTemplate *template_,
                                                         ClutterTimeline *timeline,
                                                         ClutterAlphaFunc alpha_func,
                                                         gpointer user_data,
                                                         GDestroyNotify notify);
gboolean            clutter_effect_template_get_timeline_clone
                                                        (ClutterEffectTemplate *template_);
void                clutter_effect_template_set_timeline_clone
                                                        (ClutterEffectTemplate *template_,
                                                         gboolean setting);

void                (*ClutterEffectCompleteFunc)        (ClutterActor *actor,
                                                         gpointer user_data);
ClutterTimeline*    clutter_effect_fade                 (ClutterEffectTemplate *template_,
                                                         ClutterActor *actor,
                                                         guint8 opacity_end,
                                                         ClutterEffectCompleteFunc func,
                                                         gpointer data);
ClutterTimeline*    clutter_effect_move                 (ClutterEffectTemplate *template_,
                                                         ClutterActor *actor,
                                                         gint x,
                                                         gint y,
                                                         ClutterEffectCompleteFunc func,
                                                         gpointer data);
ClutterTimeline*    clutter_effect_path                 (ClutterEffectTemplate *template_,
                                                         ClutterActor *actor,
                                                         const ClutterKnot *knots,
                                                         guint n_knots,
                                                         ClutterEffectCompleteFunc func,
                                                         gpointer data);
ClutterTimeline*    clutter_effect_scale                (ClutterEffectTemplate *template_,
                                                         ClutterActor *actor,
                                                         gdouble x_scale_end,
                                                         gdouble y_scale_end,
                                                         ClutterEffectCompleteFunc func,
                                                         gpointer data);
ClutterTimeline*    clutter_effect_depth                (ClutterEffectTemplate *template_,
                                                         ClutterActor *actor,
                                                         gint depth_end,
                                                         ClutterEffectCompleteFunc func,
                                                         gpointer data);
ClutterTimeline*    clutter_effect_rotate               (ClutterEffectTemplate *template_,
                                                         ClutterActor *actor,
                                                         ClutterRotateAxis axis,
                                                         gdouble angle,
                                                         gint center_x,
                                                         gint center_y,
                                                         gint center_z,
                                                         ClutterRotateDirection direction,
                                                         ClutterEffectCompleteFunc func,
                                                         gpointer data);

Description

The ClutterEffectTemplate class provides a simple API for applying pre-defined effects to a single actor. It works as a wrapper around the ClutterBehaviour objects

Details

ClutterEffectTemplate

typedef struct {
} ClutterEffectTemplate;


ClutterEffectTemplateClass

typedef struct {
} ClutterEffectTemplateClass;


clutter_effect_template_new ()

ClutterEffectTemplate* clutter_effect_template_new      (ClutterTimeline *timeline,
                                                         ClutterAlphaFunc alpha_func);

Creates a new ClutterEffectTemplate, to be used with the effects API.

A ClutterEffectTemplate binds a timeline and an alpha function and can be used as a template for multiple calls of clutter_effect_fade(), clutter_effect_move() and clutter_effect_scale().

This API is intended for simple animations involving a single actor; for more complex animations, you should see ClutterBehaviour and the derived classes.

timeline :

A ClutterTimeline for the template (will be cloned)

alpha_func :

An alpha func to use for the template.

Returns :

a ClutterEffectTemplate

Since 0.4


clutter_effect_template_new_full ()

ClutterEffectTemplate* clutter_effect_template_new_full (ClutterTimeline *timeline,
                                                         ClutterAlphaFunc alpha_func,
                                                         gpointer user_data,
                                                         GDestroyNotify notify);

Creates a new ClutterEffectTemplate, to be used with the effects API.

A ClutterEffectTemplate binds a timeline and an alpha function and can be used as a template for multiple calls of clutter_effect_fade(), clutter_effect_move() and clutter_effect_scale().

This API is intended for simple animations involving a single actor; for more complex animations, you should see ClutterBehaviour and the derived classes.

This function is intended for language bindings only: if notify is not NULL it will be called to dispose of user_data.

timeline :

a ClutterTimeline

alpha_func :

an alpha function to use for the template

user_data :

data to be passed to the alpha function, or NULL

notify :

function to be called when disposing the alpha function's use data, or NULL

Returns :

the newly created ClutterEffectTemplate object

Since 0.4


clutter_effect_template_new_for_duration ()

ClutterEffectTemplate* clutter_effect_template_new_for_duration
                                                        (guint msecs,
                                                         ClutterAlphaFunc alpha_func);

Creates a new ClutterEffectTemplate, to be used with the effects API.

A ClutterEffectTemplate binds a timeline and an alpha function and can be used as a template for multiple calls of clutter_effect_fade(), clutter_effect_move() and clutter_effect_scale().

This API is intended for simple animations involving a single actor; for more complex animations, you should see ClutterBehaviour and the derived classes.

This function creates a ClutterTimeline with a duration of msecs milliseconds and transfers ownership of the timeline object to the returned ClutterEffectTemplate.

msecs :

the duration of the effects, in milliseconds

alpha_func :

an alpha function to use for the template

Returns :

the newly created ClutterEffectTemplate object

Since 0.6


clutter_effect_template_construct ()

void                clutter_effect_template_construct   (ClutterEffectTemplate *template_,
                                                         ClutterTimeline *timeline,
                                                         ClutterAlphaFunc alpha_func,
                                                         gpointer user_data,
                                                         GDestroyNotify notify);

Constructs a ClutterEffectTemplate, to be used with the effects API.

This function can only be called once after the creation of template_ and is only useful for language bindings.

template_ :

a ClutterEffectTemplate

timeline :

a ClutterTimeline

alpha_func :

an alpha function to use for the template

user_data :

data to be passed to the alpha function, or NULL

notify :

function to be called when disposing the alpha function's use data, or NULL

Since 0.6


clutter_effect_template_get_timeline_clone ()

gboolean            clutter_effect_template_get_timeline_clone
                                                        (ClutterEffectTemplate *template_);

Gets whether timelines should be cloned when creating a new effect or just referenced.

template_ :

A ClutterEffectTemplate

Returns :

TRUE if the templates timeline is to be cloned.

Since 0.6


clutter_effect_template_set_timeline_clone ()

void                clutter_effect_template_set_timeline_clone
                                                        (ClutterEffectTemplate *template_,
                                                         gboolean setting);

Sets if effects using this template should make a copy of the templates timeline (default) or reference the effects timeline.

template_ :

A ClutterEffectTemplate

setting :

A boolean indicating if effects should clone the timeline.

Since 0.6


ClutterEffectCompleteFunc ()

void                (*ClutterEffectCompleteFunc)        (ClutterActor *actor,
                                                         gpointer user_data);

Callback function invoked when an effect is complete.

actor :

a ClutterActor

user_data :

user data

Since 0.4


clutter_effect_fade ()

ClutterTimeline*    clutter_effect_fade                 (ClutterEffectTemplate *template_,
                                                         ClutterActor *actor,
                                                         guint8 opacity_end,
                                                         ClutterEffectCompleteFunc func,
                                                         gpointer data);

Simple effect for fading a single ClutterActor.

template_ :

A ClutterEffectTemplate

actor :

A ClutterActor to apply the effect to.

opacity_end :

Final opacity value to apply to actor

func :

A ClutterEffectCompleteFunc to call on effect completion or NULL

data :

Data to pass to supplied ClutterEffectCompleteFunc or NULL

Returns :

a ClutterTimeline for the effect. Will be unrefed by the effect when completed.

Since 0.6


clutter_effect_move ()

ClutterTimeline*    clutter_effect_move                 (ClutterEffectTemplate *template_,
                                                         ClutterActor *actor,
                                                         gint x,
                                                         gint y,
                                                         ClutterEffectCompleteFunc func,
                                                         gpointer data);

Simple effect for moving a single ClutterActor along to a destination point.

template_ :

A ClutterEffectTemplate

actor :

A ClutterActor to apply the effect to.

x :

X coordinate of the destination

y :

Y coordinate of the destination

func :

A ClutterEffectCompleteFunc to call on effect completion or NULL

data :

Data to pass to supplied ClutterEffectCompleteFunc or NULL

Returns :

a ClutterTimeline for the effect. Will be unreferenced by the effect when completed.

Since 0.6


clutter_effect_path ()

ClutterTimeline*    clutter_effect_path                 (ClutterEffectTemplate *template_,
                                                         ClutterActor *actor,
                                                         const ClutterKnot *knots,
                                                         guint n_knots,
                                                         ClutterEffectCompleteFunc func,
                                                         gpointer data);

Simple effect for moving a single ClutterActor along a path.

template_ :

A ClutterEffectTemplate

actor :

A ClutterActor to apply the effect to.

knots :

An array of ClutterKnots representing path for the actor

n_knots :

Number of ClutterKnots in passed array.

func :

A ClutterEffectCompleteFunc to call on effect completion or NULL

data :

Data to pass to supplied ClutterEffectCompleteFunc or NULL

Returns :

a ClutterTimeline for the effect. Will be unreferenced by the effect when completed.

Since 0.6


clutter_effect_scale ()

ClutterTimeline*    clutter_effect_scale                (ClutterEffectTemplate *template_,
                                                         ClutterActor *actor,
                                                         gdouble x_scale_end,
                                                         gdouble y_scale_end,
                                                         ClutterEffectCompleteFunc func,
                                                         gpointer data);

Simple effect for scaling a single ClutterActor.

template_ :

A ClutterEffectTemplate

actor :

A ClutterActor to apply the effect to.

x_scale_end :

Final X axis scale factor to apply to actor

y_scale_end :

Final Y axis scale factor to apply to actor

func :

A ClutterEffectCompleteFunc to call on effect completion or NULL

data :

Data to pass to supplied ClutterEffectCompleteFunc or NULL

Returns :

a ClutterTimeline for the effect. Will be unreferenced by the effect when completed.

Since 0.6


clutter_effect_depth ()

ClutterTimeline*    clutter_effect_depth                (ClutterEffectTemplate *template_,
                                                         ClutterActor *actor,
                                                         gint depth_end,
                                                         ClutterEffectCompleteFunc func,
                                                         gpointer data);

Simple effect for changing the depth of a single ClutterActor.

template_ :

A ClutterEffectTemplate

actor :

A ClutterActor to apply the effect to.

depth_end :

Final depth value to apply to actor

func :

A ClutterEffectCompleteFunc to call on effect completion or NULL

data :

Data to pass to supplied ClutterEffectCompleteFunc or NULL

Returns :

a ClutterTimeline for the effect. Will be unrefed by the effect when completed.

Since 0.6


clutter_effect_rotate ()

ClutterTimeline*    clutter_effect_rotate               (ClutterEffectTemplate *template_,
                                                         ClutterActor *actor,
                                                         ClutterRotateAxis axis,
                                                         gdouble angle,
                                                         gint center_x,
                                                         gint center_y,
                                                         gint center_z,
                                                         ClutterRotateDirection direction,
                                                         ClutterEffectCompleteFunc func,
                                                         gpointer data);

Simple effect for rotating a single ClutterActor.

template_ :

a ClutterEffectTemplate

actor :

a ClutterActor to apply the effect to.

axis :

axis of rotation

angle :

final angle to apply to actor

center_x :

position on X axis to rotate about.

center_y :

position on Y axis to rotate about.

center_z :

position on Z axis to rotate about.

direction :

a ClutterRotateDirection for the rotation.

func :

a ClutterEffectCompleteFunc to call on effect completion or NULL

data :

user data to pass to supplied func or NULL

Returns :

a ClutterTimeline for the effect. Will be unreferenced by the effect when completed.

Since 0.6