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.

61 lines
836B

  1. #pragma once
  2. #include "common.hpp"
  3. /** Accesses the global App pointer */
  4. #define APP rack::app::get()
  5. namespace rack {
  6. namespace event {
  7. struct State;
  8. } // namespace event
  9. namespace history {
  10. struct State;
  11. } // namespace history
  12. namespace engine {
  13. struct Engine;
  14. } // namespace engine
  15. struct Window;
  16. struct PatchManager;
  17. /** Rack-specific GUI widgets and functions that control and offer feedback for the rack state.
  18. */
  19. namespace app {
  20. struct Scene;
  21. /** Contains the application state */
  22. struct App {
  23. event::State *event = NULL;
  24. Scene *scene = NULL;
  25. engine::Engine *engine = NULL;
  26. Window *window = NULL;
  27. history::State *history = NULL;
  28. PatchManager *patch = NULL;
  29. App();
  30. ~App();
  31. };
  32. void init();
  33. void destroy();
  34. /** Returns the global App pointer */
  35. App *get();
  36. } // namespace app
  37. } // namespace rack