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/switchrow.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'adw/src/switchrow.cpp') diff --git a/adw/src/switchrow.cpp b/adw/src/switchrow.cpp index 0aab454..9c0245e 100644 --- a/adw/src/switchrow.cpp +++ b/adw/src/switchrow.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -68,6 +69,26 @@ namespace Adwaita { } + auto SwitchRow::get_active() const noexcept -> bool + { + return adw_switch_row_get_active(const_cast(unwrap(this))); + } + + auto SwitchRow::set_active(bool value) noexcept -> void + { + adw_switch_row_set_active(unwrap(this), value); + } + + auto SwitchRow::property_active() -> Glib::PropertyProxy + { + return Glib::PropertyProxy{this, "active"}; + } + + auto SwitchRow::property_active() const -> Glib::PropertyProxy_ReadOnly + { + return Glib::PropertyProxy_ReadOnly{this, "active"}; + } + } // namespace Adwaita namespace Glib -- cgit v1.2.3