Clutter 0.8.2 Reference Manual | ||||
---|---|---|---|---|
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);
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
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.
|
A ClutterTimeline for the template (will be cloned) |
|
An alpha func to use for the template. |
Returns : |
a ClutterEffectTemplate |
Since 0.4
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
.
|
a ClutterTimeline |
|
an alpha function to use for the template |
|
data to be passed to the alpha function, or NULL
|
|
function to be called when disposing the alpha function's use
data, or NULL
|
Returns : |
the newly created ClutterEffectTemplate object |
Since 0.4
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.
|
the duration of the effects, in milliseconds |
|
an alpha function to use for the template |
Returns : |
the newly created ClutterEffectTemplate object |
Since 0.6
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.
|
a ClutterEffectTemplate |
|
a ClutterTimeline |
|
an alpha function to use for the template |
|
data to be passed to the alpha function, or NULL
|
|
function to be called when disposing the alpha function's use
data, or NULL
|
Since 0.6
gboolean clutter_effect_template_get_timeline_clone (ClutterEffectTemplate *template_);
Gets whether timelines should be cloned when creating a new effect or just referenced.
|
A ClutterEffectTemplate |
Returns : |
TRUE if the templates timeline is to be cloned.
|
Since 0.6
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.
|
A ClutterEffectTemplate |
|
A boolean indicating if effects should clone the timeline. |
Since 0.6
void (*ClutterEffectCompleteFunc) (ClutterActor *actor, gpointer user_data);
Callback function invoked when an effect is complete.
|
a ClutterActor |
|
user data |
Since 0.4
ClutterTimeline* clutter_effect_fade (ClutterEffectTemplate *template_, ClutterActor *actor, guint8 opacity_end, ClutterEffectCompleteFunc func, gpointer data);
Simple effect for fading a single ClutterActor.
|
A ClutterEffectTemplate |
|
A ClutterActor to apply the effect to. |
|
Final opacity value to apply to actor |
|
A ClutterEffectCompleteFunc to call on effect
completion or NULL
|
|
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
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.
|
A ClutterEffectTemplate |
|
A ClutterActor to apply the effect to. |
|
X coordinate of the destination |
|
Y coordinate of the destination |
|
A ClutterEffectCompleteFunc to call on effect
completion or NULL
|
|
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
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.
|
A ClutterEffectTemplate |
|
A ClutterActor to apply the effect to. |
|
An array of ClutterKnots representing path for the actor |
|
Number of ClutterKnots in passed array. |
|
A ClutterEffectCompleteFunc to call on effect
completion or NULL
|
|
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
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.
|
A ClutterEffectTemplate |
|
A ClutterActor to apply the effect to. |
|
Final X axis scale factor to apply to actor |
|
Final Y axis scale factor to apply to actor |
|
A ClutterEffectCompleteFunc to call on effect completion or NULL |
|
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
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.
|
A ClutterEffectTemplate |
|
A ClutterActor to apply the effect to. |
|
Final depth value to apply to actor |
|
A ClutterEffectCompleteFunc to call on effect
completion or NULL
|
|
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
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.
|
a ClutterEffectTemplate |
|
a ClutterActor to apply the effect to. |
|
axis of rotation |
|
final angle to apply to actor |
|
position on X axis to rotate about. |
|
position on Y axis to rotate about. |
|
position on Z axis to rotate about. |
|
a ClutterRotateDirection for the rotation. |
|
a ClutterEffectCompleteFunc to call on effect
completion or NULL
|
|
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