From c4c2bb69cd50ec9ed48e9be5101a9906a8891369 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 28 Mar 2025 07:49:04 +0100 Subject: adw: clean up wrap functions --- adw/include/turns/adw/actionrow.hpp | 2 +- adw/include/turns/adw/preferencesdialog.hpp | 7 ++++++- adw/include/turns/adw/preferencespage.hpp | 6 +++++- adw/include/turns/adw/preferencesrow.hpp | 6 +++++- adw/include/turns/adw/switchrow.hpp | 6 ++++-- adw/include/turns/adw/toast.hpp | 6 +++++- adw/include/turns/adw/toastoverlay.hpp | 9 +++++++-- 7 files changed, 33 insertions(+), 9 deletions(-) (limited to 'adw/include/turns') diff --git a/adw/include/turns/adw/actionrow.hpp b/adw/include/turns/adw/actionrow.hpp index d098d65..5005f66 100644 --- a/adw/include/turns/adw/actionrow.hpp +++ b/adw/include/turns/adw/actionrow.hpp @@ -89,7 +89,7 @@ namespace turns::adw namespace Glib { - auto wrap(AdwActionRow * object, bool copy = false) -> Glib::RefPtr; + auto wrap(AdwActionRow * object, bool copy = false) -> turns::adw::ActionRow *; } // namespace Glib #endif \ No newline at end of file diff --git a/adw/include/turns/adw/preferencesdialog.hpp b/adw/include/turns/adw/preferencesdialog.hpp index 85735ef..324ab1d 100644 --- a/adw/include/turns/adw/preferencesdialog.hpp +++ b/adw/include/turns/adw/preferencesdialog.hpp @@ -5,11 +5,16 @@ #include "helpers/gobj_mixin.hpp" #include "turns/adw/preferencespage.hpp" +#include +#include +#include #include #include #include +#include + using AdwPreferencesDialog = struct _AdwPreferencesDialog; using AdwPreferencesDialogClass = struct _AdwPreferencesDialogClass; @@ -61,7 +66,7 @@ namespace turns::adw namespace Glib { - auto wrap(AdwPreferencesDialog * object, bool copy = false) -> Glib::RefPtr; + auto wrap(AdwPreferencesDialog * object, bool copy = false) -> turns::adw::PreferencesDialog *; } // namespace Glib #endif \ No newline at end of file diff --git a/adw/include/turns/adw/preferencespage.hpp b/adw/include/turns/adw/preferencespage.hpp index b8b4051..dceabf8 100644 --- a/adw/include/turns/adw/preferencespage.hpp +++ b/adw/include/turns/adw/preferencespage.hpp @@ -4,11 +4,15 @@ #include "helpers/gobj_mixin.hpp" #include +#include +#include #include #include #include +#include + using AdwPreferencesPage = struct _AdwPreferencesPage; using AdwPreferencesPageClass = struct _AdwPreferencesPageClass; @@ -56,7 +60,7 @@ namespace turns::adw namespace Glib { - auto wrap(AdwPreferencesPage * object, bool copy = false) -> Glib::RefPtr; + auto wrap(AdwPreferencesPage * object, bool copy = false) -> turns::adw::PreferencesPage *; } // namespace Glib #endif \ No newline at end of file diff --git a/adw/include/turns/adw/preferencesrow.hpp b/adw/include/turns/adw/preferencesrow.hpp index a0f22ed..7490d05 100644 --- a/adw/include/turns/adw/preferencesrow.hpp +++ b/adw/include/turns/adw/preferencesrow.hpp @@ -5,11 +5,15 @@ #include "turns/adw/helpers/properties.hpp" #include +#include +#include #include #include #include +#include + using AdwPreferencesRow = struct _AdwPreferencesRow; using AdwPreferencesRowClass = struct _AdwPreferencesRowClass; @@ -113,7 +117,7 @@ namespace turns::adw namespace Glib { - auto wrap(AdwPreferencesRow * object, bool copy = false) -> Glib::RefPtr; + auto wrap(AdwPreferencesRow * object, bool copy = false) -> turns::adw::PreferencesRow *; } // namespace Glib #endif \ No newline at end of file diff --git a/adw/include/turns/adw/switchrow.hpp b/adw/include/turns/adw/switchrow.hpp index e7e0131..39c21da 100644 --- a/adw/include/turns/adw/switchrow.hpp +++ b/adw/include/turns/adw/switchrow.hpp @@ -13,6 +13,8 @@ #include +#include + #define _ADWAITA_INSIDE #include #undef _ADWAITA_INSIDE @@ -22,7 +24,7 @@ using AdwSwitchRow = struct _AdwSwitchRow; namespace turns::adw { struct SwitchRow final : adw::ActionRow, - helpers::gobj_mixin + helpers::gobj_mixin { struct Class : Glib::Class { @@ -80,7 +82,7 @@ namespace turns::adw namespace Glib { - auto wrap(AdwSwitchRow * object, bool copy = false) -> Glib::RefPtr; + auto wrap(AdwSwitchRow * object, bool copy = false) -> turns::adw::SwitchRow *; } // namespace Glib #endif \ No newline at end of file diff --git a/adw/include/turns/adw/toast.hpp b/adw/include/turns/adw/toast.hpp index 83242c7..80d9b8b 100644 --- a/adw/include/turns/adw/toast.hpp +++ b/adw/include/turns/adw/toast.hpp @@ -5,12 +5,15 @@ #include "turns/adw/helpers/properties.hpp" #include +#include #include #include #include #include +#include + #define _ADWAITA_INSIDE #include #undef _ADWAITA_INSIDE @@ -49,13 +52,13 @@ namespace turns::adw using helpers::gobj_mixin::gobj; using helpers::gobj_mixin::gobj_copy; - explicit Toast(Glib::ustring const & title); Toast(Toast const & other) = delete; Toast(Toast && other) noexcept = default; auto operator=(Toast const & other) noexcept -> Toast & = delete; auto operator=(Toast && other) noexcept -> Toast & = default; + auto static create(Glib::ustring const & title) -> Glib::RefPtr; auto static get_type() -> GType; auto static get_base_type() -> GType; @@ -71,6 +74,7 @@ namespace turns::adw auto property_use_markup(this auto && self); protected: + explicit Toast(Glib::ustring const & title); explicit Toast(Glib::ConstructParams const & params); explicit Toast(BaseObjectType * gobj); }; diff --git a/adw/include/turns/adw/toastoverlay.hpp b/adw/include/turns/adw/toastoverlay.hpp index 49f6a59..7560c0d 100644 --- a/adw/include/turns/adw/toastoverlay.hpp +++ b/adw/include/turns/adw/toastoverlay.hpp @@ -4,10 +4,15 @@ #include "turns/adw/helpers/gobj_mixin.hpp" #include "turns/adw/helpers/properties.hpp" +#include +#include +#include #include #include +#include + #define _ADWAITA_INSIDE #include #undef _ADWAITA_INSIDE @@ -48,7 +53,7 @@ namespace turns::adw auto static get_type() -> GType; auto static get_base_type() -> GType; - auto add(struct Toast && toast) -> void; + auto add(Glib::RefPtr const & toast) -> void; auto property_child(this auto && self); @@ -66,7 +71,7 @@ namespace turns::adw namespace Glib { - auto wrap(AdwToastOverlay * object, bool copy = false) -> Glib::RefPtr; + auto wrap(AdwToastOverlay * object, bool copy = false) -> turns::adw::ToastOverlay *; } // namespace Glib #endif \ No newline at end of file -- cgit v1.2.3