Commit Graph

228 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
Emanuele Aina
f4bd9a6a3b Fix cookbook examples compilation
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2012-08-27 14:52:45 +01:00
Emmanuele Bassi
d8fddbf780 build: Include top builddir for cookbook examples 2012-08-07 09:45:58 +01:00
Debarshi Ray
d154a10fa0 cookbook/examples: Don't mix up height and width while splitting
Fixes: https://bugzilla.gnome.org/675998
2012-05-31 11:50:58 +01:00
Emmanuele Bassi
073ec80c05 cookbook/examples: Use real implicit animations
Instead of clutter_actor_animate().
2012-03-19 18:10:26 +00:00
Emmanuele Bassi
a3007b9847 build: Remove maintainer flags from cookbook/examples
The code should be a tad more relaxed.
2012-03-16 12:33:40 +00:00
Emmanuele Bassi
618e04e9cc cookbook/examples: Modernize the code
Use new and non-deprecated methods.
2012-02-27 10:59:46 +00:00
Emmanuele Bassi
657e0ce093 cookbook: Use clutter_timeline_set_repeat_count() 2012-02-13 17:30:22 +00:00
Kerrick Staley
4360fcccf4 Fix spelling in Clutter Cookbook: ouest -> west 2012-01-27 12:17:08 +00:00
Emmanuele Bassi
54c9257f28 docs: Update to show the symbolic button names
https://bugzilla.gnome.org/show_bug.cgi?id=668692
2012-01-27 09:46:51 +00:00
Emmanuele Bassi
90397bf06c doc/cookbook: Remove dead link 2012-01-27 07:30:02 +00:00
Emmanuele Bassi
b2bf2dbb08 docs: Use symbolic constants for sources and events 2012-01-25 23:20:24 +00:00
Emmanuele Bassi
18ec12a3b7 cookbook: Start migrating to the new API
Drop mentions of deprecated classes and API, and update the inline
example code.

Still some way to go, and the cookbook would probably benefit from
having a recipe on how to use ClutterActor to build a scene.
2012-01-24 15:12:41 +00:00
Emmanuele Bassi
1c01554e6a cookbook: Begin porting examples to the new API
Start dropping the usage of deprecated classes and API.
2012-01-24 15:01:00 +00:00
Emmanuele Bassi
fd1196c7b5 docs/cookbook: Mention the event control macros
Now that we have symbolic names for event propagation values for signal
handlers, we ought to mention them in the cookbook.
2012-01-03 12:10:28 +00:00
Emmanuele Bassi
26aa4b5290 docs: Remove clutter_stage_get_default()
A lot of the example code in the cookbook and the API reference still
uses the default stage — sometimes as if it were a non-default one,
which once again demonstrates how the default stage was a flawed concept
that just confused people.
2011-11-10 15:37:51 +00:00
Emmanuele Bassi
7ab84f981c Remove CLUTTER_DISABLE_DEPRECATED from the build flags
We don't use it any more.
2011-11-03 15:35:01 +00:00
Emmanuele Bassi
a09bbffd92 Implement multi-backend support
The Clutter backend split is opaque enough that should allow us to just
build all possible backends inside the same shared object, and select
the wanted backend at initialization time.

This requires some work in the build system, as well as the
initialization code, to remove duplicate functions that might cause
conflicts at build and link time. We also need to defer all the checks
of the internal state of the platform-specific API to run-time type
checks.
2011-11-03 13:45:19 +00:00
Emmanuele Bassi
9a78eacb72 build: Fix distcheck in cookbook/examples 2011-09-05 21:16:01 +01:00
Emmanuele Bassi
72caef0de0 cookbooks/examples: Use g_signal_handlers_disconnect_by_func()
The disconnect_matched() function is a bit too complicated, and its
simpler wrapper disconnect_by_func() is functionally equivalent in the
cases used by the cookbook examples.
2011-09-02 12:19:30 +01:00
Emmanuele Bassi
2557370445 docs/cookbook: Update the introduction
Clean up some wording.
2011-09-01 16:06:04 +01:00
Emmanuele Bassi
b0f868edfd build: Install the cookbook examples code
Use $(datadir)/clutter-1.0/cookbook/examples as the target directory.
2011-09-01 13:51:20 +01:00
Emmanuele Bassi
e03fb1e872 docs/cookbook: Update copyright 2011-08-31 12:27:30 +01:00
Emmanuele Bassi
3bdd49dc19 docs/cookbook: Add script->state connection recipe
Script definitions can connect a signal to a State transition; this is a
useful thing to document with a recipe in the cookbook.
2011-08-31 12:25:01 +01:00
Emmanuele Bassi
a661191b4b docs/cookbook: Point out that Cogl does not do AA drawing 2011-08-22 13:15:42 +01:00
Emmanuele Bassi
010fc072f9 docs/cookbook: Update the link to the GObject reference 2011-08-22 12:33:20 +01:00
Emmanuele Bassi
2b81d90dd7 Eliminate G_CONST_RETURN
The G_CONST_RETURN define in GLib is, and has always been, a bit fuzzy.

