mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-03 03:32:37 +00:00
sys/windows: add a couple of procedures and types
This commit is contained in:
@@ -1131,4 +1131,4 @@ write_bytes :: proc(buf: ^bytes.Buffer, data: []u8) -> (err: compress.General_Er
|
||||
return compress.General_Error.Resize_Failed
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user