[libadwaita/wip/cdavis/final-types: 85/85] general: Use G_DEFINE_FINAL_TYPE for final types




commit 0601067c674c1142504c813ba3619d115eb8493a
Author: Christopher Davis <christopherdavis gnome org>
Date:   Mon Oct 18 01:13:55 2021 -0700

    general: Use G_DEFINE_FINAL_TYPE for final types
    
    See https://www.bassi.io/articles/2021/07/27/final-types/

 demo/adw-demo-preferences-window.c   |  2 +-
 demo/adw-demo-window.c               |  2 +-
 demo/adw-flap-demo-window.c          |  2 +-
 demo/adw-tab-view-demo-window.c      |  2 +-
 demo/adw-view-switcher-demo-window.c |  2 +-
 src/adw-animation.c                  |  2 +-
 src/adw-avatar.c                     |  2 +-
 src/adw-button-content.c             |  2 +-
 src/adw-carousel-indicator-dots.c    |  4 ++--
 src/adw-carousel-indicator-lines.c   |  4 ++--
 src/adw-carousel.c                   |  8 ++++----
 src/adw-clamp-layout.c               |  4 ++--
 src/adw-clamp-scrollable.c           |  8 ++++----
 src/adw-clamp.c                      |  7 +++----
 src/adw-enum-list-model.c            |  6 +++---
 src/adw-fading-label.c               |  2 +-
 src/adw-flap.c                       |  8 ++++----
 src/adw-gizmo.c                      |  2 +-
 src/adw-header-bar.c                 |  5 ++---
 src/adw-indicator-bin.c              |  4 ++--
 src/adw-leaflet.c                    | 16 ++++++++--------
 src/adw-settings.c                   |  2 +-
 src/adw-shadow-helper.c              |  2 +-
 src/adw-split-button.c               |  6 +++---
 src/adw-squeezer.c                   | 14 +++++++-------
 src/adw-status-page.c                |  4 ++--
 src/adw-style-manager.c              |  2 +-
 src/adw-swipe-tracker.c              |  4 ++--
 src/adw-tab-bar.c                    |  5 ++---
 src/adw-tab-box.c                    |  6 +++---
 src/adw-tab-view.c                   | 10 +++++-----
 src/adw-tab.c                        |  2 +-
 src/adw-view-stack.c                 | 12 ++++++------
 src/adw-view-switcher-bar.c          |  2 +-
 src/adw-view-switcher-button.c       |  4 ++--
 src/adw-view-switcher-title.c        |  2 +-
 src/adw-view-switcher.c              |  2 +-
 src/adw-window-mixin.c               |  2 +-
 src/adw-window-title.c               |  2 +-
 src/inspector/adw-inspector-page.c   |  2 +-
 src/meson.build                      |  2 +-
 41 files changed, 89 insertions(+), 92 deletions(-)
---
diff --git a/demo/adw-demo-preferences-window.c b/demo/adw-demo-preferences-window.c
index bd9d2a42..5f1e0dea 100644
--- a/demo/adw-demo-preferences-window.c
+++ b/demo/adw-demo-preferences-window.c
@@ -8,7 +8,7 @@ struct _AdwDemoPreferencesWindow
   GtkWidget *subpage2;
 };
 
-G_DEFINE_TYPE (AdwDemoPreferencesWindow, adw_demo_preferences_window, ADW_TYPE_PREFERENCES_WINDOW)
+G_DEFINE_FINAL_TYPE (AdwDemoPreferencesWindow, adw_demo_preferences_window, ADW_TYPE_PREFERENCES_WINDOW)
 
 AdwDemoPreferencesWindow *
 adw_demo_preferences_window_new (void)
diff --git a/demo/adw-demo-window.c b/demo/adw-demo-window.c
index 049e77be..ee1bd2c4 100644
--- a/demo/adw-demo-window.c
+++ b/demo/adw-demo-window.c
@@ -28,7 +28,7 @@ struct _AdwDemoWindow
   GtkListBox *avatar_contacts;
 };
 
-G_DEFINE_TYPE (AdwDemoWindow, adw_demo_window, ADW_TYPE_APPLICATION_WINDOW)
+G_DEFINE_FINAL_TYPE (AdwDemoWindow, adw_demo_window, ADW_TYPE_APPLICATION_WINDOW)
 
 static char *
 get_color_scheme_icon_name (gpointer user_data,
diff --git a/demo/adw-flap-demo-window.c b/demo/adw-flap-demo-window.c
index f43e802f..b1f4c75c 100644
--- a/demo/adw-flap-demo-window.c
+++ b/demo/adw-flap-demo-window.c
@@ -11,7 +11,7 @@ struct _AdwFlapDemoWindow
   GtkWidget *reveal_btn_end;
 };
 
