Virtual Method

PhocAnimatableadd_frame_callback

Declaration [src]

guint
add_frame_callback (
  PhocAnimatable* self,
  PhocFrameCallback callback,
  gpointer user_data,
  GDestroyNotify notify
)

Description [src]

Adds a callback to be called before each frame. Until the frame callback is removed, it will be at the frame rate of the output. The frame callback does not automatically imply any repaint. You need to damage the areas you want repainted.

Parameters

callback

Type: PhocFrameCallback

The frame callback to add.

user_data

Type: gpointer

User data to pass to the callback.

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

Type: GDestroyNotify

How to free the user data.

Return value

Type: guint

An id for the connection of this callback. Suitable to pass to phoc_animatable_remove_frame_callback() or 0 if the callback can’t be attached for some reason.