[mutter] clutter/container: Remove clutter_container_raise_child



commit 8d1105ae6c78c6858b7717b6e79658f1721b74f9
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Wed Sep 15 22:52:10 2021 -0300

    clutter/container: Remove clutter_container_raise_child
    
    Also unused.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2057>

 clutter/clutter/clutter-container.c            | 80 --------------------------
 clutter/clutter/clutter-container.h            |  7 ---
 clutter/clutter/deprecated/clutter-container.h |  5 --
 3 files changed, 92 deletions(-)
---
diff --git a/clutter/clutter/clutter-container.c b/clutter/clutter/clutter-container.c
index 61e17cd569..bd18af3e7b 100644
--- a/clutter/clutter/clutter-container.c
+++ b/clutter/clutter/clutter-container.c
@@ -119,16 +119,6 @@ container_real_remove (ClutterContainer *container,
   clutter_actor_remove_child (CLUTTER_ACTOR (container), actor);
 }
 
-static void
-container_real_raise (ClutterContainer *container,
-                      ClutterActor     *child,
-                      ClutterActor     *sibling)
-{
-  ClutterActor *self = CLUTTER_ACTOR (container);
-
-  clutter_actor_set_child_above_sibling (self, child, sibling);
-}
-
 static void
 clutter_container_default_init (ClutterContainerInterface *iface)
 {
@@ -198,7 +188,6 @@ clutter_container_default_init (ClutterContainerInterface *iface)
 
   iface->add = container_real_add;
   iface->remove = container_real_remove;
-  iface->raise = container_real_raise;
 
   iface->child_meta_type = G_TYPE_INVALID;
   iface->create_child_meta = create_child_meta;
@@ -453,75 +442,6 @@ clutter_container_get_children (ClutterContainer *container)
   return clutter_actor_get_children (CLUTTER_ACTOR (container));
 }
 
-/**
- * clutter_container_raise_child: (virtual raise)
- * @container: a #ClutterContainer
- * @actor: the actor to raise
- * @sibling: (allow-none): the sibling to raise to, or %NULL to raise
- *   to the top
- *
- * Raises @actor to @sibling level, in the depth ordering.
- *
- * This function calls the #ClutterContainerIface.raise() virtual function,
- * which has been deprecated. The default implementation will call
- * clutter_actor_set_child_above_sibling().
- *
- * Since: 0.6
- *
- * Deprecated: 1.10: Use clutter_actor_set_child_above_sibling() instead.
- */
-void
-clutter_container_raise_child (ClutterContainer *container,
-                               ClutterActor     *actor,
-                               ClutterActor     *sibling)
-{
-  ClutterContainerIface *iface;
-  ClutterActor *self;
-
-  g_return_if_fail (CLUTTER_IS_CONTAINER (container));
-  g_return_if_fail (CLUTTER_IS_ACTOR (actor));
-  g_return_if_fail (sibling == NULL || CLUTTER_IS_ACTOR (sibling));
-
-  if (actor == sibling)
-    return;
-
-  self = CLUTTER_ACTOR (container);
-
-  if (clutter_actor_get_parent (actor) != self)
-    {
-      g_warning ("Actor of type '%s' is not a child of the container "
-                 "of type '%s'",
-                 g_type_name (G_OBJECT_TYPE (actor)),
-                 g_type_name (G_OBJECT_TYPE (container)));
-      return;
-    }
-
-  if (sibling != NULL &&
-      clutter_actor_get_parent (sibling) != self)
-    {
-      g_warning ("Actor of type '%s' is not a child of the container "
-                 "of type '%s'",
-                 g_type_name (G_OBJECT_TYPE (sibling)),
-                 g_type_name (G_OBJECT_TYPE (container)));
-      return;
-    }
-
-  iface = CLUTTER_CONTAINER_GET_IFACE (container);
-
-#ifdef CLUTTER_ENABLE_DEBUG
-  if (G_UNLIKELY (_clutter_diagnostic_enabled ()))
-    {
-      if (iface->raise != container_real_raise)
-        _clutter_diagnostic_message ("The ClutterContainer::raise() "
-                                     "virtual function has been deprecated "
-                                     "and it should not be overridden by "
-                                     "newly written code");
-    }
-#endif /* CLUTTER_ENABLE_DEBUG */
-
-  iface->raise (container, actor, sibling);
-}
-
 /**
  * clutter_container_find_child_by_name:
  * @container: a #ClutterContainer
diff --git a/clutter/clutter/clutter-container.h b/clutter/clutter/clutter-container.h
index 110756930d..cf263fe5e9 100644
--- a/clutter/clutter/clutter-container.h
+++ b/clutter/clutter/clutter-container.h
@@ -59,8 +59,6 @@ typedef struct _ClutterContainerIface   ClutterContainerIface;
  *   function is deprecated, and it should not be overridden.
  * @remove: virtual function for removing an actor from the container. This
  *   virtual function is deprecated, and it should not be overridden.
- * @raise: virtual function for raising a child. This virtual function is
- *   deprecated and it should not be overridden.
  * @child_meta_type: The GType used for storing auxiliary information about
  *   each of the containers children.
  * @create_child_meta: virtual function that gets called for each added
@@ -92,11 +90,6 @@ struct _ClutterContainerIface
   void (* remove)           (ClutterContainer *container,
                              ClutterActor     *actor);
 
-  /* child stacking */
-  void (* raise)            (ClutterContainer *container,
-                             ClutterActor     *actor,
-                             ClutterActor     *sibling);
-
   /* ClutterChildMeta management */
   GType                child_meta_type;
   void              (* create_child_meta)  (ClutterContainer *container,
diff --git a/clutter/clutter/deprecated/clutter-container.h b/clutter/clutter/deprecated/clutter-container.h
index d4fea41412..d8da9e0267 100644
--- a/clutter/clutter/deprecated/clutter-container.h
+++ b/clutter/clutter/deprecated/clutter-container.h
@@ -55,11 +55,6 @@ void            clutter_container_remove_actor                  (ClutterContaine
 CLUTTER_DEPRECATED_FOR(clutter_actor_get_children)
 GList *         clutter_container_get_children                  (ClutterContainer *container);
 
-CLUTTER_DEPRECATED_FOR(clutter_actor_set_child_above_sibling)
-void            clutter_container_raise_child                   (ClutterContainer *container,
-                                                                 ClutterActor     *actor,
-                                                                 ClutterActor     *sibling);
-
 G_END_DECLS
 
 #endif /* __CLUTTER_CONTAINER_DEPRECATED_H__ */


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