From 6ff0bb23a71f334fe0ca86581cc86aaab2882003 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 3 Apr 2025 17:45:48 +0200 Subject: adw: implement missing members in Toast --- adw/include/turns/adw/toast.hpp | 82 ++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 50 deletions(-) (limited to 'adw/include/turns') diff --git a/adw/include/turns/adw/toast.hpp b/adw/include/turns/adw/toast.hpp index 80d9b8b..da0ef4d 100644 --- a/adw/include/turns/adw/toast.hpp +++ b/adw/include/turns/adw/toast.hpp @@ -2,11 +2,13 @@ #define TURNS_ADW_TOAST_HPP #include "turns/adw/helpers/gobj_mixin.hpp" -#include "turns/adw/helpers/properties.hpp" +#include #include #include +#include #include +#include #include #include @@ -63,15 +65,35 @@ namespace turns::adw auto static get_base_type() -> GType; auto dismiss() -> void; - - auto property_action_name(this auto && self); - auto property_action_target(this auto && self); - auto property_button_label(this auto && self); - auto property_custom_title(this auto && self); - auto property_priority(this auto && self); - auto property_timeout(this auto && self); - auto property_title(this auto && self); - auto property_use_markup(this auto && self); + auto get_action_name() const -> Glib::ustring; + auto get_action_target_value() const -> Glib::VariantBase; + auto get_button_label() const -> Glib::ustring; + auto get_custom_title() const -> Gtk::Widget *; + auto get_priority() const -> Priority; + auto get_timeout() const -> unsigned; + auto get_title() const -> Glib::ustring; + auto get_use_markup() const -> bool; + auto set_action_name(Glib::ustring value) -> void; + auto set_action_target_value(Glib::VariantBase const & value) -> void; + auto set_button_label(Glib::ustring value) -> void; + auto set_custom_title(Gtk::Widget * value) -> void; + auto set_detailed_action_name(Glib::ustring value) -> void; + auto set_priority(Priority value) -> void; + auto set_timeout(unsigned value) -> void; + auto set_title(Glib::ustring value) -> void; + auto set_use_markup(bool value) -> void; + + auto property_action_name() -> Glib::PropertyProxy; + auto property_action_target() -> Glib::PropertyProxy; + auto property_button_label() -> Glib::PropertyProxy; + auto property_custom_title() -> Glib::PropertyProxy; + auto property_priority() -> Glib::PropertyProxy; + auto property_timeout() -> Glib::PropertyProxy; + auto property_title() -> Glib::PropertyProxy; + auto property_use_markup() -> Glib::PropertyProxy; + + auto signal_button_clicked() -> Glib::SignalProxy; + auto signal_dismissed() -> Glib::SignalProxy; protected: explicit Toast(Glib::ustring const & title); @@ -79,46 +101,6 @@ namespace turns::adw explicit Toast(BaseObjectType * gobj); }; - auto Toast::property_action_name(this auto && self) - { - return helpers::make_property_proxy(self, "action-name"); - } - - auto Toast::property_action_target(this auto && self) - { - return helpers::make_property_proxy(self, "action-target"); - } - - auto Toast::property_button_label(this auto && self) - { - return helpers::make_property_proxy(self, "button-label"); - } - - auto Toast::property_custom_title(this auto && self) - { - return helpers::make_property_proxy(self, "custom-title"); - } - - auto Toast::property_priority(this auto && self) - { - return helpers::make_property_proxy(self, "priority"); - } - - auto Toast::property_timeout(this auto && self) - { - return helpers::make_property_proxy(self, "timeout"); - } - - auto Toast::property_title(this auto && self) - { - return helpers::make_property_proxy(self, "title"); - } - - auto Toast::property_use_markup(this auto && self) - { - return helpers::make_property_proxy(self, "use-markup"); - } - } // namespace turns::adw namespace Glib -- cgit v1.2.3