profile/ivi/clutter.git
12 years agox11/stage: Use symbolic constants for source function
Emmanuele Bassi [Wed, 25 Jan 2012 23:17:42 +0000 (23:17 +0000)]
x11/stage: Use symbolic constants for source function

And make sure to use the clutter_threads_add_timeout(), so that the
function is called under the Clutter lock.

12 years agoPost-release version bump to 1.9.9
Emmanuele Bassi [Tue, 24 Jan 2012 15:42:20 +0000 (15:42 +0000)]
Post-release version bump to 1.9.9

12 years agoRelease Clutter 1.9.8 (snapshot)
Emmanuele Bassi [Tue, 24 Jan 2012 15:20:35 +0000 (15:20 +0000)]
Release Clutter 1.9.8 (snapshot)

12 years agocookbook: Start migrating to the new API
Emmanuele Bassi [Tue, 24 Jan 2012 15:12:41 +0000 (15:12 +0000)]
cookbook: Start migrating to the new API

Drop mentions of deprecated classes and API, and update the inline
example code.

Still some way to go, and the cookbook would probably benefit from
having a recipe on how to use ClutterActor to build a scene.

12 years agocookbook: Begin porting examples to the new API
Emmanuele Bassi [Tue, 24 Jan 2012 15:01:00 +0000 (15:01 +0000)]
cookbook: Begin porting examples to the new API

Start dropping the usage of deprecated classes and API.

12 years agoactor: use paint opacity to paint the background color
Emmanuele Bassi [Tue, 24 Jan 2012 14:52:33 +0000 (14:52 +0000)]
actor: use paint opacity to paint the background color

12 years agodocs: Add missing function
Emmanuele Bassi [Tue, 24 Jan 2012 14:20:07 +0000 (14:20 +0000)]
docs: Add missing function

12 years agodocs: Inlined examples break enums gtk-doc
Emmanuele Bassi [Tue, 24 Jan 2012 14:13:53 +0000 (14:13 +0000)]
docs: Inlined examples break enums gtk-doc

12 years agoscript: Add loading from a resource
Emmanuele Bassi [Mon, 16 Jan 2012 11:27:08 +0000 (11:27 +0000)]
script: Add loading from a resource

GLib has gained support for compiling ancillary data files into the same
binary blob as a library or as an executable.

We should add this feature to ClutterScript, so that it's possible to
bundle UI definitions with an application.

12 years agoactor: Remove unused function
Emmanuele Bassi [Tue, 24 Jan 2012 09:36:31 +0000 (09:36 +0000)]
actor: Remove unused function

12 years agoOverride Container inside ClutterStage
Emmanuele Bassi [Mon, 23 Jan 2012 18:00:01 +0000 (18:00 +0000)]
Override Container inside ClutterStage

The only actor that results in a mix of the old Container API and the
new Actor API is ClutterStage. By inheritance, a Stage is a Group, but
we don't want it to behave like a Group - as it already overrides most
of the Actor API, and the reason why it was made as a Group in the
first place was convenience for adding/removing children.

Given that touching Group to make it aware of the new Actor API has
rapidly devolved into a struggle between a Demiurge that tries to
avoid breakage and a Chaos that finds new and interesting ways to
break ClutterGroup, let's declare API bankruptcy here and now.

ClutterStage should override ClutterContainer methods, and use the
layout management of ClutterFixedLayout as the proper class that it
was meant to be ages ago. Let ClutterGroup rot in pieces.

12 years agoAllow mixing old and new API without falling apart
Emmanuele Bassi [Sat, 21 Jan 2012 23:06:49 +0000 (23:06 +0000)]
Allow mixing old and new API without falling apart

Now that we reinstated Group to its "former glory", we need to ensure
that applications using the deprecated containers with the new DOM API
in ClutterActor can actually work - or, at least, not break horribly.

This actually means making sure that ClutterStage and ClutterGroup can
cope with the DOM, while retaining their old implementations, as well as
their bizarre idiosyncrasies and their utter, utter brokenness.

