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.

169 lines
4.7KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2017 - ROLI Ltd.
  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. #pragma once
  18. //==============================================================================
  19. /** Current JUCE version number.
  20. See also SystemStats::getJUCEVersion() for a string version.
  21. */
  22. #define JUCE_MAJOR_VERSION 5
  23. #define JUCE_MINOR_VERSION 4
  24. #define JUCE_BUILDNUMBER 5
  25. /** Current JUCE version number.
  26. Bits 16 to 32 = major version.
  27. Bits 8 to 16 = minor version.
  28. Bits 0 to 8 = point release.
  29. See also SystemStats::getJUCEVersion() for a string version.
  30. */
  31. #define JUCE_VERSION ((JUCE_MAJOR_VERSION << 16) + (JUCE_MINOR_VERSION << 8) + JUCE_BUILDNUMBER)
  32. //==============================================================================
  33. #include <memory>
  34. #include <cmath>
  35. #include <vector>
  36. #include <iostream>
  37. #include <functional>
  38. #include <algorithm>
  39. #include <limits>
  40. #include <atomic>
  41. #include <sstream>
  42. #include <iomanip>
  43. #include <map>
  44. #include <cstddef>
  45. #include <unordered_set>
  46. #include <mutex>
  47. #include <condition_variable>
  48. #include <queue>
  49. //==============================================================================
  50. #include "juce_CompilerSupport.h"
  51. #include "juce_PlatformDefs.h"
  52. //==============================================================================
  53. // Now we'll include some common OS headers..
  54. #if JUCE_MSVC
  55. #pragma warning (push)
  56. #pragma warning (disable: 4514 4245 4100)
  57. #include <intrin.h>
  58. #endif
  59. #if JUCE_MAC || JUCE_IOS
  60. #include <libkern/OSAtomic.h>
  61. #include <xlocale.h>
  62. #if JUCE_IOS
  63. #include <signal.h>
  64. #endif
  65. #endif
  66. #if JUCE_LINUX
  67. #include <cstring>
  68. #include <signal.h>
  69. #if __INTEL_COMPILER
  70. #if __ia64__
  71. #include <ia64intrin.h>
  72. #else
  73. #include <ia32intrin.h>
  74. #endif
  75. #endif
  76. #endif
  77. #if JUCE_MSVC && JUCE_DEBUG
  78. #include <crtdbg.h>
  79. #endif
  80. #if JUCE_MSVC
  81. #pragma warning (pop)
  82. #endif
  83. #if JUCE_MINGW
  84. #include <cstring>
  85. #include <sys/types.h>
  86. #endif
  87. #if JUCE_ANDROID
  88. #include <cstring>
  89. #include <atomic>
  90. #include <byteswap.h>
  91. #endif
  92. // undef symbols that are sometimes set by misguided 3rd-party headers..
  93. #undef TYPE_BOOL
  94. #undef max
  95. #undef min
  96. #undef major
  97. #undef minor
  98. #undef KeyPress
  99. // Include a replacement for std::function
  100. #if JUCE_PROJUCER_LIVE_BUILD
  101. #include "../misc/juce_StdFunctionCompat.h"
  102. #endif
  103. //==============================================================================
  104. // DLL building settings on Windows
  105. #if JUCE_MSVC
  106. #ifdef JUCE_DLL_BUILD
  107. #define JUCE_API __declspec (dllexport)
  108. #pragma warning (disable: 4251)
  109. #elif defined (JUCE_DLL)
  110. #define JUCE_API __declspec (dllimport)
  111. #pragma warning (disable: 4251)
  112. #endif
  113. #ifdef __INTEL_COMPILER
  114. #pragma warning (disable: 1125) // (virtual override warning)
  115. #endif
  116. #elif defined (JUCE_DLL) || defined (JUCE_DLL_BUILD)
  117. #define JUCE_API __attribute__ ((visibility("default")))
  118. #endif
  119. //==============================================================================
  120. #ifndef JUCE_API
  121. #define JUCE_API /**< This macro is added to all JUCE public class declarations. */
  122. #endif
  123. #if JUCE_MSVC && JUCE_DLL_BUILD
  124. #define JUCE_PUBLIC_IN_DLL_BUILD(declaration) public: declaration; private:
  125. #else
  126. #define JUCE_PUBLIC_IN_DLL_BUILD(declaration) declaration;
  127. #endif
  128. /** This macro is added to all JUCE public function declarations. */
  129. #define JUCE_PUBLIC_FUNCTION JUCE_API JUCE_CALLTYPE
  130. #if (! defined (JUCE_CATCH_DEPRECATED_CODE_MISUSE)) && JUCE_DEBUG && ! DOXYGEN
  131. /** This turns on some non-essential bits of code that should prevent old code from compiling
  132. in cases where method signatures have changed, etc.
  133. */
  134. #define JUCE_CATCH_DEPRECATED_CODE_MISUSE 1
  135. #endif
  136. #ifndef DOXYGEN
  137. #define JUCE_NAMESPACE juce // This old macro is deprecated: you should just use the juce namespace directly.
  138. #endif