fluo/window
Types
pub type Context(params) {
Context(
draw: fn(render.Renderer, mesh.Mesh, params) -> Nil,
delta: Float,
keys_down: List(Key),
mouse_pos: Position,
mouse_delta: Position,
width: Int,
height: Int,
color: image.ColorImage,
depth: image.DepthImage,
title: String,
)
}
Constructors
-
Context( draw: fn(render.Renderer, mesh.Mesh, params) -> Nil, delta: Float, keys_down: List(Key), mouse_pos: Position, mouse_delta: Position, width: Int, height: Int, color: image.ColorImage, depth: image.DepthImage, title: String, )
pub type Key {
KeyA
KeyB
KeyC
KeyD
KeyE
KeyF
KeyG
KeyH
KeyI
KeyJ
KeyK
KeyL
KeyM
KeyN
KeyO
KeyP
KeyQ
KeyR
KeyS
KeyT
KeyU
KeyV
KeyW
KeyX
KeyY
KeyZ
ArrowUp
ArrowDown
ArrowLeft
ArrowRight
Enter
Space
Backspace
Tab
LShift
RShift
LCtrl
RCtrl
LAlt
RAlt
}
Constructors
-
KeyA -
KeyB -
KeyC -
KeyD -
KeyE -
KeyF -
KeyG -
KeyH -
KeyI -
KeyJ -
KeyK -
KeyL -
KeyM -
KeyN -
KeyO -
KeyP -
KeyQ -
KeyR -
KeyS -
KeyT -
KeyU -
KeyV -
KeyW -
KeyX -
KeyY -
KeyZ -
ArrowUp -
ArrowDown -
ArrowLeft -
ArrowRight -
Enter -
Space -
Backspace -
Tab -
LShift -
RShift -
LCtrl -
RCtrl -
LAlt -
RAlt
pub type Position {
Position(x: Float, y: Float)
}
Constructors
-
Position(x: Float, y: Float)
Values
pub fn color(window: Window) -> image.ColorImage
pub fn create_window(
title: String,
width width: Int,
height height: Int,
) -> Window
pub fn depth(window: Window) -> image.DepthImage
pub fn poll_events(window: Window) -> Nil
pub fn swap(window: Window, color: image.ColorImage) -> Nil
pub fn window_should_close(window: Window) -> Bool