12 years agointeractive/actors: Update the venerable test-actors
Emmanuele Bassi [Fri, 20 Jan 2012 18:05:53 +0000 (18:05 +0000)]
interactive/actors: Update the venerable test-actors

12 years agoUpdated Galician translations
Fran Diéguez [Sun, 22 Jan 2012 23:34:20 +0000 (00:34 +0100)]
Updated Galician translations

12 years agoactor: NULL-ify sibling fields when removing
Emmanuele Bassi [Fri, 20 Jan 2012 17:15:20 +0000 (17:15 +0000)]
actor: NULL-ify sibling fields when removing

Let's try and avoid leaving around stale pointers.

12 years agowayland: Update to changes in the SHM api
Rob Bradford [Mon, 16 Jan 2012 11:55:32 +0000 (11:55 +0000)]
wayland: Update to changes in the SHM api

The enum value for the SHM formats has changed to be more explicit about the
format of the data.

12 years agogroup: Restore previous implementation
Emmanuele Bassi [Fri, 20 Jan 2012 16:00:19 +0000 (16:00 +0000)]
group: Restore previous implementation

Making Group just a proxy to Actor broke some behaviour that application
and toolkit code was relying on. Let's keep Group around to fight
another day.

This commit fixes gnome-shell as far as I can test it.

12 years agostage: Restore the chain up inside allocate()
Emmanuele Bassi [Fri, 20 Jan 2012 14:55:57 +0000 (14:55 +0000)]
stage: Restore the chain up inside allocate()

Group does not have a custom allocate() any more, so it would end up
calling the default allocate() implementation provided by ClutterActor
anyway.

12 years agoactor: Remove default layout-manager
Emmanuele Bassi [Fri, 20 Jan 2012 14:55:13 +0000 (14:55 +0000)]
actor: Remove default layout-manager

It's creating more issues than what it's trying to solve. At least for
the time being, let's not set one.

12 years agogroup: Gut the implementation
Emmanuele Bassi [Fri, 20 Jan 2012 14:53:41 +0000 (14:53 +0000)]
group: Gut the implementation

A Group is a just a ClutterActor with the layout-manager property set at
instance initialization time. It doesn't need anything else from
ClutterActor's vtable, except the slightly custom show_all/hide_all
implementation, and a simplified get_paint_volume.

12 years agoactor: Move underallocation warning to diagnostic mode
Emmanuele Bassi [Fri, 20 Jan 2012 12:04:48 +0000 (12:04 +0000)]
actor: Move underallocation warning to diagnostic mode

This should keep down the warning messages — at least for the time
being.

12 years agoactor: Use internal add/remove child in reparent()
Emmanuele Bassi [Fri, 20 Jan 2012 12:02:49 +0000 (12:02 +0000)]
actor: Use internal add/remove child in reparent()

Do not use the public API; reparent() used to use unparent() and
set_parent(), so we need to maintain the old behaviour.

12 years agoPost-release version bump to 1.9.7
Emmanuele Bassi [Thu, 19 Jan 2012 14:01:20 +0000 (14:01 +0000)]
Post-release version bump to 1.9.7

12 years agoRelease Clutter 1.9.6 (snapshot)
Emmanuele Bassi [Thu, 19 Jan 2012 13:42:37 +0000 (13:42 +0000)]
Release Clutter 1.9.6 (snapshot)

12 years agobuild: Bump up the Cogl requirement
Emmanuele Bassi [Thu, 19 Jan 2012 13:41:45 +0000 (13:41 +0000)]
build: Bump up the Cogl requirement

Clutter requires a new version of Cogl's API, but we never bumped the
requirement inside configure.ac.

12 years agostage: Use clutter_actor_set_allocation()
Emmanuele Bassi [Thu, 19 Jan 2012 13:40:02 +0000 (13:40 +0000)]
stage: Use clutter_actor_set_allocation()

