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.

452 lines
15KB

  1. /*
  2. ==============================================================================
  3. This file is part of the juce_core module of the JUCE library.
  4. Copyright (c) 2013 - Raw Material Software 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. #ifndef __JUCE_CORE_JUCEHEADER__
  22. #define __JUCE_CORE_JUCEHEADER__
  23. #ifndef JUCE_MODULE_AVAILABLE_juce_core
  24. /* If you fail to make sure that all your compile units are building JUCE with the same set of
  25. option flags, then there's a risk that different compile units will treat the classes as having
  26. different memory layouts, leading to very nasty memory corruption errors when they all get
  27. linked together. That's why it's best to always include the Introjucer-generated AppConfig.h
  28. file before any juce headers.
  29. Note that if you do have an AppConfig.h file and hit this warning, it means that it doesn't
  30. contain the JUCE_MODULE_AVAILABLE_xxx flags, which are necessary for some inter-module
  31. functionality to work correctly. In that case, you should either rebuild your AppConfig.h with
  32. the latest introjucer, or fix it manually to contain these flags.
  33. */
  34. #ifdef _MSC_VER
  35. #pragma message ("Have you included your AppConfig.h file before including the JUCE headers?")
  36. #else
  37. #warning "Have you included your AppConfig.h file before including the JUCE headers?"
  38. #endif
  39. #endif
  40. //==============================================================================
  41. #include "system/juce_TargetPlatform.h"
  42. //=============================================================================
  43. /** Config: JUCE_FORCE_DEBUG
  44. Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings,
  45. but if you define this value, you can override this to force it to be true or false.
  46. */
  47. #ifndef JUCE_FORCE_DEBUG
  48. //#define JUCE_FORCE_DEBUG 0
  49. #endif
  50. //=============================================================================
  51. /** Config: JUCE_LOG_ASSERTIONS
  52. If this flag is enabled, the the jassert and jassertfalse macros will always use Logger::writeToLog()
  53. to write a message when an assertion happens.
  54. Enabling it will also leave this turned on in release builds. When it's disabled,
  55. however, the jassert and jassertfalse macros will not be compiled in a
  56. release build.
  57. @see jassert, jassertfalse, Logger
  58. */
  59. #ifndef JUCE_LOG_ASSERTIONS
  60. #if JUCE_ANDROID
  61. #define JUCE_LOG_ASSERTIONS 1
  62. #else
  63. #define JUCE_LOG_ASSERTIONS 0
  64. #endif
  65. #endif
  66. //=============================================================================
  67. /** Config: JUCE_CHECK_MEMORY_LEAKS
  68. Enables a memory-leak check for certain objects when the app terminates. See the LeakedObjectDetector
  69. class and the JUCE_LEAK_DETECTOR macro for more details about enabling leak checking for specific classes.
  70. */
  71. #if JUCE_DEBUG && ! defined (JUCE_CHECK_MEMORY_LEAKS)
  72. #define JUCE_CHECK_MEMORY_LEAKS 1
  73. #endif
  74. //=============================================================================
  75. /** Config: JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  76. In a Visual C++ build, this can be used to stop the required system libs being
  77. automatically added to the link stage.
  78. */
  79. #ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  80. #define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 0
  81. #endif
  82. /* Config: JUCE_INCLUDE_ZLIB_CODE
  83. This can be used to disable Juce's embedded 3rd-party zlib code.
  84. You might need to tweak this if you're linking to an external zlib library in your app,
  85. but for normal apps, this option should be left alone.
  86. If you disable this, you might also want to set a value for JUCE_ZLIB_INCLUDE_PATH, to
  87. specify the path where your zlib headers live.
  88. */
  89. #ifndef JUCE_INCLUDE_ZLIB_CODE
  90. #define JUCE_INCLUDE_ZLIB_CODE 1
  91. #endif
  92. #ifndef JUCE_ZLIB_INCLUDE_PATH
  93. #define JUCE_ZLIB_INCLUDE_PATH <zlib.h>
  94. #endif
  95. /* Config: JUCE_CATCH_UNHANDLED_EXCEPTIONS
  96. If enabled, this will add some exception-catching code to forward unhandled exceptions
  97. to your JUCEApplication::unhandledException() callback.
  98. */
  99. #ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS
  100. //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1
  101. #endif
  102. //=============================================================================
  103. //=============================================================================
  104. #if JUCE_MSVC
  105. #pragma warning (disable: 4251) // (DLL build warning, must be disabled before pushing the warning state)
  106. #pragma warning (push)
  107. #pragma warning (disable: 4786) // (long class name warning)
  108. #ifdef __INTEL_COMPILER
  109. #pragma warning (disable: 1125)
  110. #endif
  111. #endif
  112. #include "system/juce_StandardHeader.h"
  113. namespace juce
  114. {
  115. // START_AUTOINCLUDE containers, files, json, logging, maths, memory, misc, network,
  116. // streams, system, text, threads, time, unit_tests, xml, zip
  117. #ifndef __JUCE_ABSTRACTFIFO_JUCEHEADER__
  118. #include "containers/juce_AbstractFifo.h"
  119. #endif
  120. #ifndef __JUCE_ARRAY_JUCEHEADER__
  121. #include "containers/juce_Array.h"
  122. #endif
  123. #ifndef __JUCE_ARRAYALLOCATIONBASE_JUCEHEADER__
  124. #include "containers/juce_ArrayAllocationBase.h"
  125. #endif
  126. #ifndef __JUCE_DYNAMICOBJECT_JUCEHEADER__
  127. #include "containers/juce_DynamicObject.h"
  128. #endif
  129. #ifndef __JUCE_ELEMENTCOMPARATOR_JUCEHEADER__
  130. #include "containers/juce_ElementComparator.h"
  131. #endif
  132. #ifndef __JUCE_HASHMAP_JUCEHEADER__
  133. #include "containers/juce_HashMap.h"
  134. #endif
  135. #ifndef __JUCE_LINKEDLISTPOINTER_JUCEHEADER__
  136. #include "containers/juce_LinkedListPointer.h"
  137. #endif
  138. #ifndef __JUCE_NAMEDVALUESET_JUCEHEADER__
  139. #include "containers/juce_NamedValueSet.h"
  140. #endif
  141. #ifndef __JUCE_OWNEDARRAY_JUCEHEADER__
  142. #include "containers/juce_OwnedArray.h"
  143. #endif
  144. #ifndef __JUCE_PROPERTYSET_JUCEHEADER__
  145. #include "containers/juce_PropertySet.h"
  146. #endif
  147. #ifndef __JUCE_REFERENCECOUNTEDARRAY_JUCEHEADER__
  148. #include "containers/juce_ReferenceCountedArray.h"
  149. #endif
  150. #ifndef __JUCE_SCOPEDVALUESETTER_JUCEHEADER__
  151. #include "containers/juce_ScopedValueSetter.h"
  152. #endif
  153. #ifndef __JUCE_SORTEDSET_JUCEHEADER__
  154. #include "containers/juce_SortedSet.h"
  155. #endif
  156. #ifndef __JUCE_SPARSESET_JUCEHEADER__
  157. #include "containers/juce_SparseSet.h"
  158. #endif
  159. #ifndef __JUCE_VARIANT_JUCEHEADER__
  160. #include "containers/juce_Variant.h"
  161. #endif
  162. #ifndef __JUCE_DIRECTORYITERATOR_JUCEHEADER__
  163. #include "files/juce_DirectoryIterator.h"
  164. #endif
  165. #ifndef __JUCE_FILE_JUCEHEADER__
  166. #include "files/juce_File.h"
  167. #endif
  168. #ifndef __JUCE_FILEINPUTSTREAM_JUCEHEADER__
  169. #include "files/juce_FileInputStream.h"
  170. #endif
  171. #ifndef __JUCE_FILEOUTPUTSTREAM_JUCEHEADER__
  172. #include "files/juce_FileOutputStream.h"
  173. #endif
  174. #ifndef __JUCE_FILESEARCHPATH_JUCEHEADER__
  175. #include "files/juce_FileSearchPath.h"
  176. #endif
  177. #ifndef __JUCE_MEMORYMAPPEDFILE_JUCEHEADER__
  178. #include "files/juce_MemoryMappedFile.h"
  179. #endif
  180. #ifndef __JUCE_TEMPORARYFILE_JUCEHEADER__
  181. #include "files/juce_TemporaryFile.h"
  182. #endif
  183. #ifndef __JUCE_JSON_JUCEHEADER__
  184. #include "json/juce_JSON.h"
  185. #endif
  186. #ifndef __JUCE_FILELOGGER_JUCEHEADER__
  187. #include "logging/juce_FileLogger.h"
  188. #endif
  189. #ifndef __JUCE_LOGGER_JUCEHEADER__
  190. #include "logging/juce_Logger.h"
  191. #endif
  192. #ifndef __JUCE_BIGINTEGER_JUCEHEADER__
  193. #include "maths/juce_BigInteger.h"
  194. #endif
  195. #ifndef __JUCE_EXPRESSION_JUCEHEADER__
  196. #include "maths/juce_Expression.h"
  197. #endif
  198. #ifndef __JUCE_MATHSFUNCTIONS_JUCEHEADER__
  199. #include "maths/juce_MathsFunctions.h"
  200. #endif
  201. #ifndef __JUCE_RANDOM_JUCEHEADER__
  202. #include "maths/juce_Random.h"
  203. #endif
  204. #ifndef __JUCE_RANGE_JUCEHEADER__
  205. #include "maths/juce_Range.h"
  206. #endif
  207. #ifndef __JUCE_ATOMIC_JUCEHEADER__
  208. #include "memory/juce_Atomic.h"
  209. #endif
  210. #ifndef __JUCE_BYTEORDER_JUCEHEADER__
  211. #include "memory/juce_ByteOrder.h"
  212. #endif
  213. #ifndef __JUCE_HEAPBLOCK_JUCEHEADER__
  214. #include "memory/juce_HeapBlock.h"
  215. #endif
  216. #ifndef __JUCE_LEAKEDOBJECTDETECTOR_JUCEHEADER__
  217. #include "memory/juce_LeakedObjectDetector.h"
  218. #endif
  219. #ifndef __JUCE_MEMORY_JUCEHEADER__
  220. #include "memory/juce_Memory.h"
  221. #endif
  222. #ifndef __JUCE_MEMORYBLOCK_JUCEHEADER__
  223. #include "memory/juce_MemoryBlock.h"
  224. #endif
  225. #ifndef __JUCE_OPTIONALSCOPEDPOINTER_JUCEHEADER__
  226. #include "memory/juce_OptionalScopedPointer.h"
  227. #endif
  228. #ifndef __JUCE_REFERENCECOUNTEDOBJECT_JUCEHEADER__
  229. #include "memory/juce_ReferenceCountedObject.h"
  230. #endif
  231. #ifndef __JUCE_SCOPEDPOINTER_JUCEHEADER__
  232. #include "memory/juce_ScopedPointer.h"
  233. #endif
  234. #ifndef __JUCE_SINGLETON_JUCEHEADER__
  235. #include "memory/juce_Singleton.h"
  236. #endif
  237. #ifndef __JUCE_WEAKREFERENCE_JUCEHEADER__
  238. #include "memory/juce_WeakReference.h"
  239. #endif
  240. #ifndef __JUCE_RESULT_JUCEHEADER__
  241. #include "misc/juce_Result.h"
  242. #endif
  243. #ifndef __JUCE_UUID_JUCEHEADER__
  244. #include "misc/juce_Uuid.h"
  245. #endif
  246. #ifndef __JUCE_WINDOWSREGISTRY_JUCEHEADER__
  247. #include "misc/juce_WindowsRegistry.h"
  248. #endif
  249. #ifndef __JUCE_IPADDRESS_JUCEHEADER__
  250. #include "network/juce_IPAddress.h"
  251. #endif
  252. #ifndef __JUCE_MACADDRESS_JUCEHEADER__
  253. #include "network/juce_MACAddress.h"
  254. #endif
  255. #ifndef __JUCE_NAMEDPIPE_JUCEHEADER__
  256. #include "network/juce_NamedPipe.h"
  257. #endif
  258. #ifndef __JUCE_SOCKET_JUCEHEADER__
  259. #include "network/juce_Socket.h"
  260. #endif
  261. #ifndef __JUCE_URL_JUCEHEADER__
  262. #include "network/juce_URL.h"
  263. #endif
  264. #ifndef __JUCE_BUFFEREDINPUTSTREAM_JUCEHEADER__
  265. #include "streams/juce_BufferedInputStream.h"
  266. #endif
  267. #ifndef __JUCE_FILEINPUTSOURCE_JUCEHEADER__
  268. #include "streams/juce_FileInputSource.h"
  269. #endif
  270. #ifndef __JUCE_INPUTSOURCE_JUCEHEADER__
  271. #include "streams/juce_InputSource.h"
  272. #endif
  273. #ifndef __JUCE_INPUTSTREAM_JUCEHEADER__
  274. #include "streams/juce_InputStream.h"
  275. #endif
  276. #ifndef __JUCE_MEMORYINPUTSTREAM_JUCEHEADER__
  277. #include "streams/juce_MemoryInputStream.h"
  278. #endif
  279. #ifndef __JUCE_MEMORYOUTPUTSTREAM_JUCEHEADER__
  280. #include "streams/juce_MemoryOutputStream.h"
  281. #endif
  282. #ifndef __JUCE_OUTPUTSTREAM_JUCEHEADER__
  283. #include "streams/juce_OutputStream.h"
  284. #endif
  285. #ifndef __JUCE_SUBREGIONSTREAM_JUCEHEADER__
  286. #include "streams/juce_SubregionStream.h"
  287. #endif
  288. #ifndef __JUCE_PLATFORMDEFS_JUCEHEADER__
  289. #include "system/juce_PlatformDefs.h"
  290. #endif
  291. #ifndef __JUCE_STANDARDHEADER_JUCEHEADER__
  292. #include "system/juce_StandardHeader.h"
  293. #endif
  294. #ifndef __JUCE_SYSTEMSTATS_JUCEHEADER__
  295. #include "system/juce_SystemStats.h"
  296. #endif
  297. #ifndef __JUCE_TARGETPLATFORM_JUCEHEADER__
  298. #include "system/juce_TargetPlatform.h"
  299. #endif
  300. #ifndef __JUCE_CHARACTERFUNCTIONS_JUCEHEADER__
  301. #include "text/juce_CharacterFunctions.h"
  302. #endif
  303. #ifndef __JUCE_CHARPOINTER_ASCII_JUCEHEADER__
  304. #include "text/juce_CharPointer_ASCII.h"
  305. #endif
  306. #ifndef __JUCE_CHARPOINTER_UTF16_JUCEHEADER__
  307. #include "text/juce_CharPointer_UTF16.h"
  308. #endif
  309. #ifndef __JUCE_CHARPOINTER_UTF32_JUCEHEADER__
  310. #include "text/juce_CharPointer_UTF32.h"
  311. #endif
  312. #ifndef __JUCE_CHARPOINTER_UTF8_JUCEHEADER__
  313. #include "text/juce_CharPointer_UTF8.h"
  314. #endif
  315. #ifndef __JUCE_IDENTIFIER_JUCEHEADER__
  316. #include "text/juce_Identifier.h"
  317. #endif
  318. #ifndef __JUCE_LOCALISEDSTRINGS_JUCEHEADER__
  319. #include "text/juce_LocalisedStrings.h"
  320. #endif
  321. #ifndef __JUCE_NEWLINE_JUCEHEADER__
  322. #include "text/juce_NewLine.h"
  323. #endif
  324. #ifndef __JUCE_STRING_JUCEHEADER__
  325. #include "text/juce_String.h"
  326. #endif
  327. #ifndef __JUCE_STRINGARRAY_JUCEHEADER__
  328. #include "text/juce_StringArray.h"
  329. #endif
  330. #ifndef __JUCE_STRINGPAIRARRAY_JUCEHEADER__
  331. #include "text/juce_StringPairArray.h"
  332. #endif
  333. #ifndef __JUCE_STRINGPOOL_JUCEHEADER__
  334. #include "text/juce_StringPool.h"
  335. #endif
  336. #ifndef __JUCE_TEXTDIFF_JUCEHEADER__
  337. #include "text/juce_TextDiff.h"
  338. #endif
  339. #ifndef __JUCE_CHILDPROCESS_JUCEHEADER__
  340. #include "threads/juce_ChildProcess.h"
  341. #endif
  342. #ifndef __JUCE_CRITICALSECTION_JUCEHEADER__
  343. #include "threads/juce_CriticalSection.h"
  344. #endif
  345. #ifndef __JUCE_DYNAMICLIBRARY_JUCEHEADER__
  346. #include "threads/juce_DynamicLibrary.h"
  347. #endif
  348. #ifndef __JUCE_HIGHRESOLUTIONTIMER_JUCEHEADER__
  349. #include "threads/juce_HighResolutionTimer.h"
  350. #endif
  351. #ifndef __JUCE_INTERPROCESSLOCK_JUCEHEADER__
  352. #include "threads/juce_InterProcessLock.h"
  353. #endif
  354. #ifndef __JUCE_PROCESS_JUCEHEADER__
  355. #include "threads/juce_Process.h"
  356. #endif
  357. #ifndef __JUCE_READWRITELOCK_JUCEHEADER__
  358. #include "threads/juce_ReadWriteLock.h"
  359. #endif
  360. #ifndef __JUCE_SCOPEDLOCK_JUCEHEADER__
  361. #include "threads/juce_ScopedLock.h"
  362. #endif
  363. #ifndef __JUCE_SCOPEDREADLOCK_JUCEHEADER__
  364. #include "threads/juce_ScopedReadLock.h"
  365. #endif
  366. #ifndef __JUCE_SCOPEDWRITELOCK_JUCEHEADER__
  367. #include "threads/juce_ScopedWriteLock.h"
  368. #endif
  369. #ifndef __JUCE_SPINLOCK_JUCEHEADER__
  370. #include "threads/juce_SpinLock.h"
  371. #endif
  372. #ifndef __JUCE_THREAD_JUCEHEADER__
  373. #include "threads/juce_Thread.h"
  374. #endif
  375. #ifndef __JUCE_THREADLOCALVALUE_JUCEHEADER__
  376. #include "threads/juce_ThreadLocalValue.h"
  377. #endif
  378. #ifndef __JUCE_THREADPOOL_JUCEHEADER__
  379. #include "threads/juce_ThreadPool.h"
  380. #endif
  381. #ifndef __JUCE_TIMESLICETHREAD_JUCEHEADER__
  382. #include "threads/juce_TimeSliceThread.h"
  383. #endif
  384. #ifndef __JUCE_WAITABLEEVENT_JUCEHEADER__
  385. #include "threads/juce_WaitableEvent.h"
  386. #endif
  387. #ifndef __JUCE_PERFORMANCECOUNTER_JUCEHEADER__
  388. #include "time/juce_PerformanceCounter.h"
  389. #endif
  390. #ifndef __JUCE_RELATIVETIME_JUCEHEADER__
  391. #include "time/juce_RelativeTime.h"
  392. #endif
  393. #ifndef __JUCE_TIME_JUCEHEADER__
  394. #include "time/juce_Time.h"
  395. #endif
  396. #ifndef __JUCE_UNITTEST_JUCEHEADER__
  397. #include "unit_tests/juce_UnitTest.h"
  398. #endif
  399. #ifndef __JUCE_XMLDOCUMENT_JUCEHEADER__
  400. #include "xml/juce_XmlDocument.h"
  401. #endif
  402. #ifndef __JUCE_XMLELEMENT_JUCEHEADER__
  403. #include "xml/juce_XmlElement.h"
  404. #endif
  405. #ifndef __JUCE_GZIPCOMPRESSOROUTPUTSTREAM_JUCEHEADER__
  406. #include "zip/juce_GZIPCompressorOutputStream.h"
  407. #endif
  408. #ifndef __JUCE_GZIPDECOMPRESSORINPUTSTREAM_JUCEHEADER__
  409. #include "zip/juce_GZIPDecompressorInputStream.h"
  410. #endif
  411. #ifndef __JUCE_ZIPFILE_JUCEHEADER__
  412. #include "zip/juce_ZipFile.h"
  413. #endif
  414. // END_AUTOINCLUDE
  415. }
  416. #if JUCE_MSVC
  417. #pragma warning (pop)
  418. #endif
  419. #endif // __JUCE_CORE_JUCEHEADER__