Clutter.Animation¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
d/r/w |
The alpha used by the animation |
||
r/w |
Duration of the animation, in milliseconds |
||
r/w |
Whether the animation should loop |
||
r/w |
The mode of the animation |
||
r/w |
Object to which the animation applies |
||
r/w |
The timeline used by the animation |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
The |
|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class Clutter.Animation(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
Clutter.Animationstructure contains only private data and should be accessed using the provided functions.New in version 1.0.
Deprecated since version 1.12: Use the implicit animation on
Clutter.Actor- classmethod new()¶
- Returns:
the newly created
Clutter.Animation. UseGObject.Object.unref() to release the associated resources- Return type:
Creates a new
Clutter.Animationinstance. You should set theGObject.Objectto be animated usingClutter.Animation.set_object(), set the duration withClutter.Animation.set_duration() and the easing mode usingClutter.Animation.set_mode().Use
Clutter.Animation.bind() orClutter.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
Clutter.Actorand automatically manage the lifetime of aClutter.Animationinstance, so you should consider using those functions instead of manually creating an animation.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- bind(property_name, final)¶
- Parameters:
property_name (
str) – the property to controlfinal (
GObject.Value) – The final value of the property
- Returns:
The animation itself.
- Return type:
Adds a single property with name property_name to the animation self. For more information about animations, see clutter_actor_animate().
This method returns the animation primarily to make chained calls convenient in language bindings.
New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- bind_interval(property_name, interval)¶
- Parameters:
property_name (
str) – the property to controlinterval (
Clutter.Interval) – aClutter.Interval
- Returns:
The animation itself.
- Return type:
Binds interval to the property_name of the
GObject.Objectattached to self. TheClutter.Animationwill take ownership of the passedClutter.Interval. For more information about animations, see clutter_actor_animate().If you need to update the interval instance use
Clutter.Animation.update_interval() instead.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- completed()¶
Emits the
::completedsignal on selfWhen using this function with a
Clutter.Animationcreated by the clutter_actor_animate() family of functions, self will be unreferenced and it will not be valid anymore, unlessGObject.Object.ref() was called before calling this function or unless a reference was taken inside a handler for theClutter.Animation::completedsignalNew in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- get_alpha()¶
- Returns:
the alpha object used by the animation
- Return type:
Retrieves the
Clutter.Alphaused by self.New in version 1.0.
Deprecated since version 1.10: Use
Clutter.Animation.get_timeline() andClutter.Timeline.get_progress_mode() instead.
- get_duration()¶
- Returns:
the duration of the animation
- Return type:
Retrieves the duration of self, in milliseconds.
New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- get_interval(property_name)¶
- Parameters:
property_name (
str) – name of the property- Returns:
a
Clutter.IntervalorNoneif no property with the same name was found. The returned interval is owned by theClutter.Animationand should not be unreferenced- Return type:
Retrieves the
Clutter.Intervalassociated to property_name inside self.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- get_loop()¶
-
Retrieves whether self is looping.
New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- get_mode()¶
- Returns:
the mode for the animation
- Return type:
Retrieves the animation mode of self, as set by
Clutter.Animation.set_mode().New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- get_object()¶
- Returns:
- Return type:
Retrieves the
GObject.Objectattached to self.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- get_timeline()¶
- Returns:
the timeline used by the animation
- Return type:
Retrieves the
Clutter.Timelineused by selfNew in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- has_property(property_name)¶
- Parameters:
property_name (
str) – name of the property- Returns:
Trueif the property is animated by theClutter.Animation,Falseotherwise- Return type:
Checks whether self is controlling property_name.
New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- set_alpha(alpha)¶
- Parameters:
alpha (
Clutter.Alpha) – aClutter.Alpha, orNoneto unset the currentClutter.Alpha
Sets alpha as the
Clutter.Alphaused by self.If alpha is not
None, theClutter.Animationwill take ownership of theClutter.Alphainstance.New in version 1.0.
Deprecated since version 1.10: Use
Clutter.Animation.get_timeline() andClutter.Timeline.set_progress_mode() instead.
- set_duration(msecs)¶
- Parameters:
msecs (
int) – the duration in milliseconds
Sets the duration of self in milliseconds.
This function will set
Clutter.Animation:alphaandClutter.Animation:timelineif needed.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- set_loop(loop)¶
-
Sets whether self should loop over itself once finished.
A looping
Clutter.Animationwill not emit theClutter.Animation::completedsignal when finished.This function will set
Clutter.Animation:alphaandClutter.Animation:timelineif needed.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- set_mode(mode)¶
- Parameters:
mode (
int) – an animation mode logical id
Sets the animation mode of self. The animation mode is a logical id, either coming from the
Clutter.AnimationModeenumeration or the return value ofClutter.Alpha.register_func().This function will also set
Clutter.Animation:alphaif needed.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- set_object(object)¶
- Parameters:
object (
GObject.Object) – aGObject.Object
Attaches self to object. The
Clutter.Animationwill take a reference on object.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- set_timeline(timeline)¶
- Parameters:
timeline (
Clutter.TimelineorNone) – aClutter.Timeline, orNoneto unset the currentClutter.Timeline
Sets the
Clutter.Timelineused by self.This function will take a reference on the passed timeline.
New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- unbind_property(property_name)¶
- Parameters:
property_name (
str) – name of the property
Removes property_name from the list of animated properties.
New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- update(property_name, final)¶
- Parameters:
property_name (
str) – name of the propertyfinal (
GObject.Value) – The final value of the property
- Returns:
The animation itself.
- Return type:
Updates the final value of the interval for property_name
New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- update_interval(property_name, interval)¶
- Parameters:
property_name (
str) – name of the propertyinterval (
Clutter.Interval) – aClutter.Interval
Changes the interval for property_name. The
Clutter.Animationwill take ownership of the passedClutter.Interval.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- do_completed() virtual¶
Emits the
::completedsignal on animationWhen using this function with a
Clutter.Animationcreated by the clutter_actor_animate() family of functions, animation will be unreferenced and it will not be valid anymore, unlessGObject.Object.ref() was called before calling this function or unless a reference was taken inside a handler for theClutter.Animation::completedsignalNew in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- do_started() virtual¶
class handler for the
Clutter.Animation::startedsignal
Signal Details¶
- Clutter.Animation.signals.completed(animation)¶
- Signal Name:
completed- Flags:
- Parameters:
animation (
Clutter.Animation) – The object which received the signal
The
::completedsignal 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.
New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- Clutter.Animation.signals.started(animation)¶
- Signal Name:
started- Flags:
- Parameters:
animation (
Clutter.Animation) – The object which received the signal
The
::startedsignal is emitted once the animation has been startedNew in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
Property Details¶
- Clutter.Animation.props.alpha¶
- Name:
alpha- Type:
- Default Value:
- Flags:
The
Clutter.Alphaused by the animation.New in version 1.0.
Deprecated since version 1.10: Use the
Clutter.Animation:timelineproperty and theClutter.Timeline:progress-modeproperty instead.
- Clutter.Animation.props.duration¶
-
The duration of the animation, expressed in milliseconds.
New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- Clutter.Animation.props.loop¶
-
Whether the animation should loop.
New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- Clutter.Animation.props.mode¶
-
The animation mode, either a value from
Clutter.AnimationModeor a value returned byClutter.Alpha.register_func(). The default value isClutter.AnimationMode.LINEAR.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- Clutter.Animation.props.object¶
- Name:
object- Type:
- Default Value:
- Flags:
The
GObject.Objectto which the animation applies.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead
- Clutter.Animation.props.timeline¶
- Name:
timeline- Type:
- Default Value:
- Flags:
The
Clutter.Timelineused by the animation.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransitioninstead