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.

172 lines
5.8KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library - "Jules' Utility Class Extensions"
  4. Copyright 2004-9 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_JUCEHEADER__
  19. #define __JUCE_JUCEHEADER__
  20. //==============================================================================
  21. /*
  22. This is the main JUCE header file that applications need to include.
  23. */
  24. //==============================================================================
  25. /* This line is here just to help catch syntax errors caused by mistakes in other header
  26. files that are included before juce.h. If you hit an error at this line, it must be some
  27. kind of syntax problem in whatever code immediately precedes this header.
  28. This also acts as a sanity-check in case you're trying to build with a C or obj-C compiler
  29. rather than a proper C++ one.
  30. */
  31. namespace JuceDummyNamespace {}
  32. #define JUCE_PUBLIC_INCLUDES 1
  33. // (this includes things that need defining outside of the JUCE namespace)
  34. #include "src/core/juce_StandardHeader.h"
  35. BEGIN_JUCE_NAMESPACE
  36. #if JUCE_MSVC
  37. // this is set explicitly in case the app is using a different packing size.
  38. #pragma pack (push, 8)
  39. #pragma warning (push)
  40. #pragma warning (disable: 4786) // (old vc6 warning about long class names)
  41. #ifdef __INTEL_COMPILER
  42. #pragma warning (disable: 1125)
  43. #endif
  44. #endif
  45. // this is where all the class header files get brought in..
  46. #include "src/juce_core_includes.h"
  47. // if you're compiling a command-line app, you might want to just include the core headers,
  48. // so you can set this macro before including juce.h
  49. #if ! JUCE_ONLY_BUILD_CORE_LIBRARY
  50. #include "src/juce_app_includes.h"
  51. #endif
  52. #if JUCE_MSVC
  53. #pragma warning (pop)
  54. #pragma pack (pop)
  55. #endif
  56. #ifdef JUCE_DLL
  57. #undef JUCE_LEAK_DETECTOR(OwnerClass)
  58. #define JUCE_LEAK_DETECTOR(OwnerClass)
  59. #endif
  60. END_JUCE_NAMESPACE
  61. //==============================================================================
  62. #ifndef DONT_SET_USING_JUCE_NAMESPACE
  63. #ifdef JUCE_NAMESPACE
  64. // this will obviously save a lot of typing, but can be disabled by
  65. // defining DONT_SET_USING_JUCE_NAMESPACE, in case there are conflicts.
  66. using namespace JUCE_NAMESPACE;
  67. /* On the Mac, these symbols are defined in the Mac libraries, so
  68. these macros make it easier to reference them without writing out
  69. the namespace every time.
  70. If you run into difficulties where these macros interfere with the contents
  71. of 3rd party header files, you may need to use the juce_WithoutMacros.h file - see
  72. the comments in that file for more information.
  73. */
  74. #if (JUCE_MAC || JUCE_IOS) && ! JUCE_DONT_DEFINE_MACROS
  75. #define Component JUCE_NAMESPACE::Component
  76. #define MemoryBlock JUCE_NAMESPACE::MemoryBlock
  77. #define Point JUCE_NAMESPACE::Point
  78. #define Button JUCE_NAMESPACE::Button
  79. #endif
  80. /* "Rectangle" is defined in some of the newer windows header files, so this makes
  81. it easier to use the juce version explicitly.
  82. If you run into difficulties where this macro interferes with other 3rd party header
  83. files, you may need to use the juce_WithoutMacros.h file - see the comments in that
  84. file for more information.
  85. */
  86. #if JUCE_WINDOWS && ! JUCE_DONT_DEFINE_MACROS
  87. #define Rectangle JUCE_NAMESPACE::Rectangle
  88. #endif
  89. #endif
  90. #endif
  91. //==============================================================================
  92. /* Easy autolinking to the right JUCE libraries under win32.
  93. Note that this can be disabled by defining DONT_AUTOLINK_TO_JUCE_LIBRARY before
  94. including this header file.
  95. */
  96. #if JUCE_MSVC
  97. #ifndef DONT_AUTOLINK_TO_JUCE_LIBRARY
  98. /** If you want your application to link to Juce as a DLL instead of
  99. a static library (on win32), just define the JUCE_DLL macro before
  100. including juce.h
  101. */
  102. #ifdef JUCE_DLL
  103. #if JUCE_DEBUG
  104. #define AUTOLINKEDLIB "JUCE_debug.lib"
  105. #else
  106. #define AUTOLINKEDLIB "JUCE.lib"
  107. #endif
  108. #else
  109. #if JUCE_DEBUG
  110. #ifdef _WIN64
  111. #define AUTOLINKEDLIB "jucelib_static_x64_debug.lib"
  112. #else
  113. #define AUTOLINKEDLIB "jucelib_static_Win32_debug.lib"
  114. #endif
  115. #else
  116. #ifdef _WIN64
  117. #define AUTOLINKEDLIB "jucelib_static_x64.lib"
  118. #else
  119. #define AUTOLINKEDLIB "jucelib_static_Win32.lib"
  120. #endif
  121. #endif
  122. #endif
  123. #pragma comment(lib, AUTOLINKEDLIB)
  124. #if ! DONT_LIST_JUCE_AUTOLINKEDLIBS
  125. #pragma message("JUCE! Library to link to: " AUTOLINKEDLIB)
  126. #endif
  127. // Auto-link the other win32 libs that are needed by library calls..
  128. #if ! (defined (DONT_AUTOLINK_TO_WIN32_LIBRARIES) || defined (JUCE_DLL))
  129. #include "src/native/windows/juce_win32_AutoLinkLibraries.h"
  130. #endif
  131. #endif
  132. #endif
  133. #endif // __JUCE_JUCEHEADER__