[mutter] clutter: Remove the rest of deprecated/clutter-animator.c
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter: Remove the rest of deprecated/clutter-animator.c
- Date: Wed, 27 Feb 2019 03:38:11 +0000 (UTC)
commit 39e9e538717d2366c981ca03d09d3798ebce2709
Author: Adam Jackson <ajax redhat com>
Date: Wed Feb 20 12:26:48 2019 -0500
clutter: Remove the rest of deprecated/clutter-animator.c
https://gitlab.gnome.org/GNOME/mutter/merge_requests/452
clutter/clutter/clutter-deprecated.h | 1 -
clutter/clutter/clutter-types.h | 1 -
clutter/clutter/deprecated/clutter-animator.c | 2164 -------------------------
clutter/clutter/deprecated/clutter-animator.h | 188 ---
clutter/clutter/deprecated/clutter-state.c | 184 +--
clutter/clutter/deprecated/clutter-state.h | 9 -
clutter/clutter/meson.build | 2 -
clutter/tests/conform/animator.c | 199 ---
clutter/tests/conform/meson.build | 1 -
clutter/tests/interactive/meson.build | 1 -
clutter/tests/interactive/test-animator.c | 142 --
po/POTFILES.skip | 1 -
12 files changed, 4 insertions(+), 2889 deletions(-)
---
diff --git a/clutter/clutter/clutter-deprecated.h b/clutter/clutter/clutter-deprecated.h
index 68b3253d0..3a9add772 100644
--- a/clutter/clutter/clutter-deprecated.h
+++ b/clutter/clutter/clutter-deprecated.h
@@ -7,7 +7,6 @@
#include "deprecated/clutter-alpha.h"
#include "deprecated/clutter-animatable.h"
#include "deprecated/clutter-animation.h"
-#include "deprecated/clutter-animator.h"
#include "deprecated/clutter-behaviour.h"
#include "deprecated/clutter-behaviour-depth.h"
#include "deprecated/clutter-behaviour-ellipse.h"
diff --git a/clutter/clutter/clutter-types.h b/clutter/clutter/clutter-types.h
index 12544565b..e0bffe616 100644
--- a/clutter/clutter/clutter-types.h
+++ b/clutter/clutter/clutter-types.h
@@ -90,7 +90,6 @@ typedef struct _ClutterVertex ClutterVertex;
typedef struct _ClutterAlpha ClutterAlpha;
typedef struct _ClutterAnimation ClutterAnimation;
-typedef struct _ClutterAnimator ClutterAnimator;
typedef struct _ClutterState ClutterState;
typedef struct _ClutterInputDeviceTool ClutterInputDeviceTool;
diff --git a/clutter/clutter/deprecated/clutter-state.c b/clutter/clutter/deprecated/clutter-state.c
index 5bb9fb6ca..86d8ffd45 100644
--- a/clutter/clutter/deprecated/clutter-state.c
+++ b/clutter/clutter/deprecated/clutter-state.c
@@ -131,7 +131,6 @@
* "source" : "source-state",
* "target" : "target-state",
* "duration" : milliseconds,
- * "animator" : "animator-definition"
* },
* ...
* ]
@@ -142,7 +141,7 @@
* as clutter_state_set_key() function arguments.
*
* The source and target values control the source and target state of the
- * transition. The key and animator properties are mutually exclusive.
+ * transition.
*
* The pre-delay and post-delay values are optional.
*
@@ -189,7 +188,6 @@
#include "clutter-alpha.h"
#include "clutter-animatable.h"
-#include "clutter-animator.h"
#include "clutter-enum-types.h"
#include "clutter-interval.h"
#include "clutter-marshal.h"
@@ -197,11 +195,6 @@
#include "clutter-scriptable.h"
#include "clutter-script-private.h"
-typedef struct StateAnimator {
- const gchar *source_state_name; /* interned string identifying entry */
- ClutterAnimator *animator; /* pointer to animator itself */
-} StateAnimator;
-
typedef struct State
{
const gchar *name; /* interned string for this state name */
@@ -209,8 +202,6 @@ typedef struct State
names */
GList *keys; /* list of all keys pertaining to transitions
from other states to this one */
- GArray *animators; /* list of animators for transitioning from
- * specific source states */
ClutterState *clutter_state; /* the ClutterState object this state belongs to
*/
} State;
@@ -227,8 +218,6 @@ struct _ClutterStatePrivate
State *source_state; /* current source_state */
const gchar *target_state_name; /* current target state */
State *target_state; /* target state name */
- ClutterAnimator *current_animator; /* !NULL if the current transition is
- overriden by an animator */
};
#define SLAVE_TIMELINE_LENGTH 10000
@@ -496,7 +485,6 @@ state_free (gpointer data)
state->keys = g_list_remove (state->keys, state->keys->data))
clutter_state_key_free (state->keys->data);
- g_array_free (state->animators, TRUE);
g_hash_table_destroy (state->durations);
g_free (state);
}
@@ -510,7 +498,6 @@ state_new (ClutterState *clutter_state,
state = g_new0 (State, 1);
state->clutter_state = clutter_state;
state->name = name;
- state->animators = g_array_new (TRUE, TRUE, sizeof (StateAnimator));
state->durations = g_hash_table_new (g_direct_hash, g_direct_equal);
return state;
@@ -533,14 +520,6 @@ static void
clutter_state_completed (ClutterTimeline *timeline,
ClutterState *state)
{
- ClutterStatePrivate *priv = state->priv;
-
- if (priv->current_animator)
- {
- clutter_animator_set_timeline (priv->current_animator, NULL);
- priv->current_animator = NULL;
- }
-
g_signal_emit (state, state_signals[COMPLETED], 0);
}
@@ -556,9 +535,6 @@ clutter_state_new_frame (ClutterTimeline *timeline,
GObject *curobj = NULL;
gboolean found_specific = FALSE;
- if (priv->current_animator)
- return;
-
progress = clutter_timeline_get_progress (timeline);
for (k = priv->target_state->keys; k; k = k->next)
@@ -672,12 +648,6 @@ clutter_state_change (ClutterState *state,
clutter_timeline_stop (priv->timeline);
clutter_timeline_rewind (priv->timeline);
- if (priv->current_animator)
- {
- clutter_animator_set_timeline (priv->current_animator, NULL);
- priv->current_animator = NULL;
- }
-
return NULL;
}
@@ -693,12 +663,6 @@ clutter_state_change (ClutterState *state,
return priv->timeline;
}
- if (priv->current_animator != NULL)
- {
- clutter_animator_set_timeline (priv->current_animator, NULL);
- priv->current_animator = NULL;
- }
-
priv->source_state_name = priv->target_state_name;
priv->target_state_name = target_state_name;
@@ -1530,126 +1494,6 @@ clutter_state_init (ClutterState *self)
}
-/**
- * clutter_state_get_animator:
- * @state: a #ClutterState instance.
- * @source_state_name: the name of a source state
- * @target_state_name: the name of a target state
- *
- * Retrieves the #ClutterAnimator that is being used for transitioning
- * between the two states, if any has been set
- *
- * Return value: (transfer none): a #ClutterAnimator instance, or %NULL
- *
- * Since: 1.4
- * Deprecated: 1.12: Use #ClutterKeyframeTransition and
- * #ClutterTransitionGroup instead
- */
-ClutterAnimator *
-clutter_state_get_animator (ClutterState *state,
- const gchar *source_state_name,
- const gchar *target_state_name)
-{
- State *target_state;
- guint i;
-
- g_return_val_if_fail (CLUTTER_IS_STATE (state), NULL);
-
- source_state_name = g_intern_string (source_state_name);
- if (source_state_name == g_intern_static_string (""))
- source_state_name = NULL;
-
- target_state_name = g_intern_string (target_state_name);
-
- target_state = clutter_state_fetch_state (state, target_state_name, FALSE);
- if (target_state == NULL)
- return NULL;
-
- for (i = 0; i < target_state->animators->len; i++)
- {
- const StateAnimator *animator;
-
- animator = &g_array_index (target_state->animators, StateAnimator, i);
- if (animator->source_state_name == source_state_name)
- return animator->animator;
- }
-
- return NULL;
-}
-
-/**
- * clutter_state_set_animator:
- * @state: a #ClutterState instance.
- * @source_state_name: the name of a source state
- * @target_state_name: the name of a target state
- * @animator: (allow-none): a #ClutterAnimator instance, or %NULL to
- * unset an existing #ClutterAnimator
- *
- * Specifies a #ClutterAnimator to be used when transitioning between
- * the two named states.
- *
- * The @animator allows specifying a transition between the state that is
- * more elaborate than the basic transitions allowed by the tweening of
- * properties defined in the #ClutterState keys.
- *
- * If @animator is %NULL it will unset an existing animator.
- *
- * #ClutterState will take a reference on the passed @animator, if any
- *
- * Since: 1.4
- * Deprecated: 1.12: Use #ClutterKeyframeTransition and
- * #ClutterTransitionGroup instead
- */
-void
-clutter_state_set_animator (ClutterState *state,
- const gchar *source_state_name,
- const gchar *target_state_name,
- ClutterAnimator *animator)
-{
- State *target_state;
- guint i;
-
- g_return_if_fail (CLUTTER_IS_STATE (state));
-
- source_state_name = g_intern_string (source_state_name);
- target_state_name = g_intern_string (target_state_name);
-
- target_state = clutter_state_fetch_state (state, target_state_name, TRUE);
- if (target_state == NULL)
- return;
-
- for (i = 0; target_state->animators->len; i++)
- {
- StateAnimator *a;
-
- a = &g_array_index (target_state->animators, StateAnimator, i);
- if (a->source_state_name == source_state_name)
- {
- g_object_unref (a->animator);
-
- if (animator != NULL)
- a->animator = g_object_ref (animator);
- else
- {
- /* remove the matched animator if passed NULL */
- g_array_remove_index (target_state->animators, i);
- }
-
- return;
- }
- }
-
- if (animator != NULL)
- {
- StateAnimator state_animator = {
- source_state_name,
- g_object_ref (animator)
- };
-
- g_array_append_val (target_state->animators, state_animator);
- }
-}
-
static gpointer
clutter_state_key_copy (gpointer boxed)
{
@@ -2088,12 +1932,10 @@ parse_state_transition (JsonArray *array,
if (!json_object_has_member (object, "source") ||
!json_object_has_member (object, "target") ||
- !(json_object_has_member (object, "keys") ||
- json_object_has_member (object, "animator")))
+ !(json_object_has_member (object, "keys")))
{
g_warning ("The transition description at index %d is missing one "
- "of the mandatory members: source, target and keys or "
- "animator", index_);
+ "of the mandatory members: source, target and keys", index_);
return;
}
@@ -2112,29 +1954,11 @@ parse_state_transition (JsonArray *array,
duration);
}
- if (json_object_has_member (object, "animator"))
- {
- const gchar *id_ = json_object_get_string_member (object, "animator");
- GObject *animator;
-
- animator = clutter_script_get_object (clos->script, id_);
- if (animator == NULL)
- {
- g_warning ("No object with id '%s' has been defined.", id_);
- return;
- }
-
- clutter_state_set_animator (clos->state,
- source_name,
- target_name,
- CLUTTER_ANIMATOR (animator));
- }
-
if (!json_object_has_member (object, "keys"))
return;
keys = json_object_get_array_member (object, "keys");
- if (keys == NULL && !json_object_has_member (object, "animator"))
+ if (keys == NULL)
{
g_warning ("The transition description at index %d has an invalid "
"key member of type '%s' when an array was expected.",
diff --git a/clutter/clutter/deprecated/clutter-state.h b/clutter/clutter/deprecated/clutter-state.h
index 46151b858..b7c65b2f7 100644
--- a/clutter/clutter/deprecated/clutter-state.h
+++ b/clutter/clutter/deprecated/clutter-state.h
@@ -145,15 +145,6 @@ void clutter_state_remove_key (ClutterState *state,
CLUTTER_DEPRECATED
ClutterTimeline * clutter_state_get_timeline (ClutterState *state);
CLUTTER_DEPRECATED
-void clutter_state_set_animator (ClutterState *state,
- const gchar *source_state_name,
- const gchar *target_state_name,
- ClutterAnimator *animator);
-CLUTTER_DEPRECATED
-ClutterAnimator * clutter_state_get_animator (ClutterState *state,
- const gchar *source_state_name,
- const gchar *target_state_name);
-CLUTTER_DEPRECATED
const gchar * clutter_state_get_state (ClutterState *state);
/*
diff --git a/clutter/clutter/meson.build b/clutter/clutter/meson.build
index 5f544777e..034d42ef1 100644
--- a/clutter/clutter/meson.build
+++ b/clutter/clutter/meson.build
@@ -220,7 +220,6 @@ clutter_deprecated_headers = [
'deprecated/clutter-alpha.h',
'deprecated/clutter-animatable.h',
'deprecated/clutter-animation.h',
- 'deprecated/clutter-animator.h',
'deprecated/clutter-behaviour.h',
'deprecated/clutter-behaviour-depth.h',
'deprecated/clutter-behaviour-ellipse.h',
@@ -252,7 +251,6 @@ clutter_deprecated_sources = [
'deprecated/clutter-actor-deprecated.c',
'deprecated/clutter-alpha.c',
'deprecated/clutter-animation.c',
- 'deprecated/clutter-animator.c',
'deprecated/clutter-behaviour.c',
'deprecated/clutter-behaviour-depth.c',
'deprecated/clutter-behaviour-ellipse.c',
diff --git a/clutter/tests/conform/meson.build b/clutter/tests/conform/meson.build
index acb73d488..7b8499978 100644
--- a/clutter/tests/conform/meson.build
+++ b/clutter/tests/conform/meson.build
@@ -40,7 +40,6 @@ clutter_conform_tests_general_tests = [
]
clutter_conform_tests_deprecated_tests = [
- 'animator',
'behaviours',
'group',
'rectangle',
diff --git a/clutter/tests/interactive/meson.build b/clutter/tests/interactive/meson.build
index 3f031a0b8..c1e90d3e1 100644
--- a/clutter/tests/interactive/meson.build
+++ b/clutter/tests/interactive/meson.build
@@ -27,7 +27,6 @@ clutter_tests_interactive_test_sources = [
'test-script.c',
'test-grab.c',
'test-cogl-shader-glsl.c',
- 'test-animator.c',
'test-state.c',
'test-fbo.c',
'test-multistage.c',
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 8ff60630c..309e666d0 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -57,7 +57,6 @@ clutter/clutter/clutter-virtual-input-device.c
clutter/clutter/clutter-zoom-action.c
clutter/clutter/deprecated/clutter-alpha.c
clutter/clutter/deprecated/clutter-animation.c
-clutter/clutter/deprecated/clutter-animator.c
clutter/clutter/deprecated/clutter-behaviour.c
clutter/clutter/deprecated/clutter-behaviour-depth.c
clutter/clutter/deprecated/clutter-behaviour-ellipse.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]