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.

285 lines
9.4KB

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