ClutterTimeline

ClutterTimeline — A base class for managing time based events such as animations.

Synopsis




typedef     ClutterTimelinePrivate;
            ClutterTimeline;
ClutterTimeline* clutter_timeline_new       (guint nframes,
                                             guint fps);
void        clutter_timeline_set_speed      (ClutterTimeline *timeline,
                                             guint fps);
void        clutter_timeline_start          (ClutterTimeline *timeline);
void        clutter_timeline_pause          (ClutterTimeline *timeline);
void        clutter_timeline_stop           (ClutterTimeline *timeline);
void        clutter_timeline_set_loop       (ClutterTimeline *timeline,
                                             gboolean loop);
void        clutter_timeline_rewind         (ClutterTimeline *timeline);
void        clutter_timeline_skip           (ClutterTimeline *timeline,
                                             guint nframes);
void        clutter_timeline_advance        (ClutterTimeline *timeline,
                                             guint frame_num);
gint        clutter_timeline_get_current_frame
                                            (ClutterTimeline *timeline);
guint       clutter_timeline_get_n_frames   (ClutterTimeline *timeline);
gboolean    clutter_timeline_is_playing     (ClutterTimeline *timeline);

Object Hierarchy


  GObject
   +----ClutterTimeline

Properties


  "fps"                  gint                  : Read / Write / Construct
  "loop"                 gboolean              : Read / Write / Construct
  "num-frames"           gint                  : Read / Write / Construct Only

Signals


"completed" void        user_function      (ClutterTimeline *cluttertimeline,
                                            gpointer         user_data)            : Run last
"new-frame" void        user_function      (ClutterTimeline *cluttertimeline,
                                            gint             arg1,
                                            gpointer         user_data)            : Run last

Description

ClutterTimeline is a base class for managing time based events such as animations.

Details

ClutterTimelinePrivate

typedef struct ClutterTimelinePrivate ClutterTimelinePrivate;


ClutterTimeline

typedef struct _ClutterTimeline ClutterTimeline;


clutter_timeline_new ()

ClutterTimeline* clutter_timeline_new       (guint nframes,
                                             guint fps);

Create a new ClutterTimeline instance.

nframes : ClutterTimeline number of frames
fps : ClutterTimeline frames per second
Returns : a new ClutterTimeline

clutter_timeline_set_speed ()

void        clutter_timeline_set_speed      (ClutterTimeline *timeline,
                                             guint fps);

timeline :
fps :

clutter_timeline_start ()

void        clutter_timeline_start          (ClutterTimeline *timeline);

Starts the ClutterTimeline playing.

timeline : A ClutterTimeline

clutter_timeline_pause ()

void        clutter_timeline_pause          (ClutterTimeline *timeline);

Pauses the ClutterTimeline on current frame

timeline : A ClutterTimeline

clutter_timeline_stop ()

void        clutter_timeline_stop           (ClutterTimeline *timeline);

Stops the ClutterTimeline and moves to frame 0

timeline : A ClutterTimeline

clutter_timeline_set_loop ()

void        clutter_timeline_set_loop       (ClutterTimeline *timeline,
                                             gboolean loop);

timeline :
loop :

clutter_timeline_rewind ()

void        clutter_timeline_rewind         (ClutterTimeline *timeline);

Rewinds ClutterTimeline to frame 0.

timeline : A ClutterTimeline

clutter_timeline_skip ()

void        clutter_timeline_skip           (ClutterTimeline *timeline,
                                             guint nframes);

timeline :
nframes :

clutter_timeline_advance ()

void        clutter_timeline_advance        (ClutterTimeline *timeline,
                                             guint frame_num);

Advance timeline to requested frame number

timeline : A ClutterTimeline
frame_num : Frame number to advance to

clutter_timeline_get_current_frame ()

gint        clutter_timeline_get_current_frame
                                            (ClutterTimeline *timeline);

Set the speed in frames per second of the timeline.

timeline : A ClutterTimeline
Returns :

clutter_timeline_get_n_frames ()

guint       clutter_timeline_get_n_frames   (ClutterTimeline *timeline);

Request the totle number of frames for the ClutterTimeline.

timeline : A ClutterTimeline
Returns : Number of frames for this ClutterTimeline.

clutter_timeline_is_playing ()

gboolean    clutter_timeline_is_playing     (ClutterTimeline *timeline);

Query state of a ClutterTimeline instance.

timeline : A ClutterTimeline
Returns : TRUE if timeline is currently playing, FALSE if not.

Property Details

The "fps" property

  "fps"                  gint                  : Read / Write / Construct

Timeline frames per second.

Allowed values: [0,1000]

Default value: 50


The "loop" property

  "loop"                 gboolean              : Read / Write / Construct

Should the timeline automatically restart.

Default value: FALSE


The "num-frames" property

  "num-frames"           gint                  : Read / Write / Construct Only

Timelines total number of frames.

Allowed values: >= 0

Default value: 0

Signal Details

The "completed" signal

void        user_function                  (ClutterTimeline *cluttertimeline,
                                            gpointer         user_data)            : Run last

cluttertimeline : the object which received the signal.
user_data : user data set when the signal handler was connected.

The "new-frame" signal

void        user_function                  (ClutterTimeline *cluttertimeline,
                                            gint             arg1,
                                            gpointer         user_data)            : Run last

cluttertimeline : the object which received the signal.
arg1 :
user_data : user data set when the signal handler was connected.