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.

asset.hpp 958B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. #include <common.hpp>
  3. namespace rack {
  4. namespace plugin {
  5. struct Plugin;
  6. } // namespace plugin
  7. namespace asset {
  8. void init();
  9. /** Returns the path of a system resource. Should only read files from this location. */
  10. std::string system(std::string filename);
  11. /** Returns the path of a user resource. Can read and write files to this location. */
  12. std::string user(std::string filename);
  13. /** Returns the path of a resource in the plugin's folder. Should only read files from this location. */
  14. std::string plugin(plugin::Plugin* plugin, std::string filename);
  15. // Set these before calling init() to override the default paths
  16. extern std::string systemDir;
  17. extern std::string userDir;
  18. extern std::string logPath;
  19. extern std::string pluginsPath;
  20. extern std::string settingsPath;
  21. extern std::string autosavePath;
  22. extern std::string templatePath;
  23. // Only defined on Mac
  24. extern std::string bundlePath;
  25. } // namespace asset
  26. } // namespace rack