diff options
Diffstat (limited to 'contrib/DirectX-Headers-1.618.2/include/wsl/stubs')
10 files changed, 644 insertions, 0 deletions
diff --git a/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/basetsd.h b/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/basetsd.h new file mode 100644 index 0000000..4c75ef2 --- /dev/null +++ b/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/basetsd.h | |||
| @@ -0,0 +1,406 @@ | |||
| 1 | // Copyright (c) Microsoft Corporation. | ||
| 2 | // Licensed under the MIT License. | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | // These #defines prevent the idl-generated headers from trying to include | ||
| 7 | // Windows.h from the SDK rather than this one. | ||
| 8 | #define RPC_NO_WINDOWS_H | ||
| 9 | #define COM_NO_WINDOWS_H | ||
| 10 | |||
| 11 | // Allcaps type definitions | ||
| 12 | #include <stddef.h> | ||
| 13 | #include <stdint.h> | ||
| 14 | #include <string.h> | ||
| 15 | #include <limits.h> | ||
| 16 | |||
| 17 | // Note: using fixed-width here to match Windows widths | ||
| 18 | // Specifically this is different for 'long' vs 'LONG' | ||
| 19 | typedef uint8_t UINT8; | ||
| 20 | typedef int8_t INT8; | ||
| 21 | typedef uint16_t UINT16; | ||
| 22 | typedef int16_t INT16; | ||
| 23 | typedef uint32_t UINT32, UINT, ULONG, DWORD, BOOL, WINBOOL; | ||
| 24 | typedef int32_t INT32, INT, LONG; | ||
| 25 | typedef uint64_t UINT64, ULONG_PTR; | ||
| 26 | typedef int64_t INT64, LONG_PTR; | ||
| 27 | typedef void VOID, *HANDLE, *RPC_IF_HANDLE, *LPVOID; | ||
| 28 | typedef const void *LPCVOID; | ||
| 29 | typedef size_t SIZE_T; | ||
| 30 | typedef float FLOAT; | ||
| 31 | typedef double DOUBLE; | ||
| 32 | typedef unsigned char BYTE; | ||
| 33 | typedef int HWND; | ||
| 34 | typedef int PALETTEENTRY; | ||
| 35 | typedef int HDC; | ||
| 36 | typedef uint16_t WORD; | ||
| 37 | typedef void* PVOID; | ||
| 38 | typedef char BOOLEAN; | ||
| 39 | typedef uint64_t ULONGLONG; | ||
| 40 | typedef uint16_t USHORT, *PUSHORT; | ||
| 41 | typedef int64_t LONGLONG, *PLONGLONG; | ||
| 42 | typedef int64_t LONG_PTR, *PLONG_PTR; | ||
| 43 | typedef int64_t LONG64, *PLONG64; | ||
| 44 | typedef uint64_t ULONG64, *PULONG64; | ||
| 45 | typedef wchar_t WCHAR, *PWSTR; | ||
| 46 | typedef uint8_t UCHAR, *PUCHAR; | ||
| 47 | typedef uint64_t ULONG_PTR, *PULONG_PTR; | ||
| 48 | typedef uint64_t UINT_PTR, *PUINT_PTR; | ||
| 49 | typedef int64_t INT_PTR, *PINT_PTR; | ||
| 50 | |||
| 51 | // Note: WCHAR is not the same between Windows and Linux, to enable | ||
| 52 | // string manipulation APIs to work with resulting strings. | ||
| 53 | // APIs to D3D/DXCore will work on Linux wchars, but beware with | ||
| 54 | // interactions directly with the Windows kernel. | ||
| 55 | typedef char CHAR, *PSTR, *LPSTR, TCHAR, *PTSTR; | ||
| 56 | typedef const char *LPCSTR, *PCSTR, *LPCTSTR, *PCTSTR; | ||
| 57 | typedef wchar_t WCHAR, *PWSTR, *LPWSTR, *PWCHAR; | ||
| 58 | typedef const wchar_t *LPCWSTR, *PCWSTR; | ||
| 59 | |||
| 60 | #undef LONG_MAX | ||
| 61 | #define LONG_MAX INT_MAX | ||
| 62 | #undef ULONG_MAX | ||
| 63 | #define ULONG_MAX UINT_MAX | ||
| 64 | |||
| 65 | // Misc defines | ||
| 66 | #define MIDL_INTERFACE(x) interface | ||
| 67 | #define __analysis_assume(x) | ||
| 68 | #define TRUE 1u | ||
| 69 | #define FALSE 0u | ||
| 70 | #define DECLSPEC_UUID(x) | ||
| 71 | #define DECLSPEC_NOVTABLE | ||
| 72 | #define DECLSPEC_SELECTANY | ||
| 73 | #ifdef __cplusplus | ||
| 74 | #define EXTERN_C extern "C" | ||
| 75 | #else | ||
| 76 | #define EXTERN_C extern | ||
| 77 | #endif | ||
| 78 | #define APIENTRY | ||
| 79 | #define OUT | ||
| 80 | #define IN | ||
| 81 | #define CONST const | ||
| 82 | #define MAX_PATH 260 | ||
| 83 | #define GENERIC_ALL 0x10000000L | ||
| 84 | #define C_ASSERT(expr) static_assert((expr)) | ||
| 85 | #define _countof(a) (sizeof(a) / sizeof(*(a))) | ||
| 86 | |||
| 87 | typedef struct tagRECTL | ||
| 88 | { | ||
| 89 | LONG left; | ||
| 90 | LONG top; | ||
| 91 | LONG right; | ||
| 92 | LONG bottom; | ||
| 93 | } RECTL; | ||
| 94 | |||
| 95 | typedef struct tagPOINT | ||
| 96 | { | ||
| 97 | int x; | ||
| 98 | int y; | ||
| 99 | } POINT; | ||
| 100 | |||
| 101 | typedef struct _GUID { | ||
| 102 | uint32_t Data1; | ||
| 103 | uint16_t Data2; | ||
| 104 | uint16_t Data3; | ||
| 105 | uint8_t Data4[ 8 ]; | ||
| 106 | } GUID; | ||
| 107 | |||
| 108 | #ifdef INITGUID | ||
| 109 | #ifdef __cplusplus | ||
| 110 | #define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) EXTERN_C const GUID DECLSPEC_SELECTANY name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } | ||
| 111 | #else | ||
| 112 | #define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID DECLSPEC_SELECTANY name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } | ||
| 113 | #endif | ||
| 114 | #else | ||
| 115 | #define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) EXTERN_C const GUID name | ||
| 116 | #endif | ||
| 117 | |||
| 118 | typedef GUID IID; | ||
| 119 | typedef GUID UUID; | ||
| 120 | typedef GUID CLSID; | ||
| 121 | #ifdef __cplusplus | ||
| 122 | #define REFGUID const GUID & | ||
| 123 | #define REFIID const IID & | ||
| 124 | #define REFCLSID const IID & | ||
| 125 | |||
| 126 | __inline int InlineIsEqualGUID(REFGUID rguid1, REFGUID rguid2) | ||
| 127 | { | ||
| 128 | return ( | ||
| 129 | ((uint32_t *)&rguid1)[0] == ((uint32_t *)&rguid2)[0] && | ||
| 130 | ((uint32_t *)&rguid1)[1] == ((uint32_t *)&rguid2)[1] && | ||
| 131 | ((uint32_t *)&rguid1)[2] == ((uint32_t *)&rguid2)[2] && | ||
| 132 | ((uint32_t *)&rguid1)[3] == ((uint32_t *)&rguid2)[3]); | ||
| 133 | } | ||
| 134 | |||
| 135 | inline bool operator==(REFGUID guidOne, REFGUID guidOther) | ||
| 136 | { | ||
| 137 | return !!InlineIsEqualGUID(guidOne, guidOther); | ||
| 138 | } | ||
| 139 | |||
| 140 | inline bool operator!=(REFGUID guidOne, REFGUID guidOther) | ||
| 141 | { | ||
| 142 | return !(guidOne == guidOther); | ||
| 143 | } | ||
| 144 | |||
| 145 | #else | ||
| 146 | #define REFGUID const GUID * | ||
| 147 | #define REFIID const IID * | ||
| 148 | #define REFCLSID const IID * | ||
| 149 | #endif | ||
| 150 | |||
| 151 | // SAL annotations | ||
| 152 | #define _In_ | ||
| 153 | #define _In_z_ | ||
| 154 | #define _In_opt_ | ||
| 155 | #define _In_opt_z_ | ||
| 156 | #define _In_reads_(x) | ||
| 157 | #define _In_reads_opt_(x) | ||
| 158 | #define _In_reads_bytes_(x) | ||
| 159 | #define _In_reads_bytes_opt_(x) | ||
| 160 | #define _In_range_(x, y) | ||
| 161 | #define _In_bytecount_(x) | ||
| 162 | #define _Out_ | ||
| 163 | #define _Out_opt_ | ||
| 164 | #define _Outptr_ | ||
| 165 | #define _Outptr_opt_result_z_ | ||
| 166 | #define _Outptr_opt_result_bytebuffer_(x) | ||
| 167 | #define _COM_Outptr_ | ||
| 168 | #define _COM_Outptr_result_maybenull_ | ||
| 169 | #define _COM_Outptr_opt_ | ||
| 170 | #define _COM_Outptr_opt_result_maybenull_ | ||
| 171 | #define _Out_writes_(x) | ||
| 172 | #define _Out_writes_z_(x) | ||
| 173 | #define _Out_writes_opt_(x) | ||
| 174 | #define _Out_writes_all_(x) | ||
| 175 | #define _Out_writes_all_opt_(x) | ||
| 176 | #define _Out_writes_to_opt_(x, y) | ||
| 177 | #define _Out_writes_bytes_(x) | ||
| 178 | #define _Out_writes_bytes_all_(x) | ||
| 179 | #define _Out_writes_bytes_all_opt_(x) | ||
| 180 | #define _Out_writes_bytes_opt_(x) | ||
| 181 | #define _Inout_ | ||
| 182 | #define _Inout_opt_ | ||
| 183 | #define _Inout_updates_(x) | ||
| 184 | #define _Inout_updates_bytes_(x) | ||
| 185 | #define _Field_size_(x) | ||
| 186 | #define _Field_size_opt_(x) | ||
| 187 | #define _Field_size_bytes_(x) | ||
| 188 | #define _Field_size_full_(x) | ||
| 189 | #define _Field_size_full_opt_(x) | ||
| 190 | #define _Field_size_bytes_full_(x) | ||
| 191 | #define _Field_size_bytes_full_opt_(x) | ||
| 192 | #define _Field_size_bytes_part_(x, y) | ||
| 193 | #define _Field_range_(x, y) | ||
| 194 | #define _Field_z_ | ||
| 195 | #define _Check_return_ | ||
| 196 | #define _IRQL_requires_(x) | ||
| 197 | #define _IRQL_requires_min_(x) | ||
| 198 | #define _IRQL_requires_max_(x) | ||
| 199 | #define _At_(x, y) | ||
| 200 | #define _Always_(x) | ||
| 201 | #define _Return_type_success_(x) | ||
| 202 | #define _Translates_Win32_to_HRESULT_(x) | ||
| 203 | #define _Maybenull_ | ||
| 204 | #define _Outptr_result_maybenull_ | ||
| 205 | #define _Outptr_result_nullonfailure_ | ||
| 206 | #define _Analysis_assume_(x) | ||
| 207 | #define _Success_(x) | ||
| 208 | #define _In_count_(x) | ||
| 209 | #define _In_opt_count_(x) | ||
| 210 | #define _Use_decl_annotations_ | ||
| 211 | #define _Null_terminated_ | ||
| 212 | |||
| 213 | // Calling conventions | ||
| 214 | #define __cdecl | ||
| 215 | #define __stdcall | ||
| 216 | #define STDMETHODCALLTYPE | ||
| 217 | #define STDAPICALLTYPE | ||
| 218 | #define STDAPI EXTERN_C HRESULT STDAPICALLTYPE | ||
| 219 | #define WINAPI | ||
| 220 | |||
| 221 | #define interface struct | ||
| 222 | #if defined (__cplusplus) && !defined (CINTERFACE) | ||
| 223 | #define STDMETHOD(method) virtual HRESULT STDMETHODCALLTYPE method | ||
| 224 | #define STDMETHOD_(type, method) virtual type STDMETHODCALLTYPE method | ||
| 225 | #define PURE = 0 | ||
| 226 | #define THIS_ | ||
| 227 | #define THIS void | ||
| 228 | #define DECLARE_INTERFACE(iface) interface DECLSPEC_NOVTABLE iface | ||
| 229 | #define DECLARE_INTERFACE_(iface, baseiface) interface DECLSPEC_NOVTABLE iface : public baseiface | ||
| 230 | |||
| 231 | interface IUnknown; | ||
| 232 | extern "C++" | ||
| 233 | { | ||
| 234 | template<typename T> void** IID_PPV_ARGS_Helper(T** pp) | ||
| 235 | { | ||
| 236 | (void)static_cast<IUnknown*>(*pp); | ||
| 237 | return reinterpret_cast<void**>(pp); | ||
| 238 | } | ||
| 239 | } | ||
| 240 | #define IID_PPV_ARGS(ppType) __uuidof (**(ppType)), IID_PPV_ARGS_Helper (ppType) | ||
| 241 | #else | ||
| 242 | #define STDMETHOD(method) HRESULT (STDMETHODCALLTYPE *method) | ||
| 243 | #define STDMETHOD_(type, method) type (STDMETHODCALLTYPE *method) | ||
| 244 | #define PURE | ||
| 245 | #define THIS_ INTERFACE *This, | ||
| 246 | #define THIS INTERFACE *This | ||
| 247 | #ifdef CONST_VTABLE | ||
| 248 | #define DECLARE_INTERFACE(iface) typedef interface iface { const struct iface##Vtbl *lpVtbl; } iface; typedef const struct iface##Vtbl iface##Vtbl; const struct iface##Vtbl | ||
| 249 | #else | ||
| 250 | #define DECLARE_INTERFACE(iface) typedef interface iface { struct iface##Vtbl *lpVtbl; } iface; typedef struct iface##Vtbl iface##Vtbl; struct iface##Vtbl | ||
| 251 | #endif | ||
| 252 | #define DECLARE_INTERFACE_(iface, baseiface) DECLARE_INTERFACE (iface) | ||
| 253 | #endif | ||
| 254 | |||
| 255 | #define IFACEMETHOD(method) /*override*/ STDMETHOD (method) | ||
| 256 | #define IFACEMETHOD_(type, method) /*override*/ STDMETHOD_(type, method) | ||
| 257 | #ifndef BEGIN_INTERFACE | ||
| 258 | #define BEGIN_INTERFACE | ||
| 259 | #define END_INTERFACE | ||
| 260 | #endif | ||
| 261 | |||
| 262 | // Error codes | ||
| 263 | typedef LONG HRESULT; | ||
| 264 | #define SUCCEEDED(hr) (((HRESULT)(hr)) >= 0) | ||
| 265 | #define FAILED(hr) (((HRESULT)(hr)) < 0) | ||
| 266 | #define S_OK ((HRESULT)0L) | ||
| 267 | #define S_FALSE ((HRESULT)1L) | ||
| 268 | #define E_NOTIMPL ((HRESULT)0x80004001L) | ||
| 269 | #define E_OUTOFMEMORY ((HRESULT)0x8007000EL) | ||
| 270 | #define E_INVALIDARG ((HRESULT)0x80070057L) | ||
| 271 | #define E_NOINTERFACE ((HRESULT)0x80004002L) | ||
| 272 | #define E_POINTER ((HRESULT)0x80004003L) | ||
| 273 | #define E_HANDLE ((HRESULT)0x80070006L) | ||
| 274 | #define E_ABORT ((HRESULT)0x80004004L) | ||
| 275 | #define E_FAIL ((HRESULT)0x80004005L) | ||
| 276 | #define E_ACCESSDENIED ((HRESULT)0x80070005L) | ||
| 277 | #define E_UNEXPECTED ((HRESULT)0x8000FFFFL) | ||
| 278 | #define DXGI_ERROR_INVALID_CALL ((HRESULT)0x887A0001L) | ||
| 279 | #define DXGI_ERROR_NOT_FOUND ((HRESULT)0x887A0002L) | ||
| 280 | #define DXGI_ERROR_MORE_DATA ((HRESULT)0x887A0003L) | ||
| 281 | #define DXGI_ERROR_UNSUPPORTED ((HRESULT)0x887A0004L) | ||
| 282 | #define DXGI_ERROR_DEVICE_REMOVED ((HRESULT)0x887A0005L) | ||
| 283 | #define DXGI_ERROR_DEVICE_HUNG ((HRESULT)0x887A0006L) | ||
| 284 | #define DXGI_ERROR_DEVICE_RESET ((HRESULT)0x887A0007L) | ||
| 285 | #define DXGI_ERROR_DRIVER_INTERNAL_ERROR ((HRESULT)0x887A0020L) | ||
| 286 | #define DXGI_ERROR_SDK_COMPONENT_MISSING ((HRESULT)0x887A002DL) | ||
| 287 | |||
| 288 | typedef struct _LUID | ||
| 289 | { | ||
| 290 | ULONG LowPart; | ||
| 291 | LONG HighPart; | ||
| 292 | } LUID; | ||
| 293 | |||
| 294 | typedef struct _RECT | ||
| 295 | { | ||
| 296 | int left; | ||
| 297 | int top; | ||
| 298 | int right; | ||
| 299 | int bottom; | ||
| 300 | } RECT; | ||
| 301 | |||
| 302 | typedef union _LARGE_INTEGER { | ||
| 303 | struct { | ||
| 304 | uint32_t LowPart; | ||
| 305 | uint32_t HighPart; | ||
| 306 | } u; | ||
| 307 | int64_t QuadPart; | ||
| 308 | } LARGE_INTEGER; | ||
| 309 | typedef LARGE_INTEGER *PLARGE_INTEGER; | ||
| 310 | |||
| 311 | typedef union _ULARGE_INTEGER { | ||
| 312 | struct { | ||
| 313 | uint32_t LowPart; | ||
| 314 | uint32_t HighPart; | ||
| 315 | } u; | ||
| 316 | uint64_t QuadPart; | ||
| 317 | } ULARGE_INTEGER; | ||
| 318 | typedef ULARGE_INTEGER *PULARGE_INTEGER; | ||
| 319 | |||
| 320 | #define DECLARE_HANDLE(name) \ | ||
| 321 | struct name##__ { \ | ||
| 322 | int unused; \ | ||
| 323 | }; \ | ||
| 324 | typedef struct name##__ *name | ||
| 325 | |||
| 326 | typedef struct _SECURITY_ATTRIBUTES { | ||
| 327 | DWORD nLength; | ||
| 328 | LPVOID lpSecurityDescriptor; | ||
| 329 | WINBOOL bInheritHandle; | ||
| 330 | } SECURITY_ATTRIBUTES; | ||
| 331 | |||
| 332 | struct STATSTG; | ||
| 333 | |||
| 334 | #ifdef __cplusplus | ||
| 335 | // ENUM_FLAG_OPERATORS | ||
| 336 | // Define operator overloads to enable bit operations on enum values that are | ||
| 337 | // used to define flags. Use DEFINE_ENUM_FLAG_OPERATORS(YOUR_TYPE) to enable these | ||
| 338 | // operators on YOUR_TYPE. | ||
| 339 | extern "C++" { | ||
| 340 | template <size_t S> | ||
| 341 | struct _ENUM_FLAG_INTEGER_FOR_SIZE; | ||
| 342 | |||
| 343 | template <> | ||
| 344 | struct _ENUM_FLAG_INTEGER_FOR_SIZE<1> | ||
| 345 | { | ||
| 346 | typedef int8_t type; | ||
| 347 | }; | ||
| 348 | |||
| 349 | template <> | ||
| 350 | struct _ENUM_FLAG_INTEGER_FOR_SIZE<2> | ||
| 351 | { | ||
| 352 | typedef int16_t type; | ||
| 353 | }; | ||
| 354 | |||
| 355 | template <> | ||
| 356 | struct _ENUM_FLAG_INTEGER_FOR_SIZE<4> | ||
| 357 | { | ||
| 358 | typedef int32_t type; | ||
| 359 | }; | ||
| 360 | |||
| 361 | template <> | ||
| 362 | struct _ENUM_FLAG_INTEGER_FOR_SIZE<8> | ||
| 363 | { | ||
| 364 | typedef int64_t type; | ||
| 365 | }; | ||
| 366 | |||
| 367 | // used as an approximation of std::underlying_type<T> | ||
| 368 | template <class T> | ||
| 369 | struct _ENUM_FLAG_SIZED_INTEGER | ||
| 370 | { | ||
| 371 | typedef typename _ENUM_FLAG_INTEGER_FOR_SIZE<sizeof(T)>::type type; | ||
| 372 | }; | ||
| 373 | |||
| 374 | } | ||
| 375 | #define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) \ | ||
| 376 | extern "C++" { \ | ||
| 377 | inline constexpr ENUMTYPE operator | (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type)a) | ((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type)b)); } \ | ||
| 378 | inline ENUMTYPE &operator |= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type &)a) |= ((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type)b)); } \ | ||
| 379 | inline constexpr ENUMTYPE operator & (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type)a) & ((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type)b)); } \ | ||
| 380 | inline ENUMTYPE &operator &= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type &)a) &= ((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type)b)); } \ | ||
| 381 | inline constexpr ENUMTYPE operator ~ (ENUMTYPE a) { return ENUMTYPE(~((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type)a)); } \ | ||
| 382 | inline constexpr ENUMTYPE operator ^ (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type)a) ^ ((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type)b)); } \ | ||
| 383 | inline ENUMTYPE &operator ^= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type &)a) ^= ((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type)b)); } \ | ||
| 384 | } | ||
| 385 | #else | ||
| 386 | #define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) /* */ | ||
| 387 | #endif | ||
| 388 | |||
| 389 | // D3DX12 uses these | ||
| 390 | #include <stdlib.h> | ||
| 391 | #define HeapAlloc(heap, flags, size) malloc(size) | ||
| 392 | #define HeapFree(heap, flags, ptr) free(ptr) | ||
| 393 | |||
| 394 | #if defined(lint) | ||
| 395 | // Note: lint -e530 says don't complain about uninitialized variables for | ||
| 396 | // this variable. Error 527 has to do with unreachable code. | ||
| 397 | // -restore restores checking to the -save state | ||
| 398 | #define UNREFERENCED_PARAMETER(P) \ | ||
| 399 | /*lint -save -e527 -e530 */ \ | ||
| 400 | { \ | ||
| 401 | (P) = (P); \ | ||
| 402 | } \ | ||
| 403 | /*lint -restore */ | ||
| 404 | #else | ||
| 405 | #define UNREFERENCED_PARAMETER(P) (P) | ||
| 406 | #endif | ||
diff --git a/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/oaidl.h b/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/oaidl.h new file mode 100644 index 0000000..76f5b5f --- /dev/null +++ b/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/oaidl.h | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | // Copyright (c) Microsoft Corporation. | ||
| 2 | // Licensed under the MIT License. | ||
| 3 | |||
| 4 | // Stub header to satisfy d3d12.h include | ||
| 5 | #pragma once \ No newline at end of file | ||
diff --git a/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/ocidl.h b/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/ocidl.h new file mode 100644 index 0000000..76f5b5f --- /dev/null +++ b/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/ocidl.h | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | // Copyright (c) Microsoft Corporation. | ||
| 2 | // Licensed under the MIT License. | ||
| 3 | |||
| 4 | // Stub header to satisfy d3d12.h include | ||
| 5 | #pragma once \ No newline at end of file | ||
diff --git a/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/rpc.h b/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/rpc.h new file mode 100644 index 0000000..76f5b5f --- /dev/null +++ b/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/rpc.h | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | // Copyright (c) Microsoft Corporation. | ||
| 2 | // Licensed under the MIT License. | ||
| 3 | |||
| 4 | // Stub header to satisfy d3d12.h include | ||
| 5 | #pragma once \ No newline at end of file | ||
diff --git a/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/rpcndr.h b/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/rpcndr.h new file mode 100644 index 0000000..68aa390 --- /dev/null +++ b/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/rpcndr.h | |||
| @@ -0,0 +1,78 @@ | |||
| 1 | // Copyright (c) Microsoft Corporation. | ||
| 2 | // Licensed under the MIT License. | ||
| 3 | |||
| 4 | // Stub header to satisfy d3d12.h include | ||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "basetsd.h" | ||
| 8 | |||
| 9 | #define __RPCNDR_H_VERSION__ | ||
| 10 | |||
| 11 | #ifdef CONST_VTABLE | ||
| 12 | #define CONST_VTBL const | ||
| 13 | #else | ||
| 14 | #define CONST_VTBL | ||
| 15 | #endif | ||
| 16 | |||
| 17 | /* Macros for __uuidof template-based emulation */ | ||
| 18 | #if defined(__cplusplus) | ||
| 19 | #if __cpp_constexpr >= 200704l && __cpp_inline_variables >= 201606L | ||
| 20 | #define __wsl_stub_uuidof_use_constexpr 1 | ||
| 21 | #else | ||
| 22 | #define __wsl_stub_uuidof_use_constexpr 0 | ||
| 23 | #endif | ||
| 24 | #ifndef __GNUC__ | ||
| 25 | #error "Only support for compilers that support for `GNU C++ extension`" | ||
| 26 | #endif | ||
| 27 | extern "C++" { | ||
| 28 | #if __wsl_stub_uuidof_use_constexpr | ||
| 29 | __extension__ template<typename T> struct __wsl_stub_uuidof_s; | ||
| 30 | __extension__ template<typename T> constexpr const GUID &__wsl_stub_uuidof(); | ||
| 31 | #else | ||
| 32 | __extension__ template<typename T> const GUID &__wsl_stub_uuidof(); | ||
| 33 | #endif | ||
| 34 | } | ||
| 35 | |||
| 36 | #if __wsl_stub_uuidof_use_constexpr | ||
| 37 | #define __CRT_UUID_DECL(type, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ | ||
| 38 | extern "C++" \ | ||
| 39 | { \ | ||
| 40 | template <> \ | ||
| 41 | struct __wsl_stub_uuidof_s<type> \ | ||
| 42 | { \ | ||
| 43 | static constexpr IID __uuid_inst = { \ | ||
| 44 | l, w1, w2, {b1, b2, b3, b4, b5, b6, b7, b8}}; \ | ||
| 45 | }; \ | ||
| 46 | template <> \ | ||
| 47 | constexpr const GUID &__wsl_stub_uuidof<type>() \ | ||
| 48 | { \ | ||
| 49 | return __wsl_stub_uuidof_s<type>::__uuid_inst; \ | ||
| 50 | } \ | ||
| 51 | template <> \ | ||
| 52 | constexpr const GUID &__wsl_stub_uuidof<type *>() \ | ||
| 53 | { \ | ||
| 54 | return __wsl_stub_uuidof_s<type>::__uuid_inst; \ | ||
| 55 | } \ | ||
| 56 | } | ||
| 57 | #else | ||
| 58 | #define __CRT_UUID_DECL(type, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ | ||
| 59 | extern "C++" \ | ||
| 60 | { \ | ||
| 61 | template <> \ | ||
| 62 | inline const GUID &__wsl_stub_uuidof<type>() \ | ||
| 63 | { \ | ||
| 64 | static const IID __uuid_inst = { \ | ||
| 65 | l, w1, w2, {b1, b2, b3, b4, b5, b6, b7, b8}}; \ | ||
| 66 | return __uuid_inst; \ | ||
| 67 | } \ | ||
| 68 | template <> \ | ||
| 69 | inline const GUID &__wsl_stub_uuidof<type *>() \ | ||
| 70 | { \ | ||
| 71 | return __wsl_stub_uuidof<type>(); \ | ||
| 72 | } \ | ||
| 73 | } | ||
| 74 | #endif | ||
| 75 | #define __uuidof(type) __wsl_stub_uuidof<__typeof(type)>() | ||
| 76 | #else | ||
| 77 | #define __CRT_UUID_DECL(type, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) | ||
| 78 | #endif | ||
diff --git a/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/unknwn.h b/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/unknwn.h new file mode 100644 index 0000000..e08ad1e --- /dev/null +++ b/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/unknwn.h | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include "unknwnbase.h" | ||
diff --git a/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/unknwnbase.h b/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/unknwnbase.h new file mode 100644 index 0000000..7a54651 --- /dev/null +++ b/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/unknwnbase.h | |||
| @@ -0,0 +1,124 @@ | |||
| 1 | /*------------------------------------------------------------------------------------- | ||
| 2 | * | ||
| 3 | * Copyright (c) Microsoft Corporation | ||
| 4 | * Licensed under the MIT license | ||
| 5 | * | ||
| 6 | *-------------------------------------------------------------------------------------*/ | ||
| 7 | |||
| 8 | /* this ALWAYS GENERATED file contains the definitions for the interfaces */ | ||
| 9 | |||
| 10 | /* File created by MIDL compiler version 8.01.0627 */ | ||
| 11 | |||
| 12 | /* verify that the <rpcndr.h> version is high enough to compile this file*/ | ||
| 13 | #ifndef __REQUIRED_RPCNDR_H_VERSION__ | ||
| 14 | #define __REQUIRED_RPCNDR_H_VERSION__ 500 | ||
| 15 | #endif | ||
| 16 | |||
| 17 | /* verify that the <rpcsal.h> version is high enough to compile this file*/ | ||
| 18 | #ifndef __REQUIRED_RPCSAL_H_VERSION__ | ||
| 19 | #define __REQUIRED_RPCSAL_H_VERSION__ 100 | ||
| 20 | #endif | ||
| 21 | |||
| 22 | #include "rpc.h" | ||
| 23 | #include "rpcndr.h" | ||
| 24 | |||
| 25 | #ifndef __RPCNDR_H_VERSION__ | ||
| 26 | #error this stub requires an updated version of <rpcndr.h> | ||
| 27 | #endif /* __RPCNDR_H_VERSION__ */ | ||
| 28 | |||
| 29 | #ifndef COM_NO_WINDOWS_H | ||
| 30 | #include "windows.h" | ||
| 31 | #include "ole2.h" | ||
| 32 | #endif /*COM_NO_WINDOWS_H*/ | ||
| 33 | |||
| 34 | #ifndef __unknwnbase_h__ | ||
| 35 | #define __unknwnbase_h__ | ||
| 36 | |||
| 37 | #if defined(_MSC_VER) && (_MSC_VER >= 1020) | ||
| 38 | #pragma once | ||
| 39 | #endif | ||
| 40 | |||
| 41 | /* Forward Declarations */ | ||
| 42 | |||
| 43 | #ifndef __IUnknown_FWD_DEFINED__ | ||
| 44 | #define __IUnknown_FWD_DEFINED__ | ||
| 45 | typedef interface IUnknown IUnknown; | ||
| 46 | |||
| 47 | #endif /* __IUnknown_FWD_DEFINED__ */ | ||
| 48 | |||
| 49 | #ifndef __IUnknown_INTERFACE_DEFINED__ | ||
| 50 | #define __IUnknown_INTERFACE_DEFINED__ | ||
| 51 | |||
| 52 | /* interface IUnknown */ | ||
| 53 | /* [unique][uuid][object][local] */ | ||
| 54 | |||
| 55 | typedef /* [unique] */ IUnknown *LPUNKNOWN; | ||
| 56 | |||
| 57 | EXTERN_C const IID IID_IUnknown; | ||
| 58 | |||
| 59 | #if defined(__cplusplus) && !defined(CINTERFACE) | ||
| 60 | extern "C++" | ||
| 61 | { | ||
| 62 | MIDL_INTERFACE("00000000-0000-0000-c000-000000000046") | ||
| 63 | IUnknown | ||
| 64 | { | ||
| 65 | BEGIN_INTERFACE | ||
| 66 | |||
| 67 | virtual HRESULT STDMETHODCALLTYPE QueryInterface( | ||
| 68 | REFIID riid, | ||
| 69 | void **ppvObject) = 0; | ||
| 70 | |||
| 71 | virtual ULONG STDMETHODCALLTYPE AddRef() = 0; | ||
| 72 | |||
| 73 | virtual ULONG STDMETHODCALLTYPE Release() = 0; | ||
| 74 | |||
| 75 | template <class Q> | ||
| 76 | HRESULT | ||
| 77 | STDMETHODCALLTYPE | ||
| 78 | QueryInterface(_COM_Outptr_ Q * *pp) | ||
| 79 | { | ||
| 80 | return QueryInterface(__uuidof(Q), (void **)pp); | ||
| 81 | } | ||
| 82 | END_INTERFACE | ||
| 83 | }; | ||
| 84 | } | ||
| 85 | #ifdef __CRT_UUID_DECL | ||
| 86 | __CRT_UUID_DECL(IUnknown, 0x00000000, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46) | ||
| 87 | #endif | ||
| 88 | #else | ||
| 89 | typedef struct IUnknownVtbl { | ||
| 90 | BEGIN_INTERFACE | ||
| 91 | |||
| 92 | /*** IUnknown methods ***/ | ||
| 93 | HRESULT (STDMETHODCALLTYPE *QueryInterface)( | ||
| 94 | IUnknown *This, | ||
| 95 | REFIID riid, | ||
| 96 | void **ppvObject); | ||
| 97 | |||
| 98 | ULONG (STDMETHODCALLTYPE *AddRef)( | ||
| 99 | IUnknown *This); | ||
| 100 | |||
| 101 | ULONG (STDMETHODCALLTYPE *Release)( | ||
| 102 | IUnknown *This); | ||
| 103 | |||
| 104 | END_INTERFACE | ||
| 105 | } IUnknownVtbl; | ||
| 106 | |||
| 107 | interface IUnknown { | ||
| 108 | CONST_VTBL IUnknownVtbl* lpVtbl; | ||
| 109 | }; | ||
| 110 | |||
| 111 | #ifdef COBJMACROS | ||
| 112 | /*** IUnknown methods ***/ | ||
| 113 | #define IUnknown_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) | ||
| 114 | #define IUnknown_AddRef(This) (This)->lpVtbl->AddRef(This) | ||
| 115 | #define IUnknown_Release(This) (This)->lpVtbl->Release(This) | ||
| 116 | #endif | ||
| 117 | |||
| 118 | #endif | ||
| 119 | |||
| 120 | #endif /* __IUnknown_INTERFACE_DEFINED__ */ | ||
| 121 | |||
| 122 | DEFINE_GUID(IID_IUnknown, 0x00000000, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46); | ||
| 123 | |||
| 124 | #endif /* __unknwnbase_h__ */ | ||
diff --git a/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/winapifamily.h b/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/winapifamily.h new file mode 100644 index 0000000..064c4c2 --- /dev/null +++ b/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/winapifamily.h | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | // Copyright (c) Microsoft Corporation. | ||
| 2 | // Licensed under the MIT License. | ||
| 3 | |||
| 4 | // Stub header to satisfy d3d12.h include. Unconditionally light up all APIs. | ||
| 5 | #pragma once | ||
| 6 | #define WINAPI_FAMILY_PARTITION(Partitions) 1 \ No newline at end of file | ||
diff --git a/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/wrl/client.h b/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/wrl/client.h new file mode 100644 index 0000000..64293a7 --- /dev/null +++ b/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/wrl/client.h | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | // Copyright (c) Microsoft Corporation. | ||
| 2 | // Licensed under the MIT License. | ||
| 3 | |||
| 4 | // Stub to satisfy d3dx12.h include | ||
| 5 | #pragma once | ||
| 6 | #include <wsl/wrladapter.h> \ No newline at end of file | ||
diff --git a/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/wrl/implements.h b/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/wrl/implements.h new file mode 100644 index 0000000..5a3979e --- /dev/null +++ b/contrib/DirectX-Headers-1.618.2/include/wsl/stubs/wrl/implements.h | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | // Copyright (c) Microsoft Corporation. | ||
| 2 | // Licensed under the MIT License. | ||
| 3 | |||
| 4 | // Stub to satisfy DML TF runtime includes | ||
| 5 | #pragma once | ||
| 6 | #include <wsl/wrladapter.h> \ No newline at end of file | ||
