diff options
Diffstat (limited to 'adw/include/adwaitamm/preferencesdialog.hpp')
| -rw-r--r-- | adw/include/adwaitamm/preferencesdialog.hpp | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/adw/include/adwaitamm/preferencesdialog.hpp b/adw/include/adwaitamm/preferencesdialog.hpp index 2beaf64..080651f 100644 --- a/adw/include/adwaitamm/preferencesdialog.hpp +++ b/adw/include/adwaitamm/preferencesdialog.hpp @@ -1,9 +1,9 @@ #ifndef LIBADWAITAMM_PREFERENCES_DIALOG_HPP #define LIBADWAITAMM_PREFERENCES_DIALOG_HPP +#include "adwaitamm/preferencespage.hpp" #include "dialog.hpp" #include "helpers/gobj_mixin.hpp" -#include "adwaitamm/preferencespage.hpp" #include <glibmm/class.h> #include <glibmm/object.h> @@ -15,33 +15,19 @@ #include <glib-object.h> -using AdwPreferencesDialog = struct _AdwPreferencesDialog; -using AdwPreferencesDialogClass = struct _AdwPreferencesDialogClass; +#define _ADWAITA_INSIDE +#include <adw-preferences-dialog.h> +#undef _ADWAITA_INSIDE namespace Adwaita { - struct PreferencesDialog_Class; - struct PreferencesDialog : Dialog, helpers::gobj_mixin<PreferencesDialog, AdwPreferencesDialog> { - struct Class : Glib::Class - { - using BaseClassParent = AdwDialogClass; - using BaseClassType = AdwPreferencesDialogClass; - using BaseObjectType = AdwPreferencesDialog; - using CppClassParent = Dialog::Class; - using CppObjectType = PreferencesDialog; - - 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 = AdwPreferencesDialog; + using BaseClassType = AdwPreferencesDialogClass; + using CppObjectType = PreferencesDialog; + using CppClassType = struct PreferencesDialog_Class; using helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj; using helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj_copy; @@ -60,6 +46,8 @@ namespace Adwaita auto set_visible_page(PreferencesPage & page) -> void; protected: + friend PreferencesDialog_Class; + explicit PreferencesDialog(Glib::ConstructParams const & params); explicit PreferencesDialog(BaseObjectType * gobj); }; |
