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.

162 lines
4.6KB

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