Clutter.Animation

g Clutter.Animation Clutter.Animation Clutter.Scriptable Clutter.Scriptable Clutter.Scriptable->Clutter.Animation GObject.GInterface GObject.GInterface GObject.GInterface->Clutter.Scriptable GObject.Object GObject.Object GObject.Object->Clutter.Animation

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Clutter.Scriptable (4)

Structs:

GObject.ObjectClass (5)

class

new ()

bind (property_name, final)

bind_interval (property_name, interval)

completed ()

get_alpha ()

get_duration ()

get_interval (property_name)

get_loop ()

get_mode ()

get_object ()

get_timeline ()

has_property (property_name)

set_alpha (alpha)

set_duration (msecs)

set_loop (loop)

set_mode (mode)

set_object (object)

set_timeline (timeline)

unbind_property (property_name)

update (property_name, final)

update_interval (property_name, interval)

Virtual Methods

Inherited:

GObject.Object (7), Clutter.Scriptable (4)

do_completed ()

do_started ()

Properties

Name

Type

Flags

Short Description

alpha

Clutter.Alpha

d/r/w

The alpha used by the animation deprecated

duration

int

r/w

Duration of the animation, in milliseconds deprecated

loop

bool

r/w

Whether the animation should loop deprecated

mode

int

r/w

The mode of the animation deprecated

object

GObject.Object

r/w

Object to which the animation applies deprecated

timeline

Clutter.Timeline

r/w

The timeline used by the animation deprecated

Signals

Inherited:

GObject.Object (1)

Name

Short Description

completed

The ::completed signal is emitted once the animation has been completed. deprecated

started

The ::started signal is emitted once the animation has been started deprecated

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Clutter.Animation(**kwargs)
Bases:

GObject.Object, Clutter.Scriptable

Abstract:

No

Structure:

Clutter.AnimationClass

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. Use GObject.Object.unref() to release the associated resources

Return type:

Clutter.Animation

Creates a new Clutter.Animation instance. You should set the GObject.Object 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 Clutter.Actor and automatically manage the lifetime of a Clutter.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 control

  • final (GObject.Value) – The final value of the property

Returns:

The animation itself.

Return type:

Clutter.Animation

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:
Returns:

The animation itself.

Return type:

Clutter.Animation

Binds interval to the property_name of the GObject.Object attached to self. The Clutter.Animation will take ownership of the passed Clutter.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 self

When 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, unless GObject.Object.ref() was called before calling this function or unless a reference was taken inside a handler for the Clutter.Animation ::completed signal

New 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:

Clutter.Alpha

Retrieves the Clutter.Alpha used by self.

New in version 1.0.

Deprecated since version 1.10: Use Clutter.Animation.get_timeline() and Clutter.Timeline.get_progress_mode() instead.

get_duration()
Returns:

the duration of the animation

Return type:

int

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 or None if no property with the same name was found. The returned interval is owned by the Clutter.Animation and should not be unreferenced

Return type:

Clutter.Interval

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()
Returns:

True if the animation is looping

Return type:

bool

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:

int

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:

a GObject.Object

Return type:

GObject.Object

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:

Clutter.Timeline

Retrieves the Clutter.Timeline used by self

New 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 the Clutter.Animation, False otherwise

Return type:

bool

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) – a Clutter.Alpha, or None to unset the current Clutter.Alpha

Sets alpha as the Clutter.Alpha used by self.

If alpha is not None, the Clutter.Animation will take ownership of the Clutter.Alpha instance.

New in version 1.0.

Deprecated since version 1.10: Use Clutter.Animation.get_timeline() and Clutter.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 and Clutter.Animation :timeline if needed.

New in version 1.0.

Deprecated since version 1.12: Use Clutter.PropertyTransition instead

set_loop(loop)
Parameters:

loop (bool) – True if the animation should loop

Sets whether self should loop over itself once finished.

A looping Clutter.Animation will not emit the Clutter.Animation ::completed signal when finished.

This function will set Clutter.Animation :alpha and Clutter.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 of Clutter.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) – a GObject.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 or None) – a Clutter.Timeline, or None to unset the current Clutter.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 property

  • final (GObject.Value) – The final value of the property

Returns:

The animation itself.

Return type:

Clutter.Animation

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:

Changes the interval for property_name. The Clutter.Animation will take ownership of the passed Clutter.Interval.

New in version 1.0.

Deprecated since version 1.12: Use Clutter.PropertyTransition instead

do_completed() virtual

Emits the ::completed signal on animation

When 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, unless GObject.Object.ref() was called before calling this function or unless a reference was taken inside a handler for the Clutter.Animation ::completed signal

New 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:

RUN_LAST

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:

RUN_LAST

Parameters:

animation (Clutter.Animation) – The object which received the signal

The ::started signal is emitted once the animation has been started

New in version 1.0.

Deprecated since version 1.12: Use Clutter.PropertyTransition instead

Property Details

Clutter.Animation.props.alpha
Name:

alpha

Type:

Clutter.Alpha

Default Value:

None

Flags:

DEPRECATED, READABLE, WRITABLE

The Clutter.Alpha used by the animation.

New in version 1.0.

Deprecated since version 1.10: Use the Clutter.Animation :timeline property and the Clutter.Timeline :progress-mode property instead.

Clutter.Animation.props.duration
Name:

duration

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

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
Name:

loop

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Whether the animation should loop.

New in version 1.0.

Deprecated since version 1.12: Use Clutter.PropertyTransition instead

Clutter.Animation.props.mode
Name:

mode

Type:

int

Default Value:

1

Flags:

READABLE, WRITABLE

The animation mode, either a value from Clutter.AnimationMode or a value returned by Clutter.Alpha.register_func(). The default value is Clutter.AnimationMode.LINEAR.

New in version 1.0.

Deprecated since version 1.12: Use Clutter.PropertyTransition instead

Clutter.Animation.props.object
Name:

object

Type:

GObject.Object

Default Value:

None

Flags:

READABLE, WRITABLE

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:

Clutter.Timeline

Default Value:

None

Flags:

READABLE, WRITABLE

The Clutter.Timeline used by the animation.

New in version 1.0.

Deprecated since version 1.12: Use Clutter.PropertyTransition instead