register_progress_func
Description:
Sets the progress function for a given value_type
, like:
clutter_interval_register_progress_func (MY_TYPE_FOO,
my_foo_progress);
Whenever a Interval instance using the default
ClutterInterval::compute_value
implementation is set as an interval between two
Value 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 Type, pass null
for
func
.
Parameters:
value_type |
a Type |
func |
a ProgressFunc, or |