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.

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