Instead of chaining up, given that we want to bypass chaining up and
just set the allocation. This also allows us to bail out of the
overridden allocate vfunc check, given that we want the default Actor
behaviour to apply - including eventual layout manager delegates.

12 years agoactor: Fix the has_overridden_allocate check
Emmanuele Bassi [Thu, 19 Jan 2012 13:39:14 +0000 (13:39 +0000)]
actor: Fix the has_overridden_allocate check

12 years agodocs: Add clutter_actor_set_allocation()
Emmanuele Bassi [Thu, 19 Jan 2012 13:14:47 +0000 (13:14 +0000)]
docs: Add clutter_actor_set_allocation()

12 years agosymbols: Add clutter_actor_set_allocation()
Emmanuele Bassi [Thu, 19 Jan 2012 13:14:33 +0000 (13:14 +0000)]
symbols: Add clutter_actor_set_allocation()

12 years agoactor: Maintain behaviour of old allocate() implementations
Emmanuele Bassi [Thu, 19 Jan 2012 12:40:32 +0000 (12:40 +0000)]
actor: Maintain behaviour of old allocate() implementations

The usual way to implement a container actor is to override the
allocate() virtual function, chain up, and then allocate the actor's
children.

Clutter now has the ability to delegate layout management to
ClutterLayoutManager directly; in the allocation, this is done by
checking whether the actor has children, and then call
clutter_layout_manager_allocate() from within the default implementation
of the ClutterActor::allocate() vfunc. The same vfunc that everyone, has
been chaining up to.

Whoopsie.

Well, we can check if there's a layout manager, and if it's NULL, we
bail out. Except that there's a default layout manager, and it's the
fixed layout manager, so that classes like Group and Stage work by
default.

Double whoopsie.

The fix for this scenario is a bit nasty; we have to check if the actor
class has overridden the allocate() vfunc or not, before actually
looking at the layout manager. This means that classes that override the
allocate() vfunc are expected to do everything that ClutterActor's
default implementation does - which I think it's a fair requirement to
have.

For newly written code, though, it would probably be best if we just
provided a function that does the right thing by default, and that
you're supposed to be calling from within the allocate() vfunc
implementation, if you ever chose to override it. This new function,
clutter_actor_set_allocation(), should come with a warning the size of
Texas, to avoid people thinking it's a way to override the whole "call
allocate() on each child" mechanism. Plus, it should check if we're
inside an allocation sequence, and bail out if not.

12 years agoactor: Be more conservative with the default paint volume
Emmanuele Bassi [Wed, 18 Jan 2012 16:05:12 +0000 (16:05 +0000)]
actor: Be more conservative with the default paint volume

Check the allocation, when one is being used to initialize the paint
volume.

12 years agoUpdated Spanish translation
Daniel Mustieles [Wed, 18 Jan 2012 11:39:55 +0000 (12:39 +0100)]
Updated Spanish translation

12 years agobuild: Fix up the test rules for private deps
Emmanuele Bassi [Tue, 17 Jan 2012 22:54:44 +0000 (22:54 +0000)]
build: Fix up the test rules for private deps

Thanks to diegoe for the help with testing.

12 years agoUpdated POTFILES.in
Piotr Drąg [Tue, 17 Jan 2012 22:24:14 +0000 (23:24 +0100)]
Updated POTFILES.in

12 years agobuild: Add private deps to cflags and libs
Emmanuele Bassi [Tue, 17 Jan 2012 21:59:37 +0000 (21:59 +0000)]
build: Add private deps to cflags and libs

If we go through the whole exercise of having private dependencies, we
should at least use the compiler flags and linker flags that those
dependencies give us when building Clutter.

https://bugzilla.gnome.org/show_bug.cgi?id=668137

12 years agoactor: Add :first-child and :last-child properties
Emmanuele Bassi [Tue, 17 Jan 2012 18:46:41 +0000 (18:46 +0000)]
actor: Add :first-child and :last-child properties

