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.Animation
structure 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.Animation
instance. You should set theGObject.Object
to 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.Actor
and automatically manage the lifetime of aClutter.Animation
instance, 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.PropertyTransition
instead
- 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.PropertyTransition
instead
- 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.Object
attached to self. TheClutter.Animation
will 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.PropertyTransition
instead
- completed()¶
Emits the
::completed
signal on selfWhen using this function with a
Clutter.Animation
created 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
::completed
signalNew in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransition
instead
- get_alpha()¶
- Returns:
the alpha object used by the animation
- Return type:
Retrieves the
Clutter.Alpha
used 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.PropertyTransition
instead
- get_interval(property_name)¶
- Parameters:
property_name (
str
) – name of the property- Returns:
a
Clutter.Interval
orNone
if no property with the same name was found. The returned interval is owned by theClutter.Animation
and should not be unreferenced- Return type:
Retrieves the
Clutter.Interval
associated to property_name inside self.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransition
instead
- get_loop()¶
-
Retrieves whether self is looping.
New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransition
instead
- 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.PropertyTransition
instead
- get_object()¶
- Returns:
- Return type:
Retrieves the
GObject.Object
attached to self.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransition
instead
- get_timeline()¶
- Returns:
the timeline used by the animation
- Return type:
Retrieves the
Clutter.Timeline
used by selfNew in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransition
instead
- has_property(property_name)¶
- Parameters:
property_name (
str
) – name of the property- Returns:
True
if the property is animated by theClutter.Animation
,False
otherwise- Return type:
Checks whether self is controlling property_name.
New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransition
instead
- set_alpha(alpha)¶
- Parameters:
alpha (
Clutter.Alpha
) – aClutter.Alpha
, orNone
to unset the currentClutter.Alpha
Sets alpha as the
Clutter.Alpha
used by self.If alpha is not
None
, theClutter.Animation
will take ownership of theClutter.Alpha
instance.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
:alpha
andClutter.Animation
:timeline
if needed.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransition
instead
- set_loop(loop)¶
-
Sets whether self should loop over itself once finished.
A looping
Clutter.Animation
will not emit theClutter.Animation
::completed
signal when finished.This function will set
Clutter.Animation
:alpha
andClutter.Animation
:timeline
if needed.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransition
instead
- 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.AnimationMode
enumeration or the return value ofClutter.Alpha.register_func
().This function will also set
Clutter.Animation
:alpha
if needed.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransition
instead
- set_object(object)¶
- Parameters:
object (
GObject.Object
) – aGObject.Object
Attaches self to object. The
Clutter.Animation
will take a reference on object.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransition
instead
- set_timeline(timeline)¶
- Parameters:
timeline (
Clutter.Timeline
orNone
) – aClutter.Timeline
, orNone
to unset the currentClutter.Timeline
Sets the
Clutter.Timeline
used by self.This function will take a reference on the passed timeline.
New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransition
instead
- 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.PropertyTransition
instead
- 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.PropertyTransition
instead
- 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.Animation
will take ownership of the passedClutter.Interval
.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransition
instead
- do_completed() virtual¶
Emits the
::completed
signal on animationWhen using this function with a
Clutter.Animation
created 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
::completed
signalNew in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransition
instead
- do_started() virtual¶
Signal Details¶
- Clutter.Animation.signals.completed(animation)¶
- Signal Name:
completed
- Flags:
- Parameters:
animation (
Clutter.Animation
) – The object which received the signal
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.
New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransition
instead
- Clutter.Animation.signals.started(animation)¶
- Signal Name:
started
- Flags:
- Parameters:
animation (
Clutter.Animation
) – The object which received the signal
The
::started
signal is emitted once the animation has been startedNew in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransition
instead
Property Details¶
- Clutter.Animation.props.alpha¶
- Name:
alpha
- Type:
- Default Value:
- Flags:
The
Clutter.Alpha
used by the animation.New in version 1.0.
Deprecated since version 1.10: Use the
Clutter.Animation
:timeline
property and theClutter.Timeline
:progress-mode
property 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.PropertyTransition
instead
- Clutter.Animation.props.loop¶
-
Whether the animation should loop.
New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransition
instead
- Clutter.Animation.props.mode¶
-
The animation mode, either a value from
Clutter.AnimationMode
or 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.PropertyTransition
instead
- Clutter.Animation.props.object¶
- Name:
object
- Type:
- Default Value:
- Flags:
The
GObject.Object
to which the animation applies.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransition
instead
- Clutter.Animation.props.timeline¶
- Name:
timeline
- Type:
- Default Value:
- Flags:
The
Clutter.Timeline
used by the animation.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.PropertyTransition
instead