summaryrefslogtreecommitdiff
path: root/src/plugins/PluginAPI.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/PluginAPI.hpp')
-rw-r--r--src/plugins/PluginAPI.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/PluginAPI.hpp b/src/plugins/PluginAPI.hpp
index 568b2e0f..77bb9926 100644
--- a/src/plugins/PluginAPI.hpp
+++ b/src/plugins/PluginAPI.hpp
@@ -70,12 +70,15 @@ struct SVersionInfo {
class IHyprLayout;
class IHyprWindowDecoration;
struct SConfigValue;
+class Hypr_dummyClass {};
namespace Layout {
class ITiledAlgorithm;
class IFloatingAlgorithm;
};
+using HOOK_CALLBACK_FN = Hypr_dummyClass;
+
/*
These methods are for the plugin to implement
Methods marked with REQUIRED are required.
@@ -148,6 +151,8 @@ namespace HyprlandAPI {
APICALL Hyprlang::CConfigValue* getConfigValue(HANDLE handle, const std::string& name);
/*
+ Deprecated: doesn't do anything anymore, use Event::bus()
+
Register a dynamic (function) callback to a selected event.
Pointer will be free'd by Hyprland on unregisterCallback().
@@ -155,7 +160,7 @@ namespace HyprlandAPI {
WARNING: Losing this pointer will unregister the callback!
*/
- APICALL [[nodiscard]] SP<HOOK_CALLBACK_FN> registerCallbackDynamic(HANDLE handle, const std::string& event, HOOK_CALLBACK_FN fn);
+ APICALL [[deprecated]] [[nodiscard]] SP<HOOK_CALLBACK_FN> registerCallbackDynamic(HANDLE handle, const std::string& event, HOOK_CALLBACK_FN fn);
/*
Unregisters a callback. If the callback was dynamic, frees the memory.