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.

282 lines
11KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library - "Jules' Utility Class Extensions"
  4. Copyright 2004-11 by Raw Material Software Ltd.
  5. ------------------------------------------------------------------------------
  6. JUCE can be redistributed and/or modified under the terms of the GNU General
  7. Public License (Version 2), as published by the Free Software Foundation.
  8. A copy of the license is included in the JUCE distribution, or can be found
  9. online at www.gnu.org/licenses.
  10. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  11. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  13. ------------------------------------------------------------------------------
  14. To release a closed-source product which uses JUCE, commercial licenses are
  15. available: visit www.rawmaterialsoftware.com/juce for more information.
  16. ==============================================================================
  17. */
  18. #if defined (__JUCE_GUI_BASICS_JUCEHEADER__) && ! JUCE_AMALGAMATED_INCLUDE
  19. /* When you add this cpp file to your project, you mustn't include it in a file where you've
  20. already included any other headers - just put it inside a file on its own, possibly with your config
  21. flags preceding it, but don't include anything else. That also includes avoiding any automatic prefix
  22. header files that the compiler may be using.
  23. */
  24. #error "Incorrect use of JUCE cpp file"
  25. #endif
  26. // Your project must contain an AppConfig.h file with your project-specific settings in it,
  27. // and your header search path must make it accessible to the module's files.
  28. #include "AppConfig.h"
  29. #include "../juce_core/native/juce_BasicNativeHeaders.h"
  30. #include "juce_gui_basics.h"
  31. #if JUCE_MODULE_AVAILABLE_juce_opengl
  32. #include "../juce_opengl/juce_opengl.h"
  33. #endif
  34. //==============================================================================
  35. #if JUCE_MAC
  36. #import <WebKit/WebKit.h>
  37. #define Point CarbonDummyPointName
  38. #define Component CarbonDummyCompName
  39. #import <Carbon/Carbon.h> // still needed for SetSystemUIMode()
  40. #undef Point
  41. #undef Component
  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. //==============================================================================
  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/cursorfont.h>
  77. #if JUCE_USE_XINERAMA
  78. /* If you're trying to use Xinerama, you'll need to install the "libxinerama-dev" package.. */
  79. #include <X11/extensions/Xinerama.h>
  80. #endif
  81. #if JUCE_USE_XSHM
  82. #include <X11/extensions/XShm.h>
  83. #include <sys/shm.h>
  84. #include <sys/ipc.h>
  85. #endif
  86. #if JUCE_USE_XRENDER
  87. // If you're missing these headers, try installing the libxrender-dev and libxcomposite-dev
  88. #include <X11/extensions/Xrender.h>
  89. #include <X11/extensions/Xcomposite.h>
  90. #endif
  91. #if JUCE_USE_XCURSOR
  92. // If you're missing this header, try installing the libxcursor-dev package
  93. #include <X11/Xcursor/Xcursor.h>
  94. #endif
  95. #undef SIZEOF
  96. #undef KeyPress
  97. #endif
  98. //==============================================================================
  99. // START_AUTOINCLUDE components/*.cpp, mouse/*.cpp, keyboard/*.cpp, buttons/*.cpp,
  100. // drawables/*.cpp, filebrowser/*.cpp, layout/*.cpp, lookandfeel/*.cpp,
  101. // menus/*.cpp, positioning/*.cpp, properties/*.cpp, widgets/*.cpp,
  102. // windows/*.cpp, commands/*.cpp, application/*.cpp, misc/*.cpp
  103. #include "components/juce_Component.cpp"
  104. #include "components/juce_ComponentListener.cpp"
  105. #include "components/juce_Desktop.cpp"
  106. #include "components/juce_ModalComponentManager.cpp"
  107. #include "mouse/juce_ComponentDragger.cpp"
  108. #include "mouse/juce_DragAndDropContainer.cpp"
  109. #include "mouse/juce_MouseCursor.cpp"
  110. #include "mouse/juce_MouseEvent.cpp"
  111. #include "mouse/juce_MouseInputSource.cpp"
  112. #include "mouse/juce_MouseListener.cpp"
  113. #include "keyboard/juce_CaretComponent.cpp"
  114. #include "keyboard/juce_KeyboardFocusTraverser.cpp"
  115. #include "keyboard/juce_KeyListener.cpp"
  116. #include "keyboard/juce_KeyPress.cpp"
  117. #include "keyboard/juce_ModifierKeys.cpp"
  118. #include "buttons/juce_ArrowButton.cpp"
  119. #include "buttons/juce_Button.cpp"
  120. #include "buttons/juce_DrawableButton.cpp"
  121. #include "buttons/juce_HyperlinkButton.cpp"
  122. #include "buttons/juce_ImageButton.cpp"
  123. #include "buttons/juce_ShapeButton.cpp"
  124. #include "buttons/juce_TextButton.cpp"
  125. #include "buttons/juce_ToggleButton.cpp"
  126. #include "buttons/juce_ToolbarButton.cpp"
  127. #include "drawables/juce_Drawable.cpp"
  128. #include "drawables/juce_DrawableComposite.cpp"
  129. #include "drawables/juce_DrawableImage.cpp"
  130. #include "drawables/juce_DrawablePath.cpp"
  131. #include "drawables/juce_DrawableRectangle.cpp"
  132. #include "drawables/juce_DrawableShape.cpp"
  133. #include "drawables/juce_DrawableText.cpp"
  134. #include "drawables/juce_SVGParser.cpp"
  135. #include "filebrowser/juce_DirectoryContentsDisplayComponent.cpp"
  136. #include "filebrowser/juce_DirectoryContentsList.cpp"
  137. #include "filebrowser/juce_FileBrowserComponent.cpp"
  138. #include "filebrowser/juce_FileChooser.cpp"
  139. #include "filebrowser/juce_FileChooserDialogBox.cpp"
  140. #include "filebrowser/juce_FileFilter.cpp"
  141. #include "filebrowser/juce_FileListComponent.cpp"
  142. #include "filebrowser/juce_FilenameComponent.cpp"
  143. #include "filebrowser/juce_FileSearchPathListComponent.cpp"
  144. #include "filebrowser/juce_FileTreeComponent.cpp"
  145. #include "filebrowser/juce_ImagePreviewComponent.cpp"
  146. #include "filebrowser/juce_WildcardFileFilter.cpp"
  147. #include "layout/juce_ComponentAnimator.cpp"
  148. #include "layout/juce_ComponentBoundsConstrainer.cpp"
  149. #include "layout/juce_ComponentBuilder.cpp"
  150. #include "layout/juce_ComponentMovementWatcher.cpp"
  151. #include "layout/juce_GroupComponent.cpp"
  152. #include "layout/juce_MultiDocumentPanel.cpp"
  153. #include "layout/juce_ResizableBorderComponent.cpp"
  154. #include "layout/juce_ResizableCornerComponent.cpp"
  155. #include "layout/juce_ResizableEdgeComponent.cpp"
  156. #include "layout/juce_ScrollBar.cpp"
  157. #include "layout/juce_StretchableLayoutManager.cpp"
  158. #include "layout/juce_StretchableLayoutResizerBar.cpp"
  159. #include "layout/juce_StretchableObjectResizer.cpp"
  160. #include "layout/juce_TabbedButtonBar.cpp"
  161. #include "layout/juce_TabbedComponent.cpp"
  162. #include "layout/juce_Viewport.cpp"
  163. #include "lookandfeel/juce_LookAndFeel.cpp"
  164. #include "menus/juce_MenuBarComponent.cpp"
  165. #include "menus/juce_MenuBarModel.cpp"
  166. #include "menus/juce_PopupMenu.cpp"
  167. #include "positioning/juce_MarkerList.cpp"
  168. #include "positioning/juce_RelativeCoordinate.cpp"
  169. #include "positioning/juce_RelativeCoordinatePositioner.cpp"
  170. #include "positioning/juce_RelativeParallelogram.cpp"
  171. #include "positioning/juce_RelativePoint.cpp"
  172. #include "positioning/juce_RelativePointPath.cpp"
  173. #include "positioning/juce_RelativeRectangle.cpp"
  174. #include "properties/juce_BooleanPropertyComponent.cpp"
  175. #include "properties/juce_ButtonPropertyComponent.cpp"
  176. #include "properties/juce_ChoicePropertyComponent.cpp"
  177. #include "properties/juce_PropertyComponent.cpp"
  178. #include "properties/juce_PropertyPanel.cpp"
  179. #include "properties/juce_SliderPropertyComponent.cpp"
  180. #include "properties/juce_TextPropertyComponent.cpp"
  181. #include "widgets/juce_ComboBox.cpp"
  182. #include "widgets/juce_ImageComponent.cpp"
  183. #include "widgets/juce_Label.cpp"
  184. #include "widgets/juce_ListBox.cpp"
  185. #include "widgets/juce_ProgressBar.cpp"
  186. #include "widgets/juce_Slider.cpp"
  187. #include "widgets/juce_TableHeaderComponent.cpp"
  188. #include "widgets/juce_TableListBox.cpp"
  189. #include "widgets/juce_TextEditor.cpp"
  190. #include "widgets/juce_Toolbar.cpp"
  191. #include "widgets/juce_ToolbarItemComponent.cpp"
  192. #include "widgets/juce_ToolbarItemPalette.cpp"
  193. #include "widgets/juce_TreeView.cpp"
  194. #include "windows/juce_AlertWindow.cpp"
  195. #include "windows/juce_CallOutBox.cpp"
  196. #include "windows/juce_ComponentPeer.cpp"
  197. #include "windows/juce_DialogWindow.cpp"
  198. #include "windows/juce_DocumentWindow.cpp"
  199. #include "windows/juce_ResizableWindow.cpp"
  200. #include "windows/juce_ThreadWithProgressWindow.cpp"
  201. #include "windows/juce_TooltipWindow.cpp"
  202. #include "windows/juce_TopLevelWindow.cpp"
  203. #include "commands/juce_ApplicationCommandInfo.cpp"
  204. #include "commands/juce_ApplicationCommandManager.cpp"
  205. #include "commands/juce_ApplicationCommandTarget.cpp"
  206. #include "commands/juce_KeyPressMappingSet.cpp"
  207. #include "application/juce_Application.cpp"
  208. #include "misc/juce_BubbleComponent.cpp"
  209. #include "misc/juce_DropShadower.cpp"
  210. // END_AUTOINCLUDE
  211. using namespace juce;
  212. //==============================================================================
  213. BEGIN_JUCE_NAMESPACE
  214. #if JUCE_MAC || JUCE_IOS
  215. #include "../juce_core/native/juce_osx_ObjCHelpers.h"
  216. #include "../juce_core/native/juce_mac_ObjCSuffix.h"
  217. #include "../juce_graphics/native/juce_mac_CoreGraphicsHelpers.h"
  218. #include "../juce_graphics/native/juce_mac_CoreGraphicsContext.h"
  219. #if JUCE_IOS
  220. #include "native/juce_MultiTouchMapper.h"
  221. #include "native/juce_ios_UIViewComponentPeer.mm"
  222. #include "native/juce_ios_Windowing.mm"
  223. #else
  224. #include "native/juce_mac_NSViewComponentPeer.mm"
  225. #include "native/juce_mac_Windowing.mm"
  226. #include "native/juce_mac_MainMenu.mm"
  227. #endif
  228. #include "native/juce_mac_MouseCursor.mm"
  229. #include "native/juce_mac_FileChooser.mm"
  230. #elif JUCE_WINDOWS
  231. #include "../juce_core/native/juce_win32_ComSmartPtr.h"
  232. #include "../juce_events/native/juce_win32_HiddenMessageWindow.h"
  233. #include "native/juce_MultiTouchMapper.h"
  234. #include "native/juce_win32_Windowing.cpp"
  235. #include "native/juce_win32_DragAndDrop.cpp"
  236. #include "native/juce_win32_FileChooser.cpp"
  237. #elif JUCE_LINUX
  238. #include "native/juce_linux_Clipboard.cpp"
  239. #include "native/juce_linux_Windowing.cpp"
  240. #include "native/juce_linux_FileChooser.cpp"
  241. #elif JUCE_ANDROID
  242. #include "../juce_core/native/juce_android_JNIHelpers.h"
  243. #include "native/juce_android_Windowing.cpp"
  244. #include "native/juce_android_FileChooser.cpp"
  245. #endif
  246. END_JUCE_NAMESPACE