From b95258f419c62f7f38ec6128568df5897e4f5696 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 4 Apr 2025 22:15:41 +0200 Subject: adw: clean up property definitions --- adw/src/toast.cpp | 58 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 48 insertions(+), 10 deletions(-) (limited to 'adw/src/toast.cpp') diff --git a/adw/src/toast.cpp b/adw/src/toast.cpp index d5b372e..4d66c93 100644 --- a/adw/src/toast.cpp +++ b/adw/src/toast.cpp @@ -1,7 +1,6 @@ #include "adwaitamm/toast.hpp" #include "adwaitamm/enums.hpp" -#include "adwaitamm/helpers/properties.hpp" #include #include @@ -43,7 +42,7 @@ namespace Adwaita if (!gtype_) { class_init_func_ = &class_init_function; - gtype_= adw_toast_get_type(); + gtype_ = adw_toast_get_type(); } return *this; } @@ -183,42 +182,81 @@ namespace Adwaita auto Toast::property_action_name() -> Glib::PropertyProxy { - return helpers::make_property_proxy(*this, "action-name"); + return Glib::PropertyProxy(this, "action-name"); + } + + auto Toast::property_action_name() const -> Glib::PropertyProxy_ReadOnly + { + return Glib::PropertyProxy_ReadOnly(this, "action-name"); } auto Toast::property_action_target() -> Glib::PropertyProxy { - return helpers::make_property_proxy(*this, "action-target"); + return Glib::PropertyProxy(this, "action-target"); + } + + auto Toast::property_action_target() const -> Glib::PropertyProxy_ReadOnly + { + return Glib::PropertyProxy_ReadOnly(this, "action-target"); } auto Toast::property_button_label() -> Glib::PropertyProxy { - return helpers::make_property_proxy(*this, "button-label"); + return Glib::PropertyProxy(this, "button-label"); + } + + auto Toast::property_button_label() const -> Glib::PropertyProxy_ReadOnly + { + return Glib::PropertyProxy_ReadOnly(this, "button-label"); } auto Toast::property_custom_title() -> Glib::PropertyProxy { - return helpers::make_property_proxy(*this, "custom-title"); + return Glib::PropertyProxy(this, "custom-title"); + } + + auto Toast::property_custom_title() const -> Glib::PropertyProxy_ReadOnly + { + return Glib::PropertyProxy_ReadOnly(this, "custom-title"); } auto Toast::property_priority() -> Glib::PropertyProxy { - return helpers::make_property_proxy(*this, "priority"); + return Glib::PropertyProxy(this, "priority"); } + auto Toast::property_priority() const -> Glib::PropertyProxy_ReadOnly + { + return Glib::PropertyProxy_ReadOnly(this, "priority"); + } auto Toast::property_timeout() -> Glib::PropertyProxy { - return helpers::make_property_proxy(*this, "timeout"); + return Glib::PropertyProxy(this, "timeout"); + } + + auto Toast::property_timeout() const -> Glib::PropertyProxy_ReadOnly + { + return Glib::PropertyProxy_ReadOnly(this, "timeout"); } auto Toast::property_title() -> Glib::PropertyProxy { - return helpers::make_property_proxy(*this, "title"); + return Glib::PropertyProxy(this, "title"); + } + + auto Toast::property_title() const -> Glib::PropertyProxy_ReadOnly + { + return Glib::PropertyProxy_ReadOnly(this, "title"); } auto Toast::property_use_markup() -> Glib::PropertyProxy { - return helpers::make_property_proxy(*this, "use-markup"); + return Glib::PropertyProxy(this, "use-markup"); + } + + auto Toast::property_use_markup() const -> Glib::PropertyProxy_ReadOnly + { + return Glib::PropertyProxy_ReadOnly(this, "use-markup"); } auto Toast::signal_button_clicked() -> Glib::SignalProxy -- cgit v1.2.3