From 60bda7ee3d0a77d19277540cce53ecbddeabd716 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 5 Feb 2024 01:56:38 +0000 Subject: pluginapi: allow registering hyprctl commands closes #4616 --- src/plugins/PluginAPI.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/plugins/PluginAPI.hpp') diff --git a/src/plugins/PluginAPI.hpp b/src/plugins/PluginAPI.hpp index 12e7c128..e7a6c899 100644 --- a/src/plugins/PluginAPI.hpp +++ b/src/plugins/PluginAPI.hpp @@ -273,6 +273,20 @@ namespace HyprlandAPI { for a different hash. */ APICALL SVersionInfo getHyprlandVersion(HANDLE handle); + + /* + Registers a hyprctl command + + returns: Pointer. Nullptr on fail. + */ + APICALL std::shared_ptr registerHyprCtlCommand(HANDLE handle, SHyprCtlCommand cmd); + + /* + Unregisters a hyprctl command + + returns: true on success. False otherwise. + */ + APICALL bool unregisterHyprCtlCommand(HANDLE handle, std::shared_ptr cmd); }; /* -- cgit v1.2.3