Clutter.Behaviour¶
- Subclasses:
Clutter.BehaviourDepth
,Clutter.BehaviourEllipse
,Clutter.BehaviourOpacity
,Clutter.BehaviourPath
,Clutter.BehaviourRotate
,Clutter.BehaviourScale
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Alpha Object to drive the behaviour |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
The |
|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Clutter.Behaviour(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
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 actordata (
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.
- 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:
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:
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:
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:
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:
- Return type:
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 alpha
Binds 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 signalactor (
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.
- Clutter.Behaviour.signals.removed(behaviour, actor)¶
- Signal Name:
removed
- Flags:
- Parameters:
behaviour (
Clutter.Behaviour
) – The object which received the signalactor (
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.
Property Details¶
- Clutter.Behaviour.props.alpha¶
- Name:
alpha
- Type:
- Default Value:
- Flags:
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.