Add ';;' operator, more windows decls
This commit is contained in:
@@ -3,15 +3,47 @@ LPCSTR :: *char
|
||||
HWND :: *void
|
||||
HMENU :: *void
|
||||
HINSTANCE :: *void
|
||||
HBITMAP :: *void
|
||||
HDC :: *void
|
||||
LPVOID :: *void
|
||||
SIZE_T :: U64
|
||||
BOOL :: int
|
||||
HANDLE :: *void
|
||||
VOID :: void
|
||||
LPDWORD :: *DWORD
|
||||
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
|
||||
|
||||
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 :: (hdc: HDC): HDC
|
||||
|
||||
MEM_COMMIT :: 0x00001000
|
||||
MEM_RESERVE :: 0x00002000
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
#import "base.kl"
|
||||
os :: #import "os.kl"
|
||||
// #import "base.kl"
|
||||
#load "Windows.kl"
|
||||
|
||||
Vec2I :: struct ;; x: S32; y: S32
|
||||
|
||||
create_bitmap :: (size: Vec2I)
|
||||
pass
|
||||
|
||||
main :: (argc: int, argv: **char): int
|
||||
memory := os.reserve(size = 10000)
|
||||
os.commit(&memory, 1000)
|
||||
os.release(&memory)
|
||||
os.print("Hello world")
|
||||
pass
|
||||
// memory := os.reserve(size = 10000)
|
||||
// os.commit(&memory, 1000)
|
||||
// os.release(&memory)
|
||||
// os.print("Hello world")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user