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.

188 lines
6.4KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library - "Jules' Utility Class Extensions"
  4. Copyright 2004-10 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 17
  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. #if JUCE_USE_INTRINSICS
  78. #include <intrin.h>
  79. #endif
  80. #if JUCE_MAC || JUCE_IOS
  81. #include <libkern/OSAtomic.h>
  82. #endif
  83. #if JUCE_LINUX
  84. #include <signal.h>
  85. #if __INTEL_COMPILER
  86. #if __ia64__
  87. #include <ia64intrin.h>
  88. #else
  89. #include <ia32intrin.h>
  90. #endif
  91. #endif
  92. #endif
  93. #if JUCE_MSVC && JUCE_DEBUG
  94. #include <crtdbg.h>
  95. #endif
  96. #if JUCE_MSVC
  97. #include <malloc.h>
  98. #pragma warning (pop)
  99. #if ! JUCE_PUBLIC_INCLUDES
  100. #pragma warning (4: 4511 4512 4100) // (enable some warnings that are turned off in VC8)
  101. #endif
  102. #endif
  103. //==============================================================================
  104. // DLL building settings on Win32
  105. #if JUCE_MSVC
  106. #ifdef JUCE_DLL_BUILD
  107. #define JUCE_API __declspec (dllexport)
  108. #pragma warning (disable: 4251)
  109. #elif defined (JUCE_DLL)
  110. #define JUCE_API __declspec (dllimport)
  111. #pragma warning (disable: 4251)
  112. #endif
  113. #ifdef __INTEL_COMPILER
  114. #pragma warning (disable: 1125) // (virtual override warning)
  115. #endif
  116. #elif defined (__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
  117. #ifdef JUCE_DLL_BUILD
  118. #define JUCE_API __attribute__ ((visibility("default")))
  119. #endif
  120. #endif
  121. #ifndef JUCE_API
  122. /** This macro is added to all juce public class declarations. */
  123. #define JUCE_API
  124. #endif
  125. /** This macro is added to all juce public function declarations. */
  126. #define JUCE_PUBLIC_FUNCTION JUCE_API JUCE_CALLTYPE
  127. /** This turns on some non-essential bits of code that should prevent old code from compiling
  128. in cases where method signatures have changed, etc.
  129. */
  130. #if (! defined (JUCE_CATCH_DEPRECATED_CODE_MISUSE)) && JUCE_DEBUG && ! DOXYGEN
  131. #define JUCE_CATCH_DEPRECATED_CODE_MISUSE 1
  132. #endif
  133. //==============================================================================
  134. // Now include some basics that are needed by most of the Juce classes...
  135. BEGIN_JUCE_NAMESPACE
  136. extern JUCE_API bool JUCE_CALLTYPE juce_isRunningUnderDebugger();
  137. #if JUCE_LOG_ASSERTIONS
  138. extern JUCE_API void juce_LogAssertion (const char* filename, int lineNum) throw();
  139. #endif
  140. #include "../memory/juce_Memory.h"
  141. #include "../maths/juce_MathsFunctions.h"
  142. #include "../memory/juce_ByteOrder.h"
  143. #include "juce_Logger.h"
  144. #include "../memory/juce_LeakedObjectDetector.h"
  145. END_JUCE_NAMESPACE
  146. #endif // __JUCE_STANDARDHEADER_JUCEHEADER__