Toolkits tracking first and last children of a ClutterActor can use
these properties to get notification of hierarchy changes.

12 years agoactor: Do not use ::constructed
Emmanuele Bassi [Tue, 17 Jan 2012 18:13:42 +0000 (18:13 +0000)]
actor: Do not use ::constructed

If we want to set a default layout manager, we need to do so inside
init(), as it's not guaranteed that people subclassing Actor and
overriding ::constructed will actually chain up as they should.

12 years agointeractive: Drop more deprecated classes
Emmanuele Bassi [Tue, 17 Jan 2012 16:54:30 +0000 (16:54 +0000)]
interactive: Drop more deprecated classes

12 years agointeractive: Use ClutterActor instead of deprecated classes
Emmanuele Bassi [Tue, 17 Jan 2012 16:20:41 +0000 (16:20 +0000)]
interactive: Use ClutterActor instead of deprecated classes

12 years agoconform/actor-size: Do not use Rectangle
Emmanuele Bassi [Tue, 17 Jan 2012 16:20:19 +0000 (16:20 +0000)]
conform/actor-size: Do not use Rectangle

Use ClutterActor directly, instead.

12 years agoactor: Provide a better default pick() behaviour
Emmanuele Bassi [Tue, 17 Jan 2012 16:13:55 +0000 (16:13 +0000)]
actor: Provide a better default pick() behaviour

The default pick() behaviour does not take into consideration the
children of a ClutterActor because the existing containter actors
usually override pick(), chain up, and then paint their children.

With ClutterActor now a concrete class, though, we need a way to pick
its children without requiring a sub-class; we could simply iterate over
the children inside the default pick() implementation, but this would
lead to double painting, which is not acceptable.

A moderately gross hack is to check if the Actor instance did override
the pick() implementation, and if it is not the case, paint the children
in pick mode.

12 years agoactor: Deprecate show_all()/hide_all()
Emmanuele Bassi [Tue, 17 Jan 2012 16:11:29 +0000 (16:11 +0000)]
actor: Deprecate show_all()/hide_all()

The hide_all() method is pretty much pointless, as hiding an actor will
automatically prevent its children from being painted. The show_all()
method would only be marginally useful, if actors weren't set to be
visible by default when added to another actor - which was the case when
we introduced show_all() and hide_all().

12 years agoUpdated Spanish translation
Daniel Mustieles [Tue, 17 Jan 2012 16:12:52 +0000 (17:12 +0100)]
Updated Spanish translation

12 years agoPost-release version bump to 1.9.5
Emmanuele Bassi [Tue, 17 Jan 2012 14:44:28 +0000 (14:44 +0000)]
Post-release version bump to 1.9.5

12 years agoRelease Clutter 1.9.4 (snapshot)
Emmanuele Bassi [Tue, 17 Jan 2012 14:32:19 +0000 (14:32 +0000)]
Release Clutter 1.9.4 (snapshot)

12 years agotext: Fix the buffer length check on paint
Emmanuele Bassi [Tue, 17 Jan 2012 14:21:02 +0000 (14:21 +0000)]
text: Fix the buffer length check on paint

12 years agoscript: Fix a segfault
Emmanuele Bassi [Tue, 17 Jan 2012 14:17:20 +0000 (14:17 +0000)]
script: Fix a segfault

Accessing a variable before it is being set is not a great plan.

12 years agotext-buffer: Fix the Since annotations
Emmanuele Bassi [Tue, 17 Jan 2012 12:23:28 +0000 (12:23 +0000)]
text-buffer: Fix the Since annotations

12 years agoUpdate the NEWS file
Emmanuele Bassi [Tue, 17 Jan 2012 12:19:35 +0000 (12:19 +0000)]
Update the NEWS file

12 years agoAdd ClutterTextBuffer to the API reference
Emmanuele Bassi [Tue, 17 Jan 2012 12:00:54 +0000 (12:00 +0000)]
Add ClutterTextBuffer to the API reference

