mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-16 08:04:07 +00:00
Begin work on modules - No codegen!!!
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
#load "basic.odin"
|
||||
// #load "basic.odin"
|
||||
#import "runtime.odin"
|
||||
#import "print.odin"
|
||||
|
||||
|
||||
main :: proc() {
|
||||
println("% % % %", "Hellope", true, 6.28, {4}int{1, 2, 3, 4})
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#load "win32.odin"
|
||||
#import "win32.odin"
|
||||
|
||||
File :: type struct {
|
||||
Handle :: type HANDLE
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#load "runtime.odin"
|
||||
#load "win32.odin"
|
||||
#load "file.odin"
|
||||
#import "runtime.odin"
|
||||
#import "win32.odin"
|
||||
#import "file.odin"
|
||||
|
||||
print_byte_buffer :: proc(buf: ^[]byte, b: []byte) {
|
||||
if buf.count < buf.capacity {
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#load "win32.odin"
|
||||
#load "print.odin"
|
||||
#global_scope
|
||||
|
||||
// TODO(bill): Remove #import in runtime.odin
|
||||
#import "win32.odin"
|
||||
#import "file.odin"
|
||||
#import "print.odin"
|
||||
|
||||
// IMPORTANT NOTE(bill): Do not change the order of any of this data
|
||||
// The compiler relies upon this _exact_ order
|
||||
|
||||
@@ -1,6 +1,24 @@
|
||||
#foreign_system_library "user32"
|
||||
#foreign_system_library "gdi32"
|
||||
|
||||
HANDLE :: type rawptr
|
||||
HWND :: type HANDLE
|
||||
HDC :: type HANDLE
|
||||
HINSTANCE :: type HANDLE
|
||||
HICON :: type HANDLE
|
||||
HCURSOR :: type HANDLE
|
||||
HMENU :: type HANDLE
|
||||
HBRUSH :: type HANDLE
|
||||
WPARAM :: type uint
|
||||
LPARAM :: type int
|
||||
LRESULT :: type int
|
||||
ATOM :: type i16
|
||||
BOOL :: type i32
|
||||
POINT :: type struct { x, y: i32 }
|
||||
WNDPROC :: type proc(hwnd: HWND, msg: u32, wparam: WPARAM, lparam: LPARAM) -> LRESULT
|
||||
|
||||
INVALID_HANDLE_VALUE :: (-1 as int) as HANDLE
|
||||
|
||||
CS_VREDRAW :: 1
|
||||
CS_HREDRAW :: 2
|
||||
CW_USEDEFAULT :: 0x80000000
|
||||
@@ -23,25 +41,6 @@ PM_REMOVE :: 1
|
||||
COLOR_BACKGROUND :: 1 as HBRUSH
|
||||
|
||||
|
||||
HANDLE :: type rawptr
|
||||
HWND :: type HANDLE
|
||||
HDC :: type HANDLE
|
||||
HINSTANCE :: type HANDLE
|
||||
HICON :: type HANDLE
|
||||
HCURSOR :: type HANDLE
|
||||
HMENU :: type HANDLE
|
||||
HBRUSH :: type HANDLE
|
||||
WPARAM :: type uint
|
||||
LPARAM :: type int
|
||||
LRESULT :: type int
|
||||
ATOM :: type i16
|
||||
BOOL :: type i32
|
||||
POINT :: type struct { x, y: i32 }
|
||||
|
||||
INVALID_HANDLE_VALUE :: (-1 as int) as HANDLE
|
||||
|
||||
WNDPROC :: type proc(hwnd: HWND, msg: u32, wparam: WPARAM, lparam: LPARAM) -> LRESULT
|
||||
|
||||
WNDCLASSEXA :: struct #ordered {
|
||||
size, style: u32
|
||||
wnd_proc: WNDPROC
|
||||
|
||||
Reference in New Issue
Block a user