Commit Graph

782 Commits

Author SHA1 Message Date
Emmanuele Bassi
f2669df6b5 build: Disable deprecated API when building the cookbook examples
Make sure we always use the latest API.
2010-09-10 18:21:19 +01:00
Emmanuele Bassi
4ee05f8e21 keysyms: Update the macros to CLUTTER_KEY_*
The keysyms defines in clutter-keysyms.h are generated from the X11 key
symbols headers by doing the equivalent of a pass of sed from XK_* to
CLUTTER_*. This might lead to namespace collisions, down the road.
Instead, we should use the CLUTTER_KEY_* namespace.

This commit includes the script, taken from GDK, that parses the X11
key symbols and generates two headers:

  - clutter-keysyms.h: the default included header, with CLUTTER_KEY_*
  - clutter-keysyms-compat.h: the compatibility header, with CLUTTER_*

The compat.h header file is included if CLUTTER_DISABLE_DEPRECATED is
not defined - essentially deprecating all the old key symbols.

This does not change any ABI and, assuming that an application or
library is not compiling with CLUTTER_DISABLE_DEPRECATED, the source
compatibility is still guaranteed.
2010-09-10 17:54:52 +01:00
Emmanuele Bassi
01362effca actor: Add a method for querying key focus
A simple convenience method on Clutter.Actor for checking whether
it has key focus assigned on the Stage to which it belongs.
2010-09-10 11:42:11 +01:00
Emmanuele Bassi
71a4db6135 animation: Allow detaching an animation from an actor
When animating an actor through clutter_actor_animate() and friends we
might want forcibly detach the animation instance from the actor in
order to start a new one - for instance, in response to user
interaction.

Currently, there is no way to do that except in a very convoluted way,
by emitting the ::completed signal and adding a special case in the
signal handlers; this is due to the fact that clutter_actor_animate()
adds more logic than the one added by clutter_animation_set_object(),
so calling set_object(NULL) or unreferencing the animation instance
itself won't be enough.

The right way to approach this is to add a new method to Clutter.Actor
that detaches any eventual Animation currently referencing it.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2051
2010-09-10 11:18:53 +01:00
Emmanuele Bassi
070e239b6d docs: Fix up the Cogl API reference build 2010-09-03 17:15:22 +01:00
Emmanuele Bassi
abef73bb58 Replace cogl_color_set_from_* with cogl_color_init_from_*
The former is not yet "officially" deprecated by the latter, but it's
confusing to have them both in the code base.
2010-09-03 16:58:47 +01:00
Emmanuele Bassi
0e2b0e496e docs: Add annotation glossary to the Cogl API reference
It's the only way to let gtk-doc know that we're using annotations in
the comments.
2010-09-03 16:52:06 +01:00
Emmanuele Bassi
0caef5c8aa docs: Fixes for gtk-doc 2010-09-03 16:12:24 +01:00
Emmanuele Bassi
7fee8cf26a cookbook: Add a short introduction for the Text chapter 2010-09-03 15:44:03 +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
60ff660d42 cookbook: Added a second example to show "overlapping" transitions
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.
2010-09-03 14:19:51 +01:00
Elliot Smith
c0aa72a042 cookbook: Added complex animations example
To support recipe about using ClutterAnimator to create
complex animations.
2010-09-03 14:19:51 +01:00
Damien Lespiau
0a0a59cf7b cex100: Add an API to configure the buffering mode of the GDL plane
GDL planes can be double or triple buffered. Let the user choose between
the two modes befored initalizing Clutter.
2010-09-03 11:13:35 +01:00
Damien Lespiau
01fcd11efd cex100: Add an API to configure the GDL plane to use
Intel CE3100 and CE4100 have several planes (framebuffers) and a
hardware blender to blend the planes togeteher to produce the final
image.

clutter_cex100_set_plane() lets you configure which framebuffer clutter
will use for its rendering.
2010-09-03 11:13:35 +01:00
Emmanuele Bassi
12a5bf2e06 offscreen-effect: Rename create_target to create_buffer
*** This is an API change ***

The create_target() virtual function should return a CoglHandle to a
texture; clutter_offscreen_effect_get_target(), instead, returns a
CoglMaterial to be painted in the implementation of the paint_target()
virtual function.

Instead of equating textures with materials, and confusing the user of
the API, we should mark the difference more prominently.

First of all, we should return a CoglMaterial* (now that we have that
as a public type) in get_target(); having handles all over the place
does not make it easier to distinguish the semantics of the virtual
functions.

