Timeline
Object Hierarchy:
Description:
public class Timeline :
Object
The Timeline structure contains only private data
Namespace: Clutter
Package: clutter-1.0
Content:
Properties:
-
public bool auto_reverse { set; get; }
If the direction of the timeline should be automatically reversed when reaching the end.
-
public uint delay { set; get; }
A delay, in milliseconds, that should be observed by the timeline before actually starting.
-
public TimelineDirection direction { set; get; }
-
public uint duration { set; get; }
Duration of the timeline in milliseconds, depending on the ClutterTimeline:fps value.
-
public bool loop { set; get; }
Whether the timeline should automatically rewind and restart.
Creation methods:
Methods:
-
public void add_marker_at_time (string marker_name, uint msecs)
Adds a named marker that will be hit when the timeline has been running for msecs
milliseconds. Markers are unique string identifiers for a given time. Once timeline reaches msecs, it will
emit a marker_reached signal for each marker attached to that time.
-
public void advance (uint msecs)
Advance timeline to the requested point. The point is given as a time in milliseconds since the timeline
started.
-
public void advance_to_marker (string marker_name)
Advances timeline to the time of the given marker_name.
-
public Timeline clone ()
Create a new Timeline instance which has property
values matching that of supplied timeline. The cloned timeline will not be started and will not be positioned to the current position
of
-
public bool get_auto_reverse ()
-
public uint get_delay ()
-
public uint get_delta ()
Retrieves the amount of time elapsed since the last ClutterTimeline::new-frame signal.
-
public TimelineDirection get_direction ()
-
public uint get_duration ()
-
public uint get_elapsed_time ()
Request the current time position of the timeline.
-
public bool get_loop ()
Gets whether timeline is looping
-
public double get_progress ()
The position of the timeline in a [0, 1] interval.
-
public bool has_marker (string marker_name)
Checks whether timeline has a marker set with the given name.
-
public bool is_playing ()
-
public string[] list_markers (int msecs)
Retrieves the list of markers at time msecs. If msecs is a negative integer,
all the markers attached to timeline will be returned.
-
public void pause ()
-
public void remove_marker (string marker_name)
Removes marker_name, if found, from timeline.
-
public void rewind ()
-
public void set_auto_reverse (bool reverse)
Sets whether timeline should reverse the direction after the emission of the
completed signal.
-
public void set_delay (uint msecs)
Sets the delay, in milliseconds, before timeline should start.
-
public void set_direction (TimelineDirection direction)
-
public void set_duration (uint msecs)
Sets the duration of the timeline, in milliseconds. The speed of the timeline depends on the
ClutterTimeline:fps setting.
-
public void set_loop (bool loop)
Sets whether timeline should loop.
-
public void skip (uint msecs)
Advance timeline by the requested time in milliseconds
-
public void start ()
-
public void stop ()
Signals:
-
public virtual void completed ()
The completed signal is emitted when the
timeline reaches the number of frames specified by the ClutterTimeline:num-frames property.
-
public virtual void marker_reached (string marker_name, int frame_num)
The marker_reached signal is emitted
each time a timeline reaches a marker set with add_marker_at_time
. This signal is detailed with the name of the marker as well, so it is possible to connect a callback to the
marker_reached signal for a specific marker with:
-
public virtual void new_frame (int msecs)
The new_frame signal is emitted for each
timeline running timeline before a new frame is drawn to give animations a chance to update the scene.
-
public virtual void paused ()
-
public virtual void started ()
The started signal is emitted when the
timeline starts its run. This might be as soon as start is invoked or after
the delay set in the ClutterTimeline:delay property has expired.