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.

295 lines
11KB

  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_GUI_BASICS_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 NS_FORMAT_FUNCTION(F,A) // To avoid spurious warnings from GCC
  26. #include "../juce_core/native/juce_BasicNativeHeaders.h"
  27. #include "juce_gui_basics.h"
  28. //==============================================================================
  29. #if JUCE_MAC
  30. #import <WebKit/WebKit.h>
  31. #import <IOKit/pwr_mgt/IOPMLib.h>
  32. #if JUCE_SUPPORT_CARBON
  33. #define Point CarbonDummyPointName
  34. #define Component CarbonDummyCompName
  35. #import <Carbon/Carbon.h> // still needed for SetSystemUIMode()
  36. #undef Point
  37. #undef Component
  38. #endif
  39. //==============================================================================
  40. #elif JUCE_WINDOWS
  41. #include <windowsx.h>
  42. #include <vfw.h>
  43. #include <commdlg.h>
  44. #if JUCE_WEB_BROWSER
  45. #include <exdisp.h>
  46. #include <exdispid.h>
  47. #endif
  48. #if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  49. #pragma comment(lib, "vfw32.lib")
  50. #pragma comment(lib, "imm32.lib")
  51. #endif
  52. #if JUCE_OPENGL
  53. #if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  54. #pragma comment(lib, "OpenGL32.Lib")
  55. #pragma comment(lib, "GlU32.Lib")
  56. #endif
  57. #endif
  58. #if JUCE_QUICKTIME && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  59. #pragma comment (lib, "QTMLClient.lib")
  60. #endif
  61. #if JUCE_DIRECT2D && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  62. #pragma comment (lib, "Dwrite.lib")
  63. #pragma comment (lib, "D2d1.lib")
  64. #endif
  65. #if JUCE_MINGW
  66. #include <imm.h>
  67. #endif
  68. //==============================================================================
  69. #elif JUCE_LINUX
  70. #include <X11/Xlib.h>
  71. #include <X11/Xatom.h>
  72. #include <X11/Xresource.h>
  73. #include <X11/Xutil.h>
  74. #include <X11/Xmd.h>
  75. #include <X11/keysym.h>
  76. #include <X11/XKBlib.h>
  77. #include <X11/cursorfont.h>
  78. #include <unistd.h>
  79. #if JUCE_USE_XRANDR
  80. /* If you're trying to use Xrandr, you'll need to install the "libxrandr-dev" package.. */
  81. #include <X11/extensions/Xrandr.h>
  82. #endif
  83. #if JUCE_USE_XINERAMA
  84. /* If you're trying to use Xinerama, you'll need to install the "libxinerama-dev" package.. */
  85. #include <X11/extensions/Xinerama.h>
  86. #endif
  87. #if JUCE_USE_XSHM
  88. #include <X11/extensions/XShm.h>
  89. #include <sys/shm.h>
  90. #include <sys/ipc.h>
  91. #endif
  92. #if JUCE_USE_XRENDER
  93. // If you're missing these headers, try installing the libxrender-dev and libxcomposite-dev
  94. #include <X11/extensions/Xrender.h>
  95. #include <X11/extensions/Xcomposite.h>
  96. #endif
  97. #if JUCE_USE_XCURSOR
  98. // If you're missing this header, try installing the libxcursor-dev package
  99. #include <X11/Xcursor/Xcursor.h>
  100. #endif
  101. #undef SIZEOF
  102. #undef KeyPress
  103. #endif
  104. //==============================================================================
  105. namespace juce
  106. {
  107. #define ASSERT_MESSAGE_MANAGER_IS_LOCKED \
  108. jassert (MessageManager::getInstance()->currentThreadHasLockedMessageManager());
  109. #define ASSERT_MESSAGE_MANAGER_IS_LOCKED_OR_OFFSCREEN \
  110. jassert (MessageManager::getInstance()->currentThreadHasLockedMessageManager() || getPeer() == nullptr);
  111. extern bool juce_areThereAnyAlwaysOnTopWindows();
  112. #include "components/juce_Component.cpp"
  113. #include "components/juce_ComponentListener.cpp"
  114. #include "mouse/juce_MouseInputSource.cpp"
  115. #include "components/juce_Desktop.cpp"
  116. #include "components/juce_ModalComponentManager.cpp"
  117. #include "mouse/juce_ComponentDragger.cpp"
  118. #include "mouse/juce_DragAndDropContainer.cpp"
  119. #include "mouse/juce_MouseCursor.cpp"
  120. #include "mouse/juce_MouseEvent.cpp"
  121. #include "mouse/juce_MouseInactivityDetector.cpp"
  122. #include "mouse/juce_MouseListener.cpp"
  123. #include "keyboard/juce_CaretComponent.cpp"
  124. #include "keyboard/juce_KeyboardFocusTraverser.cpp"
  125. #include "keyboard/juce_KeyListener.cpp"
  126. #include "keyboard/juce_KeyPress.cpp"
  127. #include "keyboard/juce_ModifierKeys.cpp"
  128. #include "buttons/juce_ArrowButton.cpp"
  129. #include "buttons/juce_Button.cpp"
  130. #include "buttons/juce_DrawableButton.cpp"
  131. #include "buttons/juce_HyperlinkButton.cpp"
  132. #include "buttons/juce_ImageButton.cpp"
  133. #include "buttons/juce_ShapeButton.cpp"
  134. #include "buttons/juce_TextButton.cpp"
  135. #include "buttons/juce_ToggleButton.cpp"
  136. #include "buttons/juce_ToolbarButton.cpp"
  137. #include "drawables/juce_Drawable.cpp"
  138. #include "drawables/juce_DrawableComposite.cpp"
  139. #include "drawables/juce_DrawableImage.cpp"
  140. #include "drawables/juce_DrawablePath.cpp"
  141. #include "drawables/juce_DrawableRectangle.cpp"
  142. #include "drawables/juce_DrawableShape.cpp"
  143. #include "drawables/juce_DrawableText.cpp"
  144. #include "drawables/juce_SVGParser.cpp"
  145. #include "filebrowser/juce_DirectoryContentsDisplayComponent.cpp"
  146. #include "filebrowser/juce_DirectoryContentsList.cpp"
  147. #include "filebrowser/juce_FileBrowserComponent.cpp"
  148. #include "filebrowser/juce_FileChooser.cpp"
  149. #include "filebrowser/juce_FileChooserDialogBox.cpp"
  150. #include "filebrowser/juce_FileListComponent.cpp"
  151. #include "filebrowser/juce_FilenameComponent.cpp"
  152. #include "filebrowser/juce_FileSearchPathListComponent.cpp"
  153. #include "filebrowser/juce_FileTreeComponent.cpp"
  154. #include "filebrowser/juce_ImagePreviewComponent.cpp"
  155. #include "layout/juce_ComponentAnimator.cpp"
  156. #include "layout/juce_ComponentBoundsConstrainer.cpp"
  157. #include "layout/juce_ComponentBuilder.cpp"
  158. #include "layout/juce_ComponentMovementWatcher.cpp"
  159. #include "layout/juce_ConcertinaPanel.cpp"
  160. #include "layout/juce_GroupComponent.cpp"
  161. #include "layout/juce_MultiDocumentPanel.cpp"
  162. #include "layout/juce_ResizableBorderComponent.cpp"
  163. #include "layout/juce_ResizableCornerComponent.cpp"
  164. #include "layout/juce_ResizableEdgeComponent.cpp"
  165. #include "layout/juce_ScrollBar.cpp"
  166. #include "layout/juce_StretchableLayoutManager.cpp"
  167. #include "layout/juce_StretchableLayoutResizerBar.cpp"
  168. #include "layout/juce_StretchableObjectResizer.cpp"
  169. #include "layout/juce_TabbedButtonBar.cpp"
  170. #include "layout/juce_TabbedComponent.cpp"
  171. #include "layout/juce_Viewport.cpp"
  172. #include "lookandfeel/juce_LookAndFeel.cpp"
  173. #include "lookandfeel/juce_LookAndFeel_V2.cpp"
  174. #include "lookandfeel/juce_LookAndFeel_V1.cpp"
  175. #include "lookandfeel/juce_LookAndFeel_V3.cpp"
  176. #include "menus/juce_MenuBarComponent.cpp"
  177. #include "menus/juce_MenuBarModel.cpp"
  178. #include "menus/juce_PopupMenu.cpp"
  179. #include "positioning/juce_MarkerList.cpp"
  180. #include "positioning/juce_RelativeCoordinate.cpp"
  181. #include "positioning/juce_RelativeCoordinatePositioner.cpp"
  182. #include "positioning/juce_RelativeParallelogram.cpp"
  183. #include "positioning/juce_RelativePoint.cpp"
  184. #include "positioning/juce_RelativePointPath.cpp"
  185. #include "positioning/juce_RelativeRectangle.cpp"
  186. #include "properties/juce_BooleanPropertyComponent.cpp"
  187. #include "properties/juce_ButtonPropertyComponent.cpp"
  188. #include "properties/juce_ChoicePropertyComponent.cpp"
  189. #include "properties/juce_PropertyComponent.cpp"
  190. #include "properties/juce_PropertyPanel.cpp"
  191. #include "properties/juce_SliderPropertyComponent.cpp"
  192. #include "properties/juce_TextPropertyComponent.cpp"
  193. #include "widgets/juce_ComboBox.cpp"
  194. #include "widgets/juce_ImageComponent.cpp"
  195. #include "widgets/juce_Label.cpp"
  196. #include "widgets/juce_ListBox.cpp"
  197. #include "widgets/juce_ProgressBar.cpp"
  198. #include "widgets/juce_Slider.cpp"
  199. #include "widgets/juce_TableHeaderComponent.cpp"
  200. #include "widgets/juce_TableListBox.cpp"
  201. #include "widgets/juce_TextEditor.cpp"
  202. #include "widgets/juce_ToolbarItemComponent.cpp"
  203. #include "widgets/juce_Toolbar.cpp"
  204. #include "widgets/juce_ToolbarItemPalette.cpp"
  205. #include "widgets/juce_TreeView.cpp"
  206. #include "windows/juce_AlertWindow.cpp"
  207. #include "windows/juce_CallOutBox.cpp"
  208. #include "windows/juce_ComponentPeer.cpp"
  209. #include "windows/juce_DialogWindow.cpp"
  210. #include "windows/juce_DocumentWindow.cpp"
  211. #include "windows/juce_ResizableWindow.cpp"
  212. #include "windows/juce_ThreadWithProgressWindow.cpp"
  213. #include "windows/juce_TooltipWindow.cpp"
  214. #include "windows/juce_TopLevelWindow.cpp"
  215. #include "commands/juce_ApplicationCommandInfo.cpp"
  216. #include "commands/juce_ApplicationCommandManager.cpp"
  217. #include "commands/juce_ApplicationCommandTarget.cpp"
  218. #include "commands/juce_KeyPressMappingSet.cpp"
  219. #include "application/juce_Application.cpp"
  220. #include "misc/juce_BubbleComponent.cpp"
  221. #include "misc/juce_DropShadower.cpp"
  222. #if JUCE_IOS || JUCE_WINDOWS
  223. #include "native/juce_MultiTouchMapper.h"
  224. #endif
  225. #if JUCE_MAC || JUCE_IOS
  226. #include "../juce_core/native/juce_osx_ObjCHelpers.h"
  227. #include "../juce_graphics/native/juce_mac_CoreGraphicsHelpers.h"
  228. #include "../juce_graphics/native/juce_mac_CoreGraphicsContext.h"
  229. #if JUCE_IOS
  230. #include "native/juce_ios_UIViewComponentPeer.mm"
  231. #include "native/juce_ios_Windowing.mm"
  232. #else
  233. #include "native/juce_mac_NSViewComponentPeer.mm"
  234. #include "native/juce_mac_Windowing.mm"
  235. #include "native/juce_mac_MainMenu.mm"
  236. #endif
  237. #include "native/juce_mac_MouseCursor.mm"
  238. #include "native/juce_mac_FileChooser.mm"
  239. #elif JUCE_WINDOWS
  240. #include "../juce_core/native/juce_win32_ComSmartPtr.h"
  241. #include "../juce_events/native/juce_win32_HiddenMessageWindow.h"
  242. #include "native/juce_win32_Windowing.cpp"
  243. #include "native/juce_win32_DragAndDrop.cpp"
  244. #include "native/juce_win32_FileChooser.cpp"
  245. #elif JUCE_LINUX
  246. #include "native/juce_linux_Clipboard.cpp"
  247. #include "native/juce_linux_Windowing.cpp"
  248. #include "native/juce_linux_FileChooser.cpp"
  249. #elif JUCE_ANDROID
  250. #include "../juce_core/native/juce_android_JNIHelpers.h"
  251. #include "native/juce_android_Windowing.cpp"
  252. #include "native/juce_android_FileChooser.cpp"
  253. #endif
  254. }