In Cogl, cogl-pango.h has moved to <cogl-pango/cogl-pango.h>. When
using the experimental 2.0 API (which Clutter does) it is no longer
possible to include it under the old name of <cogl/cogl-pango.h> so we
need to update the include location.
pre_paint() and post_paint() implementations don't need
to check whether an effect is disabled: Clutter will
not apply an effect unless it is enabled.
So remove code which checks whether the effect is
enabled or disabled from the example applications and the
documentation.
Add a recipe showing how to implement two simple
effects, based on ClutterEffect: an always gray background,
and a border with configurable width and color.
Also explains the necessity to queue a redraw on
the associated actor if the effect's properties change,
and shows how to implement that.
The example gives the GObject code for both effects,
as well as an example application showing how to use them.
The example also demonstrates how to disable/enable an effect,
making the border round an actor togglable.
Add example of a simple background color effect applied via
pre_paint() implementation in a ClutterEffect subclass.
This is a simple effect with an incomplete GObject
implementation (no properties, setters or getters)
to make it as easy to follow as possible.
Make sure users get the idea that clutter_init()
has a return value that needs to be checked.
These were fixed via sed magic:
sed -i -s -e "s/clutter_init (.*)/\
if (& != CLUTTER_INIT_SUCCESS)\n return 1/"\
doc/*/*/*.{c,xml} doc/*/*.xml
http://bugzilla.clutter-project.org/show_bug.cgi?id=2574
Add an effects chapter which gives a broad overview of
the abstract classes in the effects API, plus a short
example of how to apply one of the stock Clutter
effects (ClutterColorizeEffect).
The recipe explains how to create a custom ClutterDeformEffect
to produce a page fold (code based on ClutterPageTurnEffect).
The example code includes the effect class plus a small
application to apply it to a texture.
Show how to animate an actor using a ClutterPathConstraint.
This demonstrates how to get effects similar to
ClutterPathBehaviour with the modern animation APIs.
Includes 3 examples:
1) Simple ClutterPathConstraint used with implicit animations
2) ClutterPathConstraint used to simulate circular animation,
using ClutterAnimator
3) Creating simple curved path animations with non-linear
easing
Try to make the cookbook pass the distcheck phase, so that we can run
distcheck with --enable-docs, and make sure that a tarballed clutter
release can actually build the cookbook.
Remove the dispose() implementation and replace
with destroy().
This should be promoted as the standard approach
for implementing a composite actor, as it emits a
signal when instances of the actor subclass are destroyed.
Add some extra detail to the Discussion section of the
composite actor recipe, concentrating on the pros and
cons of this approach.
Also explain more about the Clutter parts of the implementation.
Also general tidy up of language and style.
Add some extra description to the allocate() function,
explaining how the allocation has to be adjusted to
coordinates relative to the actor as a whole, before
applying to the single child actor it is composed from.
Include all the code examples inline as part of the recipe.
Remove sections around each code example, as these are
unnecessary; leave full discussion for the Discussion section
instead of trying to cram it in around the code example.
As most actor subclasses will probably want to implement
size requisition, give a simple example of how to do this
on the basis of the composed actor's size, plus some padding.
Added 3 examples for the box layout recipe:
1) Simple box layout demonstrating how to set actor properties
2) Trivial menu implementation using box layout
3) Demonstration app which enables tweaking and testing
of layout property interactions
Also inlined example 1 in the solution section and added
more explanatory text in the discussion.
Other frameworks expose the same functionality as "auto-reverse",
probably to match the cassette tape player. It actually makes sense
for Clutter to follow suit.
clutter_timeline_set_reverse() can be used to
automatically reverse a timeline's direction each time
it completes, so use that in looping animation recipe and
examples.
* elliot/cookbook-animations-scaling:
cookbook: Add recipe for animated scaling of an actor
cookbook: Add example of scaling a texture
cookbook: Added "animated scaling" recipe skeleton
cookbook: Added animated scaling example
Recipe explains how to animate scaling a single actor.
Also covers scaling vs. resizing, scale center, and
scaling within layouts and containers.
The first example shows how animations around each scale
gravity look, as well as tracking the transformed position
and size of the actor and displaying those.
The second example is a simple image viewer with zoom in/out
using scaling.
Added an example showing scaling of an actor on
each of the scaling gravity settings (NORTH_WEST, NORTH etc.),
with a mark indicating the center being used.
Displays the transformed size and position, updated
on each paint of the actor.
* elliot/cookbook-animations-looping:
cookbook: Recipe for "looping animations"
cookbook: Clarify how signals are emitted during looped animation
cookbook: First draft for looping animations recipe
cookbook: Recipe skeleton for "looping animations"
cookbook: Looping animation examples
Added a recipe giving examples of how to loop
animations for each part of the animation API (implicit,
animator, state).
The discussion covers looping a fixed number of times
and inverting a single implicit animation to create
a loop which goes back to its start on each iteration.