#ifndef TURNS_ADW_TOAST_HPP #define TURNS_ADW_TOAST_HPP #include "turns/adw/helpers/gobj_cast.hpp" #include "turns/adw/helpers/properties.hpp" #include #include #include #include #include using AdwToast = struct _AdwToast; namespace turns::adw { struct Toast_Class; struct Toast : Glib::Object, helpers::gobj_mixin { enum class Priority { NORMAL, HIGH, }; using helpers::gobj_mixin::gobj; using helpers::gobj_mixin::gobj_copy; Toast(Toast && other) noexcept = default; auto operator=(Toast && other) noexcept -> Toast & = default; Toast(Toast const & other) = delete; auto operator=(Toast const & other) noexcept -> Toast & = delete; explicit Toast(Glib::ustring const & title); auto static get_type() -> GType; auto static get_base_type() -> GType; auto dismiss() -> void; // clang-format off template auto property_action_name(this Self && self); template auto property_action_target(this Self && self); template auto property_button_label(this Self && self); template auto property_custom_title(this Self && self); template auto property_priority(this Self && self); template auto property_timeout(this Self && self); template auto property_title(this Self && self); template auto property_use_markup(this Self && self); // clang-format on protected: explicit Toast(Glib::ConstructParams const & params); explicit Toast(AdwToast * gobj); private: friend Toast_Class; static Toast_Class s_class; }; template auto Toast::property_action_name(this Self && self) { return helpers::make_property_proxy(self, "action-name"); } template auto Toast::property_action_target(this Self && self) { return helpers::make_property_proxy(self, "action-target"); } template auto Toast::property_button_label(this Self && self) { return helpers::make_property_proxy(self, "button-label"); } template auto Toast::property_custom_title(this Self && self) { return helpers::make_property_proxy(self, "custom-title"); } template auto Toast::property_priority(this Self && self) { return helpers::make_property_proxy(self, "priority"); } template auto Toast::property_timeout(this Self && self) { return helpers::make_property_proxy(self, "timeout"); } template auto Toast::property_title(this Self && self) { return helpers::make_property_proxy(self, "title"); } template auto Toast::property_use_markup(this Self && self) { return helpers::make_property_proxy(self, "use-markup"); } } // namespace turns::adw namespace Glib { auto wrap(AdwToast * object, bool copy = false) -> Glib::RefPtr; } // namespace Glib #endif