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.

212 lines
6.0KB

  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_BASICNATIVEHEADERS_JUCEHEADER__
  19. #define __JUCE_BASICNATIVEHEADERS_JUCEHEADER__
  20. #include "../system/juce_TargetPlatform.h"
  21. #undef T
  22. //==============================================================================
  23. #if JUCE_MAC || JUCE_IOS
  24. #if JUCE_IOS
  25. #import <Foundation/Foundation.h>
  26. #import <UIKit/UIKit.h>
  27. #import <CoreData/CoreData.h>
  28. #import <MobileCoreServices/MobileCoreServices.h>
  29. #include <sys/fcntl.h>
  30. #else
  31. #define Point CarbonDummyPointName
  32. #define Component CarbonDummyCompName
  33. #import <Cocoa/Cocoa.h>
  34. #import <CoreAudio/HostTime.h>
  35. #undef Point
  36. #undef Component
  37. #include <sys/dir.h>
  38. #endif
  39. #include <sys/socket.h>
  40. #include <sys/sysctl.h>
  41. #include <sys/stat.h>
  42. #include <sys/param.h>
  43. #include <sys/mount.h>
  44. #include <sys/utsname.h>
  45. #include <sys/mman.h>
  46. #include <fnmatch.h>
  47. #include <utime.h>
  48. #include <dlfcn.h>
  49. #include <ifaddrs.h>
  50. #include <net/if_dl.h>
  51. #include <mach/mach_time.h>
  52. #include <mach-o/dyld.h>
  53. //==============================================================================
  54. #elif JUCE_WINDOWS
  55. #if JUCE_MSVC
  56. #ifndef _CPPRTTI
  57. #error "You're compiling without RTTI enabled! This is needed for a lot of JUCE classes, please update your compiler settings!"
  58. #endif
  59. #ifndef _CPPUNWIND
  60. #error "You're compiling without exceptions enabled! This is needed for a lot of JUCE classes, please update your compiler settings!"
  61. #endif
  62. #pragma warning (push)
  63. #pragma warning (disable : 4100 4201 4514 4312 4995)
  64. #endif
  65. #define STRICT 1
  66. #define WIN32_LEAN_AND_MEAN 1
  67. #define _WIN32_WINNT 0x0500
  68. #define _UNICODE 1
  69. #define UNICODE 1
  70. #ifndef _WIN32_IE
  71. #define _WIN32_IE 0x0400
  72. #endif
  73. #include <windows.h>
  74. #include <shellapi.h>
  75. #include <tchar.h>
  76. #include <stddef.h>
  77. #include <ctime>
  78. #include <wininet.h>
  79. #include <nb30.h>
  80. #include <iphlpapi.h>
  81. #include <mapi.h>
  82. #include <float.h>
  83. #include <process.h>
  84. #include <shlobj.h>
  85. #include <shlwapi.h>
  86. #include <mmsystem.h>
  87. #if ! JUCE_MINGW
  88. #include <crtdbg.h>
  89. #include <comutil.h>
  90. #endif
  91. #undef PACKED
  92. #if JUCE_MSVC
  93. #pragma warning (pop)
  94. #pragma warning (4: 4511 4512 4100 /*4365*/) // (enable some warnings that are turned off in VC8)
  95. #endif
  96. #if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  97. #pragma comment (lib, "kernel32.lib")
  98. #pragma comment (lib, "user32.lib")
  99. #pragma comment (lib, "shell32.lib")
  100. #pragma comment (lib, "wininet.lib")
  101. #pragma comment (lib, "advapi32.lib")
  102. #pragma comment (lib, "ws2_32.lib")
  103. #pragma comment (lib, "version.lib")
  104. #pragma comment (lib, "shlwapi.lib")
  105. #pragma comment (lib, "winmm.lib")
  106. #ifdef _NATIVE_WCHAR_T_DEFINED
  107. #ifdef _DEBUG
  108. #pragma comment (lib, "comsuppwd.lib")
  109. #else
  110. #pragma comment (lib, "comsuppw.lib")
  111. #endif
  112. #else
  113. #ifdef _DEBUG
  114. #pragma comment (lib, "comsuppd.lib")
  115. #else
  116. #pragma comment (lib, "comsupp.lib")
  117. #endif
  118. #endif
  119. #endif
  120. /* Used with DynamicLibrary to simplify importing functions
  121. functionName: function to import
  122. localFunctionName: name you want to use to actually call it (must be different)
  123. returnType: the return type
  124. object: the DynamicLibrary to use
  125. params: list of params (bracketed)
  126. */
  127. #define JUCE_DLL_FUNCTION(functionName, localFunctionName, returnType, object, params) \
  128. typedef returnType (WINAPI *type##localFunctionName) params; \
  129. type##localFunctionName localFunctionName = (type##localFunctionName)object.getFunction (#functionName);
  130. //==============================================================================
  131. #elif JUCE_LINUX
  132. #include <sched.h>
  133. #include <pthread.h>
  134. #include <sys/time.h>
  135. #include <errno.h>
  136. #include <sys/stat.h>
  137. #include <sys/dir.h>
  138. #include <sys/ptrace.h>
  139. #include <sys/vfs.h>
  140. #include <sys/wait.h>
  141. #include <sys/mman.h>
  142. #include <fnmatch.h>
  143. #include <utime.h>
  144. #include <pwd.h>
  145. #include <fcntl.h>
  146. #include <dlfcn.h>
  147. #include <netdb.h>
  148. #include <arpa/inet.h>
  149. #include <netinet/in.h>
  150. #include <sys/types.h>
  151. #include <sys/ioctl.h>
  152. #include <sys/socket.h>
  153. #include <net/if.h>
  154. #include <sys/sysinfo.h>
  155. #include <sys/file.h>
  156. #include <sys/prctl.h>
  157. #include <signal.h>
  158. //==============================================================================
  159. #elif JUCE_ANDROID
  160. #include <jni.h>
  161. #include <pthread.h>
  162. #include <sched.h>
  163. #include <sys/time.h>
  164. #include <utime.h>
  165. #include <errno.h>
  166. #include <fcntl.h>
  167. #include <dlfcn.h>
  168. #include <sys/stat.h>
  169. #include <sys/statfs.h>
  170. #include <sys/ptrace.h>
  171. #include <sys/sysinfo.h>
  172. #include <sys/mman.h>
  173. #include <pwd.h>
  174. #include <dirent.h>
  175. #include <fnmatch.h>
  176. #include <sys/wait.h>
  177. #endif
  178. // Need to clear various moronic redefinitions made by system headers..
  179. #undef max
  180. #undef min
  181. #undef direct
  182. #undef check
  183. #endif // __JUCE_BASICNATIVEHEADERS_JUCEHEADER__