mutter/doc
Emmanuele Bassi 1520ba6190 actor: Add internal child flag
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.
2009-12-18 23:33:14 +00:00
..
common docs: Clean up the additional documentation build 2009-11-30 21:33:22 +00:00
cookbook cookbook: Clean up the text 2009-12-01 10:11:33 +00:00
manual docs: Clean up the additional documentation build 2009-11-30 21:33:22 +00:00
reference actor: Add internal child flag 2009-12-18 23:33:14 +00:00
clutter-actor-invariants.txt Enforce invariants on mapped, realized, visibility states 2009-04-24 15:27:19 +01:00
CODING_STYLE docs: Move documentation under doc/ 2009-12-01 10:16:25 +00:00
HACKING docs: Move documentation under doc/ 2009-12-01 10:16:25 +00:00
HACKING.backends docs: Move documentation under doc/ 2009-12-01 10:16:25 +00:00
Makefile.am docs: Move documentation under doc/ 2009-12-01 10:16:25 +00:00
RELEASING docs: Move RELEASING under docs/ 2009-12-09 18:10:52 +00:00