mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
clutter: Remove deprecated clutter-score.c
https://gitlab.gnome.org/GNOME/mutter/merge_requests/452
This commit is contained in:
parent
d39211f438
commit
cf2d06e9b9
@ -26,7 +26,6 @@
|
||||
#include "deprecated/clutter-main.h"
|
||||
#include "deprecated/clutter-model.h"
|
||||
#include "deprecated/clutter-rectangle.h"
|
||||
#include "deprecated/clutter-score.h"
|
||||
#include "deprecated/clutter-shader.h"
|
||||
#include "deprecated/clutter-stage-manager.h"
|
||||
#include "deprecated/clutter-stage.h"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,144 +0,0 @@
|
||||
/*
|
||||
* Clutter.
|
||||
*
|
||||
* An OpenGL based 'interactive canvas' library.
|
||||
*
|
||||
* Authored By Matthew Allum <mallum@openedhand.com>
|
||||
*
|
||||
* Copyright (C) 2006 OpenedHand
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
|
||||
#error "Only <clutter/clutter.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __CLUTTER_SCORE_H__
|
||||
#define __CLUTTER_SCORE_H__
|
||||
|
||||
#include <clutter/clutter-timeline.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CLUTTER_TYPE_SCORE (clutter_score_get_type ())
|
||||
|
||||
#define CLUTTER_SCORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_SCORE, ClutterScore))
|
||||
#define CLUTTER_SCORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_SCORE, ClutterScoreClass))
|
||||
#define CLUTTER_IS_SCORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_SCORE))
|
||||
#define CLUTTER_IS_SCORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_SCORE))
|
||||
#define CLUTTER_SCORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_SCORE, ClutterScoreClass))
|
||||
|
||||
typedef struct _ClutterScore ClutterScore;
|
||||
typedef struct _ClutterScorePrivate ClutterScorePrivate;
|
||||
typedef struct _ClutterScoreClass ClutterScoreClass;
|
||||
|
||||
/**
|
||||
* ClutterScore:
|
||||
*
|
||||
* The #ClutterScore structure contains only private data
|
||||
* and should be accessed using the provided API
|
||||
*
|
||||
* Since: 0.6
|
||||
*/
|
||||
struct _ClutterScore
|
||||
{
|
||||
/*< private >*/
|
||||
GObject parent;
|
||||
ClutterScorePrivate *priv;
|
||||
};
|
||||
|
||||
/**
|
||||
* ClutterScoreClass:
|
||||
* @timeline_started: handler for the #ClutterScore::timeline-started signal
|
||||
* @timeline_completed: handler for the #ClutterScore::timeline-completed
|
||||
* signal
|
||||
* @started: handler for the #ClutterScore::started signal
|
||||
* @completed: handler for the #ClutterScore::completed signal
|
||||
* @paused: handler for the #ClutterScore::paused signal
|
||||
*
|
||||
* The #ClutterScoreClass structure contains only private data
|
||||
*
|
||||
* Since: 0.6
|
||||
*/
|
||||
struct _ClutterScoreClass
|
||||
{
|
||||
/*< private >*/
|
||||
GObjectClass parent_class;
|
||||
|
||||
/*< public >*/
|
||||
void (* timeline_started) (ClutterScore *score,
|
||||
ClutterTimeline *timeline);
|
||||
void (* timeline_completed) (ClutterScore *score,
|
||||
ClutterTimeline *timeline);
|
||||
|
||||
void (* started) (ClutterScore *score);
|
||||
void (* completed) (ClutterScore *score);
|
||||
void (* paused) (ClutterScore *score);
|
||||
|
||||
/*< private >*/
|
||||
/* padding for future expansion */
|
||||
void (*_clutter_score_1) (void);
|
||||
void (*_clutter_score_2) (void);
|
||||
void (*_clutter_score_3) (void);
|
||||
void (*_clutter_score_4) (void);
|
||||
void (*_clutter_score_5) (void);
|
||||
};
|
||||
|
||||
CLUTTER_DEPRECATED
|
||||
GType clutter_score_get_type (void) G_GNUC_CONST;
|
||||
|
||||
CLUTTER_DEPRECATED
|
||||
ClutterScore * clutter_score_new (void);
|
||||
|
||||
CLUTTER_DEPRECATED
|
||||
void clutter_score_set_loop (ClutterScore *score,
|
||||
gboolean loop);
|
||||
CLUTTER_DEPRECATED
|
||||
gboolean clutter_score_get_loop (ClutterScore *score);
|
||||
|
||||
CLUTTER_DEPRECATED
|
||||
gulong clutter_score_append (ClutterScore *score,
|
||||
ClutterTimeline *parent,
|
||||
ClutterTimeline *timeline);
|
||||
CLUTTER_DEPRECATED
|
||||
gulong clutter_score_append_at_marker (ClutterScore *score,
|
||||
ClutterTimeline *parent,
|
||||
const gchar *marker_name,
|
||||
ClutterTimeline *timeline);
|
||||
CLUTTER_DEPRECATED
|
||||
void clutter_score_remove (ClutterScore *score,
|
||||
gulong id_);
|
||||
CLUTTER_DEPRECATED
|
||||
void clutter_score_remove_all (ClutterScore *score);
|
||||
CLUTTER_DEPRECATED
|
||||
ClutterTimeline *clutter_score_get_timeline (ClutterScore *score,
|
||||
gulong id_);
|
||||
CLUTTER_DEPRECATED
|
||||
GSList * clutter_score_list_timelines (ClutterScore *score);
|
||||
|
||||
CLUTTER_DEPRECATED
|
||||
void clutter_score_start (ClutterScore *score);
|
||||
CLUTTER_DEPRECATED
|
||||
void clutter_score_stop (ClutterScore *score);
|
||||
CLUTTER_DEPRECATED
|
||||
void clutter_score_pause (ClutterScore *score);
|
||||
CLUTTER_DEPRECATED
|
||||
void clutter_score_rewind (ClutterScore *score);
|
||||
CLUTTER_DEPRECATED
|
||||
gboolean clutter_score_is_playing (ClutterScore *score);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_SCORE_H__ */
|
@ -239,7 +239,6 @@ clutter_deprecated_headers = [
|
||||
'deprecated/clutter-main.h',
|
||||
'deprecated/clutter-model.h',
|
||||
'deprecated/clutter-rectangle.h',
|
||||
'deprecated/clutter-score.h',
|
||||
'deprecated/clutter-shader.h',
|
||||
'deprecated/clutter-stage-manager.h',
|
||||
'deprecated/clutter-stage.h',
|
||||
@ -269,7 +268,6 @@ clutter_deprecated_sources = [
|
||||
'deprecated/clutter-list-model.c',
|
||||
'deprecated/clutter-model.c',
|
||||
'deprecated/clutter-rectangle.c',
|
||||
'deprecated/clutter-score.c',
|
||||
'deprecated/clutter-shader.c',
|
||||
'deprecated/clutter-state.c',
|
||||
'deprecated/clutter-table-layout.c',
|
||||
|
@ -1,121 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <clutter/clutter.h>
|
||||
|
||||
#include "test-conform-common.h"
|
||||
|
||||
static guint level = 0;
|
||||
|
||||
static void
|
||||
on_score_started (ClutterScore *score)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
g_print ("Score started\n");
|
||||
}
|
||||
|
||||
static void
|
||||
on_score_completed (ClutterScore *score)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
g_print ("Score completed\n");
|
||||
}
|
||||
|
||||
static void
|
||||
on_timeline_started (ClutterScore *score,
|
||||
ClutterTimeline *timeline)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
g_print ("Started timeline: '%s'\n",
|
||||
(gchar *) g_object_get_data (G_OBJECT (timeline), "timeline-name"));
|
||||
|
||||
level += 1;
|
||||
}
|
||||
|
||||
static void
|
||||
on_timeline_completed (ClutterScore *score,
|
||||
ClutterTimeline *timeline)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
g_print ("Completed timeline: '%s'\n",
|
||||
(gchar *) g_object_get_data (G_OBJECT (timeline), "timeline-name"));
|
||||
|
||||
level -= 1;
|
||||
}
|
||||
|
||||
void
|
||||
score_base (TestConformSimpleFixture *fixture,
|
||||
gconstpointer data)
|
||||
{
|
||||
ClutterScore *score;
|
||||
ClutterTimeline *timeline_1;
|
||||
ClutterTimeline *timeline_2;
|
||||
ClutterTimeline *timeline_3;
|
||||
ClutterTimeline *timeline_4;
|
||||
ClutterTimeline *timeline_5;
|
||||
GSList *timelines;
|
||||
|
||||
/* FIXME - this is necessary to make the master clock spin */
|
||||
ClutterActor *stage = clutter_stage_new ();
|
||||
|
||||
timeline_1 = clutter_timeline_new (100);
|
||||
g_object_set_data_full (G_OBJECT (timeline_1),
|
||||
"timeline-name", g_strdup ("Timeline 1"),
|
||||
g_free);
|
||||
|
||||
timeline_2 = clutter_timeline_new (100);
|
||||
clutter_timeline_add_marker_at_time (timeline_2, "foo", 50);
|
||||
g_object_set_data_full (G_OBJECT (timeline_2),
|
||||
"timeline-name", g_strdup ("Timeline 2"),
|
||||
g_free);
|
||||
|
||||
timeline_3 = clutter_timeline_new (100);
|
||||
g_object_set_data_full (G_OBJECT (timeline_3),
|
||||
"timeline-name", g_strdup ("Timeline 3"),
|
||||
g_free);
|
||||
|
||||
timeline_4 = clutter_timeline_new (100);
|
||||
g_object_set_data_full (G_OBJECT (timeline_4),
|
||||
"timeline-name", g_strdup ("Timeline 4"),
|
||||
g_free);
|
||||
|
||||
timeline_5 = clutter_timeline_new (100);
|
||||
g_object_set_data_full (G_OBJECT (timeline_5),
|
||||
"timeline-name", g_strdup ("Timeline 5"),
|
||||
g_free);
|
||||
|
||||
score = clutter_score_new();
|
||||
g_signal_connect (score, "started",
|
||||
G_CALLBACK (on_score_started),
|
||||
NULL);
|
||||
g_signal_connect (score, "timeline-started",
|
||||
G_CALLBACK (on_timeline_started),
|
||||
NULL);
|
||||
g_signal_connect (score, "timeline-completed",
|
||||
G_CALLBACK (on_timeline_completed),
|
||||
NULL);
|
||||
g_signal_connect (score, "completed",
|
||||
G_CALLBACK (on_score_completed),
|
||||
NULL);
|
||||
|
||||
clutter_score_append (score, NULL, timeline_1);
|
||||
clutter_score_append (score, timeline_1, timeline_2);
|
||||
clutter_score_append (score, timeline_1, timeline_3);
|
||||
clutter_score_append (score, timeline_3, timeline_4);
|
||||
|
||||
clutter_score_append_at_marker (score, timeline_2, "foo", timeline_5);
|
||||
|
||||
timelines = clutter_score_list_timelines (score);
|
||||
g_assert (5 == g_slist_length (timelines));
|
||||
g_slist_free (timelines);
|
||||
|
||||
clutter_score_start (score);
|
||||
|
||||
clutter_actor_destroy (stage);
|
||||
|
||||
g_object_unref (timeline_1);
|
||||
g_object_unref (timeline_2);
|
||||
g_object_unref (timeline_3);
|
||||
g_object_unref (timeline_4);
|
||||
g_object_unref (timeline_5);
|
||||
g_object_unref (score);
|
||||
}
|
Loading…
Reference in New Issue
Block a user