[mutter/gbsneto/clutter-cleanups-part1: 13/22] clutter/stage: Remove all deprecated functions



commit d4993c4b225fcee7f41403ffaa353058be6a9cd9
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Jun 26 17:01:43 2020 -0300

    clutter/stage: Remove all deprecated functions
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1332

 clutter/clutter/clutter-actor.c              |   3 -
 clutter/clutter/clutter-deprecated.h         |   1 -
 clutter/clutter/clutter-stage.c              | 117 +--------------------------
 clutter/clutter/deprecated/clutter-stage.h   |  82 -------------------
 clutter/clutter/meson.build                  |   1 -
 src/tests/clutter/conform/actor-invariants.c |  19 -----
 6 files changed, 1 insertion(+), 222 deletions(-)
---
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 24c5c08aad..47c03a917b 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -8700,9 +8700,6 @@ clutter_actor_new (void)
  * container, the actor will be removed.
  *
  * When you destroy a container, its children will be destroyed as well.
- *
- * Note: you cannot destroy the #ClutterStage returned by
- * clutter_stage_get_default().
  */
 void
 clutter_actor_destroy (ClutterActor *self)
diff --git a/clutter/clutter/clutter-deprecated.h b/clutter/clutter/clutter-deprecated.h
index a99964ade7..4fd0f9d3ba 100644
--- a/clutter/clutter/clutter-deprecated.h
+++ b/clutter/clutter/clutter-deprecated.h
@@ -7,7 +7,6 @@
 #include "deprecated/clutter-box.h"
 #include "deprecated/clutter-container.h"
 #include "deprecated/clutter-rectangle.h"
-#include "deprecated/clutter-stage.h"
 #include "deprecated/clutter-timeline.h"
 
 #undef __CLUTTER_DEPRECATED_H_INSIDE__
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index a0acc009f2..4f64df66e6 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -51,7 +51,6 @@
 #define CLUTTER_ENABLE_EXPERIMENTAL_API
 
 #include "clutter-stage.h"
-#include "deprecated/clutter-stage.h"
 #include "deprecated/clutter-container.h"
 
 #include "clutter-actor-private.h"
@@ -2109,56 +2108,6 @@ clutter_stage_init (ClutterStage *self)
   priv->cached_pick_mode = CLUTTER_PICK_NONE;
 }
 
-/**
- * clutter_stage_get_default:
- *
- * Retrieves a #ClutterStage singleton.
- *
- * This function is not as useful as it sounds, and will most likely
- * by deprecated in the future. Application code should only create
- * a #ClutterStage instance using clutter_stage_new(), and manage the
- * lifetime of the stage manually.
- *
- * The default stage singleton has a platform-specific behaviour: on
- * platforms without the %CLUTTER_FEATURE_STAGE_MULTIPLE feature flag
- * set, the first #ClutterStage instance will also be set to be the
- * default stage instance, and this function will always return a
- * pointer to it.
- *
- * On platforms with the %CLUTTER_FEATURE_STAGE_MULTIPLE feature flag
- * set, the default stage will be created by the first call to this
- * function, and every following call will return the same pointer to
- * it.
- *
- * Return value: (transfer none) (type Clutter.Stage): the main
- *   #ClutterStage. You should never destroy or unref the returned
- *   actor.
- *
- * Deprecated: 1.10: Use clutter_stage_new() instead.
- */
-ClutterActor *
-clutter_stage_get_default (void)
-{
-  ClutterStageManager *stage_manager = clutter_stage_manager_get_default ();
-  ClutterStage *stage;
-
-  stage = clutter_stage_manager_get_default_stage (stage_manager);
-  if (G_UNLIKELY (stage == NULL))
-    {
-      /* This will take care of automatically adding the stage to the
-       * stage manager and setting it as the default. Its floating
-       * reference will be claimed by the stage manager.
-       */
-      stage = g_object_new (CLUTTER_TYPE_STAGE, NULL);
-      _clutter_stage_manager_set_default_stage (stage_manager, stage);
-
-      /* the default stage is realized by default */
-      clutter_actor_realize (CLUTTER_ACTOR (stage));
-    }
-
-  return CLUTTER_ACTOR (stage);
-}
-
 static void
 clutter_stage_set_perspective (ClutterStage       *stage,
                                ClutterPerspective *perspective)
@@ -2719,10 +2668,7 @@ G_DEFINE_BOXED_TYPE (ClutterPerspective, clutter_perspective,
  * clutter_stage_new:
  *
  * Creates a new, non-default stage. A non-default stage is a new
- * top-level actor which can be used as another container. It works
- * exactly like the default stage, but while clutter_stage_get_default()
- * will always return the same instance, you will have to keep a pointer
- * to any #ClutterStage returned by clutter_stage_new().
+ * top-level actor which can be used as another container.
  *
  * The ability to support multiple stages depends on the current
  * backend. Use clutter_feature_available() and
@@ -2741,23 +2687,6 @@ clutter_stage_new (void)
   return g_object_new (CLUTTER_TYPE_STAGE, NULL);
 }
 
