
@c %start of fragment

@deffn Function clutter-timeline-new  (msecs@tie{}@code{unsigned-int}) @result{}@tie{} (ret@tie{}@code{<clutter-timeline>})
Creates a new @code{<clutter-timeline>} with a duration of @var{msecs}.

@table @var
@item msecs
Duration of the timeline in milliseconds

@item ret
the newly created @code{<clutter-timeline>} instance. Use
@code{g-object-unref} when done using it

@end table

Since 0.6

@end deffn

@deffn Function clutter-timeline-set-duration  (self@tie{}@code{<clutter-timeline>}) (msecs@tie{}@code{unsigned-int})
@deffnx Method set-duration
Sets the duration of the timeline, in milliseconds. The speed of the
timeline depends on the ClutterTimeline:fps setting.

@table @var
@item timeline
a @code{<clutter-timeline>}

@item msecs
duration of the timeline in milliseconds

@end table

Since 0.6

@end deffn

@deffn Function clutter-timeline-get-duration  (self@tie{}@code{<clutter-timeline>}) @result{}@tie{} (ret@tie{}@code{unsigned-int})
@deffnx Method get-duration
Retrieves the duration of a @code{<clutter-timeline>} in milliseconds.
See @code{clutter-timeline-set-duration}.

@table @var
@item timeline
a @code{<clutter-timeline>}

@item ret
the duration of the timeline, in milliseconds.

@end table

Since 0.6

@end deffn

@deffn Function clutter-timeline-set-repeat-count  (self@tie{}@code{<clutter-timeline>}) (count@tie{}@code{int})
@deffnx Method set-repeat-count
Sets the number of times the @var{timeline} should repeat.

If @var{count} is 0, the timeline never repeats.

If @var{count} is -1, the timeline will always repeat until it's
stopped.

@table @var
@item timeline
a @code{<clutter-timeline>}

@item count
the number of times the timeline should repeat

@end table

Since 1.10

@end deffn

@deffn Function clutter-timeline-get-repeat-count  (self@tie{}@code{<clutter-timeline>}) @result{}@tie{} (ret@tie{}@code{int})
@deffnx Method get-repeat-count
Retrieves the number set using @code{clutter-timeline-set-repeat-count}.

@table @var
@item timeline
a @code{<clutter-timeline>}

@item ret
the number of repeats

@end table

Since 1.10

@end deffn

@deffn Function clutter-timeline-set-delay  (self@tie{}@code{<clutter-timeline>}) (msecs@tie{}@code{unsigned-int})
@deffnx Method set-delay
Sets the delay, in milliseconds, before @var{timeline} should start.

@table @var
@item timeline
a @code{<clutter-timeline>}

@item msecs
delay in milliseconds

@end table

Since 0.4

@end deffn

@deffn Function clutter-timeline-get-delay  (self@tie{}@code{<clutter-timeline>}) @result{}@tie{} (ret@tie{}@code{unsigned-int})
@deffnx Method get-delay
Retrieves the delay set using @code{clutter-timeline-set-delay}.

@table @var
@item timeline
a @code{<clutter-timeline>}

@item ret
the delay in milliseconds.

@end table

Since 0.4

@end deffn

@deffn Function clutter-timeline-set-direction  (self@tie{}@code{<clutter-timeline>}) (direction@tie{}@code{<clutter-timeline-direction>})
@deffnx Method set-direction
Sets the direction of @var{timeline}, either
@samp{CLUTTER_TIMELINE_FORWARD} or @samp{CLUTTER_TIMELINE_BACKWARD}.

@table @var
@item timeline
a @code{<clutter-timeline>}

@item direction
the direction of the timeline

@end table

Since 0.6

@end deffn

@deffn Function clutter-timeline-get-direction  (self@tie{}@code{<clutter-timeline>}) @result{}@tie{} (ret@tie{}@code{<clutter-timeline-direction>})
@deffnx Method get-direction
Retrieves the direction of the timeline set with
@code{clutter-timeline-set-direction}.

@table @var
@item timeline
a @code{<clutter-timeline>}

@item ret
the direction of the timeline

@end table

Since 0.6

@end deffn

@deffn Function clutter-timeline-set-auto-reverse  (self@tie{}@code{<clutter-timeline>}) (reverse@tie{}@code{bool})
@deffnx Method set-auto-reverse
Sets whether @var{timeline} should reverse the direction after the
emission of the @code{<"completed">} signal.

