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.

57 lines
774B

  1. #pragma once
  2. #include "common.hpp"
  3. /** Accesses the global App pointer */
  4. #define APP rack::appGet()
  5. namespace rack {
  6. namespace history {
  7. struct State;
  8. } // namespace history
  9. namespace engine {
  10. struct Engine;
  11. } // namespace engine
  12. struct Window;
  13. struct PatchManager;
  14. namespace widget {
  15. struct EventState;
  16. };
  17. namespace app {
  18. struct Scene;
  19. } // namespace app
  20. /** Contains the application state */
  21. struct App {
  22. widget::EventState *event = NULL;
  23. app::Scene *scene = NULL;
  24. engine::Engine *engine = NULL;
  25. Window *window = NULL;
  26. history::State *history = NULL;
  27. PatchManager *patch = NULL;
  28. void init(bool headless);
  29. ~App();
  30. };
  31. void appInit(bool headless);
  32. void appDestroy();
  33. /** Returns the global App pointer */
  34. App *appGet();
  35. } // namespace rack