You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
698B

  1. #pragma once
  2. #include <plugin/Plugin.hpp>
  3. /** Called immediately after loading your plugin.
  4. Use this to save `plugin` to a global variable and add Models to it.
  5. Required in plugins.
  6. */
  7. extern "C"
  8. void init(rack::plugin::Plugin* plugin);
  9. /** Called before your plugin library is unloaded.
  10. Optional in plugins.
  11. */
  12. extern "C"
  13. void destroy();
  14. /** Called when saving user settings.
  15. Stored in `settings["pluginSettings"][pluginSlug]`.
  16. Useful for persisting plugin-wide settings.
  17. Optional in plugins.
  18. */
  19. extern "C"
  20. json_t* settingsToJson();
  21. /** Called after initializing plugin if user plugin settings property is defined.
  22. Optional in plugins.
  23. */
  24. extern "C"
  25. void settingsFromJson(json_t* rootJ);