12 years agoUpdate clutter.symbols for TextBuffer
Emmanuele Bassi [Tue, 17 Jan 2012 11:56:23 +0000 (11:56 +0000)]
Update clutter.symbols for TextBuffer

12 years agointeractive/text: Remove spurious g_object_unref()
Emmanuele Bassi [Tue, 17 Jan 2012 11:52:37 +0000 (11:52 +0000)]
interactive/text: Remove spurious g_object_unref()

12 years agotext: Implement ClutterTextBuffer
Stef Walter [Wed, 15 Jun 2011 09:06:31 +0000 (10:06 +0100)]
text: Implement ClutterTextBuffer

 * Abstracts the buffer for text in ClutterText
 * Allows implementation of undo/redo.
 * Allows use of non-pageable memory for text
   in the case of sensitive passwords.
 * Implement a test with two ClutterText using the same
   buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=652653

12 years agoUpdated Spanish translation
Daniel Mustieles [Tue, 17 Jan 2012 11:52:01 +0000 (12:52 +0100)]
Updated Spanish translation

12 years agoUpdate clutter.symbols
Emmanuele Bassi [Tue, 17 Jan 2012 11:49:05 +0000 (11:49 +0000)]
Update clutter.symbols

12 years agoUpdated Galician translations
Fran Diéguez [Tue, 17 Jan 2012 00:44:53 +0000 (01:44 +0100)]
Updated Galician translations

12 years agoUpdated POTFILES.in
Piotr Drąg [Tue, 17 Jan 2012 00:29:26 +0000 (01:29 +0100)]
Updated POTFILES.in

12 years agoFix compiler warnings
Emmanuele Bassi [Mon, 16 Jan 2012 23:49:49 +0000 (23:49 +0000)]
Fix compiler warnings

When dereferencing GArray.data to a C structure you need a double cast
from guint8* to void*, and then from void* to the actual type. This
avoids compiler warnings, especially when using clang on OSX.

12 years agodocs: Move deprecated sections to the proper location
Emmanuele Bassi [Tue, 3 Jan 2012 14:51:37 +0000 (14:51 +0000)]
docs: Move deprecated sections to the proper location

12 years agoactor: Deprecated push/pop internal methods
Emmanuele Bassi [Tue, 3 Jan 2012 14:36:32 +0000 (14:36 +0000)]
actor: Deprecated push/pop internal methods

The concept of "internal child" only meant anything when we had a
separate API for containers and actors. Now that we plugged that
particular hole, we can drop all the hacks we used to have in place
to work around its design limitations.

12 years agodocs: Fixes for the API reference
Emmanuele Bassi [Tue, 3 Jan 2012 14:31:06 +0000 (14:31 +0000)]
docs: Fixes for the API reference

12 years agoactor: Add boxed margin accessors
Emmanuele Bassi [Tue, 3 Jan 2012 14:29:39 +0000 (14:29 +0000)]
actor: Add boxed margin accessors

It can be convenient to be able to set, or get, all the components of an
actor's margin at the same time; since we already have a boxed type for
storing a margin, an accessors pair based on it is not a complicated
addition to the API.

12 years agodocs: Update the release notes
Emmanuele Bassi [Wed, 28 Dec 2011 18:37:16 +0000 (18:37 +0000)]
docs: Update the release notes

12 years agobuild: Add inclusion guards and license notices
Emmanuele Bassi [Wed, 28 Dec 2011 18:32:00 +0000 (18:32 +0000)]
build: Add inclusion guards and license notices

12 years agoactor: Use proper internal API
Emmanuele Bassi [Tue, 27 Dec 2011 19:28:47 +0000 (19:28 +0000)]
actor: Use proper internal API

Inside the set_child_[above|below]_sibling() and set_child_at_index() we
should be using the internal API for mutating the children list, instead
of the delegate functions. This ensures that we go through a single,
well-defined code path for all operations on the list of children of
an actor.

