2006-11-17 Emmanuele Bassi <ebassi@openedhand.com>

* clutter/clutter-behaviour-path.h:
	* clutter/clutter-behaviour-path.c: Add a "knot-reached" signal,
	which is emitted when the path reaches a node in the nodes list;
	flesh out the documentation a bit; sync the parameters names
	so that gtk-doc doesn't complain about missing stuff.

	* clutter/clutter-behaviour.h:
	* clutter/clutter-behaviour.c: Add the alpha value to the
	ClutterBehaviour::alpha_notify vfunc, so you don't have to
	get the value from the alpha inside the behaviour implementations;
	add more documentation.

	* clutter/clutter-alpha.c: Flesh out the description.

	* clutter/clutter-actor.h: Update the header.

	* clutter/clutter-behaviour-opacity.c:
	* clutter/clutter-behaviour-scale.c: Update docs.
This commit is contained in:
Emmanuele Bassi
2006-11-17 18:45:31 +00:00
parent 491e3ca9d2
commit 237496fa75
27 changed files with 1729 additions and 1229 deletions

View File

@ -27,6 +27,26 @@
* SECTION:clutter-behaviour
* @short_description: Class for providing behaviours to actors
*
* #ClutterBehaviour is the base class for implementing behaviours. A
* behaviour is a controller object for #ClutterActor<!-- -->s; you can
* use a behaviour to control one or more properties of an actor (such
* as its opacity, or its position). A #ClutterBehaviour is driven by
* an "alpha function" stored inside a #ClutterAlpha object; an alpha
* function is a function depending solely on time. The alpha function
* computes a value which is then applied to the properties of the
* actors driven by a behaviour.
*
* Clutter provides some pre-defined behaviours, like #ClutterBehaviourPath,
* which controls the position of a set of actors making them "walk" along
* a set of nodes; #ClutterBehaviourOpacity, which controls the opacity
* of a set of actors; #ClutterBehaviourScale, which controls the width
* and height of a set of actors.
*
* In order to implement a new behaviour you should subclass #ClutterBehaviour
* and override the "alpha_notify" virtual function; inside the overridden
* function you should obtain the alpha value from the #ClutterAlpha
* instance bound to the behaviour and apply it to the desiderd property
* (or properties) of every actor controlled by the behaviour.
*/
#include "config.h"
@ -214,12 +234,18 @@ notify_cb (GObject *object,
GParamSpec *param_spec,
ClutterBehaviour *behave)
{
ClutterBehaviourClass *class;
ClutterBehaviourClass *klass;
class = CLUTTER_BEHAVIOUR_GET_CLASS(behave);
klass = CLUTTER_BEHAVIOUR_GET_CLASS (behave);
if (class->alpha_notify)
class->alpha_notify (behave);
if (klass->alpha_notify)
{
guint32 alpha_value;
alpha_value = clutter_alpha_get_alpha (behave->priv->alpha);
klass->alpha_notify (behave, alpha_value);
}
}
void