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 (
objectorNone) – 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_foreachas it avoids alot of needless allocations.New in version 0.2.
Deprecated since version 1.6.
- get_alpha()¶
- Returns:
a
Clutter.Alphaobject, orNoneif no alpha object has been bound to this behaviour.- Return type:
Retrieves the
Clutter.Alphaobject 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
Noneif 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.Actors 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.AlphaorNoneto unset a previously set alpha
Binds alpha to a
Clutter.Behaviour. TheClutter.Alphaobject is what makes a behaviour work: for each tick of the timeline used byClutter.Alphaa new value of the alpha parameter is computed by the alpha function; the value should be used by theClutter.Behaviourto update one or more properties of the actors to which the behaviour applies.If alpha is not
None, theClutter.Behaviourwill take ownership of theClutter.Alphainstance.New in version 0.2.
Deprecated since version 1.6.
- do_alpha_notify(alpha_value) virtual¶
- Parameters:
alpha_value (
float) –
virtual function, called each time the
Clutter.Alphacomputes a new alpha value; the actors to which the behaviour applies should be changed in this function. Every subclass ofClutter.Behaviourmust implement this virtual function
- do_applied(actor) virtual¶
- Parameters:
actor (
Clutter.Actor) –
signal class handler for the
Clutter.Behaviour::appliedsignal
- do_removed(actor) virtual¶
- Parameters:
actor (
Clutter.Actor) –
signal class handler for the
Clutter.Behaviour::removedsignal
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
::applysignal 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
::removedsignal 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.Alphaobject used to drive this behaviour. AClutter.Alphaobject binds aClutter.Timelineand 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.