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.

301 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. #import <IOKit/pwr_mgt/IOPMLib.h>
  38. #if JUCE_SUPPORT_CARBON
  39. #define Point CarbonDummyPointName
  40. #define Component CarbonDummyCompName
  41. #import <Carbon/Carbon.h> // still needed for SetSystemUIMode()
  42. #undef Point
  43. #undef Component
  44. #endif
  45. //==============================================================================
  46. #elif JUCE_WINDOWS
  47. #include <windowsx.h>
  48. #include <vfw.h>
  49. #include <commdlg.h>
  50. #if JUCE_WEB_BROWSER
  51. #include <Exdisp.h>
  52. #include <exdispid.h>
  53. #endif
  54. #if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  55. #pragma comment(lib, "vfw32.lib")
  56. #pragma comment(lib, "imm32.lib")
  57. #endif
  58. #if JUCE_OPENGL
  59. #if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  60. #pragma comment(lib, "OpenGL32.Lib")
  61. #pragma comment(lib, "GlU32.Lib")
  62. #endif
  63. #endif
  64. #if JUCE_QUICKTIME && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  65. #pragma comment (lib, "QTMLClient.lib")
  66. #endif
  67. #if JUCE_DIRECT2D && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  68. #pragma comment (lib, "Dwrite.lib")
  69. #pragma comment (lib, "D2d1.lib")
  70. #endif
  71. #if JUCE_MINGW
  72. #include <imm.h>
  73. #endif
  74. //==============================================================================
  75. #elif JUCE_LINUX
  76. #include <X11/Xlib.h>
  77. #include <X11/Xatom.h>
  78. #include <X11/Xresource.h>
  79. #include <X11/Xutil.h>
  80. #include <X11/Xmd.h>
  81. #include <X11/keysym.h>
  82. #include <X11/XKBlib.h>
  83. #include <X11/cursorfont.h>
  84. #include <unistd.h>
  85. #if JUCE_USE_XINERAMA
  86. /* If you're trying to use Xinerama, you'll need to install the "libxinerama-dev" package.. */
  87. #include <X11/extensions/Xinerama.h>
  88. #endif
  89. #if JUCE_USE_XSHM
  90. #include <X11/extensions/XShm.h>
  91. #include <sys/shm.h>
  92. #include <sys/ipc.h>
  93. #endif
  94. #if JUCE_USE_XRENDER
  95. // If you're missing these headers, try installing the libxrender-dev and libxcomposite-dev
  96. #include <X11/extensions/Xrender.h>
  97. #include <X11/extensions/Xcomposite.h>
  98. #endif
  99. #if JUCE_USE_XCURSOR
  100. // If you're missing this header, try installing the libxcursor-dev package
  101. #include <X11/Xcursor/Xcursor.h>
  102. #endif
  103. #undef SIZEOF
  104. #undef KeyPress
  105. #endif
  106. //==============================================================================
  107. namespace juce
  108. {
  109. extern bool juce_areThereAnyAlwaysOnTopWindows();
  110. // START_AUTOINCLUDE components/*.cpp, mouse/*.cpp, keyboard/*.cpp, buttons/*.cpp,
  111. // drawables/*.cpp, filebrowser/*.cpp, layout/*.cpp, lookandfeel/*.cpp,
  112. // menus/*.cpp, positioning/*.cpp, properties/*.cpp, widgets/*.cpp,
  113. // windows/*.cpp, commands/*.cpp, application/*.cpp, misc/*.cpp
  114. #include "components/juce_Component.cpp"
  115. #include "components/juce_ComponentListener.cpp"
  116. #include "components/juce_Desktop.cpp"
  117. #include "components/juce_ModalComponentManager.cpp"
  118. #include "mouse/juce_ComponentDragger.cpp"
  119. #include "mouse/juce_DragAndDropContainer.cpp"
  120. #include "mouse/juce_MouseCursor.cpp"
  121. #include "mouse/juce_MouseEvent.cpp"
  122. #include "mouse/juce_MouseInputSource.cpp"
  123. #include "mouse/juce_MouseListener.cpp"
  124. #include "keyboard/juce_CaretComponent.cpp"
  125. #include "keyboard/juce_KeyboardFocusTraverser.cpp"
  126. #include "keyboard/juce_KeyListener.cpp"
  127. #include "keyboard/juce_KeyPress.cpp"
  128. #include "keyboard/juce_ModifierKeys.cpp"
  129. #include "buttons/juce_ArrowButton.cpp"
  130. #include "buttons/juce_Button.cpp"
  131. #include "buttons/juce_DrawableButton.cpp"
  132. #include "buttons/juce_HyperlinkButton.cpp"
  133. #include "buttons/juce_ImageButton.cpp"
  134. #include "buttons/juce_ShapeButton.cpp"
  135. #include "buttons/juce_TextButton.cpp"
  136. #include "buttons/juce_ToggleButton.cpp"
  137. #include "buttons/juce_ToolbarButton.cpp"
  138. #include "drawables/juce_Drawable.cpp"
  139. #include "drawables/juce_DrawableComposite.cpp"
  140. #include "drawables/juce_DrawableImage.cpp"
  141. #include "drawables/juce_DrawablePath.cpp"
  142. #include "drawables/juce_DrawableRectangle.cpp"
  143. #include "drawables/juce_DrawableShape.cpp"
  144. #include "drawables/juce_DrawableText.cpp"
  145. #include "drawables/juce_SVGParser.cpp"
  146. #include "filebrowser/juce_DirectoryContentsDisplayComponent.cpp"
  147. #include "filebrowser/juce_DirectoryContentsList.cpp"
  148. #include "filebrowser/juce_FileBrowserComponent.cpp"
  149. #include "filebrowser/juce_FileChooser.cpp"
  150. #include "filebrowser/juce_FileChooserDialogBox.cpp"
  151. #include "filebrowser/juce_FileFilter.cpp"
  152. #include "filebrowser/juce_FileListComponent.cpp"
  153. #include "filebrowser/juce_FilenameComponent.cpp"
  154. #include "filebrowser/juce_FileSearchPathListComponent.cpp"
  155. #include "filebrowser/juce_FileTreeComponent.cpp"
  156. #include "filebrowser/juce_ImagePreviewComponent.cpp"
  157. #include "filebrowser/juce_WildcardFileFilter.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 "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_Toolbar.cpp"
  203. #include "widgets/juce_ToolbarItemComponent.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. // END_AUTOINCLUDE
  223. }
  224. using namespace juce;
  225. //==============================================================================
  226. namespace juce
  227. {
  228. #if JUCE_IOS || JUCE_WINDOWS
  229. #include "native/juce_MultiTouchMapper.h"
  230. #endif
  231. #if JUCE_MAC || JUCE_IOS
  232. #include "../juce_core/native/juce_osx_ObjCHelpers.h"
  233. #include "../juce_graphics/native/juce_mac_CoreGraphicsHelpers.h"
  234. #include "../juce_graphics/native/juce_mac_CoreGraphicsContext.h"
  235. #if JUCE_IOS
  236. #include "native/juce_ios_UIViewComponentPeer.mm"
  237. #include "native/juce_ios_Windowing.mm"
  238. #else
  239. #include "native/juce_mac_NSViewComponentPeer.mm"
  240. #include "native/juce_mac_Windowing.mm"
  241. #include "native/juce_mac_MainMenu.mm"
  242. #endif
  243. #include "native/juce_mac_MouseCursor.mm"
  244. #include "native/juce_mac_FileChooser.mm"
  245. #elif JUCE_WINDOWS
  246. #include "../juce_core/native/juce_win32_ComSmartPtr.h"
  247. #include "../juce_events/native/juce_win32_HiddenMessageWindow.h"
  248. #include "native/juce_win32_Windowing.cpp"
  249. #include "native/juce_win32_DragAndDrop.cpp"
  250. #include "native/juce_win32_FileChooser.cpp"
  251. #elif JUCE_LINUX
  252. #include "native/juce_linux_Clipboard.cpp"
  253. #include "native/juce_linux_Windowing.cpp"
  254. #include "native/juce_linux_FileChooser.cpp"
  255. #elif JUCE_ANDROID
  256. #include "../juce_core/native/juce_android_JNIHelpers.h"
  257. #include "native/juce_android_Windowing.cpp"
  258. #include "native/juce_android_FileChooser.cpp"
  259. #endif
  260. }