From 2dca60bd1c9246906a4c793e7c43e3e461a9fd27 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Fri, 5 Jan 2024 16:13:56 +0100 Subject: [PATCH] clutter: Mark BinLayout as final It doesn't make sense to subclass a layout manager Part-of: --- clutter/clutter/clutter-bin-layout.c | 11 ++++++++--- clutter/clutter/clutter-bin-layout.h | 22 +++++----------------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/clutter/clutter/clutter-bin-layout.c b/clutter/clutter/clutter-bin-layout.c index 5ea81649b..df65a9f1d 100644 --- a/clutter/clutter/clutter-bin-layout.c +++ b/clutter/clutter/clutter-bin-layout.c @@ -54,9 +54,14 @@ #include "clutter/clutter-layout-meta.h" #include "clutter/clutter-private.h" -G_DEFINE_TYPE (ClutterBinLayout, - clutter_bin_layout, - CLUTTER_TYPE_LAYOUT_MANAGER) +struct _ClutterBinLayout +{ + ClutterLayoutManager parent_instance; +}; + +G_DEFINE_FINAL_TYPE (ClutterBinLayout, + clutter_bin_layout, + CLUTTER_TYPE_LAYOUT_MANAGER) static void clutter_bin_layout_get_preferred_width (ClutterLayoutManager *manager, diff --git a/clutter/clutter/clutter-bin-layout.h b/clutter/clutter/clutter-bin-layout.h index 8ebf51167..20ac4243d 100644 --- a/clutter/clutter/clutter-bin-layout.h +++ b/clutter/clutter/clutter-bin-layout.h @@ -35,23 +35,11 @@ G_BEGIN_DECLS #define CLUTTER_TYPE_BIN_LAYOUT (clutter_bin_layout_get_type ()) CLUTTER_EXPORT -G_DECLARE_DERIVABLE_TYPE (ClutterBinLayout, - clutter_bin_layout, - CLUTTER, - BIN_LAYOUT, - ClutterLayoutManager) - -/** - * ClutterBinLayoutClass: - * - * The #ClutterBinLayoutClass structure contains only private - * data and should be accessed using the provided API - */ -struct _ClutterBinLayoutClass -{ - /*< private >*/ - ClutterLayoutManagerClass parent_class; -}; +G_DECLARE_FINAL_TYPE (ClutterBinLayout, + clutter_bin_layout, + CLUTTER, + CIN_LAYOUT, + ClutterLayoutManager) CLUTTER_EXPORT ClutterLayoutManager * clutter_bin_layout_new (void);