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.

42 lines
978B

  1. #pragma once
  2. #include "common.hpp"
  3. #include <list>
  4. namespace rack {
  5. struct Model;
  6. // Subclass this and return a pointer to a new one when init() is called
  7. struct Plugin {
  8. /** A list of the models available by this plugin, add with addModel() */
  9. std::list<Model*> models;
  10. /** The file path of the plugin's directory */
  11. std::string path;
  12. /** OS-dependent library handle */
  13. void *handle = NULL;
  14. /** Must be unique. Used for patch files and the VCV store API.
  15. To guarantee uniqueness, it is a good idea to prefix the slug by your "company name" if available, e.g. "MyCompany-MyPlugin"
  16. */
  17. std::string slug;
  18. /** The version of your plugin
  19. Plugins should follow the versioning scheme described at https://github.com/VCVRack/Rack/issues/266
  20. Do not include the "v" in "v1.0" for example.
  21. */
  22. std::string version;
  23. /** Deprecated, do not use. */
  24. std::string website;
  25. std::string manual;
  26. virtual ~Plugin();
  27. void addModel(Model *model);
  28. };
  29. } // namespace rack