From 1bb2f5f7b9ca209f906b7839876ad37617ed0d05 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Mon, 14 Aug 2023 16:13:17 +0200 Subject: [PATCH] clutter: Drop Timeline.new constructor Nothing uses it nowadays except GNOME Shell for tests but goes through g_object_new so it is fine Part-of: --- clutter/clutter/clutter-timeline.c | 22 ++----------- clutter/clutter/deprecated/clutter-timeline.h | 31 ------------------- clutter/clutter/meson.build | 1 - 3 files changed, 2 insertions(+), 52 deletions(-) delete mode 100644 clutter/clutter/deprecated/clutter-timeline.h diff --git a/clutter/clutter/clutter-timeline.c b/clutter/clutter/clutter-timeline.c index 7a293250c..dd828528d 100644 --- a/clutter/clutter/clutter-timeline.c +++ b/clutter/clutter/clutter-timeline.c @@ -96,7 +96,6 @@ #include "clutter/clutter-build-config.h" #include "clutter/clutter-timeline.h" -#include "clutter/deprecated/clutter-timeline.h" #include "clutter/clutter-actor-private.h" #include "clutter/clutter-debug.h" @@ -1555,23 +1554,6 @@ clutter_timeline_is_playing (ClutterTimeline *timeline) return timeline->priv->is_playing; } -/** - * clutter_timeline_new: - * @duration_ms: Duration of the timeline in milliseconds - * - * Creates a new #ClutterTimeline with a duration of @duration_ms milli seconds. - * - * Return value: the newly created #ClutterTimeline instance. Use - * [method@GObject.Object.unref] when done using it - */ -ClutterTimeline * -clutter_timeline_new (guint duration_ms) -{ - return g_object_new (CLUTTER_TYPE_TIMELINE, - "duration", duration_ms, - NULL); -} - /** * clutter_timeline_new_for_actor: * @actor: The #ClutterActor the timeline is associated with @@ -2195,7 +2177,7 @@ clutter_timeline_has_marker (ClutterTimeline *timeline, * clutter_timeline_set_direction (timeline, dir); * } * ... - * timeline = clutter_timeline_new (1000); + * timeline = clutter_timeline_new_for_actor (some_actor, 1000); * clutter_timeline_set_repeat_count (timeline, -1); * g_signal_connect (timeline, "completed", * G_CALLBACK (reverse_timeline), @@ -2205,7 +2187,7 @@ clutter_timeline_has_marker (ClutterTimeline *timeline, * can be effectively replaced by: * * ```c - * timeline = clutter_timeline_new (1000); + * timeline = clutter_timeline_new_for_actor (some_actor, 1000); * clutter_timeline_set_repeat_count (timeline, -1); * clutter_timeline_set_auto_reverse (timeline); * ``` diff --git a/clutter/clutter/deprecated/clutter-timeline.h b/clutter/clutter/deprecated/clutter-timeline.h deleted file mode 100644 index 2a5d0450c..000000000 --- a/clutter/clutter/deprecated/clutter-timeline.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Copyright (C) 2012 Intel Corp - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see . - */ - -#pragma once - -#include "clutter/clutter-timeline.h" - -G_BEGIN_DECLS - -CLUTTER_DEPRECATED_FOR(clutter_timeline_new_for_actor) -ClutterTimeline * clutter_timeline_new (guint duration_ms); - -G_END_DECLS diff --git a/clutter/clutter/meson.build b/clutter/clutter/meson.build index b9ba6555f..c1c30b8b6 100644 --- a/clutter/clutter/meson.build +++ b/clutter/clutter/meson.build @@ -229,7 +229,6 @@ clutter_nonintrospected_sources = [ clutter_deprecated_headers = [ 'deprecated/clutter-container.h', - 'deprecated/clutter-timeline.h', ] clutter_backend_private_headers = []