We have a replacement in ClutterActor, now.
The old ClutterContainer API needs to be deprecated, and the raise() and
lower() virtual functions need a default implementation, so we can check
for implementations overriding them, by using the diagnostic mode like
we do for add(), remove(), and foreach().
The sort_depth_order() virtual function just doesn't do anything, as it
should have been made ages ago.
The Actor wrappers for the Container methods also need to be deprecated.
The get_children(), foreach(), and foreach_with_internals() methods and
virtual functions are superceded by the Actor API, and should not be
used in newly written code.
This will make things interesting.
We have better replacements in ClutterActor, that do The Right Thing™
instead of deferring control and requiring reimplementation in every
single container actor.
* nobled/wayland-fixes2:
wayland: fix shm buffers
wayland: set renderable type on dummy surface
wayland: check for egl extensions explicitly
wayland: fall back to shm buffers if drm fails
wayland: add shm buffer code
wayland: make buffer handling generic
wayland: really fix buffer format selection
wayland: fix pixel format
wayland: clean up buffer creation code
wayland: don't require the surfaceless extensions
wayland: check for API-specific surfaceless extension
wayland: fix GLES context creation
wayland: use EGL_NO_SURFACE
wayland: update to new api
wayland: fix connecting to default socket
fix ClutterContainer docs
It is conceivable that Container implementations might add children
outside of the Container::add() implementation - e.g. for packing at
a specific index. Since the addition (and removal) might happen outside
the common path we need to expose all the API that is implicitly called
by ClutterContainer when adding and removing a child - namely the
ChildMeta creation and destruction.
Bug 1517 - clutter_container_foreach_with_internals()
This allows us to iterate over all children (for things like maintaining
map/realize invariants) or only children that apps added and care about.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/clutter-container.[ch]: Add checks to the Container
interface invocation methods, to avoid crashing or corrupting
the stack when an actor does not implement every virtual
function of the Container interface vtable. GObject allows this
to happen so we must handle the case gracefully. This also means
that we can classify some virtual function as mandatory (as is
the case for ::add, ::remove and ::foreach) and some other
optional.
Bug 882 - Allow child properties for containers implementing the
ClutterContainer interface (Øyvind Kolås)
* clutter/clutter-child-meta.[ch]: Base class for the metadata
of a ClutterActor inside a ClutterContainer; the ChildMeta
object implements a wrapper for storing data that is attached
to a ClutterActor only when it's part of a ClutterContainer.
The ChildMeta object is used to store the child properties
accessible through the ClutterContainer API.
* clutter/clutter-container.[ch]: Creates the ChildMeta for
each actor, in case the Container specifies the ChildMeta
type to use.
* clutter/Makefile.am: Add clutter-child-meta.[ch] to the build.
* clutter/clutter-marshal.list: Add the marshaller for the
ClutterContainer::child-notify signal.
* clutter/clutter-types.h: Declare ClutterContainer and
ClutterChildMeta to avoid recursive inclusion.
from interface (and all implementations of it) since this
functionality is now implemented using a global hash.
* clutter/clutter-box.c:
* clutter/clutter-group.c:
Language bindings will have problems with raise() and lower() bein in both
ClutterContainer and ClutterActor; hence, this patch renames
clutter_container_raise() and clutter_container_lower() to
clutter_container_raise_child() and clutter_container_lower_child(),
respectively.
Since ClutterActor directly calls ClutterGroup methods we need ClutterContainer
to provide them, so that every container actor behaves the same way.
This patch makes ::raise, ::lower and ::sort_depth_order virtual functions
of the ClutterContainer interface, implemented by ClutterGroup.
The documentation has been added and deprecation warnings have been added
as well.
Finding a child by its ID is a method that should be used by every container
and not only by ClutterGroup. This is needed to actually fix the picking in
ClutterStage.
* clutter/clutter-container.h:
* clutter/clutter-layout.h: Interfaces are not checked
at compile-time, so there's not need to add padding to
avoid ABI breaks.