mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +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);
|
||||
}
|
||||
|
@ -505,24 +505,26 @@ gpointer _clutter_event_get_platform_data (const ClutterEvent *event);
|
||||
|
||||
#endif
|
||||
|
||||
void _clutter_paint_volume_init_static (ClutterActor *actor,
|
||||
ClutterPaintVolume *pv);
|
||||
ClutterPaintVolume *_clutter_paint_volume_new (ClutterActor *actor);
|
||||
void _clutter_paint_volume_copy_static (const ClutterPaintVolume *src_pv,
|
||||
ClutterPaintVolume *dst_pv);
|
||||
void _clutter_paint_volume_set_from_volume (ClutterPaintVolume *pv,
|
||||
const ClutterPaintVolume *src);
|
||||
void _clutter_paint_volume_init_static (ClutterActor *actor,
|
||||
ClutterPaintVolume *pv);
|
||||
ClutterPaintVolume *_clutter_paint_volume_new (ClutterActor *actor);
|
||||
void _clutter_paint_volume_copy_static (const ClutterPaintVolume *src_pv,
|
||||
ClutterPaintVolume *dst_pv);
|
||||
void _clutter_paint_volume_set_from_volume (ClutterPaintVolume *pv,
|
||||
const ClutterPaintVolume *src);
|
||||
|
||||
void _clutter_paint_volume_complete (ClutterPaintVolume *pv);
|
||||
void _clutter_paint_volume_transform (ClutterPaintVolume *pv,
|
||||
const CoglMatrix *matrix);
|
||||
void _clutter_paint_volume_project (ClutterPaintVolume *pv,
|
||||
const CoglMatrix *modelview,
|
||||
const CoglMatrix *projection,
|
||||
const int *viewport);
|
||||
void _clutter_paint_volume_get_bounding_box (ClutterPaintVolume *pv,
|
||||
ClutterActorBox *box);
|
||||
void _clutter_paint_volume_axis_align (ClutterPaintVolume *pv);
|
||||
void _clutter_paint_volume_complete (ClutterPaintVolume *pv);
|
||||
void _clutter_paint_volume_transform (ClutterPaintVolume *pv,
|
||||
const CoglMatrix *matrix);
|
||||
void _clutter_paint_volume_project (ClutterPaintVolume *pv,
|
||||
const CoglMatrix *modelview,
|
||||
const CoglMatrix *projection,
|
||||
const int *viewport);
|
||||
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…
Reference in New Issue
Block a user