-G_DEFINE_TYPE (AdwFlapDemoWindow, adw_flap_demo_window, ADW_TYPE_WINDOW)
+G_DEFINE_FINAL_TYPE (AdwFlapDemoWindow, adw_flap_demo_window, ADW_TYPE_WINDOW)
 
 static char *
 fold_policy_name (AdwEnumListItem *item,
diff --git a/demo/adw-tab-view-demo-window.c b/demo/adw-tab-view-demo-window.c
index ff05e764..28696d8a 100644
--- a/demo/adw-tab-view-demo-window.c
+++ b/demo/adw-tab-view-demo-window.c
@@ -13,7 +13,7 @@ struct _AdwTabViewDemoWindow
   AdwTabPage *menu_page;
 };
 
-G_DEFINE_TYPE (AdwTabViewDemoWindow, adw_tab_view_demo_window, ADW_TYPE_WINDOW)
+G_DEFINE_FINAL_TYPE (AdwTabViewDemoWindow, adw_tab_view_demo_window, ADW_TYPE_WINDOW)
 
 char **icon_names = NULL;
 gsize n_icon_names = 0;
diff --git a/demo/adw-view-switcher-demo-window.c b/demo/adw-view-switcher-demo-window.c
index 9637d52e..92d350d7 100644
--- a/demo/adw-view-switcher-demo-window.c
+++ b/demo/adw-view-switcher-demo-window.c
@@ -7,7 +7,7 @@ struct _AdwViewSwitcherDemoWindow
   AdwWindow parent_instance;
 };
 
-G_DEFINE_TYPE (AdwViewSwitcherDemoWindow, adw_view_switcher_demo_window, ADW_TYPE_WINDOW)
+G_DEFINE_FINAL_TYPE (AdwViewSwitcherDemoWindow, adw_view_switcher_demo_window, ADW_TYPE_WINDOW)
 
 static void
 adw_view_switcher_demo_window_class_init (AdwViewSwitcherDemoWindowClass *klass)
diff --git a/src/adw-animation.c b/src/adw-animation.c
index 521398bf..a41666a4 100644
--- a/src/adw-animation.c
+++ b/src/adw-animation.c
@@ -592,7 +592,7 @@ struct _AdwAnimationTarget
   gpointer user_data;
 };
 
-G_DEFINE_TYPE (AdwAnimationTarget, adw_animation_target, G_TYPE_OBJECT);
+G_DEFINE_FINAL_TYPE (AdwAnimationTarget, adw_animation_target, G_TYPE_OBJECT);
 
 static void
 adw_animation_target_class_init (AdwAnimationTargetClass *klass)
diff --git a/src/adw-avatar.c b/src/adw-avatar.c
index 8f08445d..d6b30208 100644
--- a/src/adw-avatar.c
+++ b/src/adw-avatar.c
@@ -59,7 +59,7 @@ struct _AdwAvatar
   int size;
 };
 
-G_DEFINE_TYPE (AdwAvatar, adw_avatar, GTK_TYPE_WIDGET);
+G_DEFINE_FINAL_TYPE (AdwAvatar, adw_avatar, GTK_TYPE_WIDGET);
 
 enum {
   PROP_0,
diff --git a/src/adw-button-content.c b/src/adw-button-content.c
index 23c2f2d3..5547697a 100644
--- a/src/adw-button-content.c
+++ b/src/adw-button-content.c
@@ -70,7 +70,7 @@ struct _AdwButtonContent {
   GtkWidget *button;
 };
 
-G_DEFINE_TYPE (AdwButtonContent, adw_button_content, GTK_TYPE_WIDGET)
+G_DEFINE_FINAL_TYPE (AdwButtonContent, adw_button_content, GTK_TYPE_WIDGET)
 
 enum {
   PROP_0,
diff --git a/src/adw-carousel-indicator-dots.c b/src/adw-carousel-indicator-dots.c
index 99d1e085..d2f7929f 100644
--- a/src/adw-carousel-indicator-dots.c
+++ b/src/adw-carousel-indicator-dots.c
@@ -51,8 +51,8 @@ struct _AdwCarouselIndicatorDots
   AdwAnimation *animation;
 };
 
-G_DEFINE_TYPE_WITH_CODE (AdwCarouselIndicatorDots, adw_carousel_indicator_dots, GTK_TYPE_WIDGET,
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwCarouselIndicatorDots, adw_carousel_indicator_dots, GTK_TYPE_WIDGET,
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL))
 
 enum {
   PROP_0,
diff --git a/src/adw-carousel-indicator-lines.c b/src/adw-carousel-indicator-lines.c
index 5095768e..9b64e919 100644
--- a/src/adw-carousel-indicator-lines.c
+++ b/src/adw-carousel-indicator-lines.c
@@ -49,8 +49,8 @@ struct _AdwCarouselIndicatorLines
   AdwAnimation *animation;
 };
 
