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.

228 lines
6.5KB

  1. /*
  2. ==============================================================================
  3. This file is part of the juce_core module of the JUCE library.
  4. Copyright (c) 2015 - ROLI Ltd.
  5. Permission to use, copy, modify, and/or distribute this software for any purpose with
  6. or without fee is hereby granted, provided that the above copyright notice and this
  7. permission notice appear in all copies.
  8. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
  9. TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
  10. NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  11. DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
  12. IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  13. CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14. ------------------------------------------------------------------------------
  15. NOTE! This permissive ISC license applies ONLY to files within the juce_core module!
  16. All other JUCE modules are covered by a dual GPL/commercial license, so if you are
  17. using any other modules, be sure to check that you also comply with their license.
  18. For more details, visit www.juce.com
  19. ==============================================================================
  20. */
  21. #ifndef JUCE_BASICNATIVEHEADERS_H_INCLUDED
  22. #define JUCE_BASICNATIVEHEADERS_H_INCLUDED
  23. #undef T
  24. //==============================================================================
  25. #if JUCE_MAC || JUCE_IOS
  26. #if JUCE_IOS
  27. #import <Foundation/Foundation.h>
  28. #import <UIKit/UIKit.h>
  29. #import <CoreData/CoreData.h>
  30. #import <MobileCoreServices/MobileCoreServices.h>
  31. #include <sys/fcntl.h>
  32. #else
  33. #import <Cocoa/Cocoa.h>
  34. #import <CoreAudio/HostTime.h>
  35. #include <sys/dir.h>
  36. #endif
  37. #include <sys/socket.h>
  38. #include <sys/sysctl.h>
  39. #include <sys/stat.h>
  40. #include <sys/param.h>
  41. #include <sys/mount.h>
  42. #include <sys/utsname.h>
  43. #include <sys/mman.h>
  44. #include <fnmatch.h>
  45. #include <utime.h>
  46. #include <dlfcn.h>
  47. #include <ifaddrs.h>
  48. #include <net/if_dl.h>
  49. #include <mach/mach_time.h>
  50. #include <mach-o/dyld.h>
  51. #include <objc/runtime.h>
  52. #include <objc/objc.h>
  53. #include <objc/message.h>
  54. //==============================================================================
  55. #elif JUCE_WINDOWS
  56. #if JUCE_MSVC
  57. #ifndef _CPPRTTI
  58. #error "You're compiling without RTTI enabled! This is needed for a lot of JUCE classes, please update your compiler settings!"
  59. #endif
  60. #ifndef _CPPUNWIND
  61. #error "You're compiling without exceptions enabled! This is needed for a lot of JUCE classes, please update your compiler settings!"
  62. #endif
  63. #pragma warning (push, 0) // disable all warnings whilst including system headers
  64. #endif
  65. #define NOMINMAX
  66. #define STRICT 1
  67. #define WIN32_LEAN_AND_MEAN 1
  68. #if JUCE_MINGW
  69. #define _WIN32_WINNT 0x0501
  70. #else
  71. #define _WIN32_WINNT 0x0602
  72. #endif
  73. #define _UNICODE 1
  74. #define UNICODE 1
  75. #ifndef _WIN32_IE
  76. #define _WIN32_IE 0x0500
  77. #endif
  78. #include <windows.h>
  79. #include <shellapi.h>
  80. #include <tchar.h>
  81. #include <stddef.h>
  82. #include <ctime>
  83. #include <wininet.h>
  84. #include <nb30.h>
  85. #include <iphlpapi.h>
  86. #include <mapi.h>
  87. #include <float.h>
  88. #include <process.h>
  89. #include <shlobj.h>
  90. #include <shlwapi.h>
  91. #include <mmsystem.h>
  92. #if JUCE_MINGW
  93. #include <basetyps.h>
  94. #include <sys/time.h>
  95. #ifndef alloca
  96. #define alloca __builtin_alloca
  97. #endif
  98. #else
  99. #include <crtdbg.h>
  100. #include <comutil.h>
  101. #endif
  102. #ifndef S_FALSE
  103. #define S_FALSE (1) // (apparently some obscure win32 dev environments don't define this)
  104. #endif
  105. #undef PACKED
  106. #if JUCE_MSVC
  107. #pragma warning (pop)
  108. #pragma warning (4: 4511 4512 4100 /*4365*/) // (enable some warnings that are turned off in VC8)
  109. #endif
  110. #if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  111. #pragma comment (lib, "kernel32.lib")
  112. #pragma comment (lib, "user32.lib")
  113. #pragma comment (lib, "wininet.lib")
  114. #pragma comment (lib, "advapi32.lib")
  115. #pragma comment (lib, "ws2_32.lib")
  116. #pragma comment (lib, "version.lib")
  117. #pragma comment (lib, "shlwapi.lib")
  118. #pragma comment (lib, "winmm.lib")
  119. #ifdef _NATIVE_WCHAR_T_DEFINED
  120. #ifdef _DEBUG
  121. #pragma comment (lib, "comsuppwd.lib")
  122. #else
  123. #pragma comment (lib, "comsuppw.lib")
  124. #endif
  125. #else
  126. #ifdef _DEBUG
  127. #pragma comment (lib, "comsuppd.lib")
  128. #else
  129. #pragma comment (lib, "comsupp.lib")
  130. #endif
  131. #endif
  132. #endif
  133. /* Used with DynamicLibrary to simplify importing functions from a win32 DLL.
  134. dll: the DynamicLibrary object
  135. functionName: function to import
  136. localFunctionName: name you want to use to actually call it (must be different)
  137. returnType: the return type
  138. params: list of params (bracketed)
  139. */
  140. #define JUCE_LOAD_WINAPI_FUNCTION(dll, functionName, localFunctionName, returnType, params) \
  141. typedef returnType (WINAPI *type##localFunctionName) params; \
  142. type##localFunctionName localFunctionName = (type##localFunctionName) dll.getFunction (#functionName);
  143. //==============================================================================
  144. #elif JUCE_LINUX
  145. #include <sched.h>
  146. #include <pthread.h>
  147. #include <sys/time.h>
  148. #include <errno.h>
  149. #include <sys/stat.h>
  150. #include <sys/dir.h>
  151. #include <sys/ptrace.h>
  152. #include <sys/vfs.h>
  153. #include <sys/wait.h>
  154. #include <sys/mman.h>
  155. #include <fnmatch.h>
  156. #include <utime.h>
  157. #include <pwd.h>
  158. #include <fcntl.h>
  159. #include <dlfcn.h>
  160. #include <netdb.h>
  161. #include <arpa/inet.h>
  162. #include <netinet/in.h>
  163. #include <sys/types.h>
  164. #include <sys/ioctl.h>
  165. #include <sys/socket.h>
  166. #include <net/if.h>
  167. #include <sys/sysinfo.h>
  168. #include <sys/file.h>
  169. #include <sys/prctl.h>
  170. #include <signal.h>
  171. #include <stddef.h>
  172. //==============================================================================
  173. #elif JUCE_ANDROID
  174. #include <jni.h>
  175. #include <pthread.h>
  176. #include <sched.h>
  177. #include <sys/time.h>
  178. #include <utime.h>
  179. #include <errno.h>
  180. #include <fcntl.h>
  181. #include <dlfcn.h>
  182. #include <sys/stat.h>
  183. #include <sys/statfs.h>
  184. #include <sys/ptrace.h>
  185. #include <sys/sysinfo.h>
  186. #include <sys/mman.h>
  187. #include <pwd.h>
  188. #include <dirent.h>
  189. #include <fnmatch.h>
  190. #include <sys/wait.h>
  191. #endif
  192. // Need to clear various moronic redefinitions made by system headers..
  193. #undef max
  194. #undef min
  195. #undef direct
  196. #undef check
  197. #endif // JUCE_BASICNATIVEHEADERS_H_INCLUDED