[animation] Allow registering custom progress function
authorEmmanuele Bassi <ebassi@linux.intel.com>
Thu, 8 Jan 2009 11:15:09 +0000 (11:15 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Thu, 8 Jan 2009 11:15:09 +0000 (11:15 +0000)
commit28b0f432b78f9db0c36d3b286cc8928d12b3b1f3
treeaed3a1ff0145bea713009dfe9ed75cf467883ec7
parentff48c3ef7c05de41e087645deb845b4d9bb66ae6
[animation] Allow registering custom progress function

A ClutterInterval can change the way the progress is computed
by subclassing and overriding the ::compute_value() virtual function.

It should also be possible to register a custom progress function
in the same way it is possible to register a custom transformation
function between two GValues.

This commit adds an internal, global hash table that maintains a
GType <-> progress function association; each ClutterInterval
will check if there is a progress function registered for the
GType of the initial and final values of the interval and, if
it has been found, it will call it to compute the value of the
interval depending on the progress factor.
clutter/clutter-interval.c
clutter/clutter-interval.h