Audio plugin host https://kx.studio/carla
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.

67 lines
1.6KB

  1. /*
  2. * Carla Plugin Host
  3. * Copyright (C) 2011-2022 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 2 of
  8. * the License, or any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * For a full copy of the GNU General Public License see the doc/GPL.txt file.
  16. */
  17. #ifndef CARLA_JUCE_HPP_INCLUDED
  18. #define CARLA_JUCE_HPP_INCLUDED
  19. #include "AppConfig.h"
  20. #include "CarlaDefines.h"
  21. #ifdef USING_JUCE
  22. # if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
  23. # define USE_STANDALONE_JUCE_APPLICATION
  24. # else
  25. # define USE_REFCOUNTER_JUCE_MESSAGE_MANAGER
  26. # endif
  27. #endif
  28. namespace juce {
  29. class MessageManager;
  30. }
  31. namespace CarlaJUCE {
  32. void initialiseJuce_GUI();
  33. void idleJuce_GUI();
  34. void shutdownJuce_GUI();
  35. const char* getVersion();
  36. struct ScopedJuceInitialiser_GUI {
  37. ScopedJuceInitialiser_GUI();
  38. ~ScopedJuceInitialiser_GUI();
  39. };
  40. #ifdef USE_REFCOUNTER_JUCE_MESSAGE_MANAGER
  41. struct ReferenceCountedJuceMessageMessager {
  42. ReferenceCountedJuceMessageMessager();
  43. ~ReferenceCountedJuceMessageMessager();
  44. void incRef() const;
  45. void decRef() const;
  46. };
  47. void setMessageManagerForThisThread();
  48. void dispatchMessageManagerMessages();
  49. #endif
  50. #ifdef USE_STANDALONE_JUCE_APPLICATION
  51. void setupAndUseMainApplication();
  52. #endif
  53. } // namespace CarlaJUCE
  54. #endif // CARLA_JUCE_HPP_INCLUDED