-/**
- * clutter_stage_ensure_current:
- * @stage: the #ClutterStage
- *
- * This function essentially makes sure the right GL context is
- * current for the passed stage. It is not intended to
- * be used by applications.
- *
- * Since: 0.8
- * Deprecated: mutter: This function does not do anything.
- */
-void
-clutter_stage_ensure_current (ClutterStage *stage)
-{
-  g_return_if_fail (CLUTTER_IS_STAGE (stage));
-}
-
 /**
  * clutter_stage_ensure_viewport:
  * @stage: a #ClutterStage
@@ -3007,50 +2936,6 @@ clutter_stage_is_redraw_queued (ClutterStage *stage)
   return priv->redraw_pending;
 }
 
-/**
- * clutter_stage_queue_redraw:
- * @stage: the #ClutterStage
- *
- * Queues a redraw for the passed stage.
- *
- * Applications should call clutter_actor_queue_redraw() and not
- * this function.
- *
- * Since: 0.8
- *
- * Deprecated: 1.10: Use clutter_actor_queue_redraw() instead.
- */
-void
-clutter_stage_queue_redraw (ClutterStage *stage)
-{
-  g_return_if_fail (CLUTTER_IS_STAGE (stage));
-
-  clutter_actor_queue_redraw (CLUTTER_ACTOR (stage));
-}
-
-/**
- * clutter_stage_is_default:
- * @stage: a #ClutterStage
- *
- * Checks if @stage is the default stage, or an instance created using
- * clutter_stage_new() but internally using the same implementation.
- *
- * Return value: %TRUE if the passed stage is the default one
- *
- * Since: 0.8
- *
- * Deprecated: 1.10: Track the stage pointer inside your application
- *   code, or use clutter_actor_get_stage() to retrieve the stage for
- *   a given actor.
- */
-gboolean
-clutter_stage_is_default (ClutterStage *stage)
-{
-  g_return_val_if_fail (CLUTTER_IS_STAGE (stage), FALSE);
-
-  return stage_is_default (stage);
-}
-
 void
 _clutter_stage_set_window (ClutterStage       *stage,
                            ClutterStageWindow *stage_window)
diff --git a/clutter/clutter/meson.build b/clutter/clutter/meson.build
index 5e7d25ac04..d6fcec5ab4 100644
--- a/clutter/clutter/meson.build
+++ b/clutter/clutter/meson.build
@@ -223,7 +223,6 @@ clutter_deprecated_headers = [
   'deprecated/clutter-box.h',
   'deprecated/clutter-container.h',
   'deprecated/clutter-rectangle.h',
-  'deprecated/clutter-stage.h',
   'deprecated/clutter-timeline.h',
 ]
 
diff --git a/src/tests/clutter/conform/actor-invariants.c b/src/tests/clutter/conform/actor-invariants.c
index 03a5a78f4a..a49b2bc634 100644
--- a/src/tests/clutter/conform/actor-invariants.c
+++ b/src/tests/clutter/conform/actor-invariants.c
@@ -341,24 +341,6 @@ clone_no_map (void)
   clutter_actor_destroy (CLUTTER_ACTOR (group));
 }
 
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-static void
-default_stage (void)
-{
-  ClutterActor *stage, *def_stage;
-
-  stage = clutter_test_get_stage ();
-  def_stage = clutter_stage_get_default ();
-
-  if (clutter_feature_available (CLUTTER_FEATURE_STAGE_MULTIPLE))
-    g_assert (stage != def_stage);
-  else
-    g_assert (stage == def_stage);
-
-  g_assert (CLUTTER_ACTOR_IS_REALIZED (def_stage));
-}
-G_GNUC_END_IGNORE_DEPRECATIONS
-
 CLUTTER_TEST_SUITE (
   CLUTTER_TEST_UNIT ("/actor/invariants/initial-state", actor_initial_state)
   CLUTTER_TEST_UNIT ("/actor/invariants/show-not-parented", actor_shown_not_parented)
@@ -369,5 +351,4 @@ CLUTTER_TEST_SUITE (
   CLUTTER_TEST_UNIT ("/actor/invariants/map-recursive", actor_map_recursive)
   CLUTTER_TEST_UNIT ("/actor/invariants/show-on-set-parent", actor_show_on_set_parent)
   CLUTTER_TEST_UNIT ("/actor/invariants/clone-no-map", clone_no_map)
-  CLUTTER_TEST_UNIT ("/actor/invariants/default-stage", default_stage)
 )


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]