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.

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