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 | b7da16d2dda3d90dbc47c4093efe37d4d5c92f27 (patch) | |
| tree | 31612a8fe027f3434d2b1220fa45657ebc6f6410 /src/toast.cpp | |
| parent | 6bcf6c01484c580b7b5846f9b0593e2b499d5aee (diff) | |
| download | libadwaitamm-b7da16d2dda3d90dbc47c4093efe37d4d5c92f27.tar.xz libadwaitamm-b7da16d2dda3d90dbc47c4093efe37d4d5c92f27.zip | |
adw: clean up wrap functions
Diffstat (limited to 'src/toast.cpp')
| -rw-r--r-- | src/toast.cpp | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/toast.cpp b/src/toast.cpp index c830496..1267221 100644 --- a/src/toast.cpp +++ b/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 |
