VisuAnimatable

VisuAnimatable — an interface defining object with animatable properties.

Functions

Signals

Types and Values

Object Hierarchy

    GInterface
    ╰── VisuAnimatable

Prerequisites

VisuAnimatable requires GObject.

Known Implementations

VisuAnimatable is implemented by VisuGlView, VisuPlane, VisuPlaneSet and VisuVibration.

Description

An object with properties that can be animated whould implement this interface.

Functions

visu_animatable_getAnimation ()

VisuAnimation *
visu_animatable_getAnimation (const VisuAnimatable *animatable,
                              const gchar *prop);

A method to retrieve the VisuAnimation from animatable given the property name prop .

Parameters

animatable

a VisuAnimatable object.

 

prop

a property name.

 

Returns

a VisuAnimation object or NULL if none is associated to prop .

[transfer none]

Since: 3.8


visu_animatable_animate ()

gboolean
visu_animatable_animate (VisuAnimatable *animatable,
                         VisuAnimation *anim,
                         const GValue *to,
                         gulong duration,
                         gboolean loop,
                         VisuAnimationType type);

Animates anim from its current value to to . The animation is scheduled to last duration and will follow the evolution described by type . If loop is true, when the value of anim reaches to , it goes back to its current value and animates again to reach to . In that case, use visu_animation_abort() on anim to stop it.

Parameters

animatable

a VisuAnimatable object.

 

anim

a VisuAnimation object.

 

to

a destination value.

 

duration

a duration in milliseconds.

 

loop

a boolean.

 

type

a type.

 

Returns

TRUE if animation is started.

Since: 3.8


visu_animatable_animateFloat ()

gboolean
visu_animatable_animateFloat (VisuAnimatable *animatable,
                              VisuAnimation *anim,
                              float to,
                              gulong duration,
                              gboolean loop,
                              VisuAnimationType type);

Like visu_animatable_animate() for a float destination value.

Parameters

animatable

a VisuAnimatable object.

 

anim

a VisuAnimation object.

 

to

a destination value.

 

duration

a duration in milliseconds.

 

loop

a boolean.

 

type

a type.

 

Returns

TRUE if animation is started.

Since: 3.8


visu_animatable_animateFloatByName ()

gboolean
visu_animatable_animateFloatByName (VisuAnimatable *animatable,
                                    const gchar *prop,
                                    float to,
                                    gulong duration,
                                    gboolean loop,
                                    VisuAnimationType type);

Like visu_animatable_animate() for a float destination value.

Parameters

animatable

a VisuAnimatable object.

 

prop

a property name from animatable .

 

to

a destination value.

 

duration

a duration in milliseconds.

 

loop

a boolean.

 

type

a type.

 

Returns

TRUE if animation is started.

Since: 3.8


visu_animatable_animateDouble ()

gboolean
visu_animatable_animateDouble (VisuAnimatable *animatable,
                               VisuAnimation *anim,
                               double to,
                               gulong duration,
                               gboolean loop,
                               VisuAnimationType type);

Like visu_animatable_animate() for a double destination value.

Parameters

animatable

a VisuAnimatable object.

 

anim

a VisuAnimation object.

 

to

a destination value.

 

duration

a duration in milliseconds.

 

loop

a boolean.

 

type

a type.

 

Returns

TRUE if animation is started.

Since: 3.8


visu_animatable_animateDoubleByName ()

gboolean
visu_animatable_animateDoubleByName (VisuAnimatable *animatable,
                                     const gchar *prop,
                                     double to,
                                     gulong duration,
                                     gboolean loop,
                                     VisuAnimationType type);

Like visu_animatable_animate() for a double destination value.

Parameters

animatable

a VisuAnimatable object.

 

prop

a property name from animatable .

 

to

a destination value.

 

duration

a duration in milliseconds.

 

loop

a boolean.

 

type

a type.

 

Returns

TRUE if animation is started.

Since: 3.8

Types and Values

struct VisuAnimatableInterface

struct VisuAnimatableInterface {
  GTypeInterface parent;

  VisuAnimation* (*get_animation)(const VisuAnimatable *self, const gchar *prop);
};

The different routines common to objects implementing a VisuAnimatable interface.

Members

GTypeInterface parent;

its parent.

 

get_animation ()

a method retrieve the VisuAnimation object of the given property.

 

Since: 3.8


VisuAnimatable

typedef struct _VisuAnimatable VisuAnimatable;

Interface object.

Since: 3.8

Signal Details

The “animate” signal

gboolean
user_function (VisuAnimatable *self,
               VisuAnimation  *animation,
               GValue         *value,
               gulong          at,
               gboolean        loop,
               guint           type,
               gpointer        user_data)

This signal is emitted when properties start an animation.

Parameters

self

the object emitting the signal.

 

animation

the object emitting the signal.

 

value

the target value.

 

at

the current tick time.

 

loop

if animation should loop.

 

type

the animation type.

 

user_data

user data set when the signal handler was connected.

 

Returns

TRUE if animation is successfully started.

Flags: No Hooks

Since: 3.8