-G_DEFINE_TYPE_WITH_CODE (AdwCarouselIndicatorLines, adw_carousel_indicator_lines, GTK_TYPE_WIDGET,
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwCarouselIndicatorLines, adw_carousel_indicator_lines, GTK_TYPE_WIDGET,
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL))
 
 enum {
   PROP_0,
diff --git a/src/adw-carousel.c b/src/adw-carousel.c
index 087daac0..d151568a 100644
--- a/src/adw-carousel.c
+++ b/src/adw-carousel.c
@@ -79,10 +79,10 @@ struct _AdwCarousel
 static void adw_carousel_buildable_init (GtkBuildableIface *iface);
 static void adw_carousel_swipeable_init (AdwSwipeableInterface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (AdwCarousel, adw_carousel, GTK_TYPE_WIDGET,
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL)
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, adw_carousel_buildable_init)
-                         G_IMPLEMENT_INTERFACE (ADW_TYPE_SWIPEABLE, adw_carousel_swipeable_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwCarousel, adw_carousel, GTK_TYPE_WIDGET,
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL)
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, adw_carousel_buildable_init)
+                               G_IMPLEMENT_INTERFACE (ADW_TYPE_SWIPEABLE, adw_carousel_swipeable_init))
 
 static GtkBuildableIface *parent_buildable_iface;
 
diff --git a/src/adw-clamp-layout.c b/src/adw-clamp-layout.c
index 101d33c2..51a51a71 100644
--- a/src/adw-clamp-layout.c
+++ b/src/adw-clamp-layout.c
@@ -57,8 +57,8 @@ struct _AdwClampLayout
 
 static GParamSpec *props[LAST_PROP];
 
-G_DEFINE_TYPE_WITH_CODE (AdwClampLayout, adw_clamp_layout, GTK_TYPE_LAYOUT_MANAGER,
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwClampLayout, adw_clamp_layout, GTK_TYPE_LAYOUT_MANAGER,
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL))
 
 static void
 set_orientation (AdwClampLayout *self,
diff --git a/src/adw-clamp-scrollable.c b/src/adw-clamp-scrollable.c
index 71ceaa06..9663d3b0 100644
--- a/src/adw-clamp-scrollable.c
+++ b/src/adw-clamp-scrollable.c
@@ -62,10 +62,10 @@ static GParamSpec *props[LAST_PROP];
 
 static void adw_clamp_scrollable_buildable_init (GtkBuildableIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (AdwClampScrollable, adw_clamp_scrollable, GTK_TYPE_WIDGET,
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL)
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE, NULL)
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, adw_clamp_scrollable_buildable_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwClampScrollable, adw_clamp_scrollable, GTK_TYPE_WIDGET,
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL)
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE, NULL)
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, 
adw_clamp_scrollable_buildable_init))
 
 static GtkBuildableIface *parent_buildable_iface;
 
diff --git a/src/adw-clamp.c b/src/adw-clamp.c
index cc49f2ce..cdcafac2 100644
--- a/src/adw-clamp.c
+++ b/src/adw-clamp.c
@@ -58,10 +58,9 @@ static GParamSpec *props[LAST_PROP];
 
 static void adw_clamp_buildable_init (GtkBuildableIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (AdwClamp, adw_clamp, GTK_TYPE_WIDGET,
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL)
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
-                         adw_clamp_buildable_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwClamp, adw_clamp, GTK_TYPE_WIDGET,
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL)
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, adw_clamp_buildable_init))
 
 static GtkBuildableIface *parent_buildable_iface;
 
