summaryrefslogtreecommitdiff
path: root/src/plugins/PluginAPI.hpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2023-10-29 16:59:50 +0000
committerVaxry <vaxry@vaxry.net>2023-10-29 16:59:50 +0000
commitaf9440152e19cee74b675e53087e032b9ccb5459 (patch)
tree537f79cad30a7c35b25ca549e5ae865f6fc2b303 /src/plugins/PluginAPI.hpp
parent7f4b0aaadc8348e8814285d7ec582cf737b62d3b (diff)
pluginapi: add a config keyword adding method
Diffstat (limited to 'src/plugins/PluginAPI.hpp')
-rw-r--r--src/plugins/PluginAPI.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/PluginAPI.hpp b/src/plugins/PluginAPI.hpp
index 36cdbe63..30c6b4c7 100644
--- a/src/plugins/PluginAPI.hpp
+++ b/src/plugins/PluginAPI.hpp
@@ -115,6 +115,14 @@ namespace HyprlandAPI {
APICALL bool addConfigValue(HANDLE handle, const std::string& name, const SConfigValue& value);
/*
+ Add a config keyword.
+ This method may only be called in "pluginInit"
+
+ returns: true on success, false on fail
+ */
+ APICALL bool addConfigKeyword(HANDLE handle, const std::string& name, std::function<void(const std::string& key, const std::string& val)> fn);
+
+ /*
Get a config value.
returns: a pointer to the config value struct, which is guaranteed to be valid for the life of this plugin, unless another `addConfigValue` is called afterwards.