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.

158 lines
4.4KB

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