Method

ClutterActorbind_model

Declaration [src]

void
clutter_actor_bind_model (
  ClutterActor* self,
  GListModel* model,
  ClutterActorCreateChildFunc create_child_func,
  gpointer user_data,
  GDestroyNotify notify
)

Description [src]

Binds a GListModel to a ClutterActor.

If the ClutterActor was already bound to a GListModel, the previous binding is destroyed.

The existing children of ClutterActor are destroyed when setting a model, and new children are created and added, representing the contents of the model. The ClutterActor is updated whenever the model changes. If model is NULL, the ClutterActor is left empty.

When a ClutterActor is bound to a model, adding and removing children directly is undefined behaviour.4.

Parameters

model

Type: GObject

A GListModel.

The argument can be NULL.
The data is owned by the caller of the method.
create_child_func

Type: ClutterActorCreateChildFunc

A function that creates ClutterActor instances from the contents of the model.

user_data

Type: gpointer

User data passed to create_child_func.

The argument can be NULL.
The data is owned by the caller of the method.
notify

Type: GDestroyNotify

Function called when unsetting the model.