Rechercher une page de manuel
Clutter::Behaviour.3pm
Langue: en
Version: 2008-02-20 (mandriva - 01/05/08)
Section: 3 (Bibliothèques de fonctions)
Sommaire
NAME
Clutter::BehaviourDESCRIPTION
Clutter::Behaviour is the base class for objects controlling the behaviour of actors. These objects are used primarily to drive a set of actors depending on the position on a timeline, using an ``alpha'' function; the alpha function is held by the Clutter::Alpha object, which automatically binds a Clutter::Timeline to the function.HIERARCHY
Glib::Object +----Clutter::Behaviour
METHODS
$behaviour->actors_foreach ($func, $data)
$behaviour->actors_foreach ($func, $data)
-
- •
- $func (scalar)
- •
- $data (scalar)
actors = $behaviour->get_actors
actors = $behaviour->get_actors
alpha = $behaviour->get_alpha
alpha = $behaviour->get_alpha
$behaviour->set_alpha ($alpha)
$behaviour->set_alpha ($alpha)
-
- •
- $alpha (Clutter::Alpha)
$behaviour->apply ($actor)
$behaviour->apply ($actor)
-
- •
- $actor (Clutter::Actor)
boolean = $behaviour->is_applied ($actor)
boolean = $behaviour->is_applied ($actor)
-
- •
- $actor (Clutter::Actor)
integer = $behaviour->get_n_actors
integer = $behaviour->get_n_actors
actor = $behaviour->get_nth_actor ($index)
actor = $behaviour->get_nth_actor ($index)
-
- •
- $index (integer)
$behaviour->remove ($actor)
$behaviour->remove ($actor)
-
- •
- $actor (Clutter::Actor)
$behaviour->remove_all
$behaviour->remove_all
PROPERTIES
- 'alpha' (Clutter::Alpha : readable / writable / private)
- Alpha Object to drive the behaviour
SIGNALS
- applied (Clutter::Behaviour, Clutter::Actor)
- removed (Clutter::Behaviour, Clutter::Actor)
DERIVING NEW BEHAVIOURS
Clutter provides various behaviours, like Clutter::Behaviour::Opacity, Clutter::Behaviour::Path and Clutter::Behaviour::Scale. You may derive a new behaviour from any of these, or directly from the Clutter::Behaviour class itself.The new behaviour must be a GObject, so you must follow the normal procedure for creating a new Glib::Object (i.e., either using the Glib::Object::Subclass pragmatic module or by directly calling the Glib::Type::register_object function). The new subclass can customize the behaviour by providing a new implementation of the following method:
- ALPHA_NOTIFY ($behaviour, $alpha_value)
-
-
- o $behaviour (Clutter::Behaviour)
- o $alpha_value (integer) The value computed by the alpha function
This is called each time the value of the alpha function held by the Clutter::Alpha object bound to the behaviour changes. You should update the property, or the properties, of the actors your behaviour controls using alpha_value, scaled accordingly.
-
SEE ALSO
Clutter, Glib::ObjectCOPYRIGHT
Copyright (C) 2006 OpenedHand Ltd.This module is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public Library version 2.1, or under the terms of the Artistic License. See Clutter for the full copyright notice.
POD ERRORS
Hey! The above document had some coding errors, which are explained below:- Around line 186:
- You forgot a '=back' before '=head1'
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre