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.

266 lines
8.8KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2016 - ROLI Ltd.
  5. Permission is granted to use this software under the terms of the ISC license
  6. http://www.isc.org/downloads/software-support-policy/isc-license/
  7. Permission to use, copy, modify, and/or distribute this software for any
  8. purpose with or without fee is hereby granted, provided that the above
  9. copyright notice and this permission notice appear in all copies.
  10. THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD
  11. TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  12. FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT,
  13. OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  14. USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
  16. OF THIS SOFTWARE.
  17. -----------------------------------------------------------------------------
  18. To release a closed-source product which uses other parts of JUCE not
  19. licensed under the ISC terms, commercial licenses are available: visit
  20. www.juce.com for more information.
  21. ==============================================================================
  22. */
  23. #ifdef JUCE_CORE_H_INCLUDED
  24. /* When you add this cpp file to your project, you mustn't include it in a file where you've
  25. already included any other headers - just put it inside a file on its own, possibly with your config
  26. flags preceding it, but don't include anything else. That also includes avoiding any automatic prefix
  27. header files that the compiler may be using.
  28. */
  29. #error "Incorrect use of JUCE cpp file"
  30. #endif
  31. #include "AppConfig.h"
  32. #define JUCE_CORE_INCLUDE_OBJC_HELPERS 1
  33. #define JUCE_CORE_INCLUDE_COM_SMART_PTR 1
  34. #define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1
  35. #include "juce_core.h"
  36. #include <locale>
  37. #include <cctype>
  38. #include <cstdarg>
  39. #if ! JUCE_ANDROID
  40. #include <sys/timeb.h>
  41. #include <cwctype>
  42. #endif
  43. #if JUCE_WINDOWS
  44. #include <ctime>
  45. #define _WINSOCK_DEPRECATED_NO_WARNINGS 1
  46. #include <winsock2.h>
  47. #include <ws2tcpip.h>
  48. #if ! JUCE_MINGW
  49. #pragma warning (push)
  50. #pragma warning (disable: 4091)
  51. #include <Dbghelp.h>
  52. #pragma warning (pop)
  53. #if ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  54. #pragma comment (lib, "DbgHelp.lib")
  55. #endif
  56. #endif
  57. #if JUCE_MINGW
  58. #include <ws2spi.h>
  59. #endif
  60. #else
  61. #if JUCE_LINUX || JUCE_ANDROID
  62. #include <sys/types.h>
  63. #include <sys/socket.h>
  64. #include <sys/errno.h>
  65. #include <unistd.h>
  66. #include <netinet/in.h>
  67. #endif
  68. #if JUCE_LINUX
  69. #include <stdio.h>
  70. #include <langinfo.h>
  71. #include <ifaddrs.h>
  72. #include <sys/resource.h>
  73. #if JUCE_USE_CURL
  74. #include <curl/curl.h>
  75. #endif
  76. #endif
  77. #include <pwd.h>
  78. #include <fcntl.h>
  79. #include <netdb.h>
  80. #include <arpa/inet.h>
  81. #include <netinet/tcp.h>
  82. #include <sys/time.h>
  83. #include <net/if.h>
  84. #include <sys/ioctl.h>
  85. #if ! JUCE_ANDROID
  86. #include <execinfo.h>
  87. #endif
  88. #endif
  89. #if JUCE_MAC || JUCE_IOS
  90. #include <xlocale.h>
  91. #include <mach/mach.h>
  92. #endif
  93. #if JUCE_ANDROID
  94. #include <android/log.h>
  95. #endif
  96. #undef check
  97. //==============================================================================
  98. #ifndef JUCE_STANDALONE_APPLICATION
  99. JUCE_COMPILER_WARNING ("Please re-save your project with the latest Projucer version to avoid this warning")
  100. #define JUCE_STANDALONE_APPLICATION 0
  101. #endif
  102. //==============================================================================
  103. namespace juce
  104. {
  105. #include "containers/juce_AbstractFifo.cpp"
  106. #include "containers/juce_NamedValueSet.cpp"
  107. #include "containers/juce_ListenerList.cpp"
  108. #include "containers/juce_PropertySet.cpp"
  109. #include "containers/juce_Variant.cpp"
  110. #include "files/juce_DirectoryIterator.cpp"
  111. #include "files/juce_File.cpp"
  112. #include "files/juce_FileInputStream.cpp"
  113. #include "files/juce_FileOutputStream.cpp"
  114. #include "files/juce_FileSearchPath.cpp"
  115. #include "files/juce_TemporaryFile.cpp"
  116. #include "javascript/juce_JSON.cpp"
  117. #include "javascript/juce_Javascript.cpp"
  118. #include "containers/juce_DynamicObject.cpp"
  119. #include "logging/juce_FileLogger.cpp"
  120. #include "logging/juce_Logger.cpp"
  121. #include "maths/juce_BigInteger.cpp"
  122. #include "maths/juce_Expression.cpp"
  123. #include "maths/juce_Random.cpp"
  124. #include "memory/juce_MemoryBlock.cpp"
  125. #include "misc/juce_RuntimePermissions.cpp"
  126. #include "misc/juce_Result.cpp"
  127. #include "misc/juce_Uuid.cpp"
  128. #include "network/juce_MACAddress.cpp"
  129. #include "network/juce_NamedPipe.cpp"
  130. #include "network/juce_Socket.cpp"
  131. #include "network/juce_IPAddress.cpp"
  132. #include "streams/juce_BufferedInputStream.cpp"
  133. #include "streams/juce_FileInputSource.cpp"
  134. #include "streams/juce_InputStream.cpp"
  135. #include "streams/juce_MemoryInputStream.cpp"
  136. #include "streams/juce_MemoryOutputStream.cpp"
  137. #include "streams/juce_SubregionStream.cpp"
  138. #include "system/juce_SystemStats.cpp"
  139. #include "text/juce_CharacterFunctions.cpp"
  140. #include "text/juce_Identifier.cpp"
  141. #include "text/juce_LocalisedStrings.cpp"
  142. #include "text/juce_String.cpp"
  143. #include "streams/juce_OutputStream.cpp"
  144. #include "text/juce_StringArray.cpp"
  145. #include "text/juce_StringPairArray.cpp"
  146. #include "text/juce_StringPool.cpp"
  147. #include "text/juce_TextDiff.cpp"
  148. #include "text/juce_Base64.cpp"
  149. #include "threads/juce_ReadWriteLock.cpp"
  150. #include "threads/juce_Thread.cpp"
  151. #include "threads/juce_ThreadPool.cpp"
  152. #include "threads/juce_TimeSliceThread.cpp"
  153. #include "time/juce_PerformanceCounter.cpp"
  154. #include "time/juce_RelativeTime.cpp"
  155. #include "time/juce_Time.cpp"
  156. #include "unit_tests/juce_UnitTest.cpp"
  157. #include "xml/juce_XmlDocument.cpp"
  158. #include "xml/juce_XmlElement.cpp"
  159. #include "zip/juce_GZIPDecompressorInputStream.cpp"
  160. #include "zip/juce_GZIPCompressorOutputStream.cpp"
  161. #include "zip/juce_ZipFile.cpp"
  162. #include "files/juce_FileFilter.cpp"
  163. #include "files/juce_WildcardFileFilter.cpp"
  164. //==============================================================================
  165. #if JUCE_ANDROID
  166. #include "native/juce_android_JNIHelpers.h"
  167. #endif
  168. #if ! JUCE_WINDOWS
  169. #include "native/juce_posix_SharedCode.h"
  170. #include "native/juce_posix_NamedPipe.cpp"
  171. #endif
  172. //==============================================================================
  173. #if JUCE_MAC || JUCE_IOS
  174. #include "native/juce_mac_Files.mm"
  175. #include "native/juce_mac_Network.mm"
  176. #include "native/juce_mac_Strings.mm"
  177. #include "native/juce_mac_SystemStats.mm"
  178. #include "native/juce_mac_Threads.mm"
  179. //==============================================================================
  180. #elif JUCE_WINDOWS
  181. #include "native/juce_win32_Files.cpp"
  182. #include "native/juce_win32_Network.cpp"
  183. #include "native/juce_win32_Registry.cpp"
  184. #include "native/juce_win32_SystemStats.cpp"
  185. #include "native/juce_win32_Threads.cpp"
  186. //==============================================================================
  187. #elif JUCE_LINUX
  188. #include "native/juce_linux_CommonFile.cpp"
  189. #include "native/juce_linux_Files.cpp"
  190. #include "native/juce_linux_Network.cpp"
  191. #if JUCE_USE_CURL
  192. #include "native/juce_curl_Network.cpp"
  193. #endif
  194. #include "native/juce_linux_SystemStats.cpp"
  195. #include "native/juce_linux_Threads.cpp"
  196. //==============================================================================
  197. #elif JUCE_ANDROID
  198. #include "native/juce_linux_CommonFile.cpp"
  199. #include "native/juce_android_Files.cpp"
  200. #include "native/juce_android_Misc.cpp"
  201. #include "native/juce_android_Network.cpp"
  202. #include "native/juce_android_SystemStats.cpp"
  203. #include "native/juce_android_Threads.cpp"
  204. #include "native/juce_android_RuntimePermissions.cpp"
  205. #endif
  206. #include "threads/juce_ChildProcess.cpp"
  207. #include "threads/juce_HighResolutionTimer.cpp"
  208. #include "network/juce_URL.cpp"
  209. #include "network/juce_WebInputStream.cpp"
  210. //==============================================================================
  211. /*
  212. As the very long class names here try to explain, the purpose of this code is to cause
  213. a linker error if not all of your compile units are consistent in the options that they
  214. enable before including JUCE headers. The reason this is important is that if you have
  215. two cpp files, and one includes the juce headers with debug enabled, and the other doesn't,
  216. then each will be generating code with different memory layouts for the classes, and
  217. you'll get subtle and hard-to-track-down memory corruption bugs!
  218. */
  219. #if JUCE_DEBUG
  220. this_will_fail_to_link_if_some_of_your_compile_units_are_built_in_debug_mode
  221. ::this_will_fail_to_link_if_some_of_your_compile_units_are_built_in_debug_mode() noexcept {}
  222. #else
  223. this_will_fail_to_link_if_some_of_your_compile_units_are_built_in_release_mode
  224. ::this_will_fail_to_link_if_some_of_your_compile_units_are_built_in_release_mode() noexcept {}
  225. #endif
  226. }