structWindow
struct Window
handle: int
state: int
timing: int
open: bool
closed_by_program: bool
shown: bool
quiet_start: bool
frame_seconds: float
endwindow: opens a window, and reads the keyboard, mouse and frame timing. use "window.jamo"
Each window keeps what Windows tells it in a block of memory, whose address Windows stores with the window. The block: closed at 0, width at 8, height at 16, mouse x at 24, mouse y at 32, wheel at 40, mouse buttons at 48 to 50, focus at 56, minimized at 64, resized at 72, then a byte for each key being held at 128, pressed at 384, and let go at 640. Those three, from wheel to let go, collect what happens between frames. Each frame they move to the copies the program reads: wheel at 44, resized at 76, pressed at 896 and let go at 1152. After those: keys pressed or repeating while held at 1408, copied to 1664; typed letters, a count at 1920 then up to 64 bytes from 1928, copied to 2000 and 2008; and mouse buttons pressed at 2080, copied to 2088.
struct Window
handle: int
state: int
timing: int
open: bool
closed_by_program: bool
shown: bool
quiet_start: bool
frame_seconds: float
endfunc open_window(title: string, width: int, height: int): Window
func Window.quiet()
Keeps the window from taking the keyboard when it first appears
func Window.is_open(): bool
Handles what Windows sent, and answers false once the window is closed. Call it once a frame
func Window.shut()
func Window.close()
func Window.must_be_open()
func Window.key_down(name: string): bool
func Window.key_pressed(name: string): bool
func Window.key_released(name: string): bool
func Window.mouse_x(): int
func Window.mouse_y(): int
func Window.mouse_down(button: string): bool
func Window.mouse_pressed(button: string): bool
True in the frame a mouse button went down, even if it came back up in the same frame
func Window.key_repeated(name: string): bool
True in the frame a key went down, and again each time it repeats while held, like in a text box
func Window.typed(): string
The letters typed this frame. Only English letters, digits, spaces and symbols come through
func Window.wheel(): int
How far the mouse wheel turned this frame. Away from you is more than 0
func Window.width(): int
func Window.height(): int
func Window.resized(): bool
func Window.has_focus(): bool
func Window.minimized(): bool
func Window.set_title(title: string)
func Window.move(x: int, y: int)
func Window.resize(width: int, height: int)
func Window.wait_frame(frames_a_second: int)
Waits until it's time for the next frame. A game that falls behind starts counting again from now
func Window.frame_time(): float
How long the last frame took, in seconds
func window_button(button: string): int
--- Inside the library ---
func window_key_code(name: string): int
func window_low_part(value: int): int
Windows packs two 16-bit numbers into one. These unpack them, with their signs
func window_high_part(value: int): int
func window_key(state: int, code: int, down: bool)
func window_mouse(state: int, place: int)
func window_message(handle: int, message: int, first: int, second: int): int