Commit Graph

44 Commits

Author SHA1 Message Date
Emmanuele Bassi
65d6c8c32e build: Dist the cookbook
So that we can publish it starting from the tarballs.
2013-03-05 00:22:21 +00:00
Emmanuele Bassi
c000fb7b83 build: Fix distcheck in the cookbook
Someday, somebody will have to explain to me how not touching
anything for a whole release cycle ends up breaking the build.

Adding the top_srcdir/doc/cookbook path to the includes fixes the
distcheck.
2012-12-18 01:40:39 +00:00
Elliot Smith
b5af8fbfac docs: Add recipe about implementing a ClutterEffect
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.
2011-03-17 15:56:55 +00:00
Elliot Smith
74de3cfdf3 docs: Add effects chapter, with introduction and first recipe
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.
2011-02-21 16:44:09 +00:00
Elliot Smith
cf18836ca0 docs: Add recipe for animating an actor on a curved path
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
2011-02-08 14:41:51 +00:00
Emmanuele Bassi
428f64212c build: Fixes to pass distcheck
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.
2011-02-01 14:39:21 +00:00
Elliot Smith
7eb248b1f0 cookbook: First draft for looping animations recipe
Includes video showing the looped animation and
basic section headings, plus outline of content and notes.
2010-11-15 11:23:04 +00:00
Elliot Smith
ce0bd4e26c cookbook: Recipe for "moving actors"
This recipe explains how to use the three animation
approaches (implicit, State, Animator) to animate movement
of actors.

Includes some guidelines about which approach to use when, with
a full code example for each approach.

The discussion section covers some subtleties around animated
movement; namely: moving actors out of their containers; anchor
points and movement; moving in the depth axis; interactions
between animated movement and constraints.
2010-09-23 16:24:21 +01:00
Emmanuele Bassi
4037f76a3e build: Update the remote publish path for the cookbook 2010-09-21 12:02:41 +01:00
Elliot Smith
e92b186719 cookbook: Add recipe about sync'ing actor sizes
The recipe covers how to use ClutterBindConstraint
to bind actor sizes together.

It gives some examples of where this approach is appropriate,
as well as explaining an alternative using allocation-changed
or notify::* signals.

Three examples are given:

1. Resizing a texture to the stage.
2. Resizing a rectangle to act as a transparent overlay on
top of a texture (using constraints).
3. Resizing a rectangle to act as a transparent overlay on
top of a texture, but with a size proportional to the texture
(using a handler connected to allocation-changed signals
emitted by the texture).
2010-09-17 15:58:48 +01:00
Elliot Smith
e8e360eaa7 cookbook: Added a recipe for reusing a complex animation
This recipe explains how to "reuse" the same animation
definition for different actors, by creating a new
instance of a "rig" (empty container) and animation
for the rig each time the animation is required.

An actor is then re-parented to the rig and animated
using it, rather than being animated directly.

JSON is used to define the rig + animator, to make
creating new instances of them simpler. The recipe
also discusses various caveats around using this
approach, rather than directly animating an actor.
2010-09-13 14:31:17 +01:00
Elliot Smith
655c60aaa9 cookbook: Added recipe for complex animation
Uses ClutterAnimator to implement a reasonably complex
animation of a single actor (movement along a path with
simultaneous scaling).

Provides a metaphor for thinking about ClutterAnimator
animations (stage directions) and explains keys and key
frames in some depth. Also compares ClutterAnimator
with other possible approaches to this type of animation
(implicit animations, ClutterState).
2010-09-03 14:31:57 +01:00
Elliot Smith
ce3a3d4404 cookbook: Use text for callouts in documentation
Set a parameter on the XSLT transform so that callout elements
are rendered as text rather than graphics (removes the need
to add callout graphics to the build).
2010-08-27 11:21:30 +01:00
Elliot Smith
fef53e1b28 cookbook: Added skeleton for script chapter of cookbook 2010-08-27 11:21:30 +01:00
Emmanuele Bassi
5f15a620a1 Merge remote branch 'elliot/cookbook-textures-crossfade'
* 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
2010-08-20 15:24:42 +01:00
Elliot Smith
81481cd803 cookbook: Added recipe for handling pointer events on an actor
Added a recipe about handling enter, leave, and motion events
on an actor.

