![]() |
![]() |
![]() |
Clutter Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
struct ClutterAnimation; struct ClutterAnimationClass; enum ClutterAnimationMode; ClutterAnimation * clutter_animation_new (void
); void clutter_animation_set_object (ClutterAnimation *animation
,GObject *object
); GObject * clutter_animation_get_object (ClutterAnimation *animation
); void clutter_animation_set_mode (ClutterAnimation *animation
,gulong mode
); gulong clutter_animation_get_mode (ClutterAnimation *animation
); void clutter_animation_set_duration (ClutterAnimation *animation
,guint msecs
); guint clutter_animation_get_duration (ClutterAnimation *animation
); void clutter_animation_set_loop (ClutterAnimation *animation
,gboolean loop
); gboolean clutter_animation_get_loop (ClutterAnimation *animation
); void clutter_animation_set_timeline (ClutterAnimation *animation
,ClutterTimeline *timeline
); ClutterTimeline * clutter_animation_get_timeline (ClutterAnimation *animation
); void clutter_animation_set_alpha (ClutterAnimation *animation
,ClutterAlpha *alpha
); ClutterAlpha * clutter_animation_get_alpha (ClutterAnimation *animation
); void clutter_animation_completed (ClutterAnimation *animation
); ClutterAnimation * clutter_animation_bind (ClutterAnimation *animation
,const gchar *property_name
,const GValue *final
); ClutterAnimation * clutter_animation_bind_interval (ClutterAnimation *animation
,const gchar *property_name
,ClutterInterval *interval
); ClutterAnimation * clutter_animation_update (ClutterAnimation *animation
,const gchar *property_name
,const GValue *final
); void clutter_animation_update_interval (ClutterAnimation *animation
,const gchar *property_name
,ClutterInterval *interval
); gboolean clutter_animation_has_property (ClutterAnimation *animation
,const gchar *property_name
); void clutter_animation_unbind_property (ClutterAnimation *animation
,const gchar *property_name
); ClutterInterval * clutter_animation_get_interval (ClutterAnimation *animation
,const gchar *property_name
); ClutterAnimation * clutter_actor_animate (ClutterActor *actor
,gulong mode
,guint duration
,const gchar *first_property_name
,...
); ClutterAnimation * clutter_actor_animate_with_timeline (ClutterActor *actor
,gulong mode
,ClutterTimeline *timeline
,const gchar *first_property_name
,...
); ClutterAnimation * clutter_actor_animate_with_alpha (ClutterActor *actor
,ClutterAlpha *alpha
,const gchar *first_property_name
,...
); ClutterAnimation * clutter_actor_animatev (ClutterActor *actor
,gulong mode
,guint duration
,gint n_properties
,const gchar * const properties[]
,const GValue *values
); ClutterAnimation * clutter_actor_animate_with_timelinev (ClutterActor *actor
,gulong mode
,ClutterTimeline *timeline
,gint n_properties
,const gchar * const properties[]
,const GValue *values
); ClutterAnimation * clutter_actor_animate_with_alphav (ClutterActor *actor
,ClutterAlpha *alpha
,gint n_properties
,const gchar * const properties[]
,const GValue *values
); ClutterAnimation * clutter_actor_get_animation (ClutterActor *actor
); void clutter_actor_detach_animation (ClutterActor *actor
);
"alpha" ClutterAlpha* : Read / Write "duration" guint : Read / Write "loop" gboolean : Read / Write "mode" gulong : Read / Write "object" GObject* : Read / Write "timeline" ClutterTimeline* : Read / Write
ClutterAnimation is an object providing simple, implicit animations for GObjects.
ClutterAnimation instances will bind one or more GObject properties belonging to a GObject to a ClutterInterval, and will then use a ClutterAlpha to interpolate the property between the initial and final values of the interval.
The duration of the animation is set using clutter_animation_set_duration()
.
The easing mode of the animation is set using clutter_animation_set_mode()
.
If you want to control the animation you should retrieve the
ClutterTimeline using clutter_animation_get_timeline()
and then
use ClutterTimeline functions like clutter_timeline_start()
,
clutter_timeline_pause()
or clutter_timeline_stop()
.
A ClutterAnimation will emit the "completed" signal
when the ClutterTimeline used by the animation is completed; unlike
ClutterTimeline, though, the "completed" will not be
emitted if "loop" is set to TRUE
- that is, a looping
animation never completes.
If your animation depends on user control you can force its completion
using clutter_animation_completed()
.
If the GObject instance bound to a ClutterAnimation implements the ClutterAnimatable interface it is possible for that instance to control the way the initial and final states are interpolated.
ClutterAnimations are distinguished from ClutterBehaviours because the former can only control GObject properties of a single GObject instance, while the latter can control multiple properties using accessor functions inside the "alpha_notify" virtual function, and can control multiple ClutterActors as well.
For convenience, it is possible to use the clutter_actor_animate()
function call which will take care of setting up and tearing down
a ClutterAnimation instance and animate an actor between its current
state and the specified final state.
When defining a ClutterAnimation inside a ClutterScript file or string the "mode" can be defined either using the ClutterAnimationMode enumeration values through their "nick" (the short string used inside GEnumValue), their numeric id, or using the following strings:
easeInQuad, easeOutQuad, easeInOutQuad |
Corresponding to the quadratic easing modes |
easeInCubic, easeOutCubic, easeInOutCubic |
Corresponding to the cubic easing modes |
easeInQuart, easeOutQuart, easeInOutQuart |
Corresponding to the quartic easing modes |
easeInQuint, easeOutQuint, easeInOutQuint |
Corresponding to the quintic easing modes |
easeInSine, easeOutSine, easeInOutSine |
Corresponding to the sine easing modes |
easeInExpo, easeOutExpo, easeInOutExpo |
Corresponding to the exponential easing modes |
easeInCirc, easeOutCirc, easeInOutCirc |
Corresponding to the circular easing modes |
easeInElastic, easeOutElastic, easeInOutElastic |
Corresponding to the overshooting elastic easing modes |
easeInBack, easeOutBack, easeInOutBack |
Corresponding to the overshooting cubic easing modes |
easeInBounce, easeOutBounce, easeInOutBounce |
Corresponding to the bouncing easing modes |
ClutterAnimation is available since Clutter 1.0
struct ClutterAnimation;
The ClutterAnimation structure contains only private data and should be accessed using the provided functions.
Since 1.0
struct ClutterAnimationClass { void (* started) (ClutterAnimation *animation); void (* completed) (ClutterAnimation *animation); };
The ClutterAnimationClass structure contains only private data and should be accessed using the provided functions.
class handler for the "started" signal | |
class handler for the "completed" signal |
Since 1.0
typedef enum { CLUTTER_CUSTOM_MODE = 0, /* linear */ CLUTTER_LINEAR, /* quadratic */ CLUTTER_EASE_IN_QUAD, CLUTTER_EASE_OUT_QUAD, CLUTTER_EASE_IN_OUT_QUAD, /* cubic */ CLUTTER_EASE_IN_CUBIC, CLUTTER_EASE_OUT_CUBIC, CLUTTER_EASE_IN_OUT_CUBIC, /* quartic */ CLUTTER_EASE_IN_QUART, CLUTTER_EASE_OUT_QUART, CLUTTER_EASE_IN_OUT_QUART, /* quintic */ CLUTTER_EASE_IN_QUINT, CLUTTER_EASE_OUT_QUINT, CLUTTER_EASE_IN_OUT_QUINT, /* sinusoidal */ CLUTTER_EASE_IN_SINE, CLUTTER_EASE_OUT_SINE, CLUTTER_EASE_IN_OUT_SINE, /* exponential */ CLUTTER_EASE_IN_EXPO, CLUTTER_EASE_OUT_EXPO, CLUTTER_EASE_IN_OUT_EXPO, /* circular */ CLUTTER_EASE_IN_CIRC, CLUTTER_EASE_OUT_CIRC, CLUTTER_EASE_IN_OUT_CIRC, /* elastic */ CLUTTER_EASE_IN_ELASTIC, CLUTTER_EASE_OUT_ELASTIC, CLUTTER_EASE_IN_OUT_ELASTIC, /* overshooting cubic */ CLUTTER_EASE_IN_BACK, CLUTTER_EASE_OUT_BACK, CLUTTER_EASE_IN_OUT_BACK, /* exponentially decaying parabolic */ CLUTTER_EASE_IN_BOUNCE, CLUTTER_EASE_OUT_BOUNCE, CLUTTER_EASE_IN_OUT_BOUNCE, /* guard, before registered alpha functions */ CLUTTER_ANIMATION_LAST } ClutterAnimationMode;
The animation modes used by ClutterAlpha and ClutterAnimation. This enumeration can be expanded in later versions of Clutter. See the ClutterAlpha documentation for a graph of all the animation modes.
Every global alpha function registered using clutter_alpha_register_func()
or clutter_alpha_register_closure()
will have a logical id greater than
CLUTTER_ANIMATION_LAST
.
custom progress function | |
linear tweening | |
quadratic tweening | |
quadratic tweening, inverse of
CLUTTER_EASE_IN_QUAD
|
|
quadratic tweening, combininig
CLUTTER_EASE_IN_QUAD and CLUTTER_EASE_OUT_QUAD
|
|
cubic tweening | |
cubic tweening, invers of
CLUTTER_EASE_IN_CUBIC
|
|
cubic tweening, combining
CLUTTER_EASE_IN_CUBIC and CLUTTER_EASE_OUT_CUBIC
|
|
quartic tweening | |
quartic tweening, inverse of
CLUTTER_EASE_IN_QUART
|
|
quartic tweening, combining
CLUTTER_EASE_IN_QUART and CLUTTER_EASE_OUT_QUART
|
|
quintic tweening | |
quintic tweening, inverse of
CLUTTER_EASE_IN_QUINT
|
|
fifth power tweening, combining
CLUTTER_EASE_IN_QUINT and CLUTTER_EASE_OUT_QUINT
|
|
sinusoidal tweening | |
sinusoidal tweening, inverse of
CLUTTER_EASE_IN_SINE
|
|
sine wave tweening, combining
CLUTTER_EASE_IN_SINE and CLUTTER_EASE_OUT_SINE
|
|
exponential tweening | |
exponential tweening, inverse of
CLUTTER_EASE_IN_EXPO
|
|
exponential tweening, combining
CLUTTER_EASE_IN_EXPO and CLUTTER_EASE_OUT_EXPO
|
|
circular tweening | |
circular tweening, inverse of
CLUTTER_EASE_IN_CIRC
|
|
circular tweening, combining
CLUTTER_EASE_IN_CIRC and CLUTTER_EASE_OUT_CIRC
|
|
elastic tweening, with offshoot on start | |
elastic tweening, with offshoot on end | |
elastic tweening with offshoot on both ends | |
overshooting cubic tweening, with backtracking on start | |
overshooting cubic tweening, with backtracking on end | |
overshooting cubic tweening, with backtracking on both ends | |
exponentially decaying parabolic (bounce) tweening, with bounce on start | |
exponentially decaying parabolic (bounce) tweening, with bounce on end | |
exponentially decaying parabolic (bounce) tweening, with bounce on both ends | |
last animation mode, used as a guard for registered global alpha functions |
Since 1.0
ClutterAnimation * clutter_animation_new (void
);
Creates a new ClutterAnimation instance. You should set the
GObject to be animated using clutter_animation_set_object()
,
set the duration with clutter_animation_set_duration()
and the
easing mode using clutter_animation_set_mode()
.
Use clutter_animation_bind()
or clutter_animation_bind_interval()
to define the properties to be animated. The interval and the
animated properties can be updated at runtime.
The clutter_actor_animate()
and relative family of functions provide
an easy way to animate a ClutterActor and automatically manage the
lifetime of a ClutterAnimation instance, so you should consider using
those functions instead of manually creating an animation.
Returns : |
the newly created ClutterAnimation. Use g_object_unref()
to release the associated resources
|
Since 1.0
void clutter_animation_set_object (ClutterAnimation *animation
,GObject *object
);
Attaches animation
to object
. The ClutterAnimation will take a
reference on object
.
|
a ClutterAnimation |
|
a GObject |
Since 1.0
GObject * clutter_animation_get_object (ClutterAnimation *animation
);
Retrieves the GObject attached to animation
.
|
a ClutterAnimation |
Returns : |
a GObject. [transfer none] |
Since 1.0
void clutter_animation_set_mode (ClutterAnimation *animation
,gulong mode
);
Sets the animation mode
of animation
. The animation mode
is
a logical id, either coming from the ClutterAnimationMode enumeration
or the return value of clutter_alpha_register_func()
.
This function will also set "alpha" if needed.
|
a ClutterAnimation |
|
an animation mode logical id |
Since 1.0
gulong clutter_animation_get_mode (ClutterAnimation *animation
);
Retrieves the animation mode of animation
, as set by
clutter_animation_set_mode()
.
|
a ClutterAnimation |
Returns : |
the mode for the animation |
Since 1.0
void clutter_animation_set_duration (ClutterAnimation *animation
,guint msecs
);
Sets the duration of animation
in milliseconds.
This function will set "alpha" and "timeline" if needed.
|
a ClutterAnimation |
|
the duration in milliseconds |
Since 1.0
guint clutter_animation_get_duration (ClutterAnimation *animation
);
Retrieves the duration of animation
, in milliseconds.
|
a ClutterAnimation |
Returns : |
the duration of the animation |
Since 1.0
void clutter_animation_set_loop (ClutterAnimation *animation
,gboolean loop
);
Sets whether animation
should loop over itself once finished.
A looping ClutterAnimation will not emit the "completed" signal when finished.
This function will set "alpha" and "timeline" if needed.
|
a ClutterAnimation |
|
TRUE if the animation should loop
|
Since 1.0
gboolean clutter_animation_get_loop (ClutterAnimation *animation
);
Retrieves whether animation
is looping.
|
a ClutterAnimation |
Returns : |
TRUE if the animation is looping
|
Since 1.0
void clutter_animation_set_timeline (ClutterAnimation *animation
,ClutterTimeline *timeline
);
Sets the ClutterTimeline used by animation
.
|
a ClutterAnimation |
|
a ClutterTimeline, or NULL to unset the
current ClutterTimeline
|
Since 1.0
ClutterTimeline * clutter_animation_get_timeline (ClutterAnimation *animation
);
Retrieves the ClutterTimeline used by animation
|
a ClutterAnimation |
Returns : |
the timeline used by the animation. [transfer none] |
Since 1.0
void clutter_animation_set_alpha (ClutterAnimation *animation
,ClutterAlpha *alpha
);
Sets alpha
as the ClutterAlpha used by animation
.
If alpha
is not NULL
, the ClutterAnimation will take ownership
of the ClutterAlpha instance.
|
a ClutterAnimation |
|
a ClutterAlpha, or NULL to unset the current ClutterAlpha
|
Since 1.0
ClutterAlpha * clutter_animation_get_alpha (ClutterAnimation *animation
);
Retrieves the ClutterAlpha used by animation
.
|
a ClutterAnimation |
Returns : |
the alpha object used by the animation. [transfer none] |
Since 1.0
void clutter_animation_completed (ClutterAnimation *animation
);
Emits the ::completed signal on animation
When using this function with a ClutterAnimation created
by the clutter_actor_animate()
family of functions, animation
will be unreferenced and it will not be valid anymore,
unless g_object_ref()
was called before calling this function
or unless a reference was taken inside a handler for the
"completed" signal
|
a ClutterAnimation |
Since 1.0
ClutterAnimation * clutter_animation_bind (ClutterAnimation *animation
,const gchar *property_name
,const GValue *final
);
Adds a single property with name property_name
to the
animation animation
. For more information about animations,
see clutter_actor_animate()
.
This method returns the animation primarily to make chained calls convenient in language bindings.
|
a ClutterAnimation |
|
the property to control |
|
The final value of the property |
Returns : |
The animation itself. [transfer none] |
Since 1.0
ClutterAnimation * clutter_animation_bind_interval (ClutterAnimation *animation
,const gchar *property_name
,ClutterInterval *interval
);
Binds interval
to the property_name
of the GObject
attached to animation
. The ClutterAnimation will take
ownership of the passed ClutterInterval. For more information
about animations, see clutter_actor_animate()
.
If you need to update the interval instance use
clutter_animation_update_property()
instead.
|
a ClutterAnimation |
|
the property to control |
|
a ClutterInterval. [transfer full] |
Returns : |
The animation itself. [transfer none] |
Since 1.0
ClutterAnimation * clutter_animation_update (ClutterAnimation *animation
,const gchar *property_name
,const GValue *final
);
Updates the final
value of the interval for property_name
|
a ClutterAnimation |
|
name of the property |
|
The final value of the property |
Returns : |
The animation itself. [transfer none] |
Since 1.0
void clutter_animation_update_interval (ClutterAnimation *animation
,const gchar *property_name
,ClutterInterval *interval
);
Changes the interval
for property_name
. The ClutterAnimation
will take ownership of the passed ClutterInterval.
|
a ClutterAnimation |
|
name of the property |
|
a ClutterInterval |
Since 1.0
gboolean clutter_animation_has_property (ClutterAnimation *animation
,const gchar *property_name
);
Checks whether animation
is controlling property_name
.
|
a ClutterAnimation |
|
name of the property |
Returns : |
TRUE if the property is animated by the
ClutterAnimation, FALSE otherwise
|
Since 1.0
void clutter_animation_unbind_property (ClutterAnimation *animation
,const gchar *property_name
);
Removes property_name
from the list of animated properties.
|
a ClutterAnimation |
|
name of the property |
Since 1.0
ClutterInterval * clutter_animation_get_interval (ClutterAnimation *animation
,const gchar *property_name
);
Retrieves the ClutterInterval associated to property_name
inside animation
.
|
a ClutterAnimation |
|
name of the property |
Returns : |
a ClutterInterval or NULL if no
property with the same name was found. The returned interval is
owned by the ClutterAnimation and should not be unreferenced. [transfer none]
|
Since 1.0
ClutterAnimation * clutter_actor_animate (ClutterActor *actor
,gulong mode
,guint duration
,const gchar *first_property_name
,...
);
Animates the given list of properties of actor
between the current
value for each property and a new final value. The animation has a
definite duration and a speed given by the mode
.
For example, this:
1 2 3 4 |
clutter_actor_animate (rectangle, CLUTTER_LINEAR, 250, "width", 100.0, "height", 100.0, NULL); |
will make width and height properties of the ClutterActor "rectangle" grow linearly between the current value and 100 pixels, in 250 milliseconds.
The animation mode
is a logical id, either from the ClutterAnimationMode
enumeration of from clutter_alpha_register_func()
.
All the properties specified will be animated between the current value and the final value. If a property should be set at the beginning of the animation but not updated during the animation, it should be prefixed by the "fixed::" string, for instance:
1 2 3 4 |
clutter_actor_animate (actor, CLUTTER_EASE_IN_SINE, 100, "rotation-angle-z", 360.0, "fixed::rotation-center-z", ¢er, NULL); |
Will animate the "rotation-angle-z" property between the current value and 360 degrees, and set the "rotation-center-z" property to the fixed value of the ClutterVertex "center".
This function will implicitly create a ClutterAnimation object which
will be assigned to the actor
and will be returned to the developer
to control the animation or to know when the animation has been
completed.
If a name argument starts with "signal::", "signal-after::", "signal-swapped::" or "signal-swapped-after::" the two following arguments are used as callback function and data for a signal handler installed on the ClutterAnimation object for the specified signal name, for instance:
1 2 3 4 5 6 7 8 9 10 11 |
static void on_animation_completed (ClutterAnimation *animation, ClutterActor *actor) { clutter_actor_hide (actor); } clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 100, "opacity", 0, "signal::completed", on_animation_completed, actor, NULL); |
or, to automatically destroy an actor at the end of the animation:
1 2 3 4 5 6 |
clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 100, "opacity", 0, "signal-swapped-after::completed", clutter_actor_destroy, actor, NULL); |
The "signal::" modifier is the equivalent of using g_signal_connect()
;
the "signal-after::" modifier is the equivalent of using
g_signal_connect_after()
or g_signal_connect_data()
with the
G_CONNECT_AFTER
; the "signal-swapped::" modifier is the equivalent
of using g_signal_connect_swapped()
or g_signal_connect_data()
with the
G_CONNECT_SWAPPED
flah; finally, the "signal-swapped-after::" modifier
is the equivalent of using g_signal_connect_data()
with both the
G_CONNECT_AFTER
and G_CONNECT_SWAPPED
flags. The clutter_actor_animate()
function will not keep track of multiple connections to the same signal,
so it is your responsability to avoid them when calling
clutter_actor_animate()
multiple times on the same actor.
Calling this function on an actor that is already being animated will cause the current animation to change with the new final values, the new easing mode and the new duration - that is, this code:
1 2 3 4 5 6 7 8 9 |
clutter_actor_animate (actor, CLUTTER_LINEAR, 250, "width", 100.0, "height", 100.0, NULL); clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 500, "x", 100.0, "y", 100.0, "width", 200.0, NULL); |
is the equivalent of:
1 2 3 4 5 6 |
clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 500, "x", 100.0, "y", 100.0, "width", 200.0, "height", 100.0, NULL); |
clutter_actor_animate()
will become invalid as soon as it is
complete.
Since the created ClutterAnimation instance attached to actor
is guaranteed to be valid throughout the "completed"
signal emission chain, you will not be able to create a new animation
using clutter_actor_animate()
on the same actor
from within the
"completed" signal handler unless you use
g_signal_connect_after()
to connect the callback function, for instance:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
static void on_animation_completed (ClutterAnimation *animation, ClutterActor *actor) { clutter_actor_animate (actor, CLUTTER_EASE_OUT_CUBIC, 250, "x", 500.0, "y", 500.0, NULL); } ... animation = clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 250, "x", 100.0, "y", 100.0, NULL); g_signal_connect (animation, "completed", G_CALLBACK (on_animation_completed), actor); ... |
|
a ClutterActor |
|
an animation mode logical id |
|
duration of the animation, in milliseconds |
|
the name of a property |
|
a NULL terminated list of property names and
property values
|
Returns : |
a ClutterAnimation object. The object is
owned by the ClutterActor and should not be unreferenced with
g_object_unref() . [transfer none]
|
Since 1.0
ClutterAnimation * clutter_actor_animate_with_timeline (ClutterActor *actor
,gulong mode
,ClutterTimeline *timeline
,const gchar *first_property_name
,...
);
Animates the given list of properties of actor
between the current
value for each property and a new final value. The animation has a
definite duration given by timeline
and a speed given by the mode
.
See clutter_actor_animate()
for further details.
This function is useful if you want to use an existing timeline
to animate actor
.
|
a ClutterActor |
|
an animation mode logical id |
|
a ClutterTimeline |
|
the name of a property |
|
a NULL terminated list of property names and
property values
|
Returns : |
a ClutterAnimation object. The object is
owned by the ClutterActor and should not be unreferenced with
g_object_unref() . [transfer none]
|
Since 1.0
ClutterAnimation * clutter_actor_animate_with_alpha (ClutterActor *actor
,ClutterAlpha *alpha
,const gchar *first_property_name
,...
);
Animates the given list of properties of actor
between the current
value for each property and a new final value. The animation has a
definite behaviour given by the passed alpha
.
See clutter_actor_animate()
for further details.
This function is useful if you want to use an existing ClutterAlpha
to animate actor
.
|
a ClutterActor |
|
a ClutterAlpha |
|
the name of a property |
|
a NULL terminated list of property names and
property values
|
Returns : |
a ClutterAnimation object. The object is owned by the
ClutterActor and should not be unreferenced with g_object_unref() . [transfer none]
|
Since 1.0
ClutterAnimation * clutter_actor_animatev (ClutterActor *actor
,gulong mode
,guint duration
,gint n_properties
,const gchar * const properties[]
,const GValue *values
);
Animates the given list of properties of actor
between the current
value for each property and a new final value. The animation has a
definite duration and a speed given by the mode
.
This is the vector-based variant of clutter_actor_animate()
, useful
for language bindings.
clutter_actor_animate()
, this function will not
allow you to specify "signal::" names and callbacks.
|
a ClutterActor |
|
an animation mode logical id |
|
duration of the animation, in milliseconds |
|
number of property names and values |
|
a vector containing the property names to set. [array length=n_properties][element-type utf8] |
|
a vector containing the property values to set. [array length=n_properties] |
Returns : |
a ClutterAnimation object. The object is
owned by the ClutterActor and should not be unreferenced with
g_object_unref() . [transfer none]
|
Since 1.0
ClutterAnimation * clutter_actor_animate_with_timelinev (ClutterActor *actor
,gulong mode
,ClutterTimeline *timeline
,gint n_properties
,const gchar * const properties[]
,const GValue *values
);
Animates the given list of properties of actor
between the current
value for each property and a new final value. The animation has a
definite duration given by timeline
and a speed given by the mode
.
See clutter_actor_animate()
for further details.
This function is useful if you want to use an existing timeline
to animate actor
.
This is the vector-based variant of clutter_actor_animate_with_timeline()
,
useful for language bindings.
clutter_actor_animate_with_timeline()
, this function
will not allow you to specify "signal::" names and callbacks.
|
a ClutterActor |
|
an animation mode logical id |
|
a ClutterTimeline |
|
number of property names and values |
|
a vector containing the property names to set. [array length=n_properties][element-type utf8] |
|
a vector containing the property values to set. [array length=n_properties] |
Returns : |
a ClutterAnimation object. The object is
owned by the ClutterActor and should not be unreferenced with
g_object_unref() . [transfer none]
|
Since 1.0
ClutterAnimation * clutter_actor_animate_with_alphav (ClutterActor *actor
,ClutterAlpha *alpha
,gint n_properties
,const gchar * const properties[]
,const GValue *values
);
Animates the given list of properties of actor
between the current
value for each property and a new final value. The animation has a
definite behaviour given by the passed alpha
.
See clutter_actor_animate()
for further details.
This function is useful if you want to use an existing ClutterAlpha
to animate actor
.
This is the vector-based variant of clutter_actor_animate_with_alpha()
,
useful for language bindings.
clutter_actor_animate_with_alpha()
, this function will
not allow you to specify "signal::" names and callbacks.
|
a ClutterActor |
|
a ClutterAlpha |
|
number of property names and values |
|
a vector containing the property names to set. [array length=n_properties][element-type utf8] |
|
a vector containing the property values to set. [array length=n_properties] |
Returns : |
a ClutterAnimation object. The object is owned by the
ClutterActor and should not be unreferenced with g_object_unref() . [transfer none]
|
Since 1.0
ClutterAnimation * clutter_actor_get_animation (ClutterActor *actor
);
Retrieves the ClutterAnimation used by actor
, if clutter_actor_animate()
has been called on actor
.
|
a ClutterActor |
Returns : |
a ClutterAnimation, or NULL . [transfer none]
|
Since 1.0
void clutter_actor_detach_animation (ClutterActor *actor
);
Detaches the ClutterAnimation used by actor
, if clutter_actor_animate()
has been called on actor
.
Once the animation has been detached, it loses a reference. If it was the only reference then the ClutterAnimation becomes invalid.
The "completed" signal will not be emitted.
|
a ClutterActor |
Since 1.4
"alpha"
property"alpha" ClutterAlpha* : Read / Write
The ClutterAlpha used by the animation.
Since 1.0
"duration"
property "duration" guint : Read / Write
The duration of the animation, expressed in milliseconds.
Default value: 0
Since 1.0
"loop"
property "loop" gboolean : Read / Write
Whether the animation should loop.
Default value: FALSE
Since 1.0
"mode"
property "mode" gulong : Read / Write
The animation mode, either a value from ClutterAnimationMode
or a value returned by clutter_alpha_register_func()
. The
default value is CLUTTER_LINEAR
.
Since 1.0
"object"
property "object" GObject* : Read / Write
The GObject to which the animation applies.
Since 1.0
"timeline"
property"timeline" ClutterTimeline* : Read / Write
The ClutterTimeline used by the animation.
Since 1.0
"completed"
signalvoid user_function (ClutterAnimation *animation,
gpointer user_data) : Run Last
The ::completed signal is emitted once the animation has been completed.
The animation
instance is guaranteed to be valid for the entire
duration of the signal emission chain.
|
the animation that emitted the signal |
|
user data set when the signal handler was connected. |
Since 1.0
"started"
signalvoid user_function (ClutterAnimation *animation,
gpointer user_data) : Run Last
The ::started signal is emitted once the animation has been started
|
the animation that emitted the signal |
|
user data set when the signal handler was connected. |
Since 1.0