Callbacks¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- Clutter.ActorCreateChildFunc(item, *user_data)¶
- Parameters:
item (
GObject.Object
) – the item in the modeluser_data (
object
orNone
) – Data passed toClutter.Actor.bind_model
()
- Returns:
The newly created child
Clutter.Actor
- Return type:
Creates a
Clutter.Actor
using the item in the model.The usual way to implement this function is to create a
Clutter.Actor
instance and then bind theGObject.Object
properties to the actor properties of interest, usingGObject.Object.bind_property
(). This way, when the item in theGio.ListModel
changes, theClutter.Actor
changes as well.New in version 1.24.
- Clutter.AlphaFunc(alpha, *user_data)¶
- Parameters:
alpha (
Clutter.Alpha
) – aClutter.Alpha
user_data (
object
orNone
) – user data passed to the function
- Returns:
a floating point value
- Return type:
A function returning a value depending on the position of the
Clutter.Timeline
bound to alpha.New in version 0.2.
Deprecated since version 1.12: Use
Clutter.TimelineProgressFunc
instead.
- Clutter.BehaviourForeachFunc(behaviour, actor, *data)¶
- Parameters:
behaviour (
Clutter.Behaviour
) – theClutter.Behaviour
actor (
Clutter.Actor
) – an actor driven by behaviourdata (
object
orNone
) – optional data passed to the function
This function is passed to
Clutter.Behaviour.actors_foreach
() and will be called for each actor driven by behaviour.New in version 0.2.
Deprecated since version 1.6.
- Clutter.BindingActionFunc(gobject, action_name, key_val, modifiers, *user_data)¶
- Parameters:
gobject (
GObject.Object
) – aGObject.Object
action_name (
str
) – the name of the actionkey_val (
int
) – the key symbolmodifiers (
Clutter.ModifierType
) – bitmask of the modifier flags
- Returns:
the function should return
True
if the key binding has been handled, and returnFalse
otherwise- Return type:
The prototype for the callback function registered with
Clutter.BindingPool.install_action
() and invoked byClutter.BindingPool.activate
().New in version 1.0.
- Clutter.Callback(actor, *data)¶
- Parameters:
actor (
Clutter.Actor
) – aClutter.Actor
Generic callback
- Clutter.EventFilterFunc(event, *user_data)¶
- Parameters:
event (
Clutter.Event
) – the event that is going to be emitteduser_data (
object
orNone
) – the data pointer passed toClutter.Event.add_filter
()
- Returns:
Clutter.EVENT_STOP
to indicate that the event has been handled orClutter.EVENT_PROPAGATE
otherwise. ReturningClutter.EVENT_STOP
skips any further filter functions and prevents the signal emission for the event.- Return type:
A function pointer type used by event filters that are added with
Clutter.Event.add_filter
().New in version 1.18.
- Clutter.ModelFilterFunc(model, iter, *user_data)¶
- Parameters:
model (
Clutter.Model
) – aClutter.Model
iter (
Clutter.ModelIter
) – the iterator for the rowuser_data (
object
orNone
) – data passed toClutter.Model.set_filter
()
- Returns:
If the row should be displayed, return
True
- Return type:
Filters the content of a row in the model.
New in version 0.6.
Deprecated since version 1.24: Implement filters using a custom
Gio.ListModel
instead
- Clutter.ModelForeachFunc(model, iter, *user_data)¶
- Parameters:
model (
Clutter.Model
) – aClutter.Model
iter (
Clutter.ModelIter
) – the iterator for the rowuser_data (
object
orNone
) – data passed toClutter.Model.foreach
()
- Returns:
- Return type:
Iterates on the content of a row in the model
New in version 0.6.
Deprecated since version 1.24: Use
Gio.ListModel
- Clutter.ModelSortFunc(model, a, b, *user_data)¶
- Parameters:
model (
Clutter.Model
) – aClutter.Model
a (
GObject.Value
) – aGObject.Value
representing the contents of the rowb (
GObject.Value
) – aGObject.Value
representing the contents of the second rowuser_data (
object
orNone
) – data passed toClutter.Model.set_sort
()
- Returns:
a positive integer if a is after b, a negative integer if a is before b, or 0 if the rows are the same
- Return type:
Compares the content of two rows in the model.
New in version 0.6.
Deprecated since version 1.24: Implement sorting using a custom
Gio.ListModel
instead
- Clutter.PathCallback(node, *data)¶
- Parameters:
node (
Clutter.PathNode
) – the nodedata (
object
orNone
) – optional data passed to the function
This function is passed to
Clutter.Path.foreach
() and will be called for each node contained in the path.New in version 1.0.
- Clutter.ProgressFunc(a, b, progress, retval)¶
- Parameters:
a (
GObject.Value
) – the initial value of an intervalb (
GObject.Value
) – the final value of an intervalprogress (
float
) – the progress factor, between 0 and 1retval (
GObject.Value
) – the value used to store the progress
- Returns:
True
if the function successfully computed the value and stored it inside retval- Return type:
Prototype of the progress function used to compute the value between the two ends a and b of an interval depending on the value of progress.
The
GObject.Value
in retval is already initialized with the same type as a and b.This function will be called by
Clutter.Interval
if the type of the values of the interval was registered using clutter_interval_register_progress_func().New in version 1.0.
- Clutter.ScriptConnectFunc(script, object, signal_name, handler_name, connect_object, flags, *user_data)¶
- Parameters:
script (
Clutter.Script
) – aClutter.Script
object (
GObject.Object
) – the object to connectsignal_name (
str
) – the name of the signalhandler_name (
str
) – the name of the signal handlerconnect_object (
GObject.Object
) – the object to connect the signal to, orNone
flags (
GObject.ConnectFlags
) – signal connection flagsuser_data (
object
orNone
) – user data to pass to the signal handler
This is the signature of a function used to connect signals. It is used by the
Clutter.Script.connect_signals_full
() function. It is mainly intended for interpreted language bindings, but could be useful where the programmer wants more control over the signal connection process.New in version 0.6.
- Clutter.TimelineProgressFunc(timeline, elapsed, total, *user_data)¶
- Parameters:
timeline (
Clutter.Timeline
) – aClutter.Timeline
elapsed (
float
) – the elapsed time, in millisecondstotal (
float
) – the total duration of the timeline, in milliseconds,
- Returns:
the progress, as a floating point value between -1.0 and 2.0.
- Return type:
A function for defining a custom progress.
New in version 1.10.