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.hpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/plugins/PluginAPI.hpp b/src/plugins/PluginAPI.hpp
index 47a695db..568b2e0f 100644
--- a/src/plugins/PluginAPI.hpp
+++ b/src/plugins/PluginAPI.hpp
@@ -71,6 +71,11 @@ class IHyprLayout;
class IHyprWindowDecoration;
struct SConfigValue;
+namespace Layout {
+ class ITiledAlgorithm;
+ class IFloatingAlgorithm;
+};
+
/*
These methods are for the plugin to implement
Methods marked with REQUIRED are required.
@@ -172,15 +177,26 @@ namespace HyprlandAPI {
Adds a layout to Hyprland.
returns: true on success. False otherwise.
+
+ deprecated: addTiledAlgo, addFloatingAlgo
*/
- APICALL bool addLayout(HANDLE handle, const std::string& name, IHyprLayout* layout);
+ APICALL [[deprecated]] bool addLayout(HANDLE handle, const std::string& name, IHyprLayout* layout);
/*
Removes an added layout from Hyprland.
returns: true on success. False otherwise.
+
+ deprecated: V2 removeAlgo
+ */
+ APICALL [[deprecated]] bool removeLayout(HANDLE handle, IHyprLayout* layout);
+
+ /*
+ Algorithm fns. Used for registering and removing. Return success.
*/
- APICALL bool removeLayout(HANDLE handle, IHyprLayout* layout);
+ APICALL bool addTiledAlgo(HANDLE handle, const std::string& name, const std::type_info* typeInfo, std::function<UP<Layout::ITiledAlgorithm>()>&& factory);
+ APICALL bool addFloatingAlgo(HANDLE handle, const std::string& name, const std::type_info* typeInfo, std::function<UP<Layout::IFloatingAlgorithm>()>&& factory);
+ APICALL bool removeAlgo(HANDLE handle, const std::string& name);
/*
Queues a config reload. Does not take effect immediately.