mirror of
https://github.com/brl/mutter.git
synced 2025-05-29 01:50:02 +00:00
paint_volume: add private api to change reference actor
For Clone actors we will need a way to report the volume of the source actor as the volume of the clone actor. To make this work though we need to be able to replace the reference to the source actor with a reference to the clone actor instead. This adds a private _clutter_paint_volume_set_reference_actor function to do that.
This commit is contained in:
parent
2d895816be
commit
7d8effd5e2
@ -908,3 +908,18 @@ clutter_paint_volume_set_from_allocation (ClutterPaintVolume *pv,
|
||||
|
||||
return _clutter_actor_set_default_paint_volume (actor, G_TYPE_INVALID, pv);
|
||||
}
|
||||
|
||||
/* Currently paint volumes are defined relative to a given actor, but
|
||||
* in some cases it is desireable to be able to change the actor that
|
||||
* a volume relates too (For instance for ClutterClone actors where we
|
||||
* need to masquarade the source actors volume as the volume for the
|
||||
* clone). */
|
||||
void
|
||||
_clutter_paint_volume_set_reference_actor (ClutterPaintVolume *pv,
|
||||
ClutterActor *actor)
|
||||
{
|
||||
g_return_if_fail (pv != NULL);
|
||||
|
||||
g_object_unref (pv->actor);
|
||||
pv->actor = g_object_ref (actor);
|
||||
}
|
||||
|
@ -523,6 +523,8 @@ void _clutter_paint_volume_project (ClutterPaintVolume *
|
||||
void _clutter_paint_volume_get_bounding_box (ClutterPaintVolume *pv,
|
||||
ClutterActorBox *box);
|
||||
void _clutter_paint_volume_axis_align (ClutterPaintVolume *pv);
|
||||
void _clutter_paint_volume_set_reference_actor (ClutterPaintVolume *pv,
|
||||
ClutterActor *actor);
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user