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.

264 lines
8.9KB

  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 <locale>
  31. #include <cctype>
  32. #include <cstdarg>
  33. #if ! JUCE_ANDROID
  34. #include <sys/timeb.h>
  35. #include <cwctype>
  36. #endif
  37. #if JUCE_WINDOWS
  38. #include <ctime>
  39. #if JUCE_MINGW
  40. #include <ws2spi.h>
  41. #include <cstdio>
  42. #include <locale.h>
  43. #else
  44. JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4091)
  45. #include <Dbghelp.h>
  46. JUCE_END_IGNORE_WARNINGS_MSVC
  47. #if ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  48. #pragma comment (lib, "DbgHelp.lib")
  49. #endif
  50. #endif
  51. #else
  52. #if JUCE_LINUX || JUCE_ANDROID
  53. #include <sys/types.h>
  54. #include <sys/socket.h>
  55. #include <sys/errno.h>
  56. #include <unistd.h>
  57. #include <netinet/in.h>
  58. #endif
  59. #if JUCE_LINUX
  60. #include <stdio.h>
  61. #include <langinfo.h>
  62. #include <ifaddrs.h>
  63. #include <sys/resource.h>
  64. #if JUCE_USE_CURL
  65. #include <curl/curl.h>
  66. #endif
  67. #endif
  68. #include <pwd.h>
  69. #include <fcntl.h>
  70. #include <netdb.h>
  71. #include <arpa/inet.h>
  72. #include <netinet/tcp.h>
  73. #include <sys/time.h>
  74. #include <net/if.h>
  75. #include <sys/ioctl.h>
  76. #if ! JUCE_ANDROID
  77. #include <execinfo.h>
  78. #endif
  79. #endif
  80. #if JUCE_MAC || JUCE_IOS
  81. #include <xlocale.h>
  82. #include <mach/mach.h>
  83. #include <signal.h>
  84. #endif
  85. #if JUCE_ANDROID
  86. #include <ifaddrs.h>
  87. #include <android/log.h>
  88. #endif
  89. #undef check
  90. //==============================================================================
  91. #ifndef JUCE_STANDALONE_APPLICATION
  92. JUCE_COMPILER_WARNING ("Please re-save your project with the latest Projucer version to avoid this warning")
  93. #define JUCE_STANDALONE_APPLICATION 0
  94. #endif
  95. //==============================================================================
  96. #include "containers/juce_AbstractFifo.cpp"
  97. #include "containers/juce_ArrayBase.cpp"
  98. #include "containers/juce_NamedValueSet.cpp"
  99. #include "containers/juce_OwnedArray.cpp"
  100. #include "containers/juce_PropertySet.cpp"
  101. #include "containers/juce_ReferenceCountedArray.cpp"
  102. #include "containers/juce_SparseSet.cpp"
  103. #include "files/juce_DirectoryIterator.cpp"
  104. #include "files/juce_RangedDirectoryIterator.cpp"
  105. #include "files/juce_File.cpp"
  106. #include "files/juce_FileInputStream.cpp"
  107. #include "files/juce_FileOutputStream.cpp"
  108. #include "files/juce_FileSearchPath.cpp"
  109. #include "files/juce_TemporaryFile.cpp"
  110. #include "logging/juce_FileLogger.cpp"
  111. #include "logging/juce_Logger.cpp"
  112. #include "maths/juce_BigInteger.cpp"
  113. #include "maths/juce_Expression.cpp"
  114. #include "maths/juce_Random.cpp"
  115. #include "memory/juce_MemoryBlock.cpp"
  116. #include "misc/juce_RuntimePermissions.cpp"
  117. #include "misc/juce_Result.cpp"
  118. #include "misc/juce_Uuid.cpp"
  119. #include "misc/juce_ConsoleApplication.cpp"
  120. #include "network/juce_MACAddress.cpp"
  121. #include "network/juce_NamedPipe.cpp"
  122. #include "network/juce_Socket.cpp"
  123. #include "network/juce_IPAddress.cpp"
  124. #include "streams/juce_BufferedInputStream.cpp"
  125. #include "streams/juce_FileInputSource.cpp"
  126. #include "streams/juce_InputStream.cpp"
  127. #include "streams/juce_MemoryInputStream.cpp"
  128. #include "streams/juce_MemoryOutputStream.cpp"
  129. #include "streams/juce_SubregionStream.cpp"
  130. #include "system/juce_SystemStats.cpp"
  131. #include "text/juce_CharacterFunctions.cpp"
  132. #include "text/juce_Identifier.cpp"
  133. #include "text/juce_LocalisedStrings.cpp"
  134. #include "text/juce_String.cpp"
  135. #include "streams/juce_OutputStream.cpp"
  136. #include "text/juce_StringArray.cpp"
  137. #include "text/juce_StringPairArray.cpp"
  138. #include "text/juce_StringPool.cpp"
  139. #include "text/juce_TextDiff.cpp"
  140. #include "text/juce_Base64.cpp"
  141. #include "threads/juce_ReadWriteLock.cpp"
  142. #include "threads/juce_Thread.cpp"
  143. #include "threads/juce_ThreadPool.cpp"
  144. #include "threads/juce_TimeSliceThread.cpp"
  145. #include "time/juce_PerformanceCounter.cpp"
  146. #include "time/juce_RelativeTime.cpp"
  147. #include "time/juce_Time.cpp"
  148. #include "unit_tests/juce_UnitTest.cpp"
  149. #include "containers/juce_Variant.cpp"
  150. #include "javascript/juce_JSON.cpp"
  151. #include "javascript/juce_Javascript.cpp"
  152. #include "containers/juce_DynamicObject.cpp"
  153. #include "xml/juce_XmlDocument.cpp"
  154. #include "xml/juce_XmlElement.cpp"
  155. #include "zip/juce_GZIPDecompressorInputStream.cpp"
  156. #include "zip/juce_GZIPCompressorOutputStream.cpp"
  157. #include "zip/juce_ZipFile.cpp"
  158. #include "files/juce_FileFilter.cpp"
  159. #include "files/juce_WildcardFileFilter.cpp"
  160. //==============================================================================
  161. #if ! JUCE_WINDOWS
  162. #include "native/juce_posix_SharedCode.h"
  163. #include "native/juce_posix_NamedPipe.cpp"
  164. #if ! JUCE_ANDROID || __ANDROID_API__ >= 24
  165. #include "native/juce_posix_IPAddress.h"
  166. #endif
  167. #endif
  168. //==============================================================================
  169. #if JUCE_MAC || JUCE_IOS
  170. #include "native/juce_mac_Files.mm"
  171. #include "native/juce_mac_Network.mm"
  172. #include "native/juce_mac_Strings.mm"
  173. #include "native/juce_mac_SystemStats.mm"
  174. #include "native/juce_mac_Threads.mm"
  175. //==============================================================================
  176. #elif JUCE_WINDOWS
  177. #include "native/juce_win32_Files.cpp"
  178. #include "native/juce_win32_Network.cpp"
  179. #include "native/juce_win32_Registry.cpp"
  180. #include "native/juce_win32_SystemStats.cpp"
  181. #include "native/juce_win32_Threads.cpp"
  182. //==============================================================================
  183. #elif JUCE_LINUX
  184. #include "native/juce_linux_CommonFile.cpp"
  185. #include "native/juce_linux_Files.cpp"
  186. #include "native/juce_linux_Network.cpp"
  187. #if JUCE_USE_CURL
  188. #include "native/juce_curl_Network.cpp"
  189. #endif
  190. #include "native/juce_linux_SystemStats.cpp"
  191. #include "native/juce_linux_Threads.cpp"
  192. //==============================================================================
  193. #elif JUCE_ANDROID
  194. #include "native/juce_linux_CommonFile.cpp"
  195. #include "native/juce_android_JNIHelpers.cpp"
  196. #include "native/juce_android_Files.cpp"
  197. #include "native/juce_android_Misc.cpp"
  198. #include "native/juce_android_Network.cpp"
  199. #include "native/juce_android_SystemStats.cpp"
  200. #include "native/juce_android_Threads.cpp"
  201. #include "native/juce_android_RuntimePermissions.cpp"
  202. #endif
  203. #include "threads/juce_ChildProcess.cpp"
  204. #include "threads/juce_HighResolutionTimer.cpp"
  205. #include "threads/juce_WaitableEvent.cpp"
  206. #include "network/juce_URL.cpp"
  207. #include "network/juce_WebInputStream.cpp"
  208. #include "streams/juce_URLInputSource.cpp"
  209. //==============================================================================
  210. #if JUCE_UNIT_TESTS
  211. #include "containers/juce_HashMap_test.cpp"
  212. #endif
  213. //==============================================================================
  214. namespace juce
  215. {
  216. /*
  217. As the very long class names here try to explain, the purpose of this code is to cause
  218. a linker error if not all of your compile units are consistent in the options that they
  219. enable before including JUCE headers. The reason this is important is that if you have
  220. two cpp files, and one includes the juce headers with debug enabled, and the other doesn't,
  221. then each will be generating code with different memory layouts for the classes, and
  222. you'll get subtle and hard-to-track-down memory corruption bugs!
  223. */
  224. #if JUCE_DEBUG
  225. this_will_fail_to_link_if_some_of_your_compile_units_are_built_in_debug_mode
  226. ::this_will_fail_to_link_if_some_of_your_compile_units_are_built_in_debug_mode() noexcept {}
  227. #else
  228. this_will_fail_to_link_if_some_of_your_compile_units_are_built_in_release_mode
  229. ::this_will_fail_to_link_if_some_of_your_compile_units_are_built_in_release_mode() noexcept {}
  230. #endif
  231. }