Module: Clutter::Animatable

Defined in:
lib/clutter/animatable.rb

Overview

Clutter::Animatable is an opaque structure whose members cannot be directly accessed

Instance Method Summary collapse

Instance Method Details

#animate_property(animatable, animation, property_name, initial_value, final_value, progress, value) ⇒ Boolean

Returns true if the value has been validated and can be applied to the Clutter::Animatable, and false otherwise.

Parameters:

  • animatable (Clutter::Animatable)

    a Clutter::Animatable

  • animation (Clutter::Animation)

    a Clutter::Animation

  • property_name (String)

    the name of the animated property

  • initial_value (GObject::Value)

    the initial value of the animation interval

  • final_value (GObject::Value)

    the final value of the animation interval

  • progress (Float)

    the progress factor

  • value (GObject::Value)

    return location for the animation value

Returns:

  • (Boolean)

    true if the value has been validated and can be applied to the Clutter::Animatable, and false otherwise

#find_property(animatable, property_name) ⇒ GObject::ParamSpec

Returns The GParam::Spec for the given property or nil.

Parameters:

  • animatable (Clutter::Animatable)

    a Clutter::Animatable

  • property_name (String)

    the name of the animatable property to find

Returns:

  • (GObject::ParamSpec)

    The GParam::Spec for the given property or nil

#get_initial_state(animatable, property_name, value) ⇒ nil

Parameters:

  • animatable (Clutter::Animatable)

    a Clutter::Animatable

  • property_name (String)

    the name of the animatable property to retrieve

  • value (GObject::Value)

    a #GValue initialized to the type of the property to retrieve

Returns:

  • (nil)

#interpolate_value(animatable, property_name, interval, progress, value) ⇒ Boolean

Returns true if the interpolation was successful, and false otherwise.

Parameters:

  • animatable (Clutter::Animatable)

    a Clutter::Animatable

  • property_name (String)

    the name of the property to interpolate

  • interval (Clutter::Interval)

    a Clutter::Interval with the animation range

  • progress (Float)

    the progress to use to interpolate between the initial and final values of the interval

  • value (GObject::Value)

    return location for an initialized #GValue using the same type of the interval

Returns:

  • (Boolean)

    true if the interpolation was successful, and false otherwise

#set_final_state(property_name, value) ⇒ nil

Parameters:

  • animatable (Clutter::Animatable)

    a Clutter::Animatable

  • property_name (String)

    the name of the animatable property to set

  • value (GObject::Value)

    the value of the animatable property to set

Returns:

  • (nil)


20
21
22
23
24
# File 'lib/clutter/animatable.rb', line 20

def set_final_state(property_name, value)
  property = self.class.property(property_name)
  value = GLib::Value.new(property.value_type, value)
  set_final_state_without_conversion(property_name, value)
end

#set_final_state_without_conversionnil

Parameters:

  • animatable (Clutter::Animatable)

    a Clutter::Animatable

  • property_name (String)

    the name of the animatable property to set

  • value (GObject::Value)

    the value of the animatable property to set

Returns:

  • (nil)


# File 'lib/clutter/animatable.rb', line 19