12 years agoDeprecate the old raise/lower API
Emmanuele Bassi [Tue, 27 Dec 2011 18:57:32 +0000 (18:57 +0000)]
Deprecate the old raise/lower API

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.

12 years agoactor: Add new methods for changing the paint sequence
Emmanuele Bassi [Tue, 27 Dec 2011 18:22:05 +0000 (18:22 +0000)]
actor: Add new methods for changing the paint sequence

ClutterActor provides four methods for changing the paint sequence order
of its children:

  raise_top()
  raise()
  lower()
  lower_bottom()

The first and last one being just wrappers around raise() and lower(),
respectively. These methods have various issues: they omit the parent,
preferring to retrieve it from the actor passed as the first argument;
this does not match the new style of API introduced to operate on the
list of children of an actor.

Additionally, the raise() and lower() methods of ClutterActor call into
the Container interface, and are not really aptly named (raise() in
particular collides with the completely unrelated 'raise' keyword in
Python, and usually needs to be wrapped in order to be used at all).

Furthermore, we need public methods that Container can call from its
default implementation, as well as methods to port current Container
implementations.

Finally, since we have insert_child_at_index(), we should also have an
equivalent set_child_at_index() as well.

12 years agoactor: Use flags to control add/remove child
Emmanuele Bassi [Tue, 27 Dec 2011 11:28:36 +0000 (11:28 +0000)]
actor: Use flags to control add/remove child

The internal versions of add_child() and remove_child() currently use
boolean arguments to control things like the ChildMeta instances and
the emissions of signals; using more than one boolean argument is an
indication that you need flags to avoid readability issues, as well as
providing a way to add new behaviours without a combinatorial explosion
of arguments, later on.

12 years agoactor: Remove automagic "expand" flag
Emmanuele Bassi [Wed, 21 Dec 2011 17:07:25 +0000 (17:07 +0000)]
actor: Remove automagic "expand" flag

I don't feel comfortable with this feature, and its implementation
still has too many rough edges. We can safely punt it for now, and
introduce it at a later point, as it doesn't block existing features
or API.

12 years agotable-layout: Override compute_expand()
Emmanuele Bassi [Tue, 20 Dec 2011 18:42:53 +0000 (18:42 +0000)]
table-layout: Override compute_expand()

The TableLayout has two expansion flags that need to be taken into
consideration when computing the Actor expansion flags.

12 years agobox-layout: Override compute_expand()
Emmanuele Bassi [Tue, 20 Dec 2011 18:41:51 +0000 (18:41 +0000)]
box-layout: Override compute_expand()

ClutterBoxLayout has an expansion flag, and we need to take that into
consideration when computing the Actor expansion flags.

12 years agoactor: Ask the LayoutManager to compute the expansion flags
Emmanuele Bassi [Tue, 20 Dec 2011 18:40:11 +0000 (18:40 +0000)]
actor: Ask the LayoutManager to compute the expansion flags

If an actor has a layout manager, we want to involve the delegate object
into the lazy computation of the expansion flags state.

12 years agolayout-manager: Add compute_expand() vfunc
Emmanuele Bassi [Tue, 20 Dec 2011 18:38:47 +0000 (18:38 +0000)]
layout-manager: Add compute_expand() vfunc

This virtual function will let layout managers with legacy expansion
flags be able to influence the lazy computation of the expansion flags
on ClutterActor.

12 years agoactor: Paint the background color in the paint class handler
Emmanuele Bassi [Tue, 20 Dec 2011 17:05:48 +0000 (17:05 +0000)]
actor: Paint the background color in the paint class handler

We need to paint the background color in the default class handler for
two reasons: it's logically appropriate, and we don't want actor
subclasses overriding the ::paint class handler to change behaviour only
because somebody decided to set the background color.

12 years agodocs: Update the release notes
Emmanuele Bassi [Tue, 20 Dec 2011 15:59:15 +0000 (15:59 +0000)]
docs: Update the release notes

