Clutter.Behaviour¶
Subclasses: | Clutter.BehaviourDepth , Clutter.BehaviourEllipse , Clutter.BehaviourOpacity , Clutter.BehaviourPath , Clutter.BehaviourRotate , Clutter.BehaviourScale |
---|
Methods¶
Inherited: | GObject.Object (37), Clutter.Scriptable (4) |
---|---|
Structs: | GObject.ObjectClass (5) |
actors_foreach (func, *data) |
|
apply (actor) |
|
get_actors () |
|
get_alpha () |
|
get_n_actors () |
|
get_nth_actor (index_) |
|
is_applied (actor) |
|
remove (actor) |
|
remove_all () |
|
set_alpha (alpha) |
Virtual Methods¶
Inherited: | GObject.Object (7), Clutter.Scriptable (4) |
---|
do_alpha_notify (alpha_value) |
|
do_applied (actor) |
|
do_removed (actor) |
Properties¶
Name | Type | Flags | Short Description |
---|---|---|---|
alpha |
Clutter.Alpha |
r/w | Alpha Object to drive the behaviour deprecated |
Signals¶
Inherited: | GObject.Object (1) |
---|
Name | Short Description |
---|---|
applied |
The ::apply signal is emitted each time the behaviour is applied to an actor. deprecated |
removed |
The ::removed signal is emitted each time a behaviour is not applied to an actor anymore. deprecated |
Class Details¶
-
class
Clutter.
Behaviour
(**kwargs)¶ Bases: GObject.Object
,Clutter.Scriptable
Abstract: Yes Structure: Clutter.BehaviourClass
Clutter.Behaviour
-struct contains only private data and should be accessed with the functions below.New in version 0.2.
Deprecated since version 1.6.
-
actors_foreach
(func, *data)¶ Parameters: - func (
Clutter.BehaviourForeachFunc
) – a function called for each actor - data (
object
orNone
) – optional data to be passed to the function, orNone
Calls func for every actor driven by self.
New in version 0.2.
Deprecated since version 1.6.
- func (
-
apply
(actor)¶ Parameters: actor ( Clutter.Actor
) – aClutter.Actor
Applies self to actor. This function adds a reference on the actor.
New in version 0.2.
Deprecated since version 1.6.
-
get_actors
()¶ Returns: a list of actors. You should free the returned list with g_slist_free() when finished using it. Return type: [ Clutter.Actor
]Retrieves all the actors to which self applies. It is not recommended for derived classes to use this in there alpha notify method but use
Clutter.Behaviour.actors_foreach
as it avoids alot of needless allocations.New in version 0.2.
Deprecated since version 1.6.
-
get_alpha
()¶ Returns: a Clutter.Alpha
object, orNone
if no alpha object has been bound to this behaviour.Return type: Clutter.Alpha
Retrieves the
Clutter.Alpha
object bound to self.New in version 0.2.
Deprecated since version 1.6.
-
get_n_actors
()¶ Returns: The number of applied actors Return type: int
Gets the number of actors this behaviour is applied too.
New in version 0.2.
Deprecated since version 1.6.
-
get_nth_actor
(index_)¶ Parameters: index ( int
) – the index of an actor this behaviour is applied too.Returns: A Clutter actor or None
if index_ is invalid.Return type: Clutter.Actor
Gets an actor the behaviour was applied to referenced by index num.
New in version 0.2.
Deprecated since version 1.6.
-
is_applied
(actor)¶ Parameters: actor ( Clutter.Actor
) – aClutter.Actor
Returns: True
if actor has behaviour.False
otherwise.Return type: bool
Check if self applied to actor.
New in version 0.4.
Deprecated since version 1.6.
-
remove
(actor)¶ Parameters: actor ( Clutter.Actor
) – aClutter.Actor
Removes actor from the list of
Clutter.Actor
s to which self applies. This function removes a reference on the actor.New in version 0.2.
Deprecated since version 1.6.
-
remove_all
()¶ Removes every actor from the list that self holds.
New in version 0.4.
Deprecated since version 1.6.
-
set_alpha
(alpha)¶ Parameters: alpha ( Clutter.Alpha
) – aClutter.Alpha
orNone
to unset a previously set alphaBinds alpha to a
Clutter.Behaviour
. TheClutter.Alpha
object is what makes a behaviour work: for each tick of the timeline used byClutter.Alpha
a new value of the alpha parameter is computed by the alpha function; the value should be used by theClutter.Behaviour
to update one or more properties of the actors to which the behaviour applies.If alpha is not
None
, theClutter.Behaviour
will take ownership of theClutter.Alpha
instance.New in version 0.2.
Deprecated since version 1.6.
-
do_applied
(actor) virtual¶ Parameters: actor ( Clutter.Actor
) –
-
do_removed
(actor) virtual¶ Parameters: actor ( Clutter.Actor
) –
-
Signal Details¶
-
Clutter.Behaviour.signals.
applied
(behaviour, actor)¶ Signal Name: applied
Flags: Parameters: - behaviour (
Clutter.Behaviour
) – The object which received the signal - actor (
Clutter.Actor
) – the actor the behaviour was applied to.
The
::apply
signal is emitted each time the behaviour is applied to an actor.New in version 0.4.
Deprecated since version 1.6.
- behaviour (
-
Clutter.Behaviour.signals.
removed
(behaviour, actor)¶ Signal Name: removed
Flags: Parameters: - behaviour (
Clutter.Behaviour
) – The object which received the signal - actor (
Clutter.Actor
) – the removed actor
The
::removed
signal is emitted each time a behaviour is not applied to an actor anymore.New in version 0.4.
Deprecated since version 1.6.
- behaviour (
Property Details¶
-
Clutter.Behaviour.props.
alpha
¶ Name: alpha
Type: Clutter.Alpha
Default Value: None
Flags: READABLE
,WRITABLE
The
Clutter.Alpha
object used to drive this behaviour. AClutter.Alpha
object binds aClutter.Timeline
and a function which computes a value (the “alpha”) depending on the time. Each time the alpha value changes the alpha-notify virtual function is called.New in version 0.2.
Deprecated since version 1.6.