JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
juce_BasicNativeHeaders.h
Go to the documentation of this file.
1 /*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 The code included in this file is provided under the terms of the ISC license
11 http://www.isc.org/downloads/software-support-policy/isc-license. Permission
12 To use, copy, modify, and/or distribute this software for any purpose with or
13 without fee is hereby granted provided that the above copyright notice and
14 this permission notice appear in all copies.
15
16 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
17 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
18 DISCLAIMED.
19
20 ==============================================================================
21*/
22
23#pragma once
24
25#undef T
26
27//==============================================================================
28#if JUCE_MAC || JUCE_IOS
29
30 #if JUCE_IOS
31 #if JUCE_MODULE_AVAILABLE_juce_opengl
32 #define GLES_SILENCE_DEPRECATION 1
33 #endif
34
35 #define Component CarbonDummyCompName
36 #import <Foundation/Foundation.h>
37 #undef Component
38
39 #import <UIKit/UIKit.h>
40 #import <CoreData/CoreData.h>
41 #import <MobileCoreServices/MobileCoreServices.h>
42 #include <sys/fcntl.h>
43 #else
44 #if JUCE_MODULE_AVAILABLE_juce_opengl
45 #define GL_SILENCE_DEPRECATION 1
46 #endif
47
48 #import <Cocoa/Cocoa.h>
49 #import <CoreAudio/HostTime.h>
50 #include <sys/dir.h>
51 #endif
52
53 #include <sys/socket.h>
54 #include <sys/sysctl.h>
55 #include <sys/stat.h>
56 #include <sys/param.h>
57 #include <sys/mount.h>
58 #include <sys/utsname.h>
59 #include <sys/mman.h>
60 #include <fnmatch.h>
61 #include <utime.h>
62 #include <dlfcn.h>
63 #include <ifaddrs.h>
64 #include <net/if_dl.h>
65 #include <mach/mach_time.h>
66 #include <mach-o/dyld.h>
67 #include <objc/runtime.h>
68 #include <objc/objc.h>
69 #include <objc/message.h>
70 #include <poll.h>
71
72//==============================================================================
73#elif JUCE_WINDOWS
74 #if JUCE_MSVC
75 #ifndef _CPPRTTI
76 #error "You're compiling without RTTI enabled! This is needed for a lot of JUCE classes, please update your compiler settings!"
77 #endif
78
79 #ifndef _CPPUNWIND
80 #error "You're compiling without exceptions enabled! This is needed for a lot of JUCE classes, please update your compiler settings!"
81 #endif
82
83 #pragma warning (push, 0) // disable all warnings whilst including system headers
84 #endif
85
86 #define NOMINMAX
87
88 #define _WINSOCK_DEPRECATED_NO_WARNINGS 1
89 #define STRICT 1
90 #define WIN32_LEAN_AND_MEAN 1
91 #if JUCE_MINGW
92 #if ! defined (_WIN32_WINNT)
93 #define _WIN32_WINNT 0x0600
94 #endif
95 #else
96 #define _WIN32_WINNT 0x0602
97 #endif
98 #define _UNICODE 1
99 #define UNICODE 1
100 #ifndef _WIN32_IE
101 #define _WIN32_IE 0x0501
102 #endif
103
104 #include <windows.h>
105 #include <shellapi.h>
106 #include <tchar.h>
107 #include <stddef.h>
108 #include <ctime>
109 #include <wininet.h>
110 #include <nb30.h>
111 #include <winsock2.h>
112 #include <ws2tcpip.h>
113 #include <iphlpapi.h>
114 #include <accctrl.h>
115 #include <aclapi.h>
116 #include <mapi.h>
117 #include <float.h>
118 #include <process.h>
119 #include <shlobj.h>
120 #include <shlwapi.h>
121 #include <mmsystem.h>
122 #include <winioctl.h>
123
124 #if JUCE_MINGW
125 #include <basetyps.h>
126 #include <sys/time.h>
127 #ifndef alloca
128 #define alloca __builtin_alloca
129 #endif
130 #else
131 #include <crtdbg.h>
132 #include <comutil.h>
133 #endif
134
135 #ifndef S_FALSE
136 #define S_FALSE (1) // (apparently some obscure win32 dev environments don't define this)
137 #endif
138
139 #undef PACKED
140
141 #if JUCE_MSVC
142 #pragma warning (pop)
143 #pragma warning (4: 4511 4512 4100)
144 #endif
145
146 #if ! JUCE_MINGW && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
147 #pragma comment (lib, "kernel32.lib")
148 #pragma comment (lib, "user32.lib")
149 #pragma comment (lib, "wininet.lib")
150 #pragma comment (lib, "advapi32.lib")
151 #pragma comment (lib, "ws2_32.lib")
152 #pragma comment (lib, "version.lib")
153 #pragma comment (lib, "shlwapi.lib")
154 #pragma comment (lib, "winmm.lib")
155
156 #ifdef _NATIVE_WCHAR_T_DEFINED
157 #ifdef _DEBUG
158 #pragma comment (lib, "comsuppwd.lib")
159 #else
160 #pragma comment (lib, "comsuppw.lib")
161 #endif
162 #else
163 #ifdef _DEBUG
164 #pragma comment (lib, "comsuppd.lib")
165 #else
166 #pragma comment (lib, "comsupp.lib")
167 #endif
168 #endif
169 #endif
170
171 /* Used with DynamicLibrary to simplify importing functions from a win32 DLL.
172
173 dll: the DynamicLibrary object
174 functionName: function to import
175 localFunctionName: name you want to use to actually call it (must be different)
176 returnType: the return type
177 params: list of params (bracketed)
178 */
179 #define JUCE_LOAD_WINAPI_FUNCTION(dll, functionName, localFunctionName, returnType, params) \
180 typedef returnType (WINAPI *type##localFunctionName) params; \
181 type##localFunctionName localFunctionName = (type##localFunctionName) dll.getFunction (#functionName);
182
183//==============================================================================
184#elif JUCE_LINUX
185 #include <arpa/inet.h>
186 #include <dlfcn.h>
187 #include <errno.h>
188 #include <fcntl.h>
189 #include <fnmatch.h>
190 #include <net/if.h>
191 #include <netdb.h>
192 #include <netinet/in.h>
193 #include <pthread.h>
194 #include <pwd.h>
195 #include <sched.h>
196 #include <signal.h>
197 #include <stddef.h>
198 #include <sys/dir.h>
199 #include <sys/file.h>
200 #include <sys/ioctl.h>
201 #include <sys/mman.h>
202 #include <sys/prctl.h>
203 #include <sys/ptrace.h>
204 #include <sys/socket.h>
205 #include <sys/stat.h>
206 #include <sys/syscall.h>
207 #include <sys/sysinfo.h>
208 #include <sys/time.h>
209 #include <sys/types.h>
210 #include <sys/vfs.h>
211 #include <sys/wait.h>
212 #include <sys/timerfd.h>
213 #include <sys/eventfd.h>
214 #include <utime.h>
215 #include <poll.h>
216
217//==============================================================================
218#elif JUCE_BSD
219 #include <arpa/inet.h>
220 #include <dirent.h>
221 #include <dlfcn.h>
222 #include <errno.h>
223 #include <fcntl.h>
224 #include <fnmatch.h>
225 #include <ifaddrs.h>
226 #include <langinfo.h>
227 #include <net/if.h>
228 #include <net/if_dl.h>
229 #include <netdb.h>
230 #include <netinet/in.h>
231 #include <pthread.h>
232 #include <pwd.h>
233 #include <sched.h>
234 #include <signal.h>
235 #include <stddef.h>
236 #include <sys/file.h>
237 #include <sys/ioctl.h>
238 #include <sys/mman.h>
239 #include <sys/mount.h>
240 #include <sys/ptrace.h>
241 #include <sys/socket.h>
242 #include <sys/stat.h>
243 #include <sys/sysctl.h>
244 #include <sys/time.h>
245 #include <sys/types.h>
246 #include <sys/user.h>
247 #include <sys/wait.h>
248 #include <utime.h>
249 #include <poll.h>
250
251//==============================================================================
252#elif JUCE_ANDROID
253 #include <jni.h>
254 #include <pthread.h>
255 #include <sched.h>
256 #include <sys/time.h>
257 #include <utime.h>
258 #include <errno.h>
259 #include <fcntl.h>
260 #include <dlfcn.h>
261 #include <sys/stat.h>
262 #include <sys/statfs.h>
263 #include <sys/ptrace.h>
264 #include <sys/sysinfo.h>
265 #include <sys/mman.h>
266 #include <pwd.h>
267 #include <dirent.h>
268 #include <fnmatch.h>
269 #include <sys/wait.h>
270 #include <sys/timerfd.h>
271 #include <sys/eventfd.h>
272 #include <android/api-level.h>
273 #include <poll.h>
274
275 // If you are getting include errors here, then you need to re-build
276 // the Projucer and re-save your .jucer file.
277 #include <cpu-features.h>
278#endif
279
280// Need to clear various moronic redefinitions made by system headers..
281#undef max
282#undef min
283#undef direct
284#undef check