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