diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2025-04-24 20:12:26 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2025-04-25 07:43:33 +0200 |
| commit | 95dc7e43a23300b3eacbb7e1e0a9d4f31a8bd5a0 (patch) | |
| tree | 9fedc2fef0f5459f3df38c91f3b6366ffb9d48b3 /adw/include/adwaitamm/alertdialog.hpp | |
| parent | 48eb849abde6c9af75c015a9721c9b337f3a5fd9 (diff) | |
| download | turns-95dc7e43a23300b3eacbb7e1e0a9d4f31a8bd5a0.tar.xz turns-95dc7e43a23300b3eacbb7e1e0a9d4f31a8bd5a0.zip | |
adw: extract class definitions
Diffstat (limited to 'adw/include/adwaitamm/alertdialog.hpp')
| -rw-r--r-- | adw/include/adwaitamm/alertdialog.hpp | 28 |
1 files changed, 9 insertions, 19 deletions
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 <glib-object.h> -using AdwAlertDialog = struct _AdwAlertDialog; -using AdwAlertDialogClass = struct _AdwAlertDialogClass; +#define _ADWAITA_INSIDE +#include <adw-alert-dialog.h> +#undef _ADWAITA_INSIDE namespace Adwaita { @@ -27,23 +28,10 @@ namespace Adwaita struct AlertDialog : Dialog, helpers::gobj_mixin<AlertDialog, AdwAlertDialog> { - 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<CppObjectType, BaseObjectType>::gobj; using helpers::gobj_mixin<CppObjectType, BaseObjectType>::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); }; |
