diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2025-04-03 18:41:43 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2025-04-03 18:41:43 +0200 |
| commit | ee599d7d62c16bb59603bedb62f03c01504a1893 (patch) | |
| tree | 8e371a4d211d56ea42b648c7cd1758568b27858b /adw/include/adwaitamm/preferencesdialog.hpp | |
| parent | 6ff0bb23a71f334fe0ca86581cc86aaab2882003 (diff) | |
| download | turns-ee599d7d62c16bb59603bedb62f03c01504a1893.tar.xz turns-ee599d7d62c16bb59603bedb62f03c01504a1893.zip | |
adw: prepare files for extraction
Diffstat (limited to 'adw/include/adwaitamm/preferencesdialog.hpp')
| -rw-r--r-- | adw/include/adwaitamm/preferencesdialog.hpp | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/adw/include/adwaitamm/preferencesdialog.hpp b/adw/include/adwaitamm/preferencesdialog.hpp new file mode 100644 index 0000000..d57e015 --- /dev/null +++ b/adw/include/adwaitamm/preferencesdialog.hpp @@ -0,0 +1,72 @@ +#ifndef LIBADWAITAMM_PREFERENCES_DIALOG_HPP +#define LIBADWAITAMM_PREFERENCES_DIALOG_HPP + +#include "dialog.hpp" +#include "helpers/gobj_mixin.hpp" +#include "adwaitamm/preferencespage.hpp" + +#include <glibmm/class.h> +#include <glibmm/object.h> +#include <glibmm/objectbase.h> +#include <glibmm/refptr.h> +#include <glibmm/ustring.h> + +#include <gtkmm/widget.h> + +#include <glib-object.h> + +using AdwPreferencesDialog = struct _AdwPreferencesDialog; +using AdwPreferencesDialogClass = struct _AdwPreferencesDialogClass; + +namespace turns::adw +{ + struct PreferencesDialog_Class; + + struct PreferencesDialog : adw::Dialog, + helpers::gobj_mixin<PreferencesDialog, AdwPreferencesDialog> + { + struct Class : Glib::Class + { + using BaseClassParent = AdwDialogClass; + using BaseClassType = AdwPreferencesDialogClass; + using BaseObjectType = AdwPreferencesDialog; + using CppClassParent = adw::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 helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj; + using helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj_copy; + + explicit PreferencesDialog(); + PreferencesDialog(PreferencesDialog const & other) = delete; + PreferencesDialog(PreferencesDialog && other) noexcept = default; + + auto operator=(PreferencesDialog const & other) noexcept -> PreferencesDialog & = delete; + auto operator=(PreferencesDialog && other) noexcept -> PreferencesDialog & = default; + + auto static get_type() -> GType; + auto static get_base_type() -> GType; + + auto add(adw::PreferencesPage & page) -> void; + + protected: + explicit PreferencesDialog(Glib::ConstructParams const & params); + explicit PreferencesDialog(BaseObjectType * gobj); + }; +} // namespace turns::adw + +namespace Glib +{ + auto wrap(AdwPreferencesDialog * object, bool copy = false) -> turns::adw::PreferencesDialog *; +} // namespace Glib + +#endif
\ No newline at end of file |