Setting the @code{<"auto-reverse">} property to @samp{@code{#t}} is the
equivalent of connecting a callback to the @code{<"completed">} signal
and changing the direction of the timeline from that callback; for
instance, this code:

@example 

static void
reverse_timeline (ClutterTimeline *timeline)
@{
  ClutterTimelineDirection dir = clutter_timeline_get_direction (timeline);

  if (dir == CLUTTER_TIMELINE_FORWARD)
    dir = CLUTTER_TIMELINE_BACKWARD;
  else
    dir = CLUTTER_TIMELINE_FORWARD;

  clutter_timeline_set_direction (timeline, dir);
@}
...
  timeline = clutter_timeline_new (1000);
  clutter_timeline_set_repeat_count (timeline, -1);
  g_signal_connect (timeline, "completed",
                    G_CALLBACK (reverse_timeline),
                    NULL);
@end example

can be effectively replaced by:

@example 

  timeline = clutter_timeline_new (1000);
  clutter_timeline_set_repeat_count (timeline, -1);
  clutter_timeline_set_auto_reverse (timeline);
@end example

@table @var
@item timeline
a @code{<clutter-timeline>}

@item reverse
@samp{@code{#t}} if the @var{timeline} should reverse the direction

@end table

Since 1.6

@end deffn

@deffn Function clutter-timeline-get-auto-reverse  (self@tie{}@code{<clutter-timeline>}) @result{}@tie{} (ret@tie{}@code{bool})
@deffnx Method get-auto-reverse
Retrieves the value set by @code{clutter-timeline-set-auto-reverse}.

@table @var
@item timeline
a @code{<clutter-timeline>}

@item ret
@samp{@code{#t}} if the timeline should automatically reverse, and
@samp{@code{#f}} otherwise

@end table

Since 1.6

@end deffn

@deffn Function clutter-timeline-set-progress-mode  (self@tie{}@code{<clutter-timeline>}) (mode@tie{}@code{<clutter-animation-mode>})
@deffnx Method set-progress-mode
Sets the progress function using a value from the
@code{<clutter-animation-mode>} enumeration. The @var{mode} cannot be
@samp{CLUTTER_CUSTOM_MODE} or bigger than @samp{CLUTTER_ANIMATION_LAST}.

@table @var
@item timeline
a @code{<clutter-timeline>}

@item mode
the progress mode, as a @code{<clutter-animation-mode>}

@end table

Since 1.10

@end deffn

@deffn Function clutter-timeline-get-progress-mode  (self@tie{}@code{<clutter-timeline>}) @result{}@tie{} (ret@tie{}@code{<clutter-animation-mode>})
@deffnx Method get-progress-mode
Retrieves the progress mode set using
@code{clutter-timeline-set-progress-mode} or
@code{clutter-timeline-set-progress-func}.

@table @var
@item timeline
a @code{<clutter-timeline>}

@item ret
a @code{<clutter-animation-mode>}

@end table

Since 1.10

@end deffn

@deffn Function clutter-timeline-get-duration-hint  (self@tie{}@code{<clutter-timeline>}) @result{}@tie{} (ret@tie{}@code{int64})
@deffnx Method get-duration-hint
Retrieves the full duration of the @var{timeline}, taking into account
the current value of the @code{<"repeat-count">} property.

If the @code{<"repeat-count">} property is set to -1, this function will
return @samp{G_MAXINT64}.

The returned value is to be considered a hint, and it's only valid as
long as the @var{timeline} hasn't been changed.

@table @var
@item timeline
a @code{<clutter-timeline>}

@item ret
the full duration of the @code{<clutter-timeline>}

@end table

Since 1.10

@end deffn

@deffn Function clutter-timeline-get-current-repeat  (self@tie{}@code{<clutter-timeline>}) @result{}@tie{} (ret@tie{}@code{int})
@deffnx Method get-current-repeat
Retrieves the current repeat for a timeline.

Repeats start at 0.

@table @var
@item timeline
a @code{<clutter-timeline>}

@item ret
the current repeat

@end table

Since 1.10

@end deffn

@deffn Function clutter-timeline-start  (self@tie{}@code{<clutter-timeline>})
@deffnx Method start
Starts the @code{<clutter-timeline>} playing.

@table @var
@item timeline
A @code{<clutter-timeline>}

@end table

@end deffn

@deffn Function clutter-timeline-pause  (self@tie{}@code{<clutter-timeline>})
@deffnx Method pause
Pauses the @code{<clutter-timeline>} on current frame

@table @var
@item timeline
A @code{<clutter-timeline>}

@end table

@end deffn

@deffn Function clutter-timeline-stop  (self@tie{}@code{<clutter-timeline>})
@deffnx Method stop
Stops the @code{<clutter-timeline>} and moves to frame 0

@table @var
@item timeline
A @code{<clutter-timeline>}

@end table

@end deffn

@deffn Function clutter-timeline-rewind  (self@tie{}@code{<clutter-timeline>})
@deffnx Method rewind
Rewinds @code{<clutter-timeline>} to the first frame if its direction is
@samp{CLUTTER_TIMELINE_FORWARD} and the last frame if it is
@samp{CLUTTER_TIMELINE_BACKWARD}.

@table @var
@item timeline
A @code{<clutter-timeline>}

@end table

@end deffn

@deffn Function clutter-timeline-skip  (self@tie{}@code{<clutter-timeline>}) (msecs@tie{}@code{unsigned-int})
@deffnx Method skip
Advance timeline by the requested time in milliseconds

@table @var
@item timeline
A @code{<clutter-timeline>}

@item msecs
Amount of time to skip

@end table

@end deffn

@deffn Function clutter-timeline-advance  (self@tie{}@code{<clutter-timeline>}) (msecs@tie{}@code{unsigned-int})
@deffnx Method advance
Advance timeline to the requested point. The point is given as a time in
milliseconds since the timeline started.

The @var{timeline} will not emit the @code{<"new-frame">} signal for the
given time. The first ::new-frame signal after the call to
@code{clutter-timeline-advance} will be emit the skipped markers.

@table @var
@item timeline
A @code{<clutter-timeline>}

@item msecs
Time to advance to

@end table

@end deffn

@deffn Function clutter-timeline-get-elapsed-time  (self@tie{}@code{<clutter-timeline>}) @result{}@tie{} (ret@tie{}@code{unsigned-int})
@deffnx Method get-elapsed-time
Request the current time position of the timeline.

@table @var
@item timeline
A @code{<clutter-timeline>}

@item ret
current elapsed time in milliseconds.

@end table

@end deffn

@deffn Function clutter-timeline-get-delta  (self@tie{}@code{<clutter-timeline>}) @result{}@tie{} (ret@tie{}@code{unsigned-int})
@deffnx Method get-delta
Retrieves the amount of time elapsed since the last
ClutterTimeline::new-frame signal.

This function is only useful inside handlers for the ::new-frame signal,
and its behaviour is undefined if the timeline is not playing.

@table @var
@item timeline
a @code{<clutter-timeline>}

@item ret
the amount of time in milliseconds elapsed since the last frame

@end table

Since 0.6

@end deffn

@deffn Function clutter-timeline-get-progress  (self@tie{}@code{<clutter-timeline>}) @result{}@tie{} (ret@tie{}@code{double})
@deffnx Method get-progress
The position of the timeline in a normalized [-1, 2] interval.

The return value of this function is determined by the progress mode set
using @code{clutter-timeline-set-progress-mode}, or by the progress
function set using @code{clutter-timeline-set-progress-func}.

@table @var
@item timeline
a @code{<clutter-timeline>}

@item ret
the normalized current position in the timeline.

@end table

Since 0.6

@end deffn

@deffn Function clutter-timeline-is-playing  (self@tie{}@code{<clutter-timeline>}) @result{}@tie{} (ret@tie{}@code{bool})
@deffnx Method is-playing
Queries state of a @code{<clutter-timeline>}.

@table @var
@item timeline
A @code{<clutter-timeline>}

@item ret
@samp{@code{#t}} if timeline is currently playing

@end table

@end deffn

@deffn Function clutter-timeline-add-marker-at-time  (self@tie{}@code{<clutter-timeline>}) (marker_name@tie{}@code{mchars}) (msecs@tie{}@code{unsigned-int})
@deffnx Method add-marker-at-time
Adds a named marker that will be hit when the timeline has been running
for @var{msecs} milliseconds. Markers are unique string identifiers for
a given time. Once @var{timeline} reaches @var{msecs}, it will emit a
::marker-reached signal for each marker attached to that time.

A marker can be removed with @code{clutter-timeline-remove-marker}. The
timeline can be advanced to a marker using
@code{clutter-timeline-advance-to-marker}.

@table @var
@item timeline
a @code{<clutter-timeline>}

@item marker-name
the unique name for this marker

@item msecs
position of the marker in milliseconds

@end table

Since 0.8

@end deffn

@deffn Function clutter-timeline-has-marker  (self@tie{}@code{<clutter-timeline>}) (marker_name@tie{}@code{mchars}) @result{}@tie{} (ret@tie{}@code{bool})
@deffnx Method has-marker
Checks whether @var{timeline} has a marker set with the given name.

@table @var
@item timeline
a @code{<clutter-timeline>}

@item marker-name
the name of the marker

@item ret
@samp{@code{#t}} if the marker was found

@end table

Since 0.8

@end deffn

@deffn Function clutter-timeline-remove-marker  (self@tie{}@code{<clutter-timeline>}) (marker_name@tie{}@code{mchars})
@deffnx Method remove-marker
Removes @var{marker-name}, if found, from @var{timeline}.

@table @var
@item timeline
a @code{<clutter-timeline>}

@item marker-name
the name of the marker to remove

@end table

Since 0.8

@end deffn

@deffn Function clutter-timeline-advance-to-marker  (self@tie{}@code{<clutter-timeline>}) (marker_name@tie{}@code{mchars})
@deffnx Method advance-to-marker
Advances @var{timeline} to the time of the given @var{marker-name}.

Like @code{clutter-timeline-advance}, this function will not emit the
@code{<"new-frame">} for the time where @var{marker-name} is set, nor it
will emit @code{<"marker-reached">} for @var{marker-name}.

@table @var
@item timeline
a @code{<clutter-timeline>}

@item marker-name
the name of the marker

@end table

Since 0.8

@end deffn


@c %end of fragment