Gives some pointers to data available from motion events,
explains a bit about stage-relative and actor-relative coords,
and covers how overlapping actors and reactivity of actors
can affect events occurring.

Examples include a simple scribble app showing how to integrate
pointer events into a more useful context.
2010-08-20 13:56:17 +01:00
Elliot Smith
e54d3e716b cookbook: Added video of two texture cross-fade
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.
2010-08-18 11:41:32 +01:00
Emmanuele Bassi
e43215a5c9 build: Rule for quick publishing of the cookbook
Just call `make publish`.
2010-08-14 08:53:18 +01:00
Elliot Smith
f5db4943de cookbook: Added video showing scrollable actor 2010-08-11 18:16:07 +01:00
Elliot Smith
eaed9c22da cookbook: Added layout introduction and "stacking actors" recipe
Expanded the layout introduction and added a recipe about
stacking actors using ClutterBinLayout, with two examples.
2010-08-09 16:25:48 +01:00
Elliot Smith
309dd1f50e cookbook: Added layouts.xml to the list of XML files
Make sure layouts.xml is included for make dist.
2010-08-09 11:43:33 +01:00
Damien Lespiau
cbd6e047dd cookbook: Add a recipe on how to create sub-textures
Fiddle with Cogl textures to create a new ClutterTexture that only
displays a rectangular region of a bigger ClutterTexture.
2010-08-06 15:43:15 +01:00
Damien Lespiau
c0c9ddab65 cookbook: Add text.xml to the list of XML files
text.xml was feeling lonely and forgotten, that's fixed now.
2010-08-06 15:43:15 +01:00
Damien Lespiau
b4f4942e07 cookbook: Add the source XML files as dependencies in the Makefile rules
The generated cookbook files (either HTML or PDF) do not only depend on
clutter-cookbok.xml but also on all the chapters that compose the
cookbook. Add this dependency to the Makefile rules to have make rebuild
the book when a chapter changes.

Since XML_FILES is now the list of source files, move recipe-template.xml
to EXTRA_DIST.
2010-08-06 15:43:15 +01:00
Elliot Smith
7ed3517504 cookbook: Added recipe for animated rotation of an actor
New recipe covering how to animate rotation of
an actor (in all axes).

Covers various factors affecting rotation animation
(like orientation of axes, parent rotation/orientation),
as well as trying to make rotations easier to visualise
(e.g. describing how rotation direction is affected by
those factors, how a rotation can be expected to look
when animated). Uses implicit animations for code examples.

Also refers to a full code example which uses ClutterState.
2010-07-28 11:43:26 +01:00
Emmanuele Bassi
90b74458d2 cookbook: Add an empty recipe for shadows under text
Currently, it's just an example and an image, but it should be easy to
flesh it out properly for the "Text" chapter.
2010-07-18 10:56:35 +01:00
Emmanuele Bassi
bb3dc013bf cookbook: Add example code
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.
2010-07-18 10:53:06 +01:00
Emmanuele Bassi
71dfdf92d7 Merge remote branch 'elliot/cookbook-actor-opacity'
Conflicts:
	doc/cookbook/Makefile.am
2010-07-16 17:23:36 +01:00
Emmanuele Bassi
af6f023a80 cookbook: Add a missing image to the list 2010-07-16 17:20:38 +01:00
Emmanuele Bassi
e92c8d72cc Merge remote branch 'elliot/cookbook-include-videos'
* elliot/cookbook-include-videos:
  cookbook: Tweak so that videos sit inside a paragraph for better spacing
  docs: Note the P_() macro in the HACKING file
  cookbook: Added support for inline video

Conflicts:
	doc/cookbook/Makefile.am