Then we should rename create_target() to create_texture(), to make it
clear that what should be returned is a texture that is used as the
backing for the offscreen framebuffer.
2010-09-01 18:05:53 +01:00
Elliot Smith
6c40b10083 cookbook: Added recipe for signal handling in ClutterScript
Added a recipe explaining how to connect signals to handlers
in the JSON definition used by ClutterScript; also shows
how to connect the signals in code once the JSON has been
loaded.

Includes guidelines on writing handlers (i.e. need to use
-export-dynamic and non-static functions) and example
which connects a handler for motion events on a rectangle.
2010-08-31 14:39:47 +01:00
Elliot Smith
a67111a17c cookbook: Added example of connecting signals in ClutterScript
To support recipe about connecting signals in script.
2010-08-31 10:06:08 +01:00
Emmanuele Bassi
b369cb51dc docs: Pass -DCOGL_ENABLE_EXPERIMENTAL_API when scanning 2010-08-28 21:21:08 +01:00
Emmanuele Bassi
be9dd6e7da docs: Split x11-texture-pixmap in its own section 2010-08-28 21:18:12 +01:00
Emmanuele Bassi
a0c700b8d0 docs: Fix up the main index of the Clutter API reference 2010-08-28 21:17:52 +01:00
Elliot Smith
79a4dbb329 cookbook: Use nicknames for enumeration values
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.
2010-08-27 15:29:15 +01:00
Elliot Smith
2c3ca20cdc cookbook: Don't use the default stage
It's not necessary to use the default stage, so
don't encourage this in the JSON example.
2010-08-27 15:13:28 +01:00
Elliot Smith
6db795baf6 cookbook: Mention nick names as possible values for enums
As JSON can make use of nicknames for GEnum properties,
mentioned this in the table mapping C property values
to their JSON equivalents (as the nick name is a much
shorter and cleaner way of setting a property in JSON).
2010-08-27 15:10:17 +01:00
Elliot Smith
b532f95917 cookbook: Added introduction to and recipe on ClutterScript
Wrote an introduction to using ClutterScript with JSON. Focus
is on explaining why you might want to use it, basic principles
of operation (with annotated JSON sample), and how to map
data types from C to JSON.

Written simultaneously with a short recipe (uses the same sample
code) showing how to load a JSON file and retrieve objects
from it in code.
2010-08-27 11:25:40 +01:00
Elliot Smith
7900ac4dc7 cookbook: Added comments to script example
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).
2010-08-27 11:21:30 +01:00
Elliot Smith
0fc1c8503b cookbook: Added first draft of script introduction
New script chapter needs an introduction.

While writing the introduction, also slightly changed the
emphasis of the recipe (towards refactoring an existing
application to use ClutterScript) and incorporated example
code into documentation.
2010-08-27 11:21:30 +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
Elliot Smith
27d9825abe cookbook: Simplified ClutterScript example
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).
2010-08-27 11:21:30 +01:00
Elliot Smith
4cba0cf3e8 cookbook: Added ClutterScript example
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.
2010-08-27 11:21:30 +01:00
Emmanuele Bassi
36d45b660f click-action: Add get_button()
Allow retrieving the pointer button that caused the ::clicked signal to
be emitted.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2287
2010-08-26 16:39:39 +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
c480e5ec00 cookbook: Added example to show how stacking affects pointer events
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.
2010-08-20 12:54:19 +01:00
Elliot Smith
526b438b3a cookbook: Use get_coords rather than struct members
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.
2010-08-20 12:54:19 +01:00
Elliot Smith
a4db7746f2 cookbook: Made callback names more consistent
Changed callback function names so they are more consistent
within this recipe and with other callback names used
in other recipes.
2010-08-20 12:54:19 +01:00
Elliot Smith
c1e2658104 cookbook: Added simple pointer motion example
Added a simple pointer motion example which just reports on
the stage and actor-relative coordinates of the pointer
as it moves.
2010-08-20 12:54:19 +01:00
Elliot Smith
7c196d31b4 cookbook: Added scribble example for pointer motion recipe
Simple scribbler application which demonstrates tracking
mouse enter and motion events on a texture, drawing with
COGL and ClutterPath as they occur.
2010-08-20 12:39:48 +01:00
Elliot Smith
b648bff10c cookbook: Renamed example for pointer crossing
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).
2010-08-20 12:39:48 +01:00
Elliot Smith
72ddd471f0 cookbook: Added example for pointer cross recipe
Code example demonstrates detecting pointers entering/leaving
an actor by implementing a (very) simple button with hover
effect.
2010-08-20 12:39:48 +01:00
Emmanuele Bassi
459a6bb24c click-action: Add a method to force a release
It can be useful to be able to forcibly break the grab set up by the
ClickAction. The newly added release() method provides a mechanism to
release the grab and unset the :held state of the ClickAction.
2010-08-19 12:10:43 +01:00
Elliot Smith
444d315078 cookbook: Use GdkPixbuf instead of getting data from a texture
Rewrote example for single texture + COGL to use
a GdkPixbuf to load images, rather than reading data
out of another CoglTexture.