12 years agodocs: Clean up ClutterContainer's description
Emmanuele Bassi [Tue, 20 Dec 2011 15:49:20 +0000 (15:49 +0000)]
docs: Clean up ClutterContainer's description

The API to add/remove/iterate over children is in ClutterActor, now.

12 years agocontainer: Add diagnostic warnings for deprecated vfuncs
Emmanuele Bassi [Tue, 20 Dec 2011 15:21:06 +0000 (15:21 +0000)]
container: Add diagnostic warnings for deprecated vfuncs

The old add(), remove(), and foreach() virtual functions are deprecated;
ClutterContainer should warn if the public API detects that the vfuncs
have been overridden.

Strictly speaking, it's still legal to override those vfuncs: you can
chain up to the default vtable, or you could just provide an equivalent
implementation. The goal is to avoid having to override the Container
interface, until we can safely deprecate it and remove it in Clutter
2.0.

12 years agocontainer: Provide default implementation of vfuncs
Emmanuele Bassi [Tue, 20 Dec 2011 15:04:24 +0000 (15:04 +0000)]
container: Provide default implementation of vfuncs

Instead of making ClutterActor implement the basic add/remove/foreach
virtual functions of ClutterContainer, we can simply do that from
within the ClutterContainer implementation.

12 years agocontainer: Deprecate more methods
Emmanuele Bassi [Tue, 20 Dec 2011 14:58:08 +0000 (14:58 +0000)]
container: Deprecate more methods

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.

12 years agogroup: Use Actor.remove_all_children()
Emmanuele Bassi [Tue, 20 Dec 2011 14:57:38 +0000 (14:57 +0000)]
group: Use Actor.remove_all_children()

To implement the remove_all() method.

12 years agocally: Use Actor.get_children()
Emmanuele Bassi [Tue, 20 Dec 2011 14:56:54 +0000 (14:56 +0000)]
cally: Use Actor.get_children()

Instead of the Container method, given that the new get_children() gives
us more actors by default.

12 years agotests/interactive: Add a simple test for Actor
Emmanuele Bassi [Tue, 20 Dec 2011 14:47:35 +0000 (14:47 +0000)]
tests/interactive: Add a simple test for Actor

It's meant to be xincluded in the API reference.

12 years agoactor: Add some debug spew
Emmanuele Bassi [Tue, 20 Dec 2011 14:47:04 +0000 (14:47 +0000)]
actor: Add some debug spew

12 years agodocs: Update the Actor API reference
Emmanuele Bassi [Tue, 20 Dec 2011 13:32:37 +0000 (13:32 +0000)]
docs: Update the Actor API reference

Given the size and scope of the changes in ClutterActor, we ought to
rewrite the overall description of what an actor is, what it does, and
how are you supposed to use it and subclass it.

12 years agoDeprecate Container add() and remove() methods
Emmanuele Bassi [Mon, 19 Dec 2011 18:48:02 +0000 (18:48 +0000)]
Deprecate Container add() and remove() methods

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.

12 years agoactor: Add remove_all_children()
Emmanuele Bassi [Mon, 19 Dec 2011 18:01:04 +0000 (18:01 +0000)]
actor: Add remove_all_children()

A simple method for removing all children of an actor in one fell swoop.

12 years agodocs: Clarify the Actor's iterator API behaviour
Emmanuele Bassi [Mon, 19 Dec 2011 17:34:22 +0000 (17:34 +0000)]
docs: Clarify the Actor's iterator API behaviour

It should be noted in the documentation that it is not safe to operate
on the list of children of an Actor while iterating over it.

12 years agoactor: Provide a proper implementation of replace_child()
Emmanuele Bassi [Mon, 19 Dec 2011 14:37:42 +0000 (14:37 +0000)]
actor: Provide a proper implementation of replace_child()

