Class: Clutter::Animation

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Overview

The Clutter::AnimationClass structure contains only private data and should be accessed using the provided functions.

Instance Method Summary collapse

Constructor Details

#initializeClutter::Animation

Creates a new Clutter::Animation 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 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.

Instance Method Details

#alphaClutter::Alpha

The Clutter::Alpha used by the animation.

Returns:

#alpha=(alpha) ⇒ Clutter::Alpha

The Clutter::Alpha used by the animation.

Parameters:

Returns:

#bind(property_name, final) ⇒ Clutter::Animation

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.

Parameters:

  • property_name (String)

    the property to control

  • final (GObject::Value)

    The final value of the property

Returns:

#bind_interval(property_name, interval) ⇒ Clutter::Animation

Binds interval to the property_name of the #GObject attached to animation. 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.

Parameters:

  • property_name (String)

    the property to control

  • interval (Clutter::Interval)

    a Clutter::Interval

Returns:

#completednil

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

Returns:

  • (nil)

#durationInteger

The duration of the animation, expressed in milliseconds.

Returns:

  • (Integer)

    duration

#duration=(duration) ⇒ Integer

The duration of the animation, expressed in milliseconds.

Parameters:

  • duration (Integer)

Returns:

  • (Integer)

    duration

  • (Integer)

    duration

#get_interval(property_name) ⇒ Clutter::Interval

Retrieves the Clutter::Interval associated to property_name inside animation.

Parameters:

  • property_name (String)

    name of the property

Returns:

  • (Clutter::Interval)

    a Clutter::Interval or nil if no property with the same name was found. The returned interval is owned by the Clutter::Animation and should not be unreferenced

#has_property(property_name) ⇒ Boolean

Checks whether animation is controlling property_name.

Parameters:

  • property_name (String)

    name of the property

Returns:

  • (Boolean)

    true if the property is animated by the Clutter::Animation, false otherwise

#loopBoolean

Retrieves whether animation is looping.

Returns:

  • (Boolean)

    true if the animation is looping

#loop=(loop) ⇒ Boolean

Whether the animation should loop.

Parameters:

  • loop (Boolean)

Returns:

  • (Boolean)

    loop

  • (Boolean)

    loop

#loop?Boolean

Whether the animation should loop.

Returns:

  • (Boolean)

    loop

#modeClutter::gulong

The animation mode, either a value from Clutter::AnimationMode or a value returned by clutter_alpha_register_func(). The default value is %CLUTTER_LINEAR.

Returns:

  • (Clutter::gulong)

    mode

#mode=(mode) ⇒ Clutter::gulong

The animation mode, either a value from Clutter::AnimationMode or a value returned by clutter_alpha_register_func(). The default value is %CLUTTER_LINEAR.

Parameters:

  • mode (Clutter::gulong)

Returns:

  • (Clutter::gulong)

    mode

  • (Clutter::gulong)

    mode

#objectGObject::Object

The #GObject to which the animation applies.

Returns:

  • (GObject::Object)

    object

#object=(object) ⇒ GObject::Object

The #GObject to which the animation applies.

Parameters:

  • object (GObject::Object)

Returns:

  • (GObject::Object)

    object

  • (GObject::Object)

    object

#timelineClutter::Timeline

The Clutter::Timeline used by the animation.

Returns:

#timeline=(timeline) ⇒ Clutter::Timeline

The Clutter::Timeline used by the animation.

Parameters:

Returns:

#unbind_property(property_name) ⇒ nil

Removes property_name from the list of animated properties.

Parameters:

  • property_name (String)

    name of the property

Returns:

  • (nil)

#update(property_name, final) ⇒ Clutter::Animation

Updates the final value of the interval for property_name

Parameters:

  • property_name (String)

    name of the property

  • final (GObject::Value)

    The final value of the property

Returns:

#update_interval(property_name, interval) ⇒ nil

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

Parameters:

  • property_name (String)

    name of the property

  • interval (Clutter::Interval)

    a Clutter::Interval

Returns:

  • (nil)