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.

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