The correct sequence of actions should be remove(old) → insert(new), not
insert(new) → remove(old). We can implement a simple delegate insertion
functions to insert the new child between the previous and next siblings
of the old child.

While we're at it, let's also add a unit test for replace_child().

12 years agoactor: Fix get_paint_volume() default implementation
Emmanuele Bassi [Mon, 19 Dec 2011 12:13:23 +0000 (12:13 +0000)]
actor: Fix get_paint_volume() default implementation

Providing a default get_paint_volume() that takes into account the
children of an actor was a goal of the whole First Apocalypse; if we
make all the containers rely on it, and yet we return a FALSE value
(meaning: we don't have a valid paint volume) even when we do have it,
then we are going to break the whole machinery, though.

12 years agostage: Use the Actor iteration API
Emmanuele Bassi [Mon, 19 Dec 2011 12:04:03 +0000 (12:04 +0000)]
stage: Use the Actor iteration API

12 years agoRemove usage of Actor/Container.get_children()
Emmanuele Bassi [Mon, 19 Dec 2011 11:53:48 +0000 (11:53 +0000)]
Remove usage of Actor/Container.get_children()

ClutterBox and ClutterGroup are still using the get_children() method
instead of the child iteration API.

12 years agoactor: Simplify first/last child updates
Emmanuele Bassi [Mon, 19 Dec 2011 07:20:20 +0000 (07:20 +0000)]
actor: Simplify first/last child updates

12 years agoDrop some more ClutterContainer.get_children() uses
Emmanuele Bassi [Sun, 18 Dec 2011 22:35:45 +0000 (22:35 +0000)]
Drop some more ClutterContainer.get_children() uses

12 years agofixed-layout: Use the Actor iteration API
Emmanuele Bassi [Sun, 18 Dec 2011 22:34:51 +0000 (22:34 +0000)]
fixed-layout: Use the Actor iteration API

Forgot to migrate the FixedLayout layout manager like we did for the
other layout managers provided by Clutter.

12 years agocally: Use the Actor API instead of ClutterContainer
Emmanuele Bassi [Sun, 18 Dec 2011 22:33:24 +0000 (22:33 +0000)]
cally: Use the Actor API instead of ClutterContainer

Cally is doing a bunch of list traversals through the list returned by
ClutterContainer.get_children(); this means a traversal already, plus
a bunch of allocations. We can do better than that, now that we have
a proper graph iteration API inside ClutterActor.

12 years agoactor: Add replace_child() method
Emmanuele Bassi [Sun, 18 Dec 2011 22:14:36 +0000 (22:14 +0000)]
actor: Add replace_child() method

A simple method that atomically replaces a child actor with another one.

12 years agoactor: Deprecate the old parent modifiers
Emmanuele Bassi [Sun, 18 Dec 2011 21:18:27 +0000 (21:18 +0000)]
actor: Deprecate the old parent modifiers

The old API should not be used in newly written code; we have better
methods for setting up and modifying the scene graph, now.

12 years agoconform/actor-graph: Add lower/raise units
Emmanuele Bassi [Sun, 18 Dec 2011 21:09:44 +0000 (21:09 +0000)]
conform/actor-graph: Add lower/raise units

Check that the lower_bottom(), lower(), raise(), and raise_top()
methods work as intended.

12 years agoconform: Add a suite for the Actor scene graph API
Emmanuele Bassi [Sun, 18 Dec 2011 20:59:07 +0000 (20:59 +0000)]
conform: Add a suite for the Actor scene graph API

Verify that insertion and removal maintain a stable graph, with pointers
to the various children. This should help out tracking regressions in
the scene graph API.

12 years agoactor: Fix child insertion issues
Emmanuele Bassi [Sun, 18 Dec 2011 20:57:02 +0000 (20:57 +0000)]
actor: Fix child insertion issues

The insert_child_at_index, insert_below and insert_above messed up the
first and last child pointers in various cases. This commit fixes all
the instances of first and last child pointers being stale or set to
NULL.