The data is then loaded from the pixbuf to a region of
the CoglTexture (as before).
2010-08-18 16:02:51 +01:00
Elliot Smith
c207820bef cookbook: Added a recipe for cross-fading between two images
The recipe covers a two texture approach (using the Clutter API)
and a single texture approach (using COGL).

It also discusses issues with cross-fading between images of
different sizes with the COGL API, and gives a longer
example of cycling through multiple images in a slideshow
application.
2010-08-18 11:42:00 +01:00
Elliot Smith
c492faecb2 cookbook: Modified COGL example for consistency
Changed the stage size so the COGL API example for cross-fade
has a stage the same size as the two texture example.
2010-08-18 11:41:32 +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
Elliot Smith
0486c56a41 cookbook: Removed unused constant 2010-08-18 11:41:32 +01:00
Elliot Smith
8c0c2924ae cookbook: Renamed front/back to top/bottom in cross-fade example
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.
2010-08-18 11:41:32 +01:00
Elliot Smith
1e4578d1dd cookbook: Don't need to set keep-aspect-ratio for simple example 2010-08-18 11:41:32 +01:00
Elliot Smith
1b2606a850 cookbook: Modified ordering of statements in cross-fade example
Changed the order of statements in the sample code to match
the order they will be explained in the walk-through in the recipe.
2010-08-18 11:41:32 +01:00
Elliot Smith
e332236b87 cookbook: Added a longer slideshow example
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.
2010-08-18 11:41:32 +01:00
Elliot Smith
c230fd8dfd cookbook: Made code examples more consistent
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.
2010-08-18 11:41:32 +01:00
Elliot Smith
83a8d0b3bb cookbook: Added example code for texture cross-fading
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.
2010-08-18 11:41:32 +01:00
Emmanuele Bassi
ad0c36e1a1 docs: Fixes to avoid gtk-doc warnings 2010-08-17 14:54:20 +01:00
Emmanuele Bassi
3142b15a9f build: Use maintainer-clean for the ignore files removal
Instead of distclean.
2010-08-15 18:42:54 +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
Emmanuele Bassi
94c8635d0f build: Autogenerate more ignore files
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.
2010-08-14 08:43:16 +01:00
Emmanuele Bassi
6c6e93d27a Merge remote branch 'elliot/cookbook-events-mouse-scroll'
* elliot/cookbook-events-mouse-scroll:
  cookbook: Cleaning up grammar and wording in mouse scroll recipe
  cookbook: Added more explanation about setting y coord on scrollable
  cookbook: Mentioned the animation in the sample code
  cookbook: Included video of the scroll example running
  cookbook: Made stage slightly smaller for scroll event example
  cookbook: Added video showing scrollable actor
  cookbook: Added walk through of code example for mouse scroll
  cookbook: Fixed link to example in mouse scroll recipe
  cookbook: Simplified full scroll example
  cookbook: Improved wording and formatting in mouse scroll intro.
  cookbook: Handle all possible mouse scroll directions
  cookbook: Build mouse scroll example with cookbook
  cookbook: Cleaned up redundant comments in code example
  cookbook: Added xmlns for XInclude to events docbook file
  cookbook: Added basic mouse scroll recipe
2010-08-12 18:29:08 +01:00
Neil Roberts
12f2481462 docs: Update the build instructions in the reference
This removes all references to SDL in the build instructions as the
backend is no longer available.  The OpenGL version required is only
1.2 not 1.4. The Windows build instructions were out of date and have
been replaced with a link to the wiki instead.
2010-08-12 17:30:45 +01:00
Robert Bragg
f03037d580 cogl-program: Adds use_uniform_xyz methods
Instead of exposing an API that provides an OpenGL state machine style
where you first have to bind the program to the context using
cogl_program_use() followed by updating uniforms using
cogl_program_uniform_xyz we now have uniform setter methods that take an
explicit CoglHandle for the program.

