Use the LayoutManager API to set a back pointer to the Box actor
inside the LayoutManager used by the box.
This also allows us to replace the LayoutManager on a Box, since
the LayoutManager will be able to replace all the metadata if
needed.
The ClutterBox::add method is a simple wrapper around the Container
add_actor() method and the LayoutManager layout properties API. It
allows adding an actor to a Box and setting the layout properties in
one call.
If the LayoutManager used by the Box does not support layout properties
then the add() method short-circuits out.
Along with the varargs version of the method there's also a vector-based
variant, for language bindings to use.
* Use ::layout-changed to queue a relayout when the layout changes
* Destroy the Box children when destroying the Box
* Allow getting the layout manager from the Box
Remove the layout containers: they will be moved to a
high-level library.
* clutter/clutter.h:
* clutter/Makefile.am: Remove layout and boxes from the
build.
* clutter/clutter-layout.[ch]: Remove the ClutterLayout
interface.
* clutter/clutter-box.[ch]:
* clutter/clutter-hbox.[ch]:
* clutter/clutter-vbox.[ch]: Remove ClutterBox and its
subclasses.
* clutter/clutter-label.c: Remove ClutterLayout implementation
* clutter/clutter-script-private.h:
* clutter/clutter-script-parser.c:
* clutter/clutter-script.c:
(clutter_script_parse_node): Remove special parsing for
ClutterMargin and ClutterPadding.
* clutter/clutter-types.h: Remove ClutterPadding and ClutterMargin.
* tests/Makefile.am:
* tests/test-boxes.c: Remove the boxes test case.
To avoid using a ClutterPadding each time you add an actor to a ClutterBox
when you want the same padding around each child, you can now set the
default padding. The API is pixel-based, since it's a commodity function,
and will affect only clutter_box_pack_defaults().
ClutterBox is meant to work like the HTML boxing model: it has a margin and
a backgrdound color, and every child actor is added with a pack type and a
padding. The ClutterBoxChild structure holds the child actor, the padding,
the packing type and the allocated coordinates for the actor.
Most of these fixes are simple symbol shadowing issues, like index and the
braindead y0 and y1 extern symbols exported by math.h on GNU libc systems.
There is a masking issue in ClutterTexture which should be checked; I ran
the tests and everything looked fine.
The rest are just unused variables.