|
@@ -62,5 +62,13 @@ foreign gdi32 {
|
|
ChoosePixelFormat :: proc(hdc: HDC, ppfd: ^PIXELFORMATDESCRIPTOR) -> c_int ---
|
|
ChoosePixelFormat :: proc(hdc: HDC, ppfd: ^PIXELFORMATDESCRIPTOR) -> c_int ---
|
|
SwapBuffers :: proc(HDC) -> BOOL ---
|
|
SwapBuffers :: proc(HDC) -> BOOL ---
|
|
|
|
|
|
|
|
+ SetDCBrushColor :: proc(hdc: HDC, color: COLORREF) -> COLORREF ---
|
|
|
|
+ GetDCBrushColor :: proc(hdc: HDC) -> COLORREF ---
|
|
PatBlt :: proc(hdc: HDC, x, y, w, h: c_int, rop: DWORD) -> BOOL ---
|
|
PatBlt :: proc(hdc: HDC, x, y, w, h: c_int, rop: DWORD) -> BOOL ---
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// Windows colors are packed as ABGR
|
|
|
|
+RGB :: #force_inline proc "contextless" (r, g, b: u8) -> COLORREF {
|
|
|
|
+ res: [4]u8 = {0, b, g, r}
|
|
|
|
+ return transmute(COLORREF)res
|
|
|
|
+}
|