From 0840ff9a28e627351a520437ec83902d88310fe5 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 15 Aug 2024 11:25:30 +0200 Subject: adw: add Toast and ToastOverlay classes --- include/turns/adw/helpers/properties.hpp | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 include/turns/adw/helpers/properties.hpp (limited to 'include/turns/adw/helpers/properties.hpp') diff --git a/include/turns/adw/helpers/properties.hpp b/include/turns/adw/helpers/properties.hpp new file mode 100644 index 0000000..6cc602a --- /dev/null +++ b/include/turns/adw/helpers/properties.hpp @@ -0,0 +1,35 @@ +#ifndef TURNS_ADW_HELPERS_PROPERTIES_HPP +#define TURNS_ADW_HELPERS_PROPERTIES_HPP + +#include +#include + +#include + +namespace turns::adw::helpers +{ + + template + struct deduced_property_proxy + { + using type = Glib::PropertyProxy; + }; + + template + struct deduced_property_proxy + { + using type = Glib::PropertyProxy_ReadOnly; + }; + + template + using deduced_property_proxy_t = typename deduced_property_proxy::type; + + template + auto make_property_proxy(ObjectType && object, char const * property) + { + return deduced_property_proxy_t>{&object, property}; + } + +} // namespace turns::adw::helpers + +#endif \ No newline at end of file -- cgit v1.2.3