Instead of using the fixed position and size API, use the newly added
update_allocation() virtual function in ClutterConstraint to change the
allocation of a ClutterActor. This allows using constraints inside
layout managers, and also allows Constraints to react to changes in the
size of an actor without causing relayout cycles.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2319
This adds a wrapper macro to clutter-private that will use
g_object_notify_by_pspec if it's compiled against a version of GLib
that is sufficiently new. Otherwise it will notify by the property
name as before by extracting the name from the pspec. The objects can
then store a static array of GParamSpecs and notify using those as
suggested in the documentation for g_object_notify_by_pspec.
Note that the name of the variable used for storing the array of
GParamSpecs is obj_props instead of properties as used in the
documentation because some places in Clutter uses 'properties' as the
name of a local variable.
Mose of the classes in Clutter have been converted using the script in
the bug report. Some classes have not been modified even though the
script picked them up as described here:
json-generator:
We probably don't want to modify the internal copy of JSON
behaviour-depth:
rectangle:
score:
stage-manager:
These aren't using the separate GParamSpec* variable style.
blur-effect:
win32/device-manager:
Don't actually define any properties even though it has the enum.
box-layout:
flow-layout:
Have some per-child properties that don't work automatically with
the script.
clutter-model:
The script gets confused with ClutterModelIter
stage:
Script gets confused because PROP_USER_RESIZE doesn't match
"user-resizable"
test-layout:
Don't really want to modify the tests
http://bugzilla.clutter-project.org/show_bug.cgi?id=2150
The AlignConstraint update is using only the width/height of the source,
but it should also take into account the position.
Also, instead of using the ::notify signal, it should follow the
BindConstraint, and switch to the ::allocation-changed signal, since
it's less expensive (one emission instead of four notifications, one for
each property we use).
The scanner has some issues when parsing valid gtk-doc annotations; we
should make its (and, in return, ours) life easier.
We still get warnings for code declared in <programlisting> sections,
unfortunately.
Since constructing AlignConstraint and BindConstraint instances could be
deferred (think ClutterScript) we need to make their :source properties
setters accept NULL. This does not break the constraints because they
need to handle that condition in case they actor to which they are
applied is destroyed and somebody is holding a reference on them anyway.
AlignConstraint is a simple constraint that keeps an actor's position
aligned to the width or height of another actor, multiplied by an
alignment factor.