sys/windows: add a couple of procedures and types

This commit is contained in:
hikari
2022-04-30 11:21:37 +03:00
parent e53ba3b116
commit 0ad448f1c7
3 changed files with 8 additions and 1 deletions

View File

@@ -1131,4 +1131,4 @@ write_bytes :: proc(buf: ^bytes.Buffer, data: []u8) -> (err: compress.General_Er
return compress.General_Error.Resize_Failed
}
return nil
}
}

View File

@@ -62,5 +62,10 @@ foreign gdi32 {
ChoosePixelFormat :: proc(hdc: HDC, ppfd: ^PIXELFORMATDESCRIPTOR) -> c_int ---
SwapBuffers :: proc(HDC) -> BOOL ---
SetDCBrushColor :: proc(hdc: HDC, color: COLORREF) -> COLORREF ---
PatBlt :: proc(hdc: HDC, x, y, w, h: c_int, rop: DWORD) -> BOOL ---
}
RGB :: proc(r, g, b: u8) -> COLORREF {
return COLORREF(COLORREF(r) | COLORREF(g) << 8 | COLORREF(b) << 16)
}

View File

@@ -55,6 +55,8 @@ UINT_PTR :: uintptr
ULONG :: c_ulong
UCHAR :: BYTE
NTSTATUS :: c.long
COLORREF :: DWORD
LPCOLORREF :: ^COLORREF
LPARAM :: LONG_PTR
WPARAM :: UINT_PTR
LRESULT :: LONG_PTR