From dfeb19b0a83b8ce57d28bf94a4f8d129993d1064 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Mon, 12 Jan 2026 23:06:20 +0100 Subject: Initial commit --- src/xcb_resources.hh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/xcb_resources.hh (limited to 'src/xcb_resources.hh') diff --git a/src/xcb_resources.hh b/src/xcb_resources.hh new file mode 100644 index 0000000..f0482c3 --- /dev/null +++ b/src/xcb_resources.hh @@ -0,0 +1,35 @@ +#ifndef XCB_RESOURCES_HH +#define XCB_RESOURCES_HH + +#include "xcb_connection.hh" + +#include +#include +#include + +namespace xcb { + +class Resources { + public: + virtual ~Resources() = default; + + virtual std::optional get_string(std::string const& name, + std::string const& clazz) = 0; + + virtual std::optional get_long(std::string const& name, + std::string const& clazz) = 0; + + virtual std::optional get_bool(std::string const& name, + std::string const& clazz) = 0; + + static std::unique_ptr create(shared_conn conn); + + protected: + Resources() = default; + Resources(Resources const&) = delete; + Resources& operator=(Resources const&) = delete; +}; + +} // namespace xcb + +#endif // XCB_RESOURCES_HH -- cgit v1.2.3-70-g09d2