/** * @author Felix Morgner (felix.morgner@gmail.com) * @copyright Copyright (c) 2025 * SPDX-License-Identifier: LGPL-2.1-or-later */ #ifndef LIBADWAITAMM_ALERT_DIALOG_HPP #define LIBADWAITAMM_ALERT_DIALOG_HPP #include "adwaitamm/dialog.hpp" #include "adwaitamm/helpers/gobj_mixin.hpp" #include #include #include #include #include #include #include #include #include #define _ADWAITA_INSIDE #include #undef _ADWAITA_INSIDE namespace Adwaita { enum struct ResponseAppearance; struct AlertDialog : Dialog, helpers::gobj_mixin { using BaseObjectType = AdwAlertDialog; using BaseClassType = AdwAlertDialogClass; using CppObjectType = AlertDialog; using CppClassType = struct AlertDialog_Class; using helpers::gobj_mixin::gobj; using helpers::gobj_mixin::gobj_copy; AlertDialog(Glib::ustring heading, Glib::ustring body); AlertDialog(AlertDialog const & other) = delete; AlertDialog(AlertDialog && other) noexcept = default; auto operator=(AlertDialog const & other) noexcept -> AlertDialog & = delete; auto operator=(AlertDialog && other) noexcept -> AlertDialog & = default; auto static create(Glib::ustring heading, Glib::ustring body) -> Glib::RefPtr; auto static get_type() -> GType; auto static get_base_type() -> GType; auto add_response(Glib::ustring id, Glib::ustring label) -> void; auto choose(Gtk::Widget & parent, Glib::RefPtr const & cancellable, Gio::SlotAsyncReady const & slot) -> void; auto choose_finish(Glib::RefPtr const & result) -> Glib::ustring; auto set_close_response(Glib::ustring id) -> void; auto set_default_response(Glib::ustring id) -> void; auto set_response_appearance(Glib::ustring id, ResponseAppearance value) -> void; protected: friend AlertDialog_Class; explicit AlertDialog(Glib::ConstructParams const & params); explicit AlertDialog(BaseObjectType * gobj); }; } // namespace Adwaita namespace Glib { auto wrap(AdwAlertDialog * object, bool copy = false) -> Adwaita::AlertDialog *; } // namespace Glib #endif