diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2025-03-28 07:49:04 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2025-03-28 07:49:04 +0100 |
| commit | c4c2bb69cd50ec9ed48e9be5101a9906a8891369 (patch) | |
| tree | 07ca1afcce8e26eccab17514896798d1aaae2a91 /adw/src/toast.cpp | |
| parent | 9c3c71b060505d91a712fc54de971d1c57a675ad (diff) | |
| download | turns-c4c2bb69cd50ec9ed48e9be5101a9906a8891369.tar.xz turns-c4c2bb69cd50ec9ed48e9be5101a9906a8891369.zip | |
adw: clean up wrap functions
Diffstat (limited to 'adw/src/toast.cpp')
| -rw-r--r-- | adw/src/toast.cpp | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/adw/src/toast.cpp b/adw/src/toast.cpp index c830496..1267221 100644 --- a/adw/src/toast.cpp +++ b/adw/src/toast.cpp @@ -31,7 +31,7 @@ namespace turns::adw if (!gtype_) { class_init_func_ = &class_init_function; - gtype_ = adw_toast_get_type(); + register_derived_type(adw_toast_get_type()); } return *this; } @@ -53,29 +53,34 @@ namespace turns::adw { } - auto Toast::get_type() -> GType + Toast::Toast(Glib::ConstructParams const & params) + : Glib::Object{params} { - return _class.init().get_type(); } - auto Toast::get_base_type() -> GType + Toast::Toast(BaseObjectType * gobj) + : Glib::Object((GObject *)gobj) { - return adw_toast_get_type(); } - auto Toast::dismiss() -> void + auto Toast::create(Glib::ustring const & title) -> Glib::RefPtr<Toast> { - return adw_toast_dismiss(gobj()); + return Glib::make_refptr_for_instance(new Toast{title}); } - Toast::Toast(Glib::ConstructParams const & params) - : Glib::Object{params} + auto Toast::get_type() -> GType { + return _class.init().get_type(); } - Toast::Toast(BaseObjectType * gobj) - : Glib::Object((GObject *)gobj) + auto Toast::get_base_type() -> GType { + return adw_toast_get_type(); + } + + auto Toast::dismiss() -> void + { + return adw_toast_dismiss(gobj()); } } // namespace turns::adw |
