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->template = template;
|
||||||
c->actor = actor;
|
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,
|
c->alpha = clutter_alpha_new_full (c->timeline,
|
||||||
priv->alpha_func,
|
priv->alpha_func,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
@ -631,28 +631,30 @@ clutter_timeline_is_playing (ClutterTimeline *timeline)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clutter_timeline_copy:
|
* clutter_timeline_clone:
|
||||||
* @timeline: #ClutterTimeline to duplicate.
|
* @timeline: #ClutterTimeline to duplicate.
|
||||||
*
|
*
|
||||||
* Create a new #ClutterTimeline instance which has property values
|
* 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
|
* Since 0.4
|
||||||
*/
|
*/
|
||||||
ClutterTimeline*
|
ClutterTimeline *
|
||||||
clutter_timeline_copy (ClutterTimeline *timeline)
|
clutter_timeline_clone (ClutterTimeline *timeline)
|
||||||
{
|
{
|
||||||
ClutterTimeline *copy;
|
ClutterTimeline *copy;
|
||||||
|
|
||||||
g_return_val_if_fail (CLUTTER_IS_TIMELINE (timeline), NULL);
|
g_return_val_if_fail (CLUTTER_IS_TIMELINE (timeline), NULL);
|
||||||
|
|
||||||
copy = g_object_new (CLUTTER_TYPE_TIMELINE, NULL);
|
copy = g_object_new (CLUTTER_TYPE_TIMELINE,
|
||||||
|
"fps", clutter_timeline_get_speed (timeline),
|
||||||
copy->priv->fps = timeline->priv->fps;
|
"num-frames", clutter_timeline_get_n_frames (timeline),
|
||||||
copy->priv->n_frames = timeline->priv->n_frames;
|
"loop", clutter_timeline_get_loop (timeline),
|
||||||
copy->priv->loop = timeline->priv->loop;
|
NULL);
|
||||||
|
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
@ -87,6 +87,8 @@ GType clutter_timeline_get_type (void) G_GNUC_CONST;
|
|||||||
|
|
||||||
ClutterTimeline *clutter_timeline_new (guint n_frames,
|
ClutterTimeline *clutter_timeline_new (guint n_frames,
|
||||||
guint fps);
|
guint fps);
|
||||||
|
ClutterTimeline *clutter_timeline_clone (ClutterTimeline *timeline);
|
||||||
|
|
||||||
guint clutter_timeline_get_speed (ClutterTimeline *timeline);
|
guint clutter_timeline_get_speed (ClutterTimeline *timeline);
|
||||||
void clutter_timeline_set_speed (ClutterTimeline *timeline,
|
void clutter_timeline_set_speed (ClutterTimeline *timeline,
|
||||||
guint fps);
|
guint fps);
|
||||||
@ -106,7 +108,6 @@ void clutter_timeline_set_n_frames (ClutterTimeline *timeline,
|
|||||||
guint n_frames);
|
guint n_frames);
|
||||||
guint clutter_timeline_get_n_frames (ClutterTimeline *timeline);
|
guint clutter_timeline_get_n_frames (ClutterTimeline *timeline);
|
||||||
gboolean clutter_timeline_is_playing (ClutterTimeline *timeline);
|
gboolean clutter_timeline_is_playing (ClutterTimeline *timeline);
|
||||||
ClutterTimeline* clutter_timeline_copy (ClutterTimeline *timeline);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -384,7 +384,7 @@ clutter_perspective_get_type
|
|||||||
ClutterTimeline
|
ClutterTimeline
|
||||||
ClutterTimelineClass
|
ClutterTimelineClass
|
||||||
clutter_timeline_new
|
clutter_timeline_new
|
||||||
clutter_timeline_copy
|
clutter_timeline_clone
|
||||||
clutter_timeline_set_speed
|
clutter_timeline_set_speed
|
||||||
clutter_timeline_get_speed
|
clutter_timeline_get_speed
|
||||||
clutter_timeline_start
|
clutter_timeline_start
|
||||||
|
Loading…
x
Reference in New Issue
Block a user