From 95dc7e43a23300b3eacbb7e1e0a9d4f31a8bd5a0 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 24 Apr 2025 20:12:26 +0200 Subject: adw: extract class definitions --- adw/include/adwaitamm/alertdialog.hpp | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) (limited to 'adw/include/adwaitamm/alertdialog.hpp') diff --git a/adw/include/adwaitamm/alertdialog.hpp b/adw/include/adwaitamm/alertdialog.hpp index 2a34a45..fb0d88f 100644 --- a/adw/include/adwaitamm/alertdialog.hpp +++ b/adw/include/adwaitamm/alertdialog.hpp @@ -17,8 +17,9 @@ #include -using AdwAlertDialog = struct _AdwAlertDialog; -using AdwAlertDialogClass = struct _AdwAlertDialogClass; +#define _ADWAITA_INSIDE +#include +#undef _ADWAITA_INSIDE namespace Adwaita { @@ -27,23 +28,10 @@ namespace Adwaita struct AlertDialog : Dialog, helpers::gobj_mixin { - struct Class : Glib::Class - { - using BaseClassParent = AdwDialogClass; - using BaseClassType = AdwAlertDialogClass; - using BaseObjectType = AdwAlertDialog; - using CppClassParent = Dialog::Class; - using CppObjectType = AlertDialog; - - auto init() -> Glib::Class const &; - auto static class_init_function(void * gclass, void * data) -> void; - auto static wrap_new(GObject * object) -> Glib::ObjectBase *; - }; - - using BaseObjectType = Class::BaseObjectType; - using BaseClassType = Class::BaseClassType; - using CppObjectType = Class::CppObjectType; - using CppClassType = Class; + using BaseObjectType = AdwAlertDialog; + using BaseClassType = AdwAlertDialogClass; + using CppObjectType = AlertDialog; + using CppClassType = struct AlertDialog_Class; using helpers::gobj_mixin::gobj; using helpers::gobj_mixin::gobj_copy; @@ -67,6 +55,8 @@ namespace Adwaita auto set_response_appearance(Glib::ustring id, ResponseAppearance value) -> void; protected: + friend AlertDialog_Class; + explicit AlertDialog(Glib::ConstructParams const & params); explicit AlertDialog(BaseObjectType * gobj); }; -- cgit v1.2.3