Commit Graph

74 Commits

Author SHA1 Message Date
Elliot Smith
f1312e118d cookbook: Build mouse scroll example with cookbook 2010-08-11 18:16:07 +01:00
Elliot Smith
241ceab73c cookbook: Cleaned up redundant comments in code example
Removed comments which are only relevant in my local build
environment.
2010-08-11 18:16:07 +01:00
Elliot Smith
5e268e0bbb cookbook: Added xmlns for XInclude to events docbook file 2010-08-11 18:16:06 +01:00
Elliot Smith
ec71866277 cookbook: Added basic mouse scroll recipe
Added a recipe explaining the basics of mouse scroll events.
2010-08-11 18:16:06 +01:00
Elliot Smith
bfa10f629f cookbook: Added recipe for non-rectangular actor
Added a new recipe for creating a non-rectangular
actor using ClutterPath (aka "shaped pick") and
the Cogl primitives API.

Also cleaned up XML alignment in the actors.xml
file.
2010-08-10 11:08:05 +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
Elliot Smith
1a44b56b7a cookbook: Added layouts section and introduction 2010-08-09 11:43:33 +01:00
Damien Lespiau
86c3be550e cookbook: Remove the note about indenting <xi:include>
It's not necessary now to special case the indentation of includes as
the XSLT for the cookbook strips leading and trailing space automaticaly
for us.
2010-08-06 15:43:16 +01:00
Damien Lespiau
4f5ab7d010 cookbook: Close a tag, making xsltproc happier
A </function> tag was not closed.
2010-08-06 15:43:15 +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
Emmanuele Bassi
8668a019a0 cookbook: Fix the text-shadow recipe
Fill out the recipe and add more comments to the example code.
2010-08-05 12:48:16 +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
Elliot Smith
94fcbafe18 cookbook: Add explanation about including code samples
Updated the "Contributing" section to explain how to include
a full code sample at the end of a recipe.
2010-07-28 11:39:59 +01:00
Elliot Smith
9e29aac49a cookbook: Make filename used in video example consistent
Fixed video filename in sample markup to match the
guidelines given in the "Contributing" section.
2010-07-28 11:39:59 +01:00
Elliot Smith
12ffe70a86 cookbook: Add example code for animated rotation
Add example code demonstrating how to rotate in the x,y,z
axes using ClutterState. Integrated with build.
2010-07-28 11:39:59 +01:00
Elliot Smith
e45b8be71b cookbook: Fix key press to examine modifers correctly
The simple key press example in the cookbook used a brittle
and incorrect switch statement to test modifier values. Instead,
use logical "&" of the state with the modifiers we're interested
in to check which keys were pressed.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2223
2010-07-19 14:45:37 +01:00
Emmanuele Bassi
5865d2a4b3 cookbook: Use TESTS_DATA_DIR
We need the correct location for redhand.png if we want to load it
in textures-reflection.
2010-07-18 22:53:56 +01:00
Emmanuele Bassi
dc19e26073 cookbook: Add image and example for text-shadow 2010-07-18 11:20:44 +01:00
Emmanuele Bassi
0dac5e0557 cookbook: Include the textures-reflection example code
Add a section at the end of the recipe containing the full code of the
example.
2010-07-18 11:15:25 +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
6f220399ae cookbook: Use the right tag for the screenshot
Screenshots should be using the <screenshot> tag, not the <figure> one.
2010-07-16 17:31:27 +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
Emmanuele Bassi
ad1613a936 Merge remote branch 'elliot/cookbook-animation-fading'
* elliot/cookbook-animation-fading:
  cookbook: Minor modification to wording to improve clarity
  cookbook: Added recipe for fading actors in/out
2010-07-16 17:12:37 +01:00
Emmanuele Bassi
4170eacd94 cookbook: Add a recipe for texture reflection
A common request: how to create a clone of a texture that looks like a
reflection.
2010-07-16 17:04:31 +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
da22150498 cookbook: Minor modification to wording to improve clarity
Text referred to three animation methods, but only provides
examples for two of them; and in future there may be more/fewer
than 3. So I reworded it.
2010-07-16 12:48:56 +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
Emmanuele Bassi
3aa3893a11 docbook: Add an introduction to the texture section 2010-07-16 12:01:42 +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
Emmanuele Bassi
1eec056bfd Merge remote branch 'elliot/cookbook-animation-inversion'
* elliot/cookbook-animation-inversion:
  cookbook: Fixed invalid XML tag
  cookbook: Added "inverting an animation" recipe
  docs: Enabled animation section
2010-07-12 21:25:25 +01:00
Emmanuele Bassi
e2a553da86 Merge remote branch 'elliot/cookbook-animation-intro'
* elliot/cookbook-animation-intro:
  cookbook: Added introduction for animations section
  docs: Enabled animation section
2010-07-12 21:25:22 +01:00
Elliot Smith
97ac28ee48 cookbook: Added introduction for animations section
Introduces basic concepts (timelines, alphas, frames)
common to different parts of the Clutter animation API.

Gives a high level overview of the three different
approaches to animation (implicit, ClutterAnimator,
ClutterState).
2010-07-12 17:15:16 +01:00
Elliot Smith
295a043194 docs: Enabled animation section 2010-07-12 17:09:03 +01:00
Elliot Smith
9d96c21de6 cookbook: Fixed invalid XML tag 2010-07-12 16:59:38 +01:00
Elliot Smith
6a443a0cd3 cookbook: Added "inverting an animation" recipe
Added a new recipe (based on the skeleton in the
animations section of the cookbook) about inverting
an animation by reversing the direction of its timeline.

Uses clutter_actor_animate() as the basic approach,
but mentions ClutterState and ClutterAnimator as well.
2010-07-12 15:45:49 +01:00
Elliot Smith
bfb51adf97 docs: Enabled animation section 2010-07-12 15:45:46 +01:00
Elliot Smith
9e5a18fea4 cookbook: Fixed typo
Removed stray 'd' character.
2010-07-06 17:20:43 +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
e566c56bd1 cookbook: Moved paragraph where it logically belongs
There was a note about constants for keys and
where they are defined in Clutter header files; but
the sentence about where key modifiers are defined
was outside the note. Logically, they belong
together.
2010-07-06 17:20:34 +01:00
Elliot Smith
03b19af38e cookbook: Added some judicious note elements
In some cases, there were blocks of text which
were really asides/interrupts to the flow, but
which weren't explicitly marked as such. I fixed
them by turning them into <note> blocks.
2010-07-06 17:20:25 +01:00
Elliot Smith
9a609cf629 cookbook: Added more information for contributors
Suggested use of <note> element for adding detail
or asides which would otherwise interrupt the
flow of the recipe.
2010-07-06 17:20:21 +01:00
Elliot Smith
15331d3a01 cookbook: Link out to docbook site
Corrected the link on the word Docbook, as it
was an internal <link> rather than an external
<ulink>.
2010-07-06 17:20:16 +01:00
Elliot Smith
c108a32c30 cookbook: Made docbook element usage consistent
Made usage of docbook elements consistent across
recipes; to ensure the conventions are kept by others,
added a section about how to write and style recipes.
2010-07-06 17:20:09 +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