2.0: Remove deprecated API from ClutterTimeline
This commit is contained in:
parent
ca2f1b6818
commit
e0aeb03b04
@ -110,8 +110,6 @@
|
||||
#include "clutter-private.h"
|
||||
#include "clutter-scriptable.h"
|
||||
|
||||
#include "deprecated/clutter-timeline.h"
|
||||
|
||||
static void clutter_scriptable_iface_init (ClutterScriptableIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (ClutterTimeline, clutter_timeline, G_TYPE_OBJECT,
|
||||
@ -183,7 +181,6 @@ enum
|
||||
{
|
||||
PROP_0,
|
||||
|
||||
PROP_LOOP,
|
||||
PROP_DELAY,
|
||||
PROP_DURATION,
|
||||
PROP_DIRECTION,
|
||||
@ -294,23 +291,6 @@ clutter_timeline_add_marker_internal (ClutterTimeline *timeline,
|
||||
g_hash_table_insert (priv->markers_by_name, marker->name, marker);
|
||||
}
|
||||
|
||||
static inline void
|
||||
clutter_timeline_set_loop_internal (ClutterTimeline *timeline,
|
||||
gboolean loop)
|
||||
{
|
||||
gint old_repeat_count;
|
||||
|
||||
old_repeat_count = timeline->priv->repeat_count;
|
||||
|
||||
if (loop)
|
||||
clutter_timeline_set_repeat_count (timeline, -1);
|
||||
else
|
||||
clutter_timeline_set_repeat_count (timeline, 0);
|
||||
|
||||
if (old_repeat_count != timeline->priv->repeat_count)
|
||||
g_object_notify_by_pspec (G_OBJECT (timeline), obj_props[PROP_LOOP]);
|
||||
}
|
||||
|
||||
/* Scriptable */
|
||||
typedef struct _ParseClosure {
|
||||
ClutterTimeline *timeline;
|
||||
@ -447,10 +427,6 @@ clutter_timeline_set_property (GObject *object,
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_LOOP:
|
||||
clutter_timeline_set_loop_internal (timeline, g_value_get_boolean (value));
|
||||
break;
|
||||
|
||||
case PROP_DELAY:
|
||||
clutter_timeline_set_delay (timeline, g_value_get_uint (value));
|
||||
break;
|
||||
@ -492,10 +468,6 @@ clutter_timeline_get_property (GObject *object,
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_LOOP:
|
||||
g_value_set_boolean (value, priv->repeat_count != 0);
|
||||
break;
|
||||
|
||||
case PROP_DELAY:
|
||||
g_value_set_uint (value, priv->delay);
|
||||
break;
|
||||
@ -577,25 +549,6 @@ clutter_timeline_class_init (ClutterTimelineClass *klass)
|
||||
|
||||
g_type_class_add_private (klass, sizeof (ClutterTimelinePrivate));
|
||||
|
||||
/**
|
||||
* ClutterTimeline:loop:
|
||||
*
|
||||
* Whether the timeline should automatically rewind and restart.
|
||||
*
|
||||
* As a side effect, setting this property to %TRUE will set the
|
||||
* #ClutterTimeline:repeat-count property to -1, while setting this
|
||||
* property to %FALSE will set the #ClutterTimeline:repeat-count
|
||||
* property to 0.
|
||||
*
|
||||
* Deprecated: 1.10: Use the #ClutterTimeline:repeat-count property instead.
|
||||
*/
|
||||
obj_props[PROP_LOOP] =
|
||||
g_param_spec_boolean ("loop",
|
||||
P_("Loop"),
|
||||
P_("Should the timeline automatically restart"),
|
||||
FALSE,
|
||||
CLUTTER_PARAM_READWRITE | G_PARAM_DEPRECATED);
|
||||
|
||||
/**
|
||||
* ClutterTimeline:delay:
|
||||
*
|
||||
@ -1266,45 +1219,6 @@ clutter_timeline_stop (ClutterTimeline *timeline)
|
||||
g_signal_emit (timeline, timeline_signals[STOPPED], 0, FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_timeline_set_loop:
|
||||
* @timeline: a #ClutterTimeline
|
||||
* @loop: %TRUE for enable looping
|
||||
*
|
||||
* Sets whether @timeline should loop.
|
||||
*
|
||||
* This function is equivalent to calling clutter_timeline_set_repeat_count()
|
||||
* with -1 if @loop is %TRUE, and with 0 if @loop is %FALSE.
|
||||
*
|
||||
* Deprecated: 1.10: Use clutter_timeline_set_repeat_count() instead.
|
||||
*/
|
||||
void
|
||||
clutter_timeline_set_loop (ClutterTimeline *timeline,
|
||||
gboolean loop)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_TIMELINE (timeline));
|
||||
|
||||
clutter_timeline_set_loop_internal (timeline, loop);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_timeline_get_loop:
|
||||
* @timeline: a #ClutterTimeline
|
||||
*
|
||||
* Gets whether @timeline is looping
|
||||
*
|
||||
* Return value: %TRUE if the timeline is looping
|
||||
*
|
||||
* Deprecated: 1.10: Use clutter_timeline_get_repeat_count() instead.
|
||||
*/
|
||||
gboolean
|
||||
clutter_timeline_get_loop (ClutterTimeline *timeline)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_TIMELINE (timeline), FALSE);
|
||||
|
||||
return timeline->priv->repeat_count != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_timeline_rewind:
|
||||
* @timeline: A #ClutterTimeline
|
||||
@ -1421,44 +1335,6 @@ clutter_timeline_is_playing (ClutterTimeline *timeline)
|
||||
return timeline->priv->is_playing;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_timeline_clone:
|
||||
* @timeline: #ClutterTimeline to duplicate.
|
||||
*
|
||||
* Create a new #ClutterTimeline 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 clutter_timeline_start().
|
||||
*
|
||||
* <note><para>The only cloned properties are:</para>
|
||||
* <itemizedlist>
|
||||
* <listitem><simpara>#ClutterTimeline:duration</simpara></listitem>
|
||||
* <listitem><simpara>#ClutterTimeline:loop</simpara></listitem>
|
||||
* <listitem><simpara>#ClutterTimeline:delay</simpara></listitem>
|
||||
* <listitem><simpara>#ClutterTimeline:direction</simpara></listitem>
|
||||
* </itemizedlist></note>
|
||||
*
|
||||
* Return value: (transfer full): a new #ClutterTimeline, cloned
|
||||
* from @timeline
|
||||
*
|
||||
* Since: 0.4
|
||||
*
|
||||
* Deprecated: 1.10: Use clutter_timeline_new() or g_object_new()
|
||||
* instead
|
||||
*/
|
||||
ClutterTimeline *
|
||||
clutter_timeline_clone (ClutterTimeline *timeline)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_TIMELINE (timeline), NULL);
|
||||
|
||||
return g_object_new (CLUTTER_TYPE_TIMELINE,
|
||||
"duration", timeline->priv->duration,
|
||||
"loop", timeline->priv->repeat_count != 0,
|
||||
"delay", timeline->priv->delay,
|
||||
"direction", timeline->priv->direction,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_timeline_new:
|
||||
* @msecs: Duration of the timeline in milliseconds
|
||||
|
Loading…
Reference in New Issue
Block a user