Fix ordering of structs when array type appears, add more windows stuff

This commit is contained in:
Krzosa Karol
2022-06-15 09:08:10 +02:00
parent 5f9f1b9a63
commit 891d4304e0
6 changed files with 50 additions and 42 deletions

View File

@@ -1,5 +1,6 @@
DWORD :: U32
LPCSTR :: *char
LPCWSTR :: *U16
HWND :: *void
HMENU :: *void
HINSTANCE :: *void
@@ -10,52 +11,18 @@ SIZE_T :: U64
BOOL :: int
HANDLE :: *void
VOID :: void
HICON :: HANDLE
HCURSOR :: HANDLE
HBRUSH :: HANDLE
LPDWORD :: *DWORD
LRESULT :: S64
WPARAM :: U64
LPARAM :: S64
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
BI_RGB :: 0x0000
BI_RLE8 :: 0x0001
BI_RLE4 :: 0x0002
BI_BITFIELDS :: 0x0003
BI_JPEG :: 0x0004
BI_PNG :: 0x0005
BI_CMYK :: 0x000B
BI_CMYKRLE8 :: 0x000C
BI_CMYKRLE4 :: 0x000
DIB_RGB_COLORS :: 0x00
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 :: #foreign (hdc: HDC): HDC
MEM_COMMIT :: 0x00001000
MEM_RESERVE :: 0x00002000
MEM_RESET :: 0x00080000