![]() |
![]() |
![]() |
Clutter 0.4 Reference Manual | ![]() |
---|---|---|---|---|
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); void (*ClutterEffectCompleteFunc) (ClutterActor *actor, gpointer user_data); ClutterTimeline* clutter_effect_fade (ClutterEffectTemplate *template_, ClutterActor *actor, guint8 start_opacity, guint8 end_opacity, ClutterEffectCompleteFunc completed_func, gpointer completed_data); ClutterTimeline* clutter_effect_move (ClutterEffectTemplate *template_, ClutterActor *actor, const ClutterKnot *knots, guint n_knots, ClutterEffectCompleteFunc completed_func, gpointer completed_data); ClutterTimeline* clutter_effect_scale (ClutterEffectTemplate *template_, ClutterActor *actor, gdouble scale_begin, gdouble scale_end, ClutterGravity gravity, ClutterEffectCompleteFunc completed_func, gpointer completed_data); ClutterTimeline* clutter_effect_depth (ClutterEffectTemplate *template_, ClutterActor *actor, gint start_depth, gint end_depth, ClutterEffectCompleteFunc completed_func, gpointer completed_data); ClutterTimeline* clutter_effect_rotate_x (ClutterEffectTemplate *template_, ClutterActor *actor, gdouble angle_begin, gdouble angle_end, gint center_y, gint center_z, ClutterRotateDirection direction, ClutterEffectCompleteFunc completed_func, gpointer completed_data); ClutterTimeline* clutter_effect_rotate_y (ClutterEffectTemplate *template_, ClutterActor *actor, gdouble angle_begin, gdouble angle_end, gint center_x, gint center_z, ClutterRotateDirection direction, ClutterEffectCompleteFunc completed_func, gpointer completed_data); ClutterTimeline* clutter_effect_rotate_z (ClutterEffectTemplate *template_, ClutterActor *actor, gdouble angle_begin, gdouble angle_end, gint center_x, gint center_y, ClutterRotateDirection direction, ClutterEffectCompleteFunc completed_func, gpointer completed_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.
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
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
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
ClutterTimeline* clutter_effect_fade (ClutterEffectTemplate *template_, ClutterActor *actor, guint8 start_opacity, guint8 end_opacity, ClutterEffectCompleteFunc completed_func, gpointer completed_data);
Simple effect for fading a single ClutterActor.
template_ : |
A ClutterEffectTemplate |
actor : |
A ClutterActor to apply the effect to. |
start_opacity : |
Initial opacity value to apply to actor |
end_opacity : |
Final opacity value to apply to actor |
completed_func : |
A ClutterEffectCompleteFunc to call on effect
completion or NULL
|
completed_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.4
ClutterTimeline* clutter_effect_move (ClutterEffectTemplate *template_, ClutterActor *actor, const ClutterKnot *knots, guint n_knots, ClutterEffectCompleteFunc completed_func, gpointer completed_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. |
completed_func : |
A ClutterEffectCompleteFunc to call on effect
completion or NULL
|
completed_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.4
ClutterTimeline* clutter_effect_scale (ClutterEffectTemplate *template_, ClutterActor *actor, gdouble scale_begin, gdouble scale_end, ClutterGravity gravity, ClutterEffectCompleteFunc completed_func, gpointer completed_data);
Simple effect for scaling a single ClutterActor.
template_ : |
A ClutterEffectTemplate |
actor : |
A ClutterActor to apply the effect to. |
scale_begin : |
Initial scale factor to apply to actor |
scale_end : |
Final scale factor to apply to actor |
gravity : |
A ClutterGravity for the scale. |
completed_func : |
A ClutterEffectCompleteFunc to call on effect completion or NULL |
completed_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.4
ClutterTimeline* clutter_effect_depth (ClutterEffectTemplate *template_, ClutterActor *actor, gint start_depth, gint end_depth, ClutterEffectCompleteFunc completed_func, gpointer completed_data);
Simple effect for changing the depth of a single ClutterActor.
template_ : |
A ClutterEffectTemplate |
actor : |
A ClutterActor to apply the effect to. |
start_depth : |
Initial depth value to apply to actor |
end_depth : |
Final depth value to apply to actor |
completed_func : |
A ClutterEffectCompleteFunc to call on effect
completion or NULL
|
completed_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.5
ClutterTimeline* clutter_effect_rotate_x (ClutterEffectTemplate *template_, ClutterActor *actor, gdouble angle_begin, gdouble angle_end, gint center_y, gint center_z, ClutterRotateDirection direction, ClutterEffectCompleteFunc completed_func, gpointer completed_data);
Simple effect for rotating a single ClutterActor about y axis.
template_ : |
A ClutterEffectTemplate |
actor : |
A ClutterActor to apply the effect to. |
angle_begin : |
Initial angle to apply to actor |
angle_end : |
Final angle to apply to actor |
center_y : |
Position on Y axis to rotate about. |
center_z : |
Position on Z axis to rotate about. |
direction : |
A ClutterRotateDirection for the rotation. |
completed_func : |
A ClutterEffectCompleteFunc to call on effect completion or NULL |
completed_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.4
ClutterTimeline* clutter_effect_rotate_y (ClutterEffectTemplate *template_, ClutterActor *actor, gdouble angle_begin, gdouble angle_end, gint center_x, gint center_z, ClutterRotateDirection direction, ClutterEffectCompleteFunc completed_func, gpointer completed_data);
Simple effect for rotating a single ClutterActor about y axis.
template_ : |
A ClutterEffectTemplate |
actor : |
A ClutterActor to apply the effect to. |
angle_begin : |
Initial angle to apply to actor |
angle_end : |
Final angle to apply to actor |
center_x : |
Position on X axis to rotate about. |
center_z : |
Position on Z axis to rotate about. |
direction : |
A ClutterRotateDirection for the rotation. |
completed_func : |
A ClutterEffectCompleteFunc to call on effect completion or NULL |
completed_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.4
ClutterTimeline* clutter_effect_rotate_z (ClutterEffectTemplate *template_, ClutterActor *actor, gdouble angle_begin, gdouble angle_end, gint center_x, gint center_y, ClutterRotateDirection direction, ClutterEffectCompleteFunc completed_func, gpointer completed_data);
Simple effect for rotating a single ClutterActor about z axis.
template_ : |
A ClutterEffectTemplate |
actor : |
A ClutterActor to apply the effect to. |
angle_begin : |
Initial angle to apply to actor |
angle_end : |
Final angle to apply to actor |
center_x : |
Position on X axis to rotate about. |
center_y : |
Position on Y axis to rotate about. |
direction : |
A ClutterRotateDirection for the rotation. |
completed_func : |
A ClutterEffectCompleteFunc to call on effect completion or NULL |
completed_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.4