mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 08:30:42 -05:00
1520ba6190
ClutterActor checks, when destroying and reparenting, if the parent actor implements the Container interface, and automatically calls the remove() method to perform a clean removal. Actors implementing Container, though, might have internal children; that is, children that are not added through the Container API. It is already possible to iterate through them using the Container API to avoid breaking invariants - but calling clutter_actor_destroy() on these children (even from the Container implementation, and thus outside of Clutter's control) will either lead to leaks or to segmentation faults. Clutter needs a way to distinguish a clutter_actor_set_parent() done on an internal child from one done on a "public" child; for this reason, a push/pop pair of functions should be available to Actor implementations to mark the section where they wish to add internal children: ➔ clutter_actor_push_internal (); ... clutter_actor_set_parent (child1, parent); clutter_actor_set_parent (child2, parent); ... ➔ clutter_actor_pop_internal (); The set_parent() call will automatically set the newly added INTERNAL_CHILD private flag on each child, and both clutter_actor_destroy() and clutter_actor_unparent() will check for the flag before deciding whether to call the Container's remove method. |
||
---|---|---|
.. | ||
actor-box.png | ||
bin-layout.png | ||
box-layout.png | ||
building-clutter.xml | ||
clutter-animation-tutorial.xml | ||
clutter-docs.xml.in | ||
clutter-overview.xml | ||
clutter-sections.txt | ||
clutter.types | ||
creating-behaviours.xml | ||
easing-modes.png | ||
easing-modes.svg | ||
event-flow.dia | ||
event-flow.png | ||
flow-layout-horizontal.png | ||
flow-layout-vertical.png | ||
glossary.xml | ||
Makefile.am | ||
migrating-ClutterEffect.xml | ||
migrating-ClutterPath.xml | ||
path-alpha-func.png | ||
running-clutter.xml | ||
subclassing-ClutterActor.xml |