2010-07-16 17:13:12 +01:00
Elliot Smith
7be6ed3334 cookbook: Added a recipe about making an actor transparent
Explains how to make an actor transparent so that other actors
are visible through it.

Also explains a bit more generally about opacity and how
it's computed from the actor, container, and color; and how actor
visibility is affected by depth (fog) and depth order.
2010-07-16 15:34:09 +01:00
Elliot Smith
962b3c6885 cookbook: Added recipe for fading actors in/out
Added a recipe showing how to fade actors in/out by
animating their opacity property, using both implicit
animations and ClutterState.
2010-07-16 12:44:39 +01:00
Elliot Smith
1d9c64ff16 cookbook: Added support for inline video
Amended Makefile to copy content of videos directory into
installation directories. Also copies videos and images
into the html/ directory during the build, so that the
built cookbook can be viewed locally (for testing without
having to install).

Added an XSLT template to transform Docbook <inlinemediaobject>
elements into HTML 5 <video> elements, with a fallback to
link to the video displayed for browsers without HTML 5 support.

Added note to "Contributing" appendix explaining how to put
video into a recipe.
2010-07-15 17:31:10 +01:00
Elliot Smith
7c67903a44 cookbook: Fix build so CSS files get installed
I had changed the build so CSS files get put into
the HTML build directory; but done it in such
a way that they were then being ignored during
install. Fixed this.
2010-07-06 17:20:39 +01:00
Elliot Smith
dfe7c554fd cookbook: Copy the CSS file into the HTML build directory
This makes local testing easier, as you can see what the
cookbook will look like when installed.
2010-07-06 17:19:56 +01:00
Emmanuele Bassi
5187804e13 cookbook: Clean up build
Create two HTML versions of the cookbook:

  • single page
  • multiple pages

Use the online version of the DocBook XHTML XSL, and disable the PDF
generation until we can restore it.
2010-07-01 12:19:34 +01:00
Emmanuele Bassi
089b9b545e cookbook: Split the cookbook chapters
Use separate files, to avoid making the XML too big and uneditable.

This breaks the PDF build.
2010-07-01 12:19:17 +01:00
Emmanuele Bassi
54aa553d0f cookbook: Re-style
Use a modified version of the Poky Handbook CSS for the HTML version of
the Cookbook.

Promote Elliot as author.

Re-license from the GPLv2.0 to the CC BY-NC-SA 2.0.
2010-06-30 17:24:51 +01:00
Emmanuele Bassi
268bfccd28 build: Redirect xsltproc to a directory
Apparently, xsltproc recognizes a directory if it has a '/' at the end
of its path, and not by doing the sensible thing and stat()'ing the
argument for the --output option.
2010-06-30 13:26:32 +01:00
Emmanuele Bassi
e9b16923bf build: Distcheck fixes 2010-06-30 12:26:10 +01:00
Emmanuele Bassi
3355c2ab25 build: Remove dist rule for non-existing image files 2010-01-03 20:25:07 +00:00
Emmanuele Bassi
5e1ccaeb60 docs: Clean up the additional documentation build
• Make the manual a DevHelp book

• Make the generation of PDFs of the cookbook and the manual optional

• Consequently, make the hard dependency on jw optional

• Clean up the checks and build for the additional documentation
2009-11-30 21:33:22 +00:00
Emmanuele Bassi
ee9d358c45 [cookbook] Build the Cookbook as a devhelp document
Instead of creating stand-alone HTML files, use XSLT to transform the
DocBook into a DevHelp file, so that we can read the Cookbook inside
DevHelp -- just like the API reference.
2009-11-30 21:31:19 +00:00
Emmanuele Bassi
35627f240f Add the Clutter Cookbook to the build
The "Clutter Cookbook" is a document designed to contain solutions
to common problems applications developers might encounter when using
Clutter. It is meant as a companion to the API reference but it
requires knowledge of the Clutter API and framework.
2009-11-30 21:31:19 +00:00