-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there an alternative to call_plugin()? #1811
Comments
The idea was to enable calling plugins via IPC, replacing the call_method in this way. It would also allow additional parameters to be passed. I have yet to decide on a good API, I think it would make sense to have this ready before 0.8. |
Forgot to mention: IPC methods can of course be also called from other plugins, and for many plugins we'd want a simple wrapper which combines a regular binding + ipc call. |
Thank you, this makes sense! |
#1821 contains a first version of the helper I was speaking of, |
By using the ipc-activator helper, scale can now be triggered from an IPC call, including one generated from another plugin. Fixes #1811
In #1864 I have added support for these ipc-activators to the scale plugin since that's what you mentioned here. Other plugins can be handled similarly, PRs welcome. Here's an example of how to call scale (haven't tested but should work): nlohmann::json data;
data["output_id"] = output->get_id();
shared_data::ref_ptr_t<ipc::method_repository_t> repo;
repo->call_method("scale/toggle", data); |
By using the ipc-activator helper, scale can now be triggered from an IPC call, including one generated from another plugin. Fixes #1811
By using the ipc-activator helper, scale can now be triggered from an IPC call, including one generated from another plugin. Fixes #1811
output_t::call_plugin() was removed in #1674 (as plugins are not created for each output anymore). Is there a replacement for its functionality? I would like to be able to programmatically activate other plugins (as if the user pressed the associated keybinding), and this was a very convenient feature, since it only required the name of the action (e.g. "scale/toggle").
Thanks!
The text was updated successfully, but these errors were encountered: