From 0a41f0f855fe574ba0efa1e648c146e8365dc851 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 5 Nov 2019 11:52:18 -0500 Subject: [PATCH] clutter: Remove unused deprecated/clutter-bin-layout.h https://gitlab.gnome.org/GNOME/mutter/merge_requests/921 --- clutter/clutter/clutter-bin-layout.c | 186 +----------------- clutter/clutter/clutter-deprecated.h | 1 - .../clutter/deprecated/clutter-bin-layout.h | 56 ------ clutter/clutter/meson.build | 1 - 4 files changed, 1 insertion(+), 243 deletions(-) delete mode 100644 clutter/clutter/deprecated/clutter-bin-layout.h diff --git a/clutter/clutter/clutter-bin-layout.c b/clutter/clutter/clutter-bin-layout.c index 6bcdbe7f9..8c63b802c 100644 --- a/clutter/clutter/clutter-bin-layout.c +++ b/clutter/clutter/clutter-bin-layout.c @@ -49,10 +49,10 @@ #define CLUTTER_DISABLE_DEPRECATION_WARNINGS #include "deprecated/clutter-container.h" -#include "deprecated/clutter-bin-layout.h" #include "clutter-actor-private.h" #include "clutter-animatable.h" +#include "clutter-bin-layout.h" #include "clutter-child-meta.h" #include "clutter-debug.h" #include "clutter-enum-types.h" @@ -698,187 +698,3 @@ clutter_bin_layout_new (ClutterBinAlignment x_align, "y-align", y_align, NULL); } - -/** - * clutter_bin_layout_set_alignment: - * @self: a #ClutterBinLayout - * @child: (allow-none): a child of @container - * @x_align: the horizontal alignment policy to be used for the @child - * inside @container - * @y_align: the vertical aligment policy to be used on the @child - * inside @container - * - * Sets the horizontal and vertical alignment policies to be applied - * to a @child of @self - * - * If @child is %NULL then the @x_align and @y_align values will - * be set as the default alignment policies - * - * Since: 1.2 - * - * Deprecated: 1.12: Use the #ClutterActor:x-align and - * #ClutterActor:y-align properties of #ClutterActor instead. - */ -void -clutter_bin_layout_set_alignment (ClutterBinLayout *self, - ClutterActor *child, - ClutterBinAlignment x_align, - ClutterBinAlignment y_align) -{ - ClutterBinLayoutPrivate *priv; - ClutterLayoutManager *manager; - ClutterLayoutMeta *meta; - - g_return_if_fail (CLUTTER_IS_BIN_LAYOUT (self)); - g_return_if_fail (child == NULL || CLUTTER_IS_ACTOR (child)); - - priv = self->priv; - - if (priv->container == NULL) - { - if (child == NULL) - { - set_x_align (self, x_align); - set_y_align (self, y_align); - } - else - g_warning ("The layout of type '%s' must be associated to " - "a ClutterContainer before setting the alignment " - "on its children", - G_OBJECT_TYPE_NAME (self)); - - return; - } - - manager = CLUTTER_LAYOUT_MANAGER (self); - meta = clutter_layout_manager_get_child_meta (manager, - priv->container, - child); - g_assert (CLUTTER_IS_BIN_LAYER (meta)); - - set_layer_x_align (CLUTTER_BIN_LAYER (meta), x_align); - set_layer_y_align (CLUTTER_BIN_LAYER (meta), y_align); -} - -/** - * clutter_bin_layout_get_alignment: - * @self: a #ClutterBinLayout - * @child: (allow-none): a child of @container - * @x_align: (out) (allow-none): return location for the horizontal - * alignment policy - * @y_align: (out) (allow-none): return location for the vertical - * alignment policy - * - * Retrieves the horizontal and vertical alignment policies for - * a child of @self - * - * If @child is %NULL the default alignment policies will be returned - * instead - * - * Since: 1.2 - * - * Deprecated: 1.12: Use the #ClutterActor:x-align and the - * #ClutterActor:y-align properties of #ClutterActor instead. - */ -void -clutter_bin_layout_get_alignment (ClutterBinLayout *self, - ClutterActor *child, - ClutterBinAlignment *x_align, - ClutterBinAlignment *y_align) -{ - ClutterBinLayoutPrivate *priv; - ClutterLayoutManager *manager; - ClutterLayoutMeta *meta; - ClutterBinLayer *layer; - - g_return_if_fail (CLUTTER_IS_BIN_LAYOUT (self)); - - priv = self->priv; - - if (priv->container == NULL) - { - if (child == NULL) - { - if (x_align) - *x_align = priv->x_align; - - if (y_align) - *y_align = priv->y_align; - } - else - g_warning ("The layout of type '%s' must be associated to " - "a ClutterContainer before getting the alignment " - "of its children", - G_OBJECT_TYPE_NAME (self)); - - return; - } - - manager = CLUTTER_LAYOUT_MANAGER (self); - meta = clutter_layout_manager_get_child_meta (manager, - priv->container, - child); - g_assert (CLUTTER_IS_BIN_LAYER (meta)); - - layer = CLUTTER_BIN_LAYER (meta); - - if (x_align) - *x_align = layer->x_align; - - if (y_align) - *y_align = layer->y_align; -} - -/** - * clutter_bin_layout_add: - * @self: a #ClutterBinLayout - * @child: a #ClutterActor - * @x_align: horizontal alignment policy for @child - * @y_align: vertical alignment policy for @child - * - * Adds a #ClutterActor to the container using @self and - * sets the alignment policies for it - * - * This function is equivalent to clutter_container_add_actor() - * and clutter_layout_manager_child_set_property() but it does not - * require a pointer to the #ClutterContainer associated to the - * #ClutterBinLayout - * - * Since: 1.2 - * - * Deprecated: 1.12: Use clutter_actor_add_child() instead. - */ -void -clutter_bin_layout_add (ClutterBinLayout *self, - ClutterActor *child, - ClutterBinAlignment x_align, - ClutterBinAlignment y_align) -{ - ClutterBinLayoutPrivate *priv; - ClutterLayoutManager *manager; - ClutterLayoutMeta *meta; - - g_return_if_fail (CLUTTER_IS_BIN_LAYOUT (self)); - g_return_if_fail (CLUTTER_IS_ACTOR (child)); - - priv = self->priv; - - if (priv->container == NULL) - { - g_warning ("The layout of type '%s' must be associated to " - "a ClutterContainer before adding children", - G_OBJECT_TYPE_NAME (self)); - return; - } - - clutter_container_add_actor (priv->container, child); - - manager = CLUTTER_LAYOUT_MANAGER (self); - meta = clutter_layout_manager_get_child_meta (manager, - priv->container, - child); - g_assert (CLUTTER_IS_BIN_LAYER (meta)); - - set_layer_x_align (CLUTTER_BIN_LAYER (meta), x_align); - set_layer_y_align (CLUTTER_BIN_LAYER (meta), y_align); -} diff --git a/clutter/clutter/clutter-deprecated.h b/clutter/clutter/clutter-deprecated.h index 0bdd51904..d9aa94bc2 100644 --- a/clutter/clutter/clutter-deprecated.h +++ b/clutter/clutter/clutter-deprecated.h @@ -6,7 +6,6 @@ #include "deprecated/clutter-actor.h" #include "deprecated/clutter-alpha.h" #include "deprecated/clutter-animation.h" -#include "deprecated/clutter-bin-layout.h" #include "deprecated/clutter-box.h" #include "deprecated/clutter-container.h" #include "deprecated/clutter-group.h" diff --git a/clutter/clutter/deprecated/clutter-bin-layout.h b/clutter/clutter/deprecated/clutter-bin-layout.h deleted file mode 100644 index a2213ff96..000000000 --- a/clutter/clutter/deprecated/clutter-bin-layout.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Copyright (C) 2009 Intel Corporation. - * - * 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 . - * - * Author: - * Emmanuele Bassi - */ - -#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) -#error "Only can be included directly." -#endif - -#ifndef __CLUTTER_BIN_LAYOUT_DEPRECATED_H__ -#define __CLUTTER_BIN_LAYOUT_DEPRECATED_H__ - -#include - -G_BEGIN_DECLS - -CLUTTER_DEPRECATED -void clutter_bin_layout_set_alignment (ClutterBinLayout *self, - ClutterActor *child, - ClutterBinAlignment x_align, - ClutterBinAlignment y_align); - -CLUTTER_DEPRECATED -void clutter_bin_layout_get_alignment (ClutterBinLayout *self, - ClutterActor *child, - ClutterBinAlignment *x_align, - ClutterBinAlignment *y_align); - -CLUTTER_DEPRECATED -void clutter_bin_layout_add (ClutterBinLayout *self, - ClutterActor *child, - ClutterBinAlignment x_align, - ClutterBinAlignment y_align); - -G_END_DECLS - -#endif /* __CLUTTER_BIN_LAYOUT_DEPRECATED_H__ */ diff --git a/clutter/clutter/meson.build b/clutter/clutter/meson.build index 1b30a7b00..bc1feb4c3 100644 --- a/clutter/clutter/meson.build +++ b/clutter/clutter/meson.build @@ -220,7 +220,6 @@ clutter_deprecated_headers = [ 'deprecated/clutter-actor.h', 'deprecated/clutter-alpha.h', 'deprecated/clutter-animation.h', - 'deprecated/clutter-bin-layout.h', 'deprecated/clutter-box.h', 'deprecated/clutter-container.h', 'deprecated/clutter-group.h',