aboutsummaryrefslogtreecommitdiff
path: root/include/adwaitamm/alertdialog.hpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-04-24 20:12:26 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-04-25 07:43:33 +0200
commit2c4e151343828af13b28ec39946b6bf34748c2b3 (patch)
tree3572c1e224ad93e51c4a560198732e8f9bac7c99 /include/adwaitamm/alertdialog.hpp
parent96ce3ba51c152e854bcc5e7df1c53fe776ca554b (diff)
downloadlibadwaitamm-2c4e151343828af13b28ec39946b6bf34748c2b3.tar.xz
libadwaitamm-2c4e151343828af13b28ec39946b6bf34748c2b3.zip
adw: extract class definitions
Diffstat (limited to 'include/adwaitamm/alertdialog.hpp')
-rw-r--r--include/adwaitamm/alertdialog.hpp28
1 files changed, 9 insertions, 19 deletions
diff --git a/include/adwaitamm/alertdialog.hpp b/include/adwaitamm/alertdialog.hpp
index 2a34a45..fb0d88f 100644
--- a/include/adwaitamm/alertdialog.hpp
+++ b/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);
};