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

20
programs/gdi32.kl Normal file
View File

@@ -0,0 +1,20 @@
#load "Windows.kl"
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
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
// #import #foreign "gdi32.lib" @todo
CreateDIBSection :: #foreign (hdc: HDC, pbmi: *BITMAPINFO, usage: UINT, ppvBits: **VOID, hSection: HANDLE, offset: DWORD): HBITMAP
CreateCompatibleDC :: #foreign (hdc: HDC): HDC