This deprecates cogl_program_use and all the cogl_program_uniform
variants and provides the following replacements:
    cogl_program_set_uniform_1i
    cogl_program_set_uniform_1f
    cogl_program_set_uniform_int
    cogl_program_set_uniform_float
    cogl_program_set_uniform_matrix
2010-08-12 16:50:46 +01:00
Elliot Smith
1ed5d5cab0 cookbook: Cleaning up grammar and wording in mouse scroll recipe 2010-08-12 13:26:09 +01:00
Elliot Smith
8db96675d4 cookbook: Added more explanation about setting y coord on scrollable
Added some extra explanation, referencing the sample code, to
try to make the scrollable actor example easier to follow. Basically
demonstrates the principles described in the paragraph about
setting the y coordinate for the scrollable actor, but using actual
numbers.
2010-08-12 10:05:27 +01:00
Elliot Smith
a74d585fc5 cookbook: Mentioned the animation in the sample code
Put in comments to make it clear where the animation
for the mouse scroll is coming from in the sample code.
2010-08-11 18:16:07 +01:00
Elliot Smith
a421f0ae42 cookbook: Included video of the scroll example running
Inlined the video of the mouse scroll example code running
to the docbook file for events.
2010-08-11 18:16:07 +01:00
Elliot Smith
1cfa87853a cookbook: Made stage slightly smaller for scroll event example
Reduced the size of the stage to make for a smaller video.
2010-08-11 18:16:07 +01:00
Elliot Smith
f5db4943de cookbook: Added video showing scrollable actor 2010-08-11 18:16:07 +01:00
Elliot Smith
f568a68ee1 cookbook: Added walk through of code example for mouse scroll
Modified the mouse scroll example to fit better with the tutorial
walkthrough.

Added a stepped walkthrough of the scrollable actor code
example.
2010-08-11 18:16:07 +01:00
Elliot Smith
57ba89c8de cookbook: Fixed link to example in mouse scroll recipe 2010-08-11 18:16:07 +01:00
Elliot Smith
5e0bc919c3 cookbook: Simplified full scroll example
Removed the layout and box to simplify the scrollable
actor example.
2010-08-11 18:16:07 +01:00
Elliot Smith
e216771a86 cookbook: Improved wording and formatting in mouse scroll intro. 2010-08-11 18:16:07 +01:00
Elliot Smith
0f919fcbe3 cookbook: Handle all possible mouse scroll directions
Added empty cases for MOUSE_SCROLL_LEFT and MOUSE_SCROLL_RIGHT
to the scroll-event signal handler in the example code.
2010-08-11 18:16:07 +01:00
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
José Dapena Paz
d14e294d86 Add ClutterTableLayout, a layout showing children in rows and columns
A TableLayout is a layout manager that allocates its children in rows
and columns. Each child is assigned to a cell (or more if a cell span
is set).

The supported child properties are:

  • x-expand and y-expand: if this cell with try to allocate the
    available extra space for the table.
  • x-fill and y-fill: if the child will get all the space available in
    the cell.
  • x-align and y-align: if the child does not fill the cell, then
    where the child will be aligned inside the cell.
  • row-span and col-span: number of cells the child will allocate for
    itself.

Also, the TableLayout has row-spacing and col-spacing for specifying
the space in pixels between rows and between columns.

We also include a simple test of the layout manager, and the
documentation updates.

The TableLayout was implemented starting from MxTable and
ClutterBoxLayout.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2038

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-08-10 23:20:06 +01:00
Emmanuele Bassi
07b01888ba actor: Add allocate_align_fill()
Layout managers are using the same code to allocate a child while taking
into consideration:

  • horizontal and vertical alignment
  • horizontal and vertical fill
  • the preferred minimum and natural size, depending
    on the :request-mode property
  • the text direction for the horizontal alignment
  • an offset given by the fixed position properties

Given the amount of code involved, and the amount of details that can go
horribly wrong while copy and pasting such code in various classes - let
alone various projects - Clutter should provide an allocate() variant
that does the right thing in the right way. This way, we have a single
point of failure.
2010-08-10 22:25:11 +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
7032e24950 cookbook: Make the table of content have a depth of 2
Instead of showing Problem/Solution/Discussion for each recipe, let's
just show the title of those recipes.
2010-08-06 15:43:16 +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
ad1f1cb741 cookbook: Strip leading and trailing space inside programlisting
It's a XSL FAQ to be able to chomp text nodes and we just have to copy
and paste a XSLT 1.0 solution from:
  http://dpawson.co.uk/xsl/sect2/N8321.html#d11325e833

Let's then empower our cookbook customization layer to chomp text nodes,
children of programlisting.
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