DzlFrameSource: Dazzle Reference Manual

## DzlFrameSource DzlFrameSource — a frame source for objects without frame clocks |

## Functions

guint | dzl_frame_source_add ()
guint | dzl_frame_source_add_full ()

## Description

If you are working with something that is not a GtkWidget, getting access to a frame-clock is sometimes not possible. This can be used as a suitable fallback that approximates a frame-rate.

If you have access to a GdkFrameClock, in most cases you'll want that instead of using this.

## Functions

### dzl_frame_source_add ()

    guint
    dzl_frame_source_add (guint frames_per_sec,
                          GSourceFunc callback,
                          gpointer user_data);

Creates a new frame source that will execute when the timeout interval for the source has elapsed. The timing will try to synchronize based on the end time of the animation.

#### Parameters

frames_per_sec | Target frames per second. | [in]
callback | A GSourceFunc to execute. | [in][scope notified]
user_data | User data for `callback` . | [in]

#### Returns

A source id that can be removed with `g_source_remove()`.

### dzl_frame_source_add_full ()

    guint
    dzl_frame_source_add_full (gint priority,
                               guint frames_per_sec,
                               GSourceFunc callback,
                               gpointer user_data,
                               GDestroyNotify notify);

## Types and Values