1
0
Fork 0
Commit graph

6 commits

Author SHA1 Message Date
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
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
82ab00930b cookbook: Simplified and clarified example code
Modified the "animation reuse" sample code to provide
a simpler example to explain in the recipe.

Also modified variable names to mirror the names used
for the previous "complex animation" example and added
some more comments, to further simplify and support the
recipe.
2010-09-13 12:25:47 +01:00
Elliot Smith
d7a3e35f46 cookbook: Cleaned up the "animations reuse" example
With some help from pippin, moved variable declarations
into more sensible positions within their functions,
changed a function name, and found a better way
to unref a script once its associated actor has
been destroyed.
2010-09-13 12:25:47 +01:00
Elliot Smith
d4190cbf8c cookbook: Refactored reusable animation example
Extracted the animation into its own JSON definition,
then create a new script and get the animation each
time a rectangle is clicked.

Removes the need to reparent onto the background and
copy property values to the rectangle after the animation,
and generally much cleaner.
2010-09-13 12:25:47 +01:00
Elliot Smith
acc28cf60c cookbook: Added example for animation reuse recipe
Added an example showing how to reuse a ClutterAnimator
instance to animate multiple actors at different times
using an animatable rig, combined with reparenting.
2010-09-13 12:25:47 +01:00