interval: Add a pointer variant to compute_value()

ClutterInterval.compute_value() computes the new value given a progress
and copies it to a given GValue. Since most of the time we want to pass
that very same value to another function that copies it again, we should
have a compute_value() variant that stores that computed value inside
ClutterInterval and returns a pointer to it. This way we initialize the
result GValue just once and we never copy it, as long as the Interval
instance is valid.
This commit is contained in:
Emmanuele Bassi
2010-05-24 15:06:14 +01:00
parent 489c16c6a6
commit af84d97fca
3 changed files with 70 additions and 9 deletions

View File

@ -154,6 +154,9 @@ gboolean clutter_interval_compute_value (ClutterInterval *interval,
gdouble factor,
GValue *value);
G_CONST_RETURN GValue *clutter_interval_compute (ClutterInterval *interval,
gdouble factor);
void clutter_interval_register_progress_func (GType value_type,
ClutterProgressFunc func);