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.

222 lines
6.2KB

  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. #include <objc/runtime.h>
  54. #include <objc/objc.h>
  55. #include <objc/message.h>
  56. //==============================================================================
  57. #elif JUCE_WINDOWS
  58. #if JUCE_MSVC
  59. #ifndef _CPPRTTI
  60. #error "You're compiling without RTTI enabled! This is needed for a lot of JUCE classes, please update your compiler settings!"
  61. #endif
  62. #ifndef _CPPUNWIND
  63. #error "You're compiling without exceptions enabled! This is needed for a lot of JUCE classes, please update your compiler settings!"
  64. #endif
  65. #pragma warning (push)
  66. #pragma warning (disable : 4100 4201 4514 4312 4995)
  67. #endif
  68. #define STRICT 1
  69. #define WIN32_LEAN_AND_MEAN 1
  70. #if JUCE_MINGW
  71. #define _WIN32_WINNT 0x0501
  72. #else
  73. #define _WIN32_WINNT 0x0600
  74. #endif
  75. #define _UNICODE 1
  76. #define UNICODE 1
  77. #ifndef _WIN32_IE
  78. #define _WIN32_IE 0x0400
  79. #endif
  80. #include <windows.h>
  81. #include <shellapi.h>
  82. #include <tchar.h>
  83. #include <stddef.h>
  84. #include <ctime>
  85. #include <wininet.h>
  86. #include <nb30.h>
  87. #include <iphlpapi.h>
  88. #include <mapi.h>
  89. #include <float.h>
  90. #include <process.h>
  91. #include <shlobj.h>
  92. #include <shlwapi.h>
  93. #include <mmsystem.h>
  94. #if JUCE_MINGW
  95. #include <basetyps.h>
  96. #else
  97. #include <crtdbg.h>
  98. #include <comutil.h>
  99. #endif
  100. #undef PACKED
  101. #if JUCE_MSVC
  102. #pragma warning (pop)
  103. #pragma warning (4: 4511 4512 4100 /*4365*/) // (enable some warnings that are turned off in VC8)
  104. #endif
  105. #if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  106. #pragma comment (lib, "kernel32.lib")
  107. #pragma comment (lib, "user32.lib")
  108. #pragma comment (lib, "shell32.lib")
  109. #pragma comment (lib, "wininet.lib")
  110. #pragma comment (lib, "advapi32.lib")
  111. #pragma comment (lib, "ws2_32.lib")
  112. #pragma comment (lib, "version.lib")
  113. #pragma comment (lib, "shlwapi.lib")
  114. #pragma comment (lib, "winmm.lib")
  115. #ifdef _NATIVE_WCHAR_T_DEFINED
  116. #ifdef _DEBUG
  117. #pragma comment (lib, "comsuppwd.lib")
  118. #else
  119. #pragma comment (lib, "comsuppw.lib")
  120. #endif
  121. #else
  122. #ifdef _DEBUG
  123. #pragma comment (lib, "comsuppd.lib")
  124. #else
  125. #pragma comment (lib, "comsupp.lib")
  126. #endif
  127. #endif
  128. #endif
  129. /* Used with DynamicLibrary to simplify importing functions from a win32 DLL.
  130. dll: the DynamicLibrary object
  131. functionName: function to import
  132. localFunctionName: name you want to use to actually call it (must be different)
  133. returnType: the return type
  134. params: list of params (bracketed)
  135. */
  136. #define JUCE_LOAD_WINAPI_FUNCTION(dll, functionName, localFunctionName, returnType, params) \
  137. typedef returnType (WINAPI *type##localFunctionName) params; \
  138. type##localFunctionName localFunctionName = (type##localFunctionName) dll.getFunction (#functionName);
  139. //==============================================================================
  140. #elif JUCE_LINUX
  141. #include <sched.h>
  142. #include <pthread.h>
  143. #include <sys/time.h>
  144. #include <errno.h>
  145. #include <sys/stat.h>
  146. #include <sys/dir.h>
  147. #include <sys/ptrace.h>
  148. #include <sys/vfs.h>
  149. #include <sys/wait.h>
  150. #include <sys/mman.h>
  151. #include <fnmatch.h>
  152. #include <utime.h>
  153. #include <pwd.h>
  154. #include <fcntl.h>
  155. #include <dlfcn.h>
  156. #include <netdb.h>
  157. #include <arpa/inet.h>
  158. #include <netinet/in.h>
  159. #include <sys/types.h>
  160. #include <sys/ioctl.h>
  161. #include <sys/socket.h>
  162. #include <net/if.h>
  163. #include <sys/sysinfo.h>
  164. #include <sys/file.h>
  165. #include <sys/prctl.h>
  166. #include <signal.h>
  167. #include <stddef.h>
  168. //==============================================================================
  169. #elif JUCE_ANDROID
  170. #include <jni.h>
  171. #include <pthread.h>
  172. #include <sched.h>
  173. #include <sys/time.h>
  174. #include <utime.h>
  175. #include <errno.h>
  176. #include <fcntl.h>
  177. #include <dlfcn.h>
  178. #include <sys/stat.h>
  179. #include <sys/statfs.h>
  180. #include <sys/ptrace.h>
  181. #include <sys/sysinfo.h>
  182. #include <sys/mman.h>
  183. #include <pwd.h>
  184. #include <dirent.h>
  185. #include <fnmatch.h>
  186. #include <sys/wait.h>
  187. #endif
  188. // Need to clear various moronic redefinitions made by system headers..
  189. #undef max
  190. #undef min
  191. #undef direct
  192. #undef check
  193. #endif // __JUCE_BASICNATIVEHEADERS_JUCEHEADER__