clutter/bin-layout: We don't need to store the container
We never do anything with it, just let it pass straight to the parent implementation Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3384>
This commit is contained in:
parent
9399c984cc
commit
d0ebfa792d
@ -34,7 +34,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterAlignConstraint, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBackend, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBindConstraint, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBindingPool, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBinLayout, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBlurEffect, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBoxLayout, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBrightnessContrastEffect, g_object_unref)
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
/**
|
||||
* ClutterBinLayout:
|
||||
*
|
||||
*
|
||||
* A simple layout manager
|
||||
*
|
||||
* #ClutterBinLayout is a layout manager which implements the following
|
||||
@ -46,9 +46,6 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS
|
||||
#include "clutter/deprecated/clutter-container.h"
|
||||
|
||||
#include "clutter/clutter-actor-private.h"
|
||||
#include "clutter/clutter-animatable.h"
|
||||
#include "clutter/clutter-bin-layout.h"
|
||||
@ -58,14 +55,9 @@
|
||||
#include "clutter/clutter-layout-meta.h"
|
||||
#include "clutter/clutter-private.h"
|
||||
|
||||
struct _ClutterBinLayoutPrivate
|
||||
{
|
||||
ClutterContainer *container;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (ClutterBinLayout,
|
||||
clutter_bin_layout,
|
||||
CLUTTER_TYPE_LAYOUT_MANAGER)
|
||||
G_DEFINE_TYPE (ClutterBinLayout,
|
||||
clutter_bin_layout,
|
||||
CLUTTER_TYPE_LAYOUT_MANAGER)
|
||||
|
||||
static void
|
||||
clutter_bin_layout_get_preferred_width (ClutterLayoutManager *manager,
|
||||
@ -260,20 +252,6 @@ clutter_bin_layout_allocate (ClutterLayoutManager *manager,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_bin_layout_set_container (ClutterLayoutManager *manager,
|
||||
ClutterContainer *container)
|
||||
{
|
||||
ClutterBinLayoutPrivate *priv;
|
||||
ClutterLayoutManagerClass *parent_class;
|
||||
|
||||
priv = CLUTTER_BIN_LAYOUT (manager)->priv;
|
||||
priv->container = container;
|
||||
|
||||
parent_class = CLUTTER_LAYOUT_MANAGER_CLASS (clutter_bin_layout_parent_class);
|
||||
parent_class->set_container (manager, container);
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_bin_layout_class_init (ClutterBinLayoutClass *klass)
|
||||
{
|
||||
@ -283,13 +261,11 @@ clutter_bin_layout_class_init (ClutterBinLayoutClass *klass)
|
||||
layout_class->get_preferred_width = clutter_bin_layout_get_preferred_width;
|
||||
layout_class->get_preferred_height = clutter_bin_layout_get_preferred_height;
|
||||
layout_class->allocate = clutter_bin_layout_allocate;
|
||||
layout_class->set_container = clutter_bin_layout_set_container;
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_bin_layout_init (ClutterBinLayout *self)
|
||||
{
|
||||
self->priv = clutter_bin_layout_get_instance_private (self);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -29,27 +29,19 @@
|
||||
#endif
|
||||
|
||||
#include "clutter/clutter-layout-manager.h"
|
||||
#include "clutter/clutter.h"
|
||||
#include "clutter/clutter-autocleanups.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CLUTTER_TYPE_BIN_LAYOUT (clutter_bin_layout_get_type ())
|
||||
#define CLUTTER_BIN_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_BIN_LAYOUT, ClutterBinLayout))
|
||||
#define CLUTTER_IS_BIN_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_BIN_LAYOUT))
|
||||
#define CLUTTER_BIN_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_BIN_LAYOUT, ClutterBinLayoutClass))
|
||||
#define CLUTTER_IS_BIN_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_BIN_LAYOUT))
|
||||
#define CLUTTER_BIN_LAYOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_BIN_LAYOUT, ClutterBinLayoutClass))
|
||||
#define CLUTTER_TYPE_BIN_LAYOUT (clutter_bin_layout_get_type ())
|
||||
|
||||
typedef struct _ClutterBinLayout ClutterBinLayout;
|
||||
typedef struct _ClutterBinLayoutPrivate ClutterBinLayoutPrivate;
|
||||
typedef struct _ClutterBinLayoutClass ClutterBinLayoutClass;
|
||||
|
||||
struct _ClutterBinLayout
|
||||
{
|
||||
/*< private >*/
|
||||
ClutterLayoutManager parent_instance;
|
||||
|
||||
ClutterBinLayoutPrivate *priv;
|
||||
};
|
||||
CLUTTER_EXPORT
|
||||
G_DECLARE_DERIVABLE_TYPE (ClutterBinLayout,
|
||||
clutter_bin_layout,
|
||||
CLUTTER,
|
||||
BIN_LAYOUT,
|
||||
ClutterLayoutManager)
|
||||
|
||||
/**
|
||||
* ClutterBinLayoutClass:
|
||||
@ -63,9 +55,6 @@ struct _ClutterBinLayoutClass
|
||||
ClutterLayoutManagerClass parent_class;
|
||||
};
|
||||
|
||||
CLUTTER_EXPORT
|
||||
GType clutter_bin_layout_get_type (void) G_GNUC_CONST;
|
||||
|
||||
CLUTTER_EXPORT
|
||||
ClutterLayoutManager * clutter_bin_layout_new (void);
|
||||
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include "clutter/clutter-backend.h"
|
||||
#include "clutter/clutter-bind-constraint.h"
|
||||
#include "clutter/clutter-binding-pool.h"
|
||||
#include "clutter/clutter-bin-layout.h"
|
||||
#include "clutter/clutter-blur-effect.h"
|
||||
#include "clutter/clutter-box-layout.h"
|
||||
#include "clutter/clutter-brightness-contrast-effect.h"
|
||||
@ -108,6 +107,7 @@
|
||||
#include "clutter/clutter-units.h"
|
||||
#include "clutter/clutter-virtual-input-device.h"
|
||||
#include "clutter/clutter-zoom-action.h"
|
||||
#include "clutter/clutter-bin-layout.h"
|
||||
|
||||
#include "clutter/clutter-deprecated.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user