The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
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.

155 lines
4.8KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2015 - ROLI Ltd.
  5. Permission is granted to use this software under the terms of either:
  6. a) the GPL v2 (or any later version)
  7. b) the Affero GPL v3
  8. Details of these licenses can be found at: www.gnu.org/licenses
  9. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  11. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  12. ------------------------------------------------------------------------------
  13. To release a closed-source product which uses JUCE, commercial licenses are
  14. available: visit www.juce.com for more information.
  15. ==============================================================================
  16. */
  17. #ifdef JUCE_AUDIO_PROCESSORS_H_INCLUDED
  18. /* When you add this cpp file to your project, you mustn't include it in a file where you've
  19. already included any other headers - just put it inside a file on its own, possibly with your config
  20. flags preceding it, but don't include anything else. That also includes avoiding any automatic prefix
  21. header files that the compiler may be using.
  22. */
  23. #error "Incorrect use of JUCE cpp file"
  24. #endif
  25. #define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1
  26. #include "juce_audio_processors.h"
  27. #include "../juce_gui_extra/juce_gui_extra.h"
  28. //==============================================================================
  29. #if JUCE_MAC
  30. #if JUCE_SUPPORT_CARBON \
  31. && ((JUCE_PLUGINHOST_VST || JUCE_PLUGINHOST_AU) \
  32. || ! (defined (MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6))
  33. #include <Carbon/Carbon.h>
  34. #endif
  35. #endif
  36. #if JUCE_PLUGINHOST_VST && JUCE_LINUX
  37. #include <X11/Xlib.h>
  38. #include <X11/Xutil.h>
  39. #undef KeyPress
  40. #endif
  41. #if ! JUCE_WINDOWS && ! JUCE_MAC
  42. #undef JUCE_PLUGINHOST_VST3
  43. #define JUCE_PLUGINHOST_VST3 0
  44. #endif
  45. //==============================================================================
  46. namespace juce
  47. {
  48. static inline bool arrayContainsPlugin (const OwnedArray<PluginDescription>& list,
  49. const PluginDescription& desc)
  50. {
  51. for (int i = list.size(); --i >= 0;)
  52. if (list.getUnchecked(i)->isDuplicateOf (desc))
  53. return true;
  54. return false;
  55. }
  56. #if JUCE_MAC
  57. //==============================================================================
  58. struct AutoResizingNSViewComponent : public NSViewComponent,
  59. private AsyncUpdater
  60. {
  61. AutoResizingNSViewComponent() : recursive (false) {}
  62. void childBoundsChanged (Component*) override
  63. {
  64. if (recursive)
  65. {
  66. triggerAsyncUpdate();
  67. }
  68. else
  69. {
  70. recursive = true;
  71. resizeToFitView();
  72. recursive = true;
  73. }
  74. }
  75. void handleAsyncUpdate() override { resizeToFitView(); }
  76. bool recursive;
  77. };
  78. //==============================================================================
  79. struct AutoResizingNSViewComponentWithParent : public AutoResizingNSViewComponent,
  80. private Timer
  81. {
  82. AutoResizingNSViewComponentWithParent()
  83. {
  84. NSView* v = [[NSView alloc] init];
  85. setView (v);
  86. [v release];
  87. startTimer (30);
  88. }
  89. NSView* getChildView() const
  90. {
  91. if (NSView* parent = (NSView*) getView())
  92. if ([[parent subviews] count] > 0)
  93. return [[parent subviews] objectAtIndex: 0];
  94. return nil;
  95. }
  96. void timerCallback() override
  97. {
  98. if (NSView* child = getChildView())
  99. {
  100. stopTimer();
  101. setView (child);
  102. }
  103. }
  104. };
  105. #endif
  106. #if JUCE_CLANG
  107. #pragma clang diagnostic ignored "-Wdeprecated-declarations"
  108. #endif
  109. #include "format/juce_AudioPluginFormat.cpp"
  110. #include "format/juce_AudioPluginFormatManager.cpp"
  111. #include "processors/juce_AudioProcessor.cpp"
  112. #include "processors/juce_AudioChannelSet.cpp"
  113. #include "processors/juce_AudioProcessorEditor.cpp"
  114. #include "processors/juce_AudioProcessorGraph.cpp"
  115. #include "processors/juce_GenericAudioProcessorEditor.cpp"
  116. #include "processors/juce_PluginDescription.cpp"
  117. #include "format_types/juce_LADSPAPluginFormat.cpp"
  118. #include "format_types/juce_VSTPluginFormat.cpp"
  119. #include "format_types/juce_VST3PluginFormat.cpp"
  120. #include "format_types/juce_AudioUnitPluginFormat.mm"
  121. #include "scanning/juce_KnownPluginList.cpp"
  122. #include "scanning/juce_PluginDirectoryScanner.cpp"
  123. #include "scanning/juce_PluginListComponent.cpp"
  124. #include "utilities/juce_AudioProcessorValueTreeState.cpp"
  125. #include "utilities/juce_AudioProcessorParameters.cpp"
  126. }