Phoc.Animatable.add_frame_callback
Description: Reference for Phoc.Animatable.add_frame_callback

### Virtual Method

# Phoc Animatableadd_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 method.

`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.