mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 03:22:04 +00:00
Rename clutter_timeline_copy to clutter_timeline_clone
Usually, in OOP objects are cloned, while boxed types are copied; this holds true in GObject, where GBoxed types have copy functions.
This commit is contained in:
parent
9789bfc69e
commit
c90a252581
@ -253,7 +253,7 @@ clutter_effect_closure_new (ClutterEffectTemplate *template,
|
||||
|
||||
c->template = template;
|
||||
c->actor = actor;
|
||||
c->timeline = clutter_timeline_copy (priv->timeline);
|
||||
c->timeline = clutter_timeline_clone (priv->timeline);
|
||||
c->alpha = clutter_alpha_new_full (c->timeline,
|
||||
priv->alpha_func,
|
||||
NULL, NULL);
|
||||
|
@ -631,28 +631,30 @@ clutter_timeline_is_playing (ClutterTimeline *timeline)
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_timeline_copy:
|
||||
* clutter_timeline_clone:
|
||||
* @timeline: #ClutterTimeline to duplicate.
|
||||
*
|
||||
* Create a new #ClutterTimeline instance which has property values
|
||||
* matching that of supplied timeline.
|
||||
* matching that of supplied timeline. The cloned timeline will not
|
||||
* be started and will not be positioned to the current position of
|
||||
* @timeline: you will have to start it with clutter_timeline_start().
|
||||
*
|
||||
* Return Value: a new #ClutterTimeline
|
||||
* Return Value: a new #ClutterTimeline, cloned from @timeline
|
||||
*
|
||||
* Since 0.4
|
||||
*/
|
||||
ClutterTimeline*
|
||||
clutter_timeline_copy (ClutterTimeline *timeline)
|
||||
ClutterTimeline *
|
||||
clutter_timeline_clone (ClutterTimeline *timeline)
|
||||
{
|
||||
ClutterTimeline *copy;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_TIMELINE (timeline), NULL);
|
||||
|
||||
copy = g_object_new (CLUTTER_TYPE_TIMELINE, NULL);
|
||||
|
||||
copy->priv->fps = timeline->priv->fps;
|
||||
copy->priv->n_frames = timeline->priv->n_frames;
|
||||
copy->priv->loop = timeline->priv->loop;
|
||||
copy = g_object_new (CLUTTER_TYPE_TIMELINE,
|
||||
"fps", clutter_timeline_get_speed (timeline),
|
||||
"num-frames", clutter_timeline_get_n_frames (timeline),
|
||||
"loop", clutter_timeline_get_loop (timeline),
|
||||
NULL);
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
@ -87,6 +87,8 @@ GType clutter_timeline_get_type (void) G_GNUC_CONST;
|
||||
|
||||
ClutterTimeline *clutter_timeline_new (guint n_frames,
|
||||
guint fps);
|
||||
ClutterTimeline *clutter_timeline_clone (ClutterTimeline *timeline);
|
||||
|
||||
guint clutter_timeline_get_speed (ClutterTimeline *timeline);
|
||||
void clutter_timeline_set_speed (ClutterTimeline *timeline,
|
||||
guint fps);
|
||||
@ -106,7 +108,6 @@ void clutter_timeline_set_n_frames (ClutterTimeline *timeline,
|
||||
guint n_frames);
|
||||
guint clutter_timeline_get_n_frames (ClutterTimeline *timeline);
|
||||
gboolean clutter_timeline_is_playing (ClutterTimeline *timeline);
|
||||
ClutterTimeline* clutter_timeline_copy (ClutterTimeline *timeline);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -384,7 +384,7 @@ clutter_perspective_get_type
|
||||
ClutterTimeline
|
||||
ClutterTimelineClass
|
||||
clutter_timeline_new
|
||||
clutter_timeline_copy
|
||||
clutter_timeline_clone
|
||||
clutter_timeline_set_speed
|
||||
clutter_timeline_get_speed
|
||||
clutter_timeline_start
|
||||
|
Loading…
Reference in New Issue
Block a user