2 ==============================================================================
4 This file is part of the JUCE library - "Jules' Utility Class Extensions"
5 Copyright 2004-11 by Raw Material Software Ltd.
7 ------------------------------------------------------------------------------
9 JUCE can be redistributed and/or modified under the terms of the GNU General
10 Public License (Version 2), as published by the Free Software Foundation.
11 A copy of the license is included in the JUCE distribution, or can be found
12 online at www.gnu.org/licenses.
14 JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 ------------------------------------------------------------------------------
20 To release a closed-source product which uses JUCE, commercial licenses are
21 available: visit www.rawmaterialsoftware.com/juce for more information.
23 ==============================================================================
26 #ifndef __JUCE_STANDARDHEADER_JUCEHEADER__
27 #define __JUCE_STANDARDHEADER_JUCEHEADER__
29 //==============================================================================
30 /** Current Juce version number.
32 See also SystemStats::getJUCEVersion() for a string version.
34 #define JUCE_MAJOR_VERSION 1
35 #define JUCE_MINOR_VERSION 53
36 #define JUCE_BUILDNUMBER 107
38 /** Current Juce version number.
40 Bits 16 to 32 = major version.
41 Bits 8 to 16 = minor version.
42 Bits 0 to 8 = point release (not currently used).
44 See also SystemStats::getJUCEVersion() for a string version.
46 #define JUCE_VERSION ((JUCE_MAJOR_VERSION << 16) + (JUCE_MINOR_VERSION << 8) + JUCE_BUILDNUMBER)
49 //==============================================================================
50 #include "juce_TargetPlatform.h" // (sets up the various JUCE_WINDOWS, JUCE_MAC, etc flags)
52 #include "../../juce_Config.h"
54 //==============================================================================
56 #define BEGIN_JUCE_NAMESPACE namespace JUCE_NAMESPACE {
57 #define END_JUCE_NAMESPACE }
59 #define BEGIN_JUCE_NAMESPACE
60 #define END_JUCE_NAMESPACE
63 //==============================================================================
64 #include "juce_PlatformDefs.h"
66 // Now we'll include any OS headers we need.. (at this point we are outside the Juce namespace).
69 #pragma warning (disable: 4284 4786) // (spurious VC6 warnings)
71 namespace std
// VC6 doesn't have sqrt/sin/cos/tan/abs in std, so declare them here:
73 template <typename Type
> Type
abs (Type a
) { if (a
< 0) return -a
; return a
; }
74 template <typename Type
> Type
tan (Type a
) { return static_cast<Type
> (::tan (static_cast<double> (a
))); }
75 template <typename Type
> Type
sin (Type a
) { return static_cast<Type
> (::sin (static_cast<double> (a
))); }
76 template <typename Type
> Type
cos (Type a
) { return static_cast<Type
> (::cos (static_cast<double> (a
))); }
77 template <typename Type
> Type
sqrt (Type a
) { return static_cast<Type
> (::sqrt (static_cast<double> (a
))); }
78 template <typename Type
> Type
floor (Type a
) { return static_cast<Type
> (::floor (static_cast<double> (a
))); }
79 template <typename Type
> Type
ceil (Type a
) { return static_cast<Type
> (::ceil (static_cast<double> (a
))); }
80 template <typename Type
> Type
atan2 (Type a
, Type b
) { return static_cast<Type
> (::atan2 (static_cast<double> (a
), static_cast<double> (b
))); }
84 #pragma warning (push)
85 #pragma warning (disable: 4514 4245 4100)
101 #if JUCE_USE_INTRINSICS
105 #if JUCE_MAC || JUCE_IOS
106 #include <libkern/OSAtomic.h>
114 #include <ia64intrin.h>
116 #include <ia32intrin.h>
121 #if JUCE_MSVC && JUCE_DEBUG
127 #pragma warning (pop)
129 #if ! JUCE_PUBLIC_INCLUDES
130 #pragma warning (4: 4511 4512 4100) // (enable some warnings that are turned off in VC8)
135 #include <sys/atomics.h>
136 #include <byteswap.h>
139 //==============================================================================
140 // DLL building settings on Win32
142 #ifdef JUCE_DLL_BUILD
143 #define JUCE_API __declspec (dllexport)
144 #pragma warning (disable: 4251)
145 #elif defined (JUCE_DLL)
146 #define JUCE_API __declspec (dllimport)
147 #pragma warning (disable: 4251)
149 #ifdef __INTEL_COMPILER
150 #pragma warning (disable: 1125) // (virtual override warning)
152 #elif defined (__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
153 #ifdef JUCE_DLL_BUILD
154 #define JUCE_API __attribute__ ((visibility("default")))
159 /** This macro is added to all juce public class declarations. */
163 /** This macro is added to all juce public function declarations. */
164 #define JUCE_PUBLIC_FUNCTION JUCE_API JUCE_CALLTYPE
166 /** This turns on some non-essential bits of code that should prevent old code from compiling
167 in cases where method signatures have changed, etc.
169 #if (! defined (JUCE_CATCH_DEPRECATED_CODE_MISUSE)) && JUCE_DEBUG && ! DOXYGEN
170 #define JUCE_CATCH_DEPRECATED_CODE_MISUSE 1
173 //==============================================================================
174 // Now include some basics that are needed by most of the Juce classes...
177 extern JUCE_API
bool JUCE_CALLTYPE
juce_isRunningUnderDebugger();
179 #if JUCE_LOG_ASSERTIONS
180 extern JUCE_API
void juce_LogAssertion (const char* filename
, int lineNum
) noexcept
;
183 #include "../memory/juce_Memory.h"
184 #include "../maths/juce_MathsFunctions.h"
185 #include "../memory/juce_ByteOrder.h"
186 #include "juce_Logger.h"
187 #include "../memory/juce_LeakedObjectDetector.h"
189 #undef TYPE_BOOL // (stupidly-named CoreServices definition which interferes with other libraries).
194 #endif // __JUCE_STANDARDHEADER_JUCEHEADER__