#pragma once #include "../RuleWithEffects.hpp" #include "../../DesktopTypes.hpp" #include "LayerRuleEffectContainer.hpp" #include #include namespace Desktop::Rule { using LayerRuleEffectValue = std::variant; struct SLayerRuleEffect { using storageType = CLayerRuleEffectContainer::storageType; using valueType = LayerRuleEffectValue; CLayerRuleEffectContainer::storageType key = LAYER_RULE_EFFECT_NONE; std::string raw; LayerRuleEffectValue value; }; class CLayerRule : public CRuleWithEffects { public: using Base = CRuleWithEffects; using storageType = Base::storageType; CLayerRule(const std::string& name = ""); virtual ~CLayerRule() = default; bool matches(PHLLS w); private: std::expected parseEffect(storageType e, const std::string& result) override; }; };