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.

159 lines
4.8KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2016 - ROLI Ltd.
  5. Permission is granted to use this software under the terms of the ISC license
  6. http://www.isc.org/downloads/software-support-policy/isc-license/
  7. Permission to use, copy, modify, and/or distribute this software for any
  8. purpose with or without fee is hereby granted, provided that the above
  9. copyright notice and this permission notice appear in all copies.
  10. THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD
  11. TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  12. FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT,
  13. OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  14. USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
  16. OF THIS SOFTWARE.
  17. -----------------------------------------------------------------------------
  18. To release a closed-source product which uses other parts of JUCE not
  19. licensed under the ISC terms, commercial licenses are available: visit
  20. www.juce.com for more information.
  21. ==============================================================================
  22. */
  23. #pragma once
  24. //==============================================================================
  25. /** Current JUCE version number.
  26. See also SystemStats::getJUCEVersion() for a string version.
  27. */
  28. #define JUCE_MAJOR_VERSION 4
  29. #define JUCE_MINOR_VERSION 3
  30. #define JUCE_BUILDNUMBER 1
  31. /** Current Juce version number.
  32. Bits 16 to 32 = major version.
  33. Bits 8 to 16 = minor version.
  34. Bits 0 to 8 = point release.
  35. See also SystemStats::getJUCEVersion() for a string version.
  36. */
  37. #define JUCE_VERSION ((JUCE_MAJOR_VERSION << 16) + (JUCE_MINOR_VERSION << 8) + JUCE_BUILDNUMBER)
  38. //==============================================================================
  39. #include <memory>
  40. #include <cmath>
  41. #include <vector>
  42. #include <iostream>
  43. #include <functional>
  44. #include <algorithm>
  45. #include <limits>
  46. //==============================================================================
  47. #include "juce_CompilerSupport.h"
  48. #include "juce_PlatformDefs.h"
  49. //==============================================================================
  50. // Now we'll include some common OS headers..
  51. #if JUCE_MSVC
  52. #pragma warning (push)
  53. #pragma warning (disable: 4514 4245 4100)
  54. #include <intrin.h>
  55. #endif
  56. #if JUCE_MAC || JUCE_IOS
  57. #include <libkern/OSAtomic.h>
  58. #endif
  59. #if JUCE_LINUX
  60. #include <cstring>
  61. #include <signal.h>
  62. #if __INTEL_COMPILER
  63. #if __ia64__
  64. #include <ia64intrin.h>
  65. #else
  66. #include <ia32intrin.h>
  67. #endif
  68. #endif
  69. #endif
  70. #if JUCE_MSVC && JUCE_DEBUG
  71. #include <crtdbg.h>
  72. #endif
  73. #if JUCE_MSVC
  74. #pragma warning (pop)
  75. #endif
  76. #if JUCE_MINGW
  77. #include <cstring>
  78. #include <sys/types.h>
  79. #endif
  80. #if JUCE_ANDROID
  81. #include <cstring>
  82. #include <atomic>
  83. #include <byteswap.h>
  84. #endif
  85. // undef symbols that are sometimes set by misguided 3rd-party headers..
  86. #undef TYPE_BOOL
  87. #undef max
  88. #undef min
  89. #undef major
  90. #undef minor
  91. #undef KeyPress
  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