|
|
@ -13,6 +13,44 @@ unsigned char* Win32GetClipboardImageData(int* width, int* height, unsigned long |
|
|
|
#include <stdlib.h> |
|
|
|
#include <assert.h> |
|
|
|
|
|
|
|
// NOTE: These search for architecture is taken from "Windows.h", and it's necessary if we really don't wanna import windows.h |
|
|
|
// and still make it compile on msvc, because import indirectly importing "winnt.h" (e.g. <minwindef.h>) can cause problems is these are not defined. |
|
|
|
#if !defined(_X86_) && !defined(_68K_) && !defined(_MPPC_) && !defined(_IA64_) && !defined(_AMD64_) && !defined(_ARM_) && !defined(_ARM64_) && !defined(_ARM64EC_) && defined(_M_IX86) |
|
|
|
#define _X86_ |
|
|
|
#if !defined(_CHPE_X86_ARM64_) && defined(_M_HYBRID) |
|
|
|
#define _CHPE_X86_ARM64_ |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
#if !defined(_AMD64_) && !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && !defined(_ARM_) && !defined(_ARM64_) && (defined(_M_AMD64) || defined(_M_ARM64EC)) |
|
|
|
#define _AMD64_ |
|
|
|
#endif |
|
|
|
|
|
|
|
#if !defined(_ARM_) && !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && !defined(_ARM64_) && !defined(_ARM64EC_) && defined(_M_ARM) |
|
|
|
#define _ARM_ |
|
|
|
#endif |
|
|
|
|
|
|
|
#if !defined(_ARM64_) && !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && !defined(_ARM_) && !defined(_ARM64EC_) && defined(_M_ARM64) |
|
|
|
#define _ARM64_ |
|
|
|
#endif |
|
|
|
|
|
|
|
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_ARM_) && !defined(_ARM64_) && !defined(_ARM64EC_) && defined(_M_ARM64EC) |
|
|
|
#define _ARM64EC_ |
|
|
|
#endif |
|
|
|
|
|
|
|
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && !defined(_ARM_) && !defined(_ARM64_) && !defined(_ARM64EC_) && defined(_M_M68K) |
|
|
|
#define _68K_ |
|
|
|
#endif |
|
|
|
|
|
|
|
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && !defined(_ARM_) && !defined(_ARM64_) && !defined(_ARM64EC_) && defined(_M_MPPC) |
|
|
|
#define _MPPC_ |
|
|
|
#endif |
|
|
|
|
|
|
|
#if !defined(_IA64_) && !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_M_IX86) && !defined(_AMD64_) && !defined(_ARM_) && !defined(_ARM64_) && !defined(_ARM64EC_) && defined(_M_IA64) |
|
|
|
#define _IA64_ |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#define WIN32_LEAN_AND_MEAN |
|
|
|
// #include <sdkddkver.h> |
|
|
|
// #include <windows.h> |
|
|
|