From 29eb802f09da07421099238eceaee9e3b1d61ff2 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 28 Apr 2025 14:01:30 +0200 Subject: adw: extract libadwaitamm --- adw/src/toastoverlay.cpp | 93 ------------------------------------------------ 1 file changed, 93 deletions(-) delete mode 100644 adw/src/toastoverlay.cpp (limited to 'adw/src/toastoverlay.cpp') diff --git a/adw/src/toastoverlay.cpp b/adw/src/toastoverlay.cpp deleted file mode 100644 index 7be0797..0000000 --- a/adw/src/toastoverlay.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#include "adwaitamm/toastoverlay.hpp" - -#include "adwaitamm/private/toastoverlay_p.hpp" -#include "adwaitamm/toast.hpp" - -#include -#include -#include -#include - -#include - -#include - -namespace Adwaita -{ - namespace - { - auto constinit _class = ToastOverlay_Class{}; - } // namespace - - auto ToastOverlay::get_type() -> GType - { - return _class.init().get_type(); - } - - auto ToastOverlay::get_base_type() -> GType - { - return adw_toast_overlay_get_type(); - } - - auto ToastOverlay::add_toast(Toast & toast) -> void - { - // Take a copy since the overlay will take ownership of the toast. - adw_toast_overlay_add_toast(Glib::unwrap(this), Glib::unwrap_copy(toast)); - } - - auto ToastOverlay::dismiss_all() -> void - { - adw_toast_overlay_dismiss_all(unwrap(this)); - } - - auto ToastOverlay::get_child() const -> Gtk::Widget * - { - return Glib::wrap(adw_toast_overlay_get_child(const_cast(unwrap(this)))); - } - - auto ToastOverlay::set_child(Gtk::Widget & value) -> void - { - adw_toast_overlay_set_child(unwrap(this), unwrap(&value)); - } - - auto ToastOverlay::property_child() -> Glib::PropertyProxy - { - return Glib::PropertyProxy{this, "child"}; - } - - auto ToastOverlay::property_child() const -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly{this, "child"}; - } - - ToastOverlay::ToastOverlay(Glib::ConstructParams const & params) - : Gtk::Widget{params} - { - } - - ToastOverlay::ToastOverlay(BaseObjectType * gobj) - : Gtk::Widget((GtkWidget *)gobj) - { - } - - ToastOverlay::ToastOverlay() - : Glib::ObjectBase{nullptr} - , Gtk::Widget{Glib::ConstructParams{_class.init()}} - { - } - -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwToastOverlay * object, bool copy) -> Adwaita::ToastOverlay * - { - return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); - } -} // namespace Glib \ No newline at end of file -- cgit v1.2.3