diff options
author | Vaxry <[email protected]> | 2023-10-21 14:52:43 +0100 |
---|---|---|
committer | Vaxry <[email protected]> | 2023-10-21 14:52:43 +0100 |
commit | a61eb7694df25a75f45502ed64b1536fda370c1d (patch) | |
tree | 30c48c414cec95598c50bed092ee35c19f3e28a2 /example | |
parent | c6233a790fed3d9a3100e16a73143700846928a2 (diff) | |
download | Hyprland-a61eb7694df25a75f45502ed64b1536fda370c1d.tar.gz Hyprland-a61eb7694df25a75f45502ed64b1536fda370c1d.zip |
hooksystem: add callbackinfo struct and cancellable events
Diffstat (limited to 'example')
-rw-r--r-- | example/examplePlugin/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/example/examplePlugin/main.cpp b/example/examplePlugin/main.cpp index 560af387..f2cd1075 100644 --- a/example/examplePlugin/main.cpp +++ b/example/examplePlugin/main.cpp @@ -58,8 +58,8 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) { HyprlandAPI::addNotification(PHANDLE, "Hello World from an example plugin!", CColor{0.f, 1.f, 1.f, 1.f}, 5000); - HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", [&](void* self, std::any data) { onActiveWindowChange(self, data); }); - HyprlandAPI::registerCallbackDynamic(PHANDLE, "openWindow", [&](void* self, std::any data) { onNewWindow(self, data); }); + HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", [&](void* self, SCallbackInfo& info, std::any data) { onActiveWindowChange(self, data); }); + HyprlandAPI::registerCallbackDynamic(PHANDLE, "openWindow", [&](void* self, SCallbackInfo& info, std::any data) { onNewWindow(self, data); }); g_pCustomLayout = std::make_unique<CHyprCustomLayout>(); |