We always used it to conform to the platform, at least for public-facing
API.

At first I assumed it has something to do with brain-damaged compilers
or with weird platforms where const was not really supported; sadly,
it's something much, much worse: it's a define that can be toggled at
compile-time to remove const from the signature of public API. This is a
truly terrifying feature that I assume was added in the past century,
and whose inception clearly had something to do with massive doses of
absynthe and opium — because any other explanation would make the
existence of such a feature even worse than assuming drugs had anything
to do with it.

Anyway, and pleasing the gods, this dubious feature is being
removed/deprecated in GLib; see bug:

  https://bugzilla.gnome.org/show_bug.cgi?id=644611

Before deprecation, though, we should just remove its usage from the
whole API. We should especially remove its usage from Cally's internals,
since there it never made sense in the first place.
2011-06-07 16:06:24 +01:00
Neil Roberts
7d233241f1 Fix include location for cogl-pango.h
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.
2011-05-16 16:04:27 +01:00
Elliot Smith
57a5f2296a docs: Remove checks for whether an effect is disabled
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.
2011-03-17 15:56:55 +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
5732b1184f docs: Add example of setting background color with ClutterEffect
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.
2011-03-17 15:56:55 +00:00
Elliot Smith
a81dbcf483 docs: Add example of a border added through ClutterEffect
Add a basic example showing how to implement a ClutterEffect
post_paint() function to overlay a highlight border over a
rectangular actor.
2011-03-17 15:56:55 +00:00
nobled
aece642adb doc: fix clutter_init() usage in examples
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
2011-02-28 14:10:05 +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
Emmanuele Bassi
c4d4a5469a build: Dist cb-button.h in the cookbook examples
The header is missing, so we have a build failure if you try to build
Clutter's cookbook from the tarball.
2011-02-01 12:45:52 +00:00
Elliot Smith
6680cebfe1 docs: Add reference to useful GObject tutorial
Add a reference to a GObject tutorial which
is a good introduction to the various macros etc.
and what they're for.
2011-01-31 13:40:10 +00:00
Elliot Smith
885664f725 docs: Explain why destroy() is implemented
As destroy() is Clutter-specific and not generic
GObject code, explain why we implement it
(rather than dispose()).
2011-01-31 13:39:11 +00:00
Elliot Smith
e69d60e8b6 docs: Implement destroy() rather than dispose()
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.
2011-01-31 13:36:37 +00:00
Elliot Smith
f63158c2a2 docs: Don't use clutter_stage_get_default()
clutter_stage_get_new() is the recommended way to
get a stage instance, so use that instead.
2011-01-31 12:18:58 +00:00
Elliot Smith
3f64137a79 docs: Change text on button
Modify the text shown on the button to "hello / world"
rather than "winkle / pickers". Slightly more
sensible.
2011-01-31 11:06:01 +00:00
Elliot Smith
5530c5e2ec docs: Add a note about other state variables
Explain that the private structure would be the
place to store other state variables for the instance.
2011-01-31 11:05:27 +00:00
Elliot Smith
08f5dc08d0 docs: Complete composite actor recipe
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.
2011-01-31 10:55:07 +00:00
Elliot Smith
238fd52c4b docs: Change order of functions in example to match docs
Moved the functions around in the C code file, to match
the order Clutter uses them, and the order they are explained
in the recipe.
2011-01-31 10:38:15 +00:00
Elliot Smith
6934b36451 docs: Add more comments on how allocate() works
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.
2011-01-31 10:08:08 +00:00
Elliot Smith
00deb59a9d docs: Include code examples in the recipe
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.
2011-01-31 10:08:07 +00:00
Elliot Smith
5f676ce325 docs: Explain enums for properties and signals
Add some more explanatory comments about the PROP_ and
signals enums.
2011-01-31 10:08:07 +00:00
Elliot Smith
18b90f100c docs: Don't set explicit size on button
Rather than set a size on the CbButton instance, let it
size itself automatically, based on the size requisition
functions.
2011-01-31 10:08:07 +00:00