#include "public.hpp" #include #include #include struct SHandler { std::string name = ""; Hyprlang::SHandlerOptions options; Hyprlang::PCONFIGHANDLERFUNC func = nullptr; }; struct SVariable { std::string name = ""; std::string value = ""; std::vector linesContainingVar; // for dynamic updates }; struct SSpecialCategoryDescriptor { std::string name = ""; std::string key = ""; std::unordered_map defaultValues; bool dontErrorOnMissing = false; }; struct SSpecialCategory { SSpecialCategoryDescriptor* descriptor = nullptr; std::string name = ""; std::string key = ""; // empty means no key std::unordered_map values; bool isStatic = false; void applyDefaults(); }; class CConfigImpl { public: std::string path = ""; std::unordered_map values; std::unordered_map defaultValues; std::vector handlers; std::vector variables; std::vector envVariables; std::vector> specialCategories; std::vector> specialCategoryDescriptors; std::vector categories; std::string currentSpecialKey = ""; std::string parseError = ""; };