Added another JSON example to show how transitions can
be easily overlapped when using ClutterAnimator (two
sequences of 5 transitions, simultaneous with two
sequences of 1 transition).
Modified the C JSON loader program so it can be used with
this example as well.
GEnum nicknames can be used to set properties in JSON
definitions, so added a callout to the JSON example explaining
this, and showing how to derive the nickname for an enumeration
value.
Modified the example code to use nicknames as well.
Commented the ClutterScript example so it can be used
inline as part of the recipe, rather than as an
example in the appendix (it's too simple to warrant
a separate appendix).
There was too much in the example code to cover in a single
recipe, so I trimmed it down to demonstrate simple
UI building (no constraints, effects, animations, or signals).
Added a simple script and program to load it, to support
recipe on ClutterScript for UI definitions.
Also amended the Makefile (following the pattern of
the tests/interactive Makefile) to enable signal
connection from ClutterScript by passing -export-dynamic
to linker.
* elliot/cookbook-textures-crossfade:
cookbook: Use GdkPixbuf instead of getting data from a texture
cookbook: Added a recipe for cross-fading between two images
cookbook: Modified COGL example for consistency
cookbook: Added video of two texture cross-fade
cookbook: Removed unused constant
cookbook: Renamed front/back to top/bottom in cross-fade example
cookbook: Don't need to set keep-aspect-ratio for simple example
cookbook: Modified ordering of statements in cross-fade example
cookbook: Added a longer slideshow example
cookbook: Made code examples more consistent
cookbook: Added example code for texture cross-fading
Post-release version bump to 1.3.13
Release Clutter 1.3.12 (developers snapshot)
Conflicts:
doc/cookbook/examples/Makefile.am
Added another example (used for a screenshot) to demonstrate
how pointer events pass through non-reactive actors and how
depth ordering affects whether an actor will emit a pointer
motion signal.
Use clutter_event_get_coords() to get x and y position,
rather than casting to the right event type then directly
accessing members of the event struct.
Decided might be better to cover crossing and motion under
a broader "pointer motion" recipe, so renamed the example
(which only shows pointer crossing event handling).
Added a video showing the two texture cross-fade.
Modified the example code to animate on key press, so
this video could be captured.
Also altered the stage size to minimise the video size.
Front/back seems like the wrong terminology when discussing
actors arranged in layers. Top/bottom fits better with Clutter
API function names and other recipes, so renamed variables.
Cross-fading between two images is straightforward,
but cycling between more than two is more efficient
if done by copying COGL textures between the
two textures, rather than trying to reposition the
textures.
The example demonstrates how to reuse a pair of
textures to cycle through multiple images.
Modified the code example for the Clutter API version
of the cross-fade to use the same command line
as the COGL version.
This also simplifies the explanation in the recipe.
Also made the COGL code sample more consistent with
the Clutter API code sample.
Added simple image viewer which loads image file names
from a directory, displays the first one, then displays
the next in the list with each key press. Uses the
primitive fade front in/fade back out approach.
Also adapted Emmanuele's example code which uses Cogl
to produce a similar effect, but within a single texture.
This code loads two images specified on the command
line and cross-fades between them.
The tests/accessibility, tests/micro-bench and the examples directory
in the coobook create a lot of non-installed binaries. Since we know who
they are, and we ignore them, we can auto-generate the ignore files as
well.
The rest of Clutter is covered by the main ignore file.
The cookbook should also include fully functional code examples. We can
even XInclude them into the docbook XML itself.
The examples should be built with the coobook, so that we can always
make sure they are up to date.