[gnome-todo] timeline: Remove frame clock API
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] timeline: Remove frame clock API
- Date: Sat, 3 Apr 2021 21:43:36 +0000 (UTC)
commit 5d76331d1602aefc7139fcae7e5887e77057a1d5
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Mar 6 21:26:46 2021 -0300
timeline: Remove frame clock API
The timeline is supposed to always be per-widget.
src/animation/gtd-timeline.c | 76 --------------------------------------------
src/animation/gtd-timeline.h | 8 -----
2 files changed, 84 deletions(-)
---
diff --git a/src/animation/gtd-timeline.c b/src/animation/gtd-timeline.c
index 707cb15e..1fdf5a89 100644
--- a/src/animation/gtd-timeline.c
+++ b/src/animation/gtd-timeline.c
@@ -151,7 +151,6 @@ enum
PROP_DIRECTION,
PROP_REPEAT_COUNT,
PROP_PROGRESS_MODE,
- PROP_FRAME_CLOCK,
PROP_WIDGET,
PROP_LAST
@@ -490,8 +489,6 @@ set_frame_clock_internal (GtdTimeline *self,
g_set_object (&priv->frame_clock, frame_clock);
- g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_FRAME_CLOCK]);
-
if (priv->is_playing)
maybe_add_timeline (self);
}
@@ -603,10 +600,6 @@ gtd_timeline_set_property (GObject *object,
gtd_timeline_set_progress_mode (self, g_value_get_enum (value));
break;
- case PROP_FRAME_CLOCK:
- gtd_timeline_set_frame_clock (self, g_value_get_object (value));
- break;
-
case PROP_WIDGET:
gtd_timeline_set_widget (self, g_value_get_object (value));
break;
@@ -652,10 +645,6 @@ gtd_timeline_get_property (GObject *object,
g_value_set_enum (value, priv->progress_mode);
break;
- case PROP_FRAME_CLOCK:
- g_value_set_object (value, priv->frame_clock);
- break;
-
case PROP_WIDGET:
g_value_set_object (value, priv->widget);
break;
@@ -822,18 +811,6 @@ gtd_timeline_class_init (GtdTimelineClass *klass)
GTD_EASE_LINEAR,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
- /**
- * GtdTimeline:frame-clock:
- *
- * The frame clock driving the timeline.
- */
- obj_props[PROP_FRAME_CLOCK] =
- g_param_spec_object ("frame-clock",
- "Frame clock",
- "Frame clock driving the timeline",
- GDK_TYPE_FRAME_CLOCK,
- G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-
object_class->dispose = gtd_timeline_dispose;
object_class->finalize = gtd_timeline_finalize;
object_class->set_property = gtd_timeline_set_property;
@@ -1215,26 +1192,6 @@ gtd_timeline_new_for_widget (GtdWidget *widget,
NULL);
}
-/**
- * gtd_timeline_new_for_frame_clock:
- * @frame_clock: The #GdkFrameClock the timeline is driven by
- * @duration_ms: Duration of the timeline in milliseconds
- *
- * Creates a new #GtdTimeline with a duration of @duration_ms milli seconds.
- *
- * Return value: the newly created #GtdTimeline instance. Use
- * g_object_unref() when done using it
- */
-GtdTimeline *
-gtd_timeline_new_for_frame_clock (GdkFrameClock *frame_clock,
- guint duration_ms)
-{
- return g_object_new (GTD_TYPE_TIMELINE,
- "duration", duration_ms,
- "frame-clock", frame_clock,
- NULL);
-}
-
/**
* gtd_timeline_get_delay:
* @timeline: a #GtdTimeline
@@ -1777,39 +1734,6 @@ gtd_timeline_cancel_delay (GtdTimeline *self)
g_clear_handle_id (&priv->delay_id, g_source_remove);
}
-
-/**
- * gtd_timeline_get_frame_clock: (skip)
- */
-GdkFrameClock *
-gtd_timeline_get_frame_clock (GtdTimeline *self)
-{
- GtdTimelinePrivate *priv;
-
- g_return_val_if_fail (GTD_IS_TIMELINE (self), NULL);
-
- priv = gtd_timeline_get_instance_private (self);
- return priv->frame_clock;
-}
-
-void
-gtd_timeline_set_frame_clock (GtdTimeline *self,
- GdkFrameClock *frame_clock)
-{
- GtdTimelinePrivate *priv;
-
- g_return_if_fail (GTD_IS_TIMELINE (self));
-
- priv = gtd_timeline_get_instance_private (self);
-
- g_assert (!frame_clock || (frame_clock && !priv->widget));
- g_return_if_fail (!frame_clock || (frame_clock && !priv->widget));
-
- priv->custom_frame_clock = frame_clock;
- if (!priv->widget)
- set_frame_clock_internal (self, frame_clock);
-}
-
/**
* gtd_timeline_get_widget:
* @timeline: a #GtdTimeline
diff --git a/src/animation/gtd-timeline.h b/src/animation/gtd-timeline.h
index c4d9aef3..e6e0a3f2 100644
--- a/src/animation/gtd-timeline.h
+++ b/src/animation/gtd-timeline.h
@@ -79,9 +79,6 @@ struct _GtdTimelineClass
GtdTimeline* gtd_timeline_new_for_widget (GtdWidget *widget,
guint duration_ms);
-GtdTimeline* gtd_timeline_new_for_frame_clock (GdkFrameClock *frame_clock,
- guint duration_ms);
-
GtdWidget* gtd_timeline_get_widget (GtdTimeline *timeline);
void gtd_timeline_set_widget (GtdTimeline *timeline,
@@ -147,11 +144,6 @@ GtdEaseMode gtd_timeline_get_progress_mode (GtdTimeline
gint64 gtd_timeline_get_duration_hint (GtdTimeline *timeline);
gint gtd_timeline_get_current_repeat (GtdTimeline *timeline);
-GdkFrameClock* gtd_timeline_get_frame_clock (GtdTimeline *timeline);
-
-void gtd_timeline_set_frame_clock (GtdTimeline *timeline,
- GdkFrameClock *frame_clock);
-
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]