72 lines
2.0 KiB
Plaintext
72 lines
2.0 KiB
Plaintext
DWORD :: U32
|
|
LPCSTR :: *char
|
|
HWND :: *void
|
|
HMENU :: *void
|
|
HINSTANCE :: *void
|
|
HBITMAP :: *void
|
|
HDC :: *void
|
|
LPVOID :: *void
|
|
SIZE_T :: U64
|
|
BOOL :: int
|
|
HANDLE :: *void
|
|
VOID :: void
|
|
LPDWORD :: *DWORD
|
|
BYTE :: U8 // @todo? unsigned char
|
|
WORD :: S16 // short
|
|
LONG :: S32 // @todo long
|
|
UINT :: U32 // @todo uint
|
|
|
|
RBGQUAD :: struct
|
|
rgbBlue: BYTE
|
|
rgbGreen: BYTE
|
|
rgbRed: BYTE
|
|
rgbReserved: BYTE
|
|
|
|
BITMAPINFOHEADER :: struct
|
|
biSize: DWORD
|
|
biWidth: LONG
|
|
biHeight: LONG
|
|
biPlanes: WORD
|
|
biBitCount: WORD
|
|
biCompression: DWORD
|
|
biSizeImage: DWORD
|
|
biXPelsPerMeter: LONG
|
|
biYPelsPerMeter: LONG
|
|
biClrUsed: DWORD
|
|
biClrImportant: DWORD
|
|
|
|
BITMAPINFO :: struct
|
|
bmiHeader :: BITMAPINFOHEADER
|
|
bmiColors :: [1]RBGQUAD
|
|
|
|
// #import #foreign "gdi32.lib" @todo
|
|
CreateWindowA :: #foreign (dwExStyle: DWORD, lpClassName: *char, lpWindowName: *char, dwStyle: DWORD, X: int, Y: int, nWidth: int, nHeight: int, hWndParent: HWND, hMenu: HMENU, hInstance: HINSTANCE, lpParam: *void): HWND
|
|
GetDC :: #foreign (hWnd: HWND): HDC
|
|
CreateDIBSection :: #foreign (hdc: HDC, pbmi: *BITMAPINFO, usage: UINT, ppvBits: **VOID, hSection: HANDLE, offset: DWORD): HBITMAP
|
|
CreateCompatibleDC :: (hdc: HDC): HDC
|
|
|
|
MEM_COMMIT :: 0x00001000
|
|
MEM_RESERVE :: 0x00002000
|
|
MEM_RESET :: 0x00080000
|
|
MEM_RESET_UNDO :: 0x1000000
|
|
|
|
MEM_DECOMMIT :: 0x00004000
|
|
MEM_RELEASE :: 0x00008000
|
|
|
|
PAGE_NOACCESS :: 1
|
|
PAGE_READONLY :: 2
|
|
PAGE_READWRITE :: 4
|
|
PAGE_WRITECOPY :: 8
|
|
PAGE_EXECUTE :: 0x10
|
|
PAGE_EXECUTE_READ :: 0x20
|
|
PAGE_EXECUTE_READWRITE :: 0x40
|
|
PAGE_EXECUTE_WRITECOPY :: 0x80
|
|
|
|
VirtualAlloc :: #foreign (lpAddress: LPVOID, dwSize: SIZE_T, flAllocationType: DWORD, flProtect: DWORD): LPVOID
|
|
VirtualFree :: #foreign (lpAddress: LPVOID, dwSize: SIZE_T, dwFreeType: DWORD): BOOL
|
|
|
|
STD_INPUT_HANDLE :: 4294967286//(-10)->DWORD
|
|
STD_OUTPUT_HANDLE :: 4294967285//(-11)->DWORD
|
|
//STD_ERROR_HANDLE :: (-12)->DWORD
|
|
GetStdHandle :: #foreign (nStdHandle: DWORD): HANDLE
|
|
WriteConsoleA :: #foreign (hConsoleOutput: HANDLE,lpBuffer: *VOID,nNumberOfCharsToWrite: DWORD,lpNumberOfCharsWritten: LPDWORD,lpReserve: LPVOID): BOOL |