diff --git a/src/adw-enum-list-model.c b/src/adw-enum-list-model.c
index d8be9a1e..7c9f0393 100644
--- a/src/adw-enum-list-model.c
+++ b/src/adw-enum-list-model.c
@@ -40,8 +40,8 @@ static GParamSpec *props[LAST_PROP];
 
 static void adw_enum_list_model_list_model_init (GListModelInterface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (AdwEnumListModel, adw_enum_list_model, G_TYPE_OBJECT,
-                         G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, adw_enum_list_model_list_model_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwEnumListModel, adw_enum_list_model, G_TYPE_OBJECT,
+                               G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, 
adw_enum_list_model_list_model_init))
 
 /**
  * AdwEnumListItem:
@@ -68,7 +68,7 @@ enum {
 
 static GParamSpec *value_props[LAST_VALUE_PROP];
 
-G_DEFINE_TYPE (AdwEnumListItem, adw_enum_list_item, G_TYPE_OBJECT)
+G_DEFINE_FINAL_TYPE (AdwEnumListItem, adw_enum_list_item, G_TYPE_OBJECT)
 
 static void
 adw_enum_list_item_get_property (GObject    *object,
diff --git a/src/adw-fading-label.c b/src/adw-fading-label.c
index f903ac46..39c06bbc 100644
--- a/src/adw-fading-label.c
+++ b/src/adw-fading-label.c
@@ -25,7 +25,7 @@ struct _AdwFadingLabel
   gboolean shader_compiled;
 };
 
-G_DEFINE_TYPE (AdwFadingLabel, adw_fading_label, GTK_TYPE_WIDGET)
+G_DEFINE_FINAL_TYPE (AdwFadingLabel, adw_fading_label, GTK_TYPE_WIDGET)
 
 enum {
   PROP_0,
diff --git a/src/adw-flap.c b/src/adw-flap.c
index e2c40f3f..5ce4b50e 100644
--- a/src/adw-flap.c
+++ b/src/adw-flap.c
@@ -154,10 +154,10 @@ struct _AdwFlap
 static void adw_flap_buildable_init (GtkBuildableIface *iface);
 static void adw_flap_swipeable_init (AdwSwipeableInterface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (AdwFlap, adw_flap, GTK_TYPE_WIDGET,
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL)
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, adw_flap_buildable_init)
-                         G_IMPLEMENT_INTERFACE (ADW_TYPE_SWIPEABLE, adw_flap_swipeable_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwFlap, adw_flap, GTK_TYPE_WIDGET,
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL)
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, adw_flap_buildable_init)
+                               G_IMPLEMENT_INTERFACE (ADW_TYPE_SWIPEABLE, adw_flap_swipeable_init))
 
 static GtkBuildableIface *parent_buildable_iface;
 
diff --git a/src/adw-gizmo.c b/src/adw-gizmo.c
index f50c31de..2474d786 100644
--- a/src/adw-gizmo.c
+++ b/src/adw-gizmo.c
@@ -23,7 +23,7 @@ struct _AdwGizmo
   AdwGizmoGrabFocusFunc grab_focus_func;
 };
 
-G_DEFINE_TYPE (AdwGizmo, adw_gizmo, GTK_TYPE_WIDGET)
+G_DEFINE_FINAL_TYPE (AdwGizmo, adw_gizmo, GTK_TYPE_WIDGET)
 
 static void
 adw_gizmo_measure (GtkWidget      *widget,
diff --git a/src/adw-header-bar.c b/src/adw-header-bar.c
index 1d0dc6b0..beb892e9 100644
--- a/src/adw-header-bar.c
+++ b/src/adw-header-bar.c
@@ -162,9 +162,8 @@ static GParamSpec *props[LAST_PROP] = { NULL, };
 
 static void adw_header_bar_buildable_init (GtkBuildableIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (AdwHeaderBar, adw_header_bar, GTK_TYPE_WIDGET,
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
-                                                adw_header_bar_buildable_init));
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwHeaderBar, adw_header_bar, GTK_TYPE_WIDGET,
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, adw_header_bar_buildable_init));
 
 static GtkBuildableIface *parent_buildable_iface;
 
diff --git a/src/adw-indicator-bin.c b/src/adw-indicator-bin.c
index 3e60d67e..2af647e6 100644
--- a/src/adw-indicator-bin.c
+++ b/src/adw-indicator-bin.c
@@ -40,8 +40,8 @@ struct _AdwIndicatorBin
 
 static void adw_indicator_bin_buildable_init (GtkBuildableIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (AdwIndicatorBin, adw_indicator_bin, GTK_TYPE_WIDGET,
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, adw_indicator_bin_buildable_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwIndicatorBin, adw_indicator_bin, GTK_TYPE_WIDGET,
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, adw_indicator_bin_buildable_init))
 
 static GtkBuildableIface *parent_buildable_iface;
 
diff --git a/src/adw-leaflet.c b/src/adw-leaflet.c
index 74bf6a7b..9b8d37c7 100644
--- a/src/adw-leaflet.c
+++ b/src/adw-leaflet.c
@@ -108,7 +108,7 @@ struct _AdwLeafletPage {
   GtkWidget *last_focus;
 };
 
-G_DEFINE_TYPE (AdwLeafletPage, adw_leaflet_page, G_TYPE_OBJECT)
+G_DEFINE_FINAL_TYPE (AdwLeafletPage, adw_leaflet_page, G_TYPE_OBJECT)
 
 enum {
   PAGE_PROP_0,
@@ -192,10 +192,10 @@ static GParamSpec *props[LAST_PROP];
 static void adw_leaflet_buildable_init (GtkBuildableIface *iface);
 static void adw_leaflet_swipeable_init (AdwSwipeableInterface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (AdwLeaflet, adw_leaflet, GTK_TYPE_WIDGET,
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL)
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, adw_leaflet_buildable_init)
-                         G_IMPLEMENT_INTERFACE (ADW_TYPE_SWIPEABLE, adw_leaflet_swipeable_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwLeaflet, adw_leaflet, GTK_TYPE_WIDGET,
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL)
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, adw_leaflet_buildable_init)
+                               G_IMPLEMENT_INTERFACE (ADW_TYPE_SWIPEABLE, adw_leaflet_swipeable_init))
 
 static GtkBuildableIface *parent_buildable_iface;
 
@@ -409,9 +409,9 @@ adw_leaflet_pages_selection_model_init (GtkSelectionModelInterface *iface)
   iface->select_item = adw_leaflet_pages_select_item;
 }
 
-G_DEFINE_TYPE_WITH_CODE (AdwLeafletPages, adw_leaflet_pages, G_TYPE_OBJECT,
-                         G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, adw_leaflet_pages_list_model_init)
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_SELECTION_MODEL, 
adw_leaflet_pages_selection_model_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwLeafletPages, adw_leaflet_pages, G_TYPE_OBJECT,
+                               G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, adw_leaflet_pages_list_model_init)
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_SELECTION_MODEL, 
adw_leaflet_pages_selection_model_init))
 
 static void
 adw_leaflet_pages_init (AdwLeafletPages *pages)
diff --git a/src/adw-settings.c b/src/adw-settings.c
index 80f9b135..4addc464 100644
--- a/src/adw-settings.c
+++ b/src/adw-settings.c
@@ -40,7 +40,7 @@ struct _AdwSettings
   gboolean high_contrast_override;
 };
 
-G_DEFINE_TYPE (AdwSettings, adw_settings, G_TYPE_OBJECT);
+G_DEFINE_FINAL_TYPE (AdwSettings, adw_settings, G_TYPE_OBJECT);
 
 enum {
   PROP_0,
diff --git a/src/adw-shadow-helper.c b/src/adw-shadow-helper.c
index f61e553d..9835f18e 100644
--- a/src/adw-shadow-helper.c
+++ b/src/adw-shadow-helper.c
@@ -21,7 +21,7 @@ struct _AdwShadowHelper
   GtkWidget *outline;
 };
 
-G_DEFINE_TYPE (AdwShadowHelper, adw_shadow_helper, G_TYPE_OBJECT);
+G_DEFINE_FINAL_TYPE (AdwShadowHelper, adw_shadow_helper, G_TYPE_OBJECT);
 
 enum {
   PROP_0,
diff --git a/src/adw-split-button.c b/src/adw-split-button.c
index 566ee475..994b666b 100644
--- a/src/adw-split-button.c
+++ b/src/adw-split-button.c
@@ -87,9 +87,9 @@ struct _AdwSplitButton
 static void adw_split_button_actionable_init (GtkActionableInterface *iface);
 static void adw_split_button_buildable_init (GtkBuildableIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (AdwSplitButton, adw_split_button, GTK_TYPE_WIDGET,
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIONABLE, adw_split_button_actionable_init)
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, adw_split_button_buildable_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwSplitButton, adw_split_button, GTK_TYPE_WIDGET,
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIONABLE, adw_split_button_actionable_init)
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, adw_split_button_buildable_init))
 
 static GtkBuildableIface *parent_buildable_iface;
 
diff --git a/src/adw-squeezer.c b/src/adw-squeezer.c
index eedb5ef3..eeec0362 100644
--- a/src/adw-squeezer.c
+++ b/src/adw-squeezer.c
@@ -67,7 +67,7 @@ struct _AdwSqueezerPage {
   gboolean enabled;
 };
 
-G_DEFINE_TYPE (AdwSqueezerPage, adw_squeezer_page, G_TYPE_OBJECT)
+G_DEFINE_FINAL_TYPE (AdwSqueezerPage, adw_squeezer_page, G_TYPE_OBJECT)
 
 enum {
   PAGE_PROP_0,
@@ -138,9 +138,9 @@ static GParamSpec *props[LAST_PROP];
 
 static void adw_squeezer_buildable_init (GtkBuildableIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (AdwSqueezer, adw_squeezer, GTK_TYPE_WIDGET,
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL)
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, adw_squeezer_buildable_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwSqueezer, adw_squeezer, GTK_TYPE_WIDGET,
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL)
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, adw_squeezer_buildable_init))
 
 static GtkBuildableIface *parent_buildable_iface;
 
@@ -320,9 +320,9 @@ adw_squeezer_pages_selection_model_init (GtkSelectionModelInterface *iface)
   iface->is_selected = adw_squeezer_pages_is_selected;
 }
 
-G_DEFINE_TYPE_WITH_CODE (AdwSqueezerPages, adw_squeezer_pages, G_TYPE_OBJECT,
-                         G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, adw_squeezer_pages_list_model_init)
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_SELECTION_MODEL, 
adw_squeezer_pages_selection_model_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwSqueezerPages, adw_squeezer_pages, G_TYPE_OBJECT,
+                               G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, adw_squeezer_pages_list_model_init)
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_SELECTION_MODEL, 
adw_squeezer_pages_selection_model_init))
 
 static void
 adw_squeezer_pages_init (AdwSqueezerPages *pages)
diff --git a/src/adw-status-page.c b/src/adw-status-page.c
index b7260b3a..330c65cc 100644
--- a/src/adw-status-page.c
+++ b/src/adw-status-page.c
@@ -57,8 +57,8 @@ struct _AdwStatusPage
 
 static void adw_status_page_buildable_init (GtkBuildableIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (AdwStatusPage, adw_status_page, GTK_TYPE_WIDGET,
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, adw_status_page_buildable_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwStatusPage, adw_status_page, GTK_TYPE_WIDGET,
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, adw_status_page_buildable_init))
 
 static GtkBuildableIface *parent_buildable_iface;
 
diff --git a/src/adw-style-manager.c b/src/adw-style-manager.c
index f9d79144..acc68d64 100644
--- a/src/adw-style-manager.c
+++ b/src/adw-style-manager.c
@@ -62,7 +62,7 @@ struct _AdwStyleManager
   guint animation_timeout_id;
 };
 
-G_DEFINE_TYPE (AdwStyleManager, adw_style_manager, G_TYPE_OBJECT);
+G_DEFINE_FINAL_TYPE (AdwStyleManager, adw_style_manager, G_TYPE_OBJECT);
 
 enum {
   PROP_0,
diff --git a/src/adw-swipe-tracker.c b/src/adw-swipe-tracker.c
index 418f49cd..70f084b4 100644
--- a/src/adw-swipe-tracker.c
+++ b/src/adw-swipe-tracker.c
@@ -90,8 +90,8 @@ struct _AdwSwipeTracker
   GtkGesture *touch_gesture_capture;
 };
 
-G_DEFINE_TYPE_WITH_CODE (AdwSwipeTracker, adw_swipe_tracker, G_TYPE_OBJECT,
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL));
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwSwipeTracker, adw_swipe_tracker, G_TYPE_OBJECT,
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL));
 
 enum {
   PROP_0,
diff --git a/src/adw-tab-bar.c b/src/adw-tab-bar.c
index 6f033dee..736a613d 100644
--- a/src/adw-tab-bar.c
+++ b/src/adw-tab-bar.c
@@ -59,9 +59,8 @@ struct _AdwTabBar
 
 static void adw_tab_bar_buildable_init (GtkBuildableIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (AdwTabBar, adw_tab_bar, GTK_TYPE_WIDGET,
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
-                         adw_tab_bar_buildable_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwTabBar, adw_tab_bar, GTK_TYPE_WIDGET,
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, adw_tab_bar_buildable_init))
 
 enum {
   PROP_0,
diff --git a/src/adw-tab-box.c b/src/adw-tab-box.c
index cf9a9f0a..54ab0969 100644
--- a/src/adw-tab-box.c
+++ b/src/adw-tab-box.c
@@ -159,8 +159,8 @@ struct _AdwTabBox
   gsize extra_drag_n_types;
 };
 
-G_DEFINE_TYPE_WITH_CODE (AdwTabBox, adw_tab_box, GTK_TYPE_WIDGET,
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE, NULL))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwTabBox, adw_tab_box, GTK_TYPE_WIDGET,
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE, NULL))
 
 enum {
   PROP_0,
@@ -1807,7 +1807,7 @@ struct _AdwTabBoxRootContent
   AdwTabBox *tab_box;
 };
 
-G_DEFINE_TYPE (AdwTabBoxRootContent, adw_tab_box_root_content, GDK_TYPE_CONTENT_PROVIDER)
+G_DEFINE_FINAL_TYPE (AdwTabBoxRootContent, adw_tab_box_root_content, GDK_TYPE_CONTENT_PROVIDER)
 
 static GdkContentFormats *
 adw_tab_box_root_content_ref_formats (GdkContentProvider *provider)
diff --git a/src/adw-tab-view.c b/src/adw-tab-view.c
index fd781986..0a2ff065 100644
--- a/src/adw-tab-view.c
+++ b/src/adw-tab-view.c
@@ -71,7 +71,7 @@ struct _AdwTabPage
   gboolean closing;
 };
 
-G_DEFINE_TYPE (AdwTabPage, adw_tab_page, G_TYPE_OBJECT)
+G_DEFINE_FINAL_TYPE (AdwTabPage, adw_tab_page, G_TYPE_OBJECT)
 
 enum {
   PAGE_PROP_0,
@@ -112,7 +112,7 @@ struct _AdwTabView
   GtkSelectionModel *pages;
 };
 
-G_DEFINE_TYPE (AdwTabView, adw_tab_view, GTK_TYPE_WIDGET)
+G_DEFINE_FINAL_TYPE (AdwTabView, adw_tab_view, GTK_TYPE_WIDGET)
 
 enum {
   PROP_0,
@@ -646,9 +646,9 @@ adw_tab_pages_selection_model_init (GtkSelectionModelInterface *iface)
   iface->select_item = adw_tab_pages_select_item;
 }
 
-G_DEFINE_TYPE_WITH_CODE (AdwTabPages, adw_tab_pages, G_TYPE_OBJECT,
-                         G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, adw_tab_pages_list_model_init)
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_SELECTION_MODEL, 
adw_tab_pages_selection_model_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwTabPages, adw_tab_pages, G_TYPE_OBJECT,
+                               G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, adw_tab_pages_list_model_init)
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_SELECTION_MODEL, 
adw_tab_pages_selection_model_init))
 
 static void
 adw_tab_pages_init (AdwTabPages *self)
diff --git a/src/adw-tab.c b/src/adw-tab.c
index 89f4a160..9b1330d5 100644
--- a/src/adw-tab.c
+++ b/src/adw-tab.c
@@ -53,7 +53,7 @@ struct _AdwTab
   gboolean shader_compiled;
 };
 
-G_DEFINE_TYPE (AdwTab, adw_tab, GTK_TYPE_WIDGET)
+G_DEFINE_FINAL_TYPE (AdwTab, adw_tab, GTK_TYPE_WIDGET)
 
 enum {
   PROP_0,
diff --git a/src/adw-view-stack.c b/src/adw-view-stack.c
index 4f2e90a7..a3512f83 100644
--- a/src/adw-view-stack.c
+++ b/src/adw-view-stack.c
@@ -117,7 +117,7 @@ struct _AdwViewStackPage {
   bool use_underline;
 };
 
-G_DEFINE_TYPE (AdwViewStackPage, adw_view_stack_page, G_TYPE_OBJECT)
+G_DEFINE_FINAL_TYPE (AdwViewStackPage, adw_view_stack_page, G_TYPE_OBJECT)
 
 enum {
   PAGE_PROP_0,
@@ -161,8 +161,8 @@ static GParamSpec *props[LAST_PROP];
 
 static void adw_view_stack_buildable_init (GtkBuildableIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (AdwViewStack, adw_view_stack, GTK_TYPE_WIDGET,
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, adw_view_stack_buildable_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwViewStack, adw_view_stack, GTK_TYPE_WIDGET,
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, adw_view_stack_buildable_init))
 
 static GtkBuildableIface *parent_buildable_iface;
 
@@ -482,9 +482,9 @@ adw_view_stack_pages_selection_model_init (GtkSelectionModelInterface *iface)
   iface->select_item = adw_view_stack_pages_select_item;
 }
 
-G_DEFINE_TYPE_WITH_CODE (AdwViewStackPages, adw_view_stack_pages, G_TYPE_OBJECT,
-                         G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, adw_view_stack_pages_list_model_init)
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_SELECTION_MODEL, 
adw_view_stack_pages_selection_model_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwViewStackPages, adw_view_stack_pages, G_TYPE_OBJECT,
+                               G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, 
adw_view_stack_pages_list_model_init)
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_SELECTION_MODEL, 
adw_view_stack_pages_selection_model_init))
 
 static void
 adw_view_stack_pages_init (AdwViewStackPages *pages)
diff --git a/src/adw-view-switcher-bar.c b/src/adw-view-switcher-bar.c
index 7b4b8782..7915dd77 100644
--- a/src/adw-view-switcher-bar.c
+++ b/src/adw-view-switcher-bar.c
@@ -85,7 +85,7 @@ struct _AdwViewSwitcherBar
 
 static GParamSpec *props[LAST_PROP];
 
-G_DEFINE_TYPE (AdwViewSwitcherBar, adw_view_switcher_bar, GTK_TYPE_WIDGET)
+G_DEFINE_FINAL_TYPE (AdwViewSwitcherBar, adw_view_switcher_bar, GTK_TYPE_WIDGET)
 
 static void
 update_bar_revealed (AdwViewSwitcherBar *self) {
diff --git a/src/adw-view-switcher-button.c b/src/adw-view-switcher-button.c
index 519e43bd..2ef75ef0 100644
--- a/src/adw-view-switcher-button.c
+++ b/src/adw-view-switcher-button.c
@@ -55,8 +55,8 @@ struct _AdwViewSwitcherButton
 
 static GParamSpec *props[LAST_PROP];
 
-G_DEFINE_TYPE_WITH_CODE (AdwViewSwitcherButton, adw_view_switcher_button, GTK_TYPE_TOGGLE_BUTTON,
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL))
+G_DEFINE_FINAL_TYPE_WITH_CODE (AdwViewSwitcherButton, adw_view_switcher_button, GTK_TYPE_TOGGLE_BUTTON,
+                               G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL))
 
 static gboolean
 adw_view_switcher_button_switch_timeout (AdwViewSwitcherButton *self)
diff --git a/src/adw-view-switcher-title.c b/src/adw-view-switcher-title.c
index e27efd88..f11db4f0 100644
--- a/src/adw-view-switcher-title.c
+++ b/src/adw-view-switcher-title.c
@@ -92,7 +92,7 @@ struct _AdwViewSwitcherTitle
 
 static GParamSpec *props[LAST_PROP];
 
-G_DEFINE_TYPE (AdwViewSwitcherTitle, adw_view_switcher_title, GTK_TYPE_WIDGET)
+G_DEFINE_FINAL_TYPE (AdwViewSwitcherTitle, adw_view_switcher_title, GTK_TYPE_WIDGET)
 
 static void
 update_view_switcher_visible (AdwViewSwitcherTitle *self)
diff --git a/src/adw-view-switcher.c b/src/adw-view-switcher.c
index 8170a328..f31875b2 100644
--- a/src/adw-view-switcher.c
+++ b/src/adw-view-switcher.c
@@ -68,7 +68,7 @@ struct _AdwViewSwitcher
 
 static GParamSpec *props[LAST_PROP];
 
-G_DEFINE_TYPE (AdwViewSwitcher, adw_view_switcher, GTK_TYPE_WIDGET)
+G_DEFINE_FINAL_TYPE (AdwViewSwitcher, adw_view_switcher, GTK_TYPE_WIDGET)
 
 static void
 on_button_toggled (GtkWidget       *button,
diff --git a/src/adw-window-mixin.c b/src/adw-window-mixin.c
index 9c2349cd..41462710 100644
--- a/src/adw-window-mixin.c
+++ b/src/adw-window-mixin.c
@@ -23,7 +23,7 @@ struct _AdwWindowMixin
   GtkWidget *content;
 };
 
-G_DEFINE_TYPE (AdwWindowMixin, adw_window_mixin, G_TYPE_OBJECT)
+G_DEFINE_FINAL_TYPE (AdwWindowMixin, adw_window_mixin, G_TYPE_OBJECT)
 
 void
 adw_window_mixin_size_allocate (AdwWindowMixin *self,
diff --git a/src/adw-window-title.c b/src/adw-window-title.c
index 33ef7595..9bcdd371 100644
--- a/src/adw-window-title.c
+++ b/src/adw-window-title.c
@@ -41,7 +41,7 @@ struct _AdwWindowTitle
 
 static GParamSpec *props[LAST_PROP];
 
-G_DEFINE_TYPE (AdwWindowTitle, adw_window_title, GTK_TYPE_WIDGET)
+G_DEFINE_FINAL_TYPE (AdwWindowTitle, adw_window_title, GTK_TYPE_WIDGET)
 
 static void
 adw_window_title_init (AdwWindowTitle *self)
diff --git a/src/inspector/adw-inspector-page.c b/src/inspector/adw-inspector-page.c
index c953b0a1..57bc1e97 100644
--- a/src/inspector/adw-inspector-page.c
+++ b/src/inspector/adw-inspector-page.c
@@ -27,7 +27,7 @@ struct _AdwInspectorPage
   GObject *object;
 };
 
-G_DEFINE_TYPE (AdwInspectorPage, adw_inspector_page, ADW_TYPE_BIN)
+G_DEFINE_FINAL_TYPE (AdwInspectorPage, adw_inspector_page, ADW_TYPE_BIN)
 
 enum {
   PROP_0,
diff --git a/src/meson.build b/src/meson.build
index 8ff2e9d7..e0a71927 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -195,7 +195,7 @@ libadwaita_sources = [
   libadwaita_init_public_types,
 ]
 
-glib_min_version = '>= 2.44'
+glib_min_version = '>= 2.70'
 gtk_min_version = '>= 4.4.0'
 
 gio_dep = dependency('gio-2.0', version: glib_min_version)


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