mirror of
https://github.com/brl/mutter.git
synced 2025-03-26 05:03:55 +00:00
actor-box: Register a progress function
So that we can animate properties storing ClutterActorBox.
This commit is contained in:
parent
2f21c851ea
commit
a5fc90d4d9
@ -9362,16 +9362,40 @@ clutter_actor_box_free (ClutterActorBox *box)
|
|||||||
g_slice_free (ClutterActorBox, box);
|
g_slice_free (ClutterActorBox, box);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
clutter_actor_box_progress (const GValue *a,
|
||||||
|
const GValue *b,
|
||||||
|
gdouble factor,
|
||||||
|
GValue *retval)
|
||||||
|
{
|
||||||
|
ClutterActorBox res = { 0, };
|
||||||
|
|
||||||
|
clutter_actor_box_interpolate (g_value_get_boxed (a),
|
||||||
|
g_value_get_boxed (b),
|
||||||
|
factor,
|
||||||
|
&res);
|
||||||
|
|
||||||
|
g_value_set_boxed (retval, &res);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
GType
|
GType
|
||||||
clutter_actor_box_get_type (void)
|
clutter_actor_box_get_type (void)
|
||||||
{
|
{
|
||||||
static GType our_type = 0;
|
static GType our_type = 0;
|
||||||
|
|
||||||
if (G_UNLIKELY (our_type == 0))
|
if (G_UNLIKELY (our_type == 0))
|
||||||
our_type =
|
{
|
||||||
g_boxed_type_register_static (I_("ClutterActorBox"),
|
our_type =
|
||||||
(GBoxedCopyFunc) clutter_actor_box_copy,
|
g_boxed_type_register_static (I_("ClutterActorBox"),
|
||||||
(GBoxedFreeFunc) clutter_actor_box_free);
|
(GBoxedCopyFunc) clutter_actor_box_copy,
|
||||||
|
(GBoxedFreeFunc) clutter_actor_box_free);
|
||||||
|
|
||||||
|
clutter_interval_register_progress_func (our_type,
|
||||||
|
clutter_actor_box_progress);
|
||||||
|
}
|
||||||
|
|
||||||
return our_type;
|
return our_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user