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.

195 lines
6.6KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library - "Jules' Utility Class Extensions"
  4. Copyright 2004-11 by Raw Material Software Ltd.
  5. ------------------------------------------------------------------------------
  6. JUCE can be redistributed and/or modified under the terms of the GNU General
  7. Public License (Version 2), as published by the Free Software Foundation.
  8. A copy of the license is included in the JUCE distribution, or can be found
  9. online at www.gnu.org/licenses.
  10. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  11. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  13. ------------------------------------------------------------------------------
  14. To release a closed-source product which uses JUCE, commercial licenses are
  15. available: visit www.rawmaterialsoftware.com/juce for more information.
  16. ==============================================================================
  17. */
  18. #ifndef __JUCE_STANDARDHEADER_JUCEHEADER__
  19. #define __JUCE_STANDARDHEADER_JUCEHEADER__
  20. //==============================================================================
  21. /** Current Juce version number.
  22. See also SystemStats::getJUCEVersion() for a string version.
  23. */
  24. #define JUCE_MAJOR_VERSION 1
  25. #define JUCE_MINOR_VERSION 53
  26. #define JUCE_BUILDNUMBER 79
  27. /** Current Juce version number.
  28. Bits 16 to 32 = major version.
  29. Bits 8 to 16 = minor version.
  30. Bits 0 to 8 = point release (not currently used).
  31. See also SystemStats::getJUCEVersion() for a string version.
  32. */
  33. #define JUCE_VERSION ((JUCE_MAJOR_VERSION << 16) + (JUCE_MINOR_VERSION << 8) + JUCE_BUILDNUMBER)
  34. //==============================================================================
  35. #include "juce_TargetPlatform.h" // (sets up the various JUCE_WINDOWS, JUCE_MAC, etc flags)
  36. #include "../../juce_Config.h"
  37. //==============================================================================
  38. #ifdef JUCE_NAMESPACE
  39. #define BEGIN_JUCE_NAMESPACE namespace JUCE_NAMESPACE {
  40. #define END_JUCE_NAMESPACE }
  41. #else
  42. #define BEGIN_JUCE_NAMESPACE
  43. #define END_JUCE_NAMESPACE
  44. #endif
  45. //==============================================================================
  46. #include "juce_PlatformDefs.h"
  47. // Now we'll include any OS headers we need.. (at this point we are outside the Juce namespace).
  48. #if JUCE_MSVC
  49. #if JUCE_VC6
  50. #pragma warning (disable: 4284 4786) // (spurious VC6 warnings)
  51. namespace std // VC6 doesn't have sqrt/sin/cos/tan/abs in std, so declare them here:
  52. {
  53. template <typename Type> Type abs (Type a) { if (a < 0) return -a; return a; }
  54. template <typename Type> Type tan (Type a) { return static_cast<Type> (::tan (static_cast<double> (a))); }
  55. template <typename Type> Type sin (Type a) { return static_cast<Type> (::sin (static_cast<double> (a))); }
  56. template <typename Type> Type cos (Type a) { return static_cast<Type> (::cos (static_cast<double> (a))); }
  57. template <typename Type> Type sqrt (Type a) { return static_cast<Type> (::sqrt (static_cast<double> (a))); }
  58. template <typename Type> Type floor (Type a) { return static_cast<Type> (::floor (static_cast<double> (a))); }
  59. template <typename Type> Type ceil (Type a) { return static_cast<Type> (::ceil (static_cast<double> (a))); }
  60. template <typename Type> Type atan2 (Type a, Type b) { return static_cast<Type> (::atan2 (static_cast<double> (a), static_cast<double> (b))); }
  61. }
  62. #endif
  63. #pragma warning (push)
  64. #pragma warning (disable: 4514 4245 4100)
  65. #endif
  66. #include <cstdlib>
  67. #include <cstdarg>
  68. #include <climits>
  69. #include <limits>
  70. #include <cmath>
  71. #include <cwchar>
  72. #include <stdexcept>
  73. #include <typeinfo>
  74. #include <cstring>
  75. #include <cstdio>
  76. #include <iostream>
  77. #include <vector>
  78. #if JUCE_USE_INTRINSICS
  79. #include <intrin.h>
  80. #endif
  81. #if JUCE_MAC || JUCE_IOS
  82. #include <libkern/OSAtomic.h>
  83. #endif
  84. #if JUCE_LINUX
  85. #include <signal.h>
  86. #if __INTEL_COMPILER
  87. #if __ia64__
  88. #include <ia64intrin.h>
  89. #else
  90. #include <ia32intrin.h>
  91. #endif
  92. #endif
  93. #endif
  94. #if JUCE_MSVC && JUCE_DEBUG
  95. #include <crtdbg.h>
  96. #endif
  97. #if JUCE_MSVC
  98. #include <malloc.h>
  99. #pragma warning (pop)
  100. #if ! JUCE_PUBLIC_INCLUDES
  101. #pragma warning (4: 4511 4512 4100) // (enable some warnings that are turned off in VC8)
  102. #endif
  103. #endif
  104. #if JUCE_ANDROID
  105. #include <sys/atomics.h>
  106. #include <byteswap.h>
  107. #endif
  108. //==============================================================================
  109. // DLL building settings on Win32
  110. #if JUCE_MSVC
  111. #ifdef JUCE_DLL_BUILD
  112. #define JUCE_API __declspec (dllexport)
  113. #pragma warning (disable: 4251)
  114. #elif defined (JUCE_DLL)
  115. #define JUCE_API __declspec (dllimport)
  116. #pragma warning (disable: 4251)
  117. #endif
  118. #ifdef __INTEL_COMPILER
  119. #pragma warning (disable: 1125) // (virtual override warning)
  120. #endif
  121. #elif defined (__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
  122. #ifdef JUCE_DLL_BUILD
  123. #define JUCE_API __attribute__ ((visibility("default")))
  124. #endif
  125. #endif
  126. #ifndef JUCE_API
  127. /** This macro is added to all juce public class declarations. */
  128. #define JUCE_API
  129. #endif
  130. /** This macro is added to all juce public function declarations. */
  131. #define JUCE_PUBLIC_FUNCTION JUCE_API JUCE_CALLTYPE
  132. /** This turns on some non-essential bits of code that should prevent old code from compiling
  133. in cases where method signatures have changed, etc.
  134. */
  135. #if (! defined (JUCE_CATCH_DEPRECATED_CODE_MISUSE)) && JUCE_DEBUG && ! DOXYGEN
  136. #define JUCE_CATCH_DEPRECATED_CODE_MISUSE 1
  137. #endif
  138. //==============================================================================
  139. // Now include some basics that are needed by most of the Juce classes...
  140. BEGIN_JUCE_NAMESPACE
  141. extern JUCE_API bool JUCE_CALLTYPE juce_isRunningUnderDebugger();
  142. #if JUCE_LOG_ASSERTIONS
  143. extern JUCE_API void juce_LogAssertion (const char* filename, int lineNum) noexcept;
  144. #endif
  145. #include "../memory/juce_Memory.h"
  146. #include "../maths/juce_MathsFunctions.h"
  147. #include "../memory/juce_ByteOrder.h"
  148. #include "juce_Logger.h"
  149. #include "../memory/juce_LeakedObjectDetector.h"
  150. #undef TYPE_BOOL // (stupidly-named CoreServices definition which interferes with other libraries).
  151. END_JUCE_NAMESPACE
  152. #endif // __JUCE_STANDARDHEADER_JUCEHEADER__