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.

257 lines
8.6KB

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