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.

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