dzl-animation: Dazzle Reference Manual

## dzl-animation dzl-animation |

## Functions

void | dzl_animation_start ()
void | dzl_animation_stop ()
void | dzl_animation_add_property ()
DzlAnimation * | dzl_object_animatev ()
DzlAnimation * | dzl_object_animate ()
DzlAnimation * | dzl_object_animate_full ()
guint | dzl_animation_calculate_duration ()

## Properties

guint | duration | Write / Construct Only
GdkFrameClock * | frame-clock | Write / Construct Only
DzlAnimationMode | mode | Write / Construct Only
GObject * | target | Write / Construct Only

## Signals

void | tick | Run First

## Types and Values

#define | DZL_TYPE_ANIMATION
| DzlAnimation

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── DzlAnimation

## Description

## Functions

### dzl_animation_start ()

    void
    dzl_animation_start (DzlAnimation *animation);

Start the animation. When the animation stops, the internal reference will be dropped and the animation may be finalized.

Side effects: None.

#### Parameters

animation | A DzlAnimation. | [in]

### dzl_animation_stop ()

    void
    dzl_animation_stop (DzlAnimation *animation);

Stops a running animation. The internal reference to the animation is dropped and therefore may cause the object to finalize.

As a convenience, this function accepts `NULL` for `animation` but does nothing if that should occur.

#### Parameters

animation | A DzlAnimation. | [nullable]

### dzl_animation_add_property ()

    void
    dzl_animation_add_property (DzlAnimation *animation,
                                GParamSpec *pspec,
                                const GValue *value);

Adds a new property to the set of properties to be animated during the lifetime of the animation.

Side effects: None.

#### Parameters

animation | A DzlAnimation. | [in]
pspec | A ParamSpec of `target` or a GtkWidget's parent. | [in]
value | The new value for the property at the end of the animation. | [in]

### dzl_object_animatev ()

    DzlAnimation *
    dzl_object_animatev (gpointer object,
                         DzlAnimationMode mode,
                         guint duration_msec,
                         GdkFrameClock *frame_clock,
                         const gchar *first_property,
                         va_list args);

#### Parameters

object | A GObject. |
mode | The animation mode. |
duration_msec | The duration in milliseconds. |
frame_clock | The GdkFrameClock to synchronize to. | [nullable]
first_property | The first property to animate. |
args | A variadac list of arguments |

#### Returns

A DzlAnimation.

[transfer none]

### dzl_object_animate ()

    DzlAnimation *
    dzl_object_animate (gpointer object,
                        DzlAnimationMode mode,
                        guint duration_msec,
                        GdkFrameClock *frame_clock,
                        const gchar *first_property,
                        ...);

Animates the properties of `object` . The can be set in a similar manner to `g_object_set()`. They will be animated from their current value to the target value over the time period.

#### Parameters

object | A GObject. | [in]
mode | The animation mode. | [in]
duration_msec | The duration in milliseconds. | [in]
first_property | The first property to animate. | [in]

#### Returns

A DzlAnimation. Side effects: None.

[transfer none]

### dzl_object_animate_full ()

    DzlAnimation *
    dzl_object_animate_full (gpointer object,
                             DzlAnimationMode mode,
                             guint duration_msec,
                             GdkFrameClock *frame_clock,
                             GDestroyNotify notify,
                             gpointer notify_data,
                             const gchar *first_property,
                             ...);

#### Returns

A DzlAnimation.

[transfer none]

### dzl_animation_calculate_duration ()

    guint
    dzl_animation_calculate_duration (GdkMonitor *monitor,
                                      gdouble from_value,
                                      gdouble to_value);

## Types and Values

### DZL_TYPE_ANIMATION

    #define DZL_TYPE_ANIMATION      (dzl_animation_get_type())

### DzlAnimation

    typedef struct _DzlAnimation DzlAnimation;

## Property Details

### The `“duration”` property

      “duration”                 guint

The "duration" property is the total number of milliseconds that the animation should run before being completed.

Owner: DzlAnimation

Flags: Write / Construct Only

Default value: 250

### The `“frame-clock”` property

      “frame-clock”              GdkFrameClock *

An optional frame-clock to synchronize with.

Owner: DzlAnimation

Flags: Write / Construct Only

### The `“mode”` property

      “mode”                     DzlAnimationMode

The "mode" property is the Alpha function that should be used to determine the offset within the animation based on the current offset in the animations duration.

Owner: DzlAnimation

Flags: Write / Construct Only

Default value: DZL_ANIMATION_LINEAR

### The `“target”` property

      “target”                   GObject *

The "target" property is the GObject that should have its properties animated.

Owner: DzlAnimation

Flags: Write / Construct Only

## Signal Details

### The `“tick”` signal

    void
    user_function (DzlAnimation *dzlanimation,
                   gpointer      user_data)

The "tick" signal is emitted on each frame in the animation.

#### Parameters

user_data | user data set when the signal handler was connected. |

Flags: Run First