cluttermm
1.17.3
|
Public Member Functions | |
virtual | ~Timeline () |
ClutterTimeline* | gobj () |
Provides access to the underlying C GObject. More... | |
const ClutterTimeline* | gobj () const |
Provides access to the underlying C GObject. More... | |
ClutterTimeline* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More... | |
Glib::RefPtr< Timeline > | clone () const |
Create a new Clutter::Timeline instance which has property values matching that of supplied timeline. More... | |
void | set_duration (guint msecs) |
Sets the duration of the timeline, in milliseconds. More... | |
guint | get_duration () const |
Retrieves the duration of a Clutter::Timeline in milliseconds. More... | |
void | start () |
Starts the Clutter::Timeline playing. More... | |
void | pause () |
Pauses the Clutter::Timeline on current frame. More... | |
void | stop () |
Stops the Clutter::Timeline and moves to frame 0. More... | |
void | set_auto_reverse (bool reverse=true) |
Sets whether timeline should reverse the direction after the emission of the Clutter::Timeline::signal_completed() signal. More... | |
bool | get_auto_reverse () const |
Retrieves the value set by set_auto_reverse(). More... | |
void | set_repeat_count (int count) |
Sets the number of times the timeline should repeat. More... | |
int | get_repeat_count () const |
Retrieves the number set using set_repeat_count(). More... | |
void | rewind () |
Rewinds Clutter::Timeline to the first frame if its direction is Clutter::TIMELINE_FORWARD and the last frame if it is Clutter::TIMELINE_BACKWARD. More... | |
void | set_loop (bool loop=true) |
Sets whether timeline should loop. More... | |
bool | get_loop () const |
Gets whether timeline is looping. More... | |
void | skip (guint n_frames) |
Advance timeline by the requested time in milliseconds. More... | |
void | advance (guint frame_num) |
Advance timeline to the requested point. More... | |
guint | get_delta () const |
Retrieves the amount of time elapsed since the last ClutterTimeline::new-frame signal. More... | |
bool | is_playing () const |
Queries state of a Clutter::Timeline. More... | |
void | set_delay (guint msecs) |
Sets the delay, in milliseconds, before timeline should start. More... | |
guint | get_delay () const |
Retrieves the delay set using set_delay(). More... | |
guint | get_elapsed_time () const |
Request the current time position of the timeline. More... | |
double | get_progress () const |
The position of the timeline in a normalized [-1, 2] interval. More... | |
void | set_direction (TimelineDirection direction) |
Sets the direction of timeline, either Clutter::TIMELINE_FORWARD or Clutter::TIMELINE_BACKWARD. More... | |
TimelineDirection | get_direction () const |
Retrieves the direction of the timeline set with set_direction(). More... | |
std::vector< Glib::ustring > | list_markers (int frame_num) const |
Retrieves the list of markers at time msecs. More... | |
void | add_marker_at_time (const Glib::ustring& marker_name, guint msecs) |
Adds a named marker that will be hit when the timeline has been running for msecs milliseconds. More... | |
bool | has_marker (const Glib::ustring& marker_name) |
Checks whether timeline has a marker set with the given name. More... | |
void | remove_marker (const Glib::ustring& marker_name) |
Removes marker_name, if found, from timeline. More... | |
void | advance_to_marker (const Glib::ustring& marker_name) |
Advances timeline to the time of the given marker_name. More... | |
void | set_progress_mode (AnimationMode mode) |
Sets the progress function using a value from the Clutter::AnimationMode enumeration. More... | |
AnimationMode | get_progress_mode () const |
Retrieves the progress mode set using set_progress_mode() or set_progress_func(). More... | |
Glib::PropertyProxy< guint > | property_delay () |
Delay before start. More... | |
Glib::PropertyProxy_ReadOnly < guint > | property_delay () const |
Delay before start. More... | |
Glib::PropertyProxy < TimelineDirection > | property_direction () |
Direction of the timeline. More... | |
Glib::PropertyProxy_ReadOnly < TimelineDirection > | property_direction () const |
Direction of the timeline. More... | |
Glib::PropertyProxy< guint > | property_duration () |
Duration of the timeline in milliseconds. More... | |
Glib::PropertyProxy_ReadOnly < guint > | property_duration () const |
Duration of the timeline in milliseconds. More... | |
Glib::PropertyProxy< bool > | property_loop () |
Should the timeline automatically restart. More... | |
Glib::PropertyProxy_ReadOnly < bool > | property_loop () const |
Should the timeline automatically restart. More... | |
Glib::PropertyProxy< bool > | property_auto_reverse () |
Whether the direction should be reversed when reaching the end. More... | |
Glib::PropertyProxy_ReadOnly < bool > | property_auto_reverse () const |
Whether the direction should be reversed when reaching the end. More... | |
Glib::PropertyProxy< int > | property_repeat_count () |
How many times the timeline should repeat. More... | |
Glib::PropertyProxy_ReadOnly< int > | property_repeat_count () const |
How many times the timeline should repeat. More... | |
Glib::PropertyProxy < AnimationMode > | property_progress_mode () |
How the timeline should compute the progress. More... | |
Glib::PropertyProxy_ReadOnly < AnimationMode > | property_progress_mode () const |
How the timeline should compute the progress. More... | |
Glib::SignalProxy0< void > | signal_completed () |
Glib::SignalProxy1< void, int > | signal_new_frame () |
Glib::SignalProxy0< void > | signal_paused () |
Glib::SignalProxy0< void > | signal_started () |
Glib::SignalProxy2< void, const Glib::ustring&, int > | signal_marker_reached () |
Static Public Member Functions | |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. More... | |
static Glib::RefPtr< Timeline > | create (guint msecs) |
Protected Member Functions | |
Timeline (guint msecs) | |
Creates a new Clutter::Timeline with a duration of msecs. More... | |
virtual void | on_completed () |
This is a default handler for the signal signal_completed(). More... | |
virtual void | on_new_frame (int fram_num) |
This is a default handler for the signal signal_new_frame(). More... | |
virtual void | on_paused () |
This is a default handler for the signal signal_paused(). More... | |
virtual void | on_started () |
This is a default handler for the signal signal_started(). More... | |
virtual void | on_marker_reached (const Glib::ustring& marker_name, int frame_num) |
This is a default handler for the signal signal_marker_reached(). More... | |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Clutter::Timeline > | wrap (ClutterTimeline* object, bool take_copy=false) |
A Glib::wrap() method for this object. More... | |
|
virtual |
|
explicitprotected |
Creates a new Clutter::Timeline with a duration of msecs.
msecs | Duration of the timeline in milliseconds. |
void Clutter::Timeline::add_marker_at_time | ( | const Glib::ustring & | marker_name, |
guint | 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 position on the timeline. Once timeline reaches the given msecs, it will emit a signal_marker_reached() signal for each marker attached to that position.
A marker can be removed with remove_marker(). The timeline can be advanced to a marker using advance_to_marker().
See also: add_marker()
marker_name | The unique name for this marker. |
msecs | Position of the marker in milliseconds. |
void Clutter::Timeline::advance | ( | guint | frame_num | ) |
Advance timeline to the requested point.
The point is given as a time in milliseconds since the timeline started.
<note>The timeline will not emit the Clutter::Timeline::signal_new_frame() signal for the given time. The first signal_new_frame() signal after the call to advance() will be emit the skipped markers. </note>
msecs | Time to advance to. |
void Clutter::Timeline::advance_to_marker | ( | const Glib::ustring & | marker_name | ) |
Advances timeline to the time of the given marker_name.
<note>Like advance(), this function will not emit the Clutter::Timeline::signal_new_frame() for the time where marker_name is set, nor it will emit Clutter::Timeline::signal_marker_reached() for marker_name.</note>
marker_name | The name of the marker. |
Glib::RefPtr<Timeline> Clutter::Timeline::clone | ( | ) | const |
Create a new Clutter::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 the original timeline: you will have to start it with start().
<note>The only cloned properties are:
Deprecated: 1.10: Use new() or Glib::object_new() instead
|
static |
bool Clutter::Timeline::get_auto_reverse | ( | ) | const |
Retrieves the value set by set_auto_reverse().
true
if the timeline should automatically reverse, and false
otherwise. guint Clutter::Timeline::get_delay | ( | ) | const |
Retrieves the delay set using set_delay().
guint Clutter::Timeline::get_delta | ( | ) | const |
Retrieves the amount of time elapsed since the last ClutterTimeline::new-frame signal.
This function is only useful inside handlers for the signal_new_frame() signal, and its behaviour is undefined if the timeline is not playing.
TimelineDirection Clutter::Timeline::get_direction | ( | ) | const |
Retrieves the direction of the timeline set with set_direction().
guint Clutter::Timeline::get_duration | ( | ) | const |
Retrieves the duration of a Clutter::Timeline in milliseconds.
See set_duration().
guint Clutter::Timeline::get_elapsed_time | ( | ) | const |
Request the current time position of the timeline.
bool Clutter::Timeline::get_loop | ( | ) | const |
Gets whether timeline is looping.
Deprecated: 1.10: Use get_repeat_count() instead.
true
if the timeline is looping. double Clutter::Timeline::get_progress | ( | ) | const |
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 set_progress_mode(), or by the progress function set using set_progress_func().
AnimationMode Clutter::Timeline::get_progress_mode | ( | ) | const |
Retrieves the progress mode set using set_progress_mode() or set_progress_func().
int Clutter::Timeline::get_repeat_count | ( | ) | const |
Retrieves the number set using set_repeat_count().
|
static |
Get the GType for this class, for use with the underlying GObject type system.
|
inline |
Provides access to the underlying C GObject.
|
inline |
Provides access to the underlying C GObject.
ClutterTimeline* Clutter::Timeline::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
bool Clutter::Timeline::has_marker | ( | const Glib::ustring & | marker_name | ) |
Checks whether timeline has a marker set with the given name.
marker_name | The name of the marker. |
true
if the marker was found. bool Clutter::Timeline::is_playing | ( | ) | const |
Queries state of a Clutter::Timeline.
true
if timeline is currently playing. std::vector<Glib::ustring> Clutter::Timeline::list_markers | ( | int | frame_num | ) | const |
Retrieves the list of markers at time msecs.
If msecs is a negative integer, all the markers attached to timeline will be returned.
msecs | The time to check, or -1. |
n_markers | The number of markers returned. |
0
terminated string array containing the names of the markers. Use Glib::strfreev() when done.
|
protectedvirtual |
This is a default handler for the signal signal_completed().
|
protectedvirtual |
This is a default handler for the signal signal_marker_reached().
|
protectedvirtual |
This is a default handler for the signal signal_new_frame().
|
protectedvirtual |
This is a default handler for the signal signal_paused().
|
protectedvirtual |
This is a default handler for the signal signal_started().
void Clutter::Timeline::pause | ( | ) |
Pauses the Clutter::Timeline on current frame.
Glib::PropertyProxy< bool > Clutter::Timeline::property_auto_reverse | ( | ) |
Whether the direction should be reversed when reaching the end.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< bool > Clutter::Timeline::property_auto_reverse | ( | ) | const |
Whether the direction should be reversed when reaching the end.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< guint > Clutter::Timeline::property_delay | ( | ) |
Delay before start.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< guint > Clutter::Timeline::property_delay | ( | ) | const |
Delay before start.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< TimelineDirection > Clutter::Timeline::property_direction | ( | ) |
Direction of the timeline.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< TimelineDirection > Clutter::Timeline::property_direction | ( | ) | const |
Direction of the timeline.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< guint > Clutter::Timeline::property_duration | ( | ) |
Duration of the timeline in milliseconds.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< guint > Clutter::Timeline::property_duration | ( | ) | const |
Duration of the timeline in milliseconds.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< bool > Clutter::Timeline::property_loop | ( | ) |
Should the timeline automatically restart.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< bool > Clutter::Timeline::property_loop | ( | ) | const |
Should the timeline automatically restart.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< AnimationMode > Clutter::Timeline::property_progress_mode | ( | ) |
How the timeline should compute the progress.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< AnimationMode > Clutter::Timeline::property_progress_mode | ( | ) | const |
How the timeline should compute the progress.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< int > Clutter::Timeline::property_repeat_count | ( | ) |
How many times the timeline should repeat.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< int > Clutter::Timeline::property_repeat_count | ( | ) | const |
How many times the timeline should repeat.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
void Clutter::Timeline::remove_marker | ( | const Glib::ustring & | marker_name | ) |
Removes marker_name, if found, from timeline.
marker_name | The name of the marker to remove. |
void Clutter::Timeline::rewind | ( | ) |
Rewinds Clutter::Timeline to the first frame if its direction is Clutter::TIMELINE_FORWARD and the last frame if it is Clutter::TIMELINE_BACKWARD.
void Clutter::Timeline::set_auto_reverse | ( | bool | reverse = true | ) |
Sets whether timeline should reverse the direction after the emission of the Clutter::Timeline::signal_completed() signal.
Setting the Clutter::Timeline::property_auto_reverse() property to true
is the equivalent of connecting a callback to the Clutter::Timeline::signal_completed() signal and changing the direction of the timeline from that callback; for instance, this code:
[C example ellipted]
can be effectively replaced by:
[C example ellipted]
reverse | true if the timeline should reverse the direction. |
void Clutter::Timeline::set_delay | ( | guint | msecs | ) |
Sets the delay, in milliseconds, before timeline should start.
msecs | Delay in milliseconds. |
void Clutter::Timeline::set_direction | ( | TimelineDirection | direction | ) |
Sets the direction of timeline, either Clutter::TIMELINE_FORWARD or Clutter::TIMELINE_BACKWARD.
direction | The direction of the timeline. |
void Clutter::Timeline::set_duration | ( | guint | msecs | ) |
Sets the duration of the timeline, in milliseconds.
The speed of the timeline depends on the ClutterTimeline:fps setting.
msecs | Duration of the timeline in milliseconds. |
void Clutter::Timeline::set_loop | ( | bool | loop = true | ) |
Sets whether timeline should loop.
This function is equivalent to calling set_repeat_count() with -1 if loop is true
, and with 0 if loop is false
.
Deprecated: 1.10: Use set_repeat_count() instead.
loop | true for enable looping. |
void Clutter::Timeline::set_progress_mode | ( | AnimationMode | mode | ) |
Sets the progress function using a value from the Clutter::AnimationMode enumeration.
The mode cannot be Clutter::CUSTOM_MODE or bigger than Clutter::ANIMATION_LAST.
mode | The progress mode, as a Clutter::AnimationMode. |
void Clutter::Timeline::set_repeat_count | ( | int | count | ) |
Sets the number of times the timeline should repeat.
If count is 0, the timeline never repeats.
If count is -1, the timeline will always repeat until it's stopped.
count | The number of times the timeline should repeat. |
Glib::SignalProxy0< void > Clutter::Timeline::signal_completed | ( | ) |
void on_my_completed()
The Clutter::Timeline::signal_completed() signal is emitted when the timeline's elapsed time reaches the value of the Clutter::Timeline::property_duration() property.
This signal will be emitted even if the Clutter::Timeline is set to be repeating.
If you want to get notification on whether the Clutter::Timeline has been stopped or has finished its run, including its eventual repeats, you should use the Clutter::Timeline::signal_stopped() signal instead.
Glib::SignalProxy2< void,const Glib::ustring&,int > Clutter::Timeline::signal_marker_reached | ( | ) |
void on_my_marker_reached(const Glib::ustring& marker_name, int frame_num)
The signal_marker_reached() signal is emitted each time a timeline reaches a marker set with Clutter::Timeline::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 signal_marker_reached() signal for a specific marker with:
[C example ellipted]
In the example, the first callback will be invoked for both the "foo" and "bar" marker, while the second and third callbacks will be invoked for the "foo" or "bar" markers, respectively.
marker_name | The name of the marker reached. |
msecs | The elapsed time. |
Glib::SignalProxy1< void,int > Clutter::Timeline::signal_new_frame | ( | ) |
void on_my_new_frame(int fram_num)
The signal_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.
msecs | The elapsed time between 0 and duration. |
Glib::SignalProxy0< void > Clutter::Timeline::signal_paused | ( | ) |
void on_my_paused()
The signal_paused() signal is emitted when Clutter::Timeline::pause() is invoked.
Glib::SignalProxy0< void > Clutter::Timeline::signal_started | ( | ) |
void on_my_started()
The signal_started() signal is emitted when the timeline starts its run. This might be as soon as Clutter::Timeline::start() is invoked or after the delay set in the ClutterTimeline:delay property has expired.
void Clutter::Timeline::skip | ( | guint | n_frames | ) |
Advance timeline by the requested time in milliseconds.
msecs | Amount of time to skip. |
void Clutter::Timeline::start | ( | ) |
Starts the Clutter::Timeline playing.
void Clutter::Timeline::stop | ( | ) |
Stops the Clutter::Timeline and moves to frame 0.
|
related |
A Glib::wrap() method for this object.
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |