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.

164 lines
4.5KB

  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 3
  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. //==============================================================================
  45. #include "juce_CompilerSupport.h"
  46. #include "juce_PlatformDefs.h"
  47. //==============================================================================
  48. // Now we'll include some common OS headers..
  49. #if JUCE_MSVC
  50. #pragma warning (push)
  51. #pragma warning (disable: 4514 4245 4100)
  52. #include <intrin.h>
  53. #endif
  54. #if JUCE_MAC || JUCE_IOS
  55. #include <libkern/OSAtomic.h>
  56. #include <xlocale.h>
  57. #if JUCE_IOS
  58. #include <signal.h>
  59. #endif
  60. #endif
  61. #if JUCE_LINUX
  62. #include <cstring>
  63. #include <signal.h>
  64. #if __INTEL_COMPILER
  65. #if __ia64__
  66. #include <ia64intrin.h>
  67. #else
  68. #include <ia32intrin.h>
  69. #endif
  70. #endif
  71. #endif
  72. #if JUCE_MSVC && JUCE_DEBUG
  73. #include <crtdbg.h>
  74. #endif
  75. #if JUCE_MSVC
  76. #pragma warning (pop)
  77. #endif
  78. #if JUCE_MINGW
  79. #include <cstring>
  80. #include <sys/types.h>
  81. #endif
  82. #if JUCE_ANDROID
  83. #include <cstring>
  84. #include <atomic>
  85. #include <byteswap.h>
  86. #endif
  87. // undef symbols that are sometimes set by misguided 3rd-party headers..
  88. #undef TYPE_BOOL
  89. #undef max
  90. #undef min
  91. #undef major
  92. #undef minor
  93. #undef KeyPress
  94. // Include a replacement for std::function
  95. #if JUCE_PROJUCER_LIVE_BUILD
  96. #include "../misc/juce_StdFunctionCompat.h"
  97. #endif
  98. //==============================================================================
  99. // DLL building settings on Windows
  100. #if JUCE_MSVC
  101. #ifdef JUCE_DLL_BUILD
  102. #define JUCE_API __declspec (dllexport)
  103. #pragma warning (disable: 4251)
  104. #elif defined (JUCE_DLL)
  105. #define JUCE_API __declspec (dllimport)
  106. #pragma warning (disable: 4251)
  107. #endif
  108. #ifdef __INTEL_COMPILER
  109. #pragma warning (disable: 1125) // (virtual override warning)
  110. #endif
  111. #elif defined (JUCE_DLL) || defined (JUCE_DLL_BUILD)
  112. #define JUCE_API __attribute__ ((visibility("default")))
  113. #endif
  114. //==============================================================================
  115. #ifndef JUCE_API
  116. #define JUCE_API /**< This macro is added to all JUCE public class declarations. */
  117. #endif
  118. #if JUCE_MSVC && JUCE_DLL_BUILD
  119. #define JUCE_PUBLIC_IN_DLL_BUILD(declaration) public: declaration; private:
  120. #else
  121. #define JUCE_PUBLIC_IN_DLL_BUILD(declaration) declaration;
  122. #endif
  123. /** This macro is added to all JUCE public function declarations. */
  124. #define JUCE_PUBLIC_FUNCTION JUCE_API JUCE_CALLTYPE
  125. #if (! defined (JUCE_CATCH_DEPRECATED_CODE_MISUSE)) && JUCE_DEBUG && ! DOXYGEN
  126. /** This turns on some non-essential bits of code that should prevent old code from compiling
  127. in cases where method signatures have changed, etc.
  128. */
  129. #define JUCE_CATCH_DEPRECATED_CODE_MISUSE 1
  130. #endif
  131. #ifndef DOXYGEN
  132. #define JUCE_NAMESPACE juce // This old macro is deprecated: you should just use the juce namespace directly.
  133. #endif