Callbacks

  ActorCreateChildFunc (item, *user_data)
  AlphaFunc (alpha, *user_data)
  BehaviourForeachFunc (behaviour, actor, *data)
  BindingActionFunc (gobject, action_name, key_val, modifiers, *user_data)
  Callback (actor, *data)
  EventFilterFunc (event, *user_data)
  ModelFilterFunc (model, iter, *user_data)
  ModelForeachFunc (model, iter, *user_data)
  ModelSortFunc (model, a, b, *user_data)
  PathCallback (node, *data)
  ProgressFunc (a, b, progress, retval)
  ScriptConnectFunc (script, object, signal_name, handler_name, connect_object, flags, *user_data)
  TimelineProgressFunc (timeline, elapsed, total, *user_data)

Details

Clutter.ActorCreateChildFunc(item, *user_data)
Parameters:
Returns:

The newly created child Clutter.Actor

Return type:

Clutter.Actor

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 the GObject.Object properties to the actor properties of interest, using GObject.Object.bind_property(). This way, when the item in the Gio.ListModel changes, the Clutter.Actor changes as well.

New in version 1.24.

Clutter.AlphaFunc(alpha, *user_data)
Parameters:
Returns:

a floating point value

Return type:

float

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:

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:
Returns:

the function should return True if the key binding has been handled, and return False otherwise

Return type:

bool

The prototype for the callback function registered with Clutter.BindingPool.install_action() and invoked by Clutter.BindingPool.activate().

New in version 1.0.

Clutter.Callback(actor, *data)
Parameters:

Generic callback

Clutter.EventFilterFunc(event, *user_data)
Parameters:
Returns:

Clutter.EVENT_STOP to indicate that the event has been handled or Clutter.EVENT_PROPAGATE otherwise. Returning Clutter.EVENT_STOP skips any further filter functions and prevents the signal emission for the event.

Return type:

bool

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:
Returns:

If the row should be displayed, return True

Return type:

bool

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:
Returns:

True if the iteration should continue, False otherwise

Return type:

bool

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:
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:

int

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:

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 interval
  • b (GObject.Value) – the final value of an interval
  • progress (float) – the progress factor, between 0 and 1
  • retval (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:

bool

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:

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:
Returns:

the progress, as a floating point value between -1.0 and 2.0.

Return type:

float

A function for defining a custom progress.

New in version 1.10.