Class: Clutter::Interval
- Inherits:
-
GObject::InitiallyUnowned
- Object
- GObject::InitiallyUnowned
- Clutter::Interval
- Defined in:
- (unknown)
Overview
The Clutter::IntervalClass contains only private data.
Class Method Summary collapse
-
.register_progress_func(value_type, func) ⇒ nil
Sets the progress function for a given value_type, like:.
Instance Method Summary collapse
-
#clone ⇒ Clutter::Interval
Creates a copy of interval.
-
#compute(factor) ⇒ GObject::Value
Computes the value between the interval boundaries given the progress factor.
-
#compute_value(factor, value) ⇒ Boolean
Computes the value between the interval boundaries given the progress factor and copies it into value.
-
#final ⇒ GObject::Value
The final value of the interval.
-
#final=(final) ⇒ GObject::Value
The final value of the interval.
-
#final_value=(value) ⇒ nil
Sets the final value of interval to value.
-
#get_final_value(value) ⇒ nil
Retrieves the final value of interval and copies it into value.
-
#get_initial_value(value) ⇒ nil
Retrieves the initial value of interval and copies it into value.
-
#get_interval(array) ⇒ nil
Variable arguments wrapper for clutter_interval_get_initial_value() and clutter_interval_get_final_value() that avoids using the #GValue arguments:.
-
#initial ⇒ GObject::Value
The initial value of the interval.
-
#initial=(initial) ⇒ GObject::Value
The initial value of the interval.
-
#initial_value=(value) ⇒ nil
Sets the initial value of interval to value.
-
#initialize(gtype, initial, final) ⇒ Clutter::Interval
constructor
Creates a new Clutter::Interval of type gtype, between initial and final.
-
#interval=(array) ⇒ nil
Variable arguments wrapper for clutter_interval_set_initial_value() and clutter_interval_set_final_value() that avoids using the #GValue arguments:.
-
#is_valid ⇒ Boolean
Checks if the interval has a valid initial and final values.
-
#peek_final_value ⇒ GObject::Value
Gets the pointer to the final value of interval.
-
#peek_initial_value ⇒ GObject::Value
Gets the pointer to the initial value of interval.
-
#validate(pspec) ⇒ Boolean
Validates the initial and final values of interval against a GParam::Spec.
-
#value_type ⇒ GLib::Type
The type of the values in the interval.
-
#value_type=(value_type) ⇒ GLib::Type
The type of the values in the interval.
Constructor Details
#initialize(gtype, initial, final) ⇒ Clutter::Interval
Creates a new Clutter::Interval of type gtype, between initial and final.
This function is useful for language bindings.
Class Method Details
.register_progress_func(value_type, func) ⇒ nil
Sets the progress function for a given value_type, like:
|[ clutter_interval_register_progress_func (MY_TYPE_FOO, my_foo_progress); ]|
Whenever a Clutter::Interval instance using the default Clutter::Interval::compute_value implementation is set as an interval between two #GValue of type value_type, it will call func to establish the value depending on the given progress, for instance:
|[ static gboolean my_int_progress (const GValue *a, const GValue *b, gdouble progress, GValue *retval) { gint ia = g_value_get_int (a); gint ib = g_value_get_int (b); gint res = factor * (ib - ia) + ia;
g_value_set_int (retval, res);
return TRUE;
}
clutter_interval_register_progress_func (G_TYPE_INT, my_int_progress); ]|
To unset a previously set progress function of a #GType, pass nil for func.
Instance Method Details
#clone ⇒ Clutter::Interval
Creates a copy of interval.
#compute(factor) ⇒ GObject::Value
Computes the value between the interval boundaries given the progress factor
Unlike clutter_interval_compute_value(), this function will return a const pointer to the computed value
You should use this function if you immediately pass the computed value to another function that makes a copy of it, like g_object_set_property()
#compute_value(factor, value) ⇒ Boolean
Computes the value between the interval boundaries given the progress factor and copies it into value.
#final ⇒ GObject::Value
The final value of the interval.
#final=(final) ⇒ GObject::Value
The final value of the interval.
#final_value=(value) ⇒ nil
Sets the final value of interval to value. The value is copied inside the Clutter::Interval.
#get_final_value(value) ⇒ nil
Retrieves the final value of interval and copies it into value.
The passed #GValue must be initialized to the value held by the Clutter::Interval.
#get_initial_value(value) ⇒ nil
Retrieves the initial value of interval and copies it into value.
The passed #GValue must be initialized to the value held by the Clutter::Interval.
#get_interval(array) ⇒ nil
Variable arguments wrapper for clutter_interval_get_initial_value() and clutter_interval_get_final_value() that avoids using the #GValue arguments:
|[ gint a = 0, b = 0; clutter_interval_get_interval (interval, &a, &b); ]|
This function is meant for the convenience of the C API; bindings should reimplement this function using the #GValue-based API.
#initial ⇒ GObject::Value
The initial value of the interval.
#initial=(initial) ⇒ GObject::Value
The initial value of the interval.
#initial_value=(value) ⇒ nil
Sets the initial value of interval to value. The value is copied inside the Clutter::Interval.
#interval=(array) ⇒ nil
Variable arguments wrapper for clutter_interval_set_initial_value() and clutter_interval_set_final_value() that avoids using the #GValue arguments:
|[ clutter_interval_set_interval (interval, 0, 50); clutter_interval_set_interval (interval, 1.0, 0.0); clutter_interval_set_interval (interval, FALSE, TRUE); ]|
This function is meant for the convenience of the C API; bindings should reimplement this function using the #GValue-based API.
#is_valid ⇒ Boolean
Checks if the interval has a valid initial and final values.
#peek_final_value ⇒ GObject::Value
Gets the pointer to the final value of interval
#peek_initial_value ⇒ GObject::Value
Gets the pointer to the initial value of interval
#validate(pspec) ⇒ Boolean
Validates the initial and final values of interval against a GParam::Spec.
#value_type ⇒ GLib::Type
The type of the values in the interval.
#value_type=(value_type) ⇒ GLib::Type
The type of the values in the interval.