glum

Types

pub opaque type App(flags, model, msg)
pub type Error =
  String
pub type GameViewFn(model) =
  fn(model) -> Object
pub type InitFn(flags, model, msg) =
  fn(flags) -> #(model, Event(msg))
pub type Tick {
  Tick
}

Constructors

  • Tick
pub type UIViewFn(model, msg) =
  fn(model) -> Element(msg)
pub type UpdateFn(model, msg) =
  fn(model, Event(msg)) -> #(model, Event(msg))

Values

pub fn application(
  init init: fn(a) -> #(b, Event(c)),
  update update: fn(b, Event(c)) -> #(b, Event(c)),
  ui_view ui_view: fn(b) -> Element(c),
  game_view game_view: fn(b) -> Object,
) -> App(a, b, c)
pub const apply: fn(fn(a) -> b, a) -> b
pub const apply_with: fn(fn(a) -> b, fn() -> a) -> b
pub const defer: fn(fn() -> a, fn() -> b) -> b
pub const func: fn(a) -> fn() -> a
pub fn get_delta_time() -> Float
pub const identity: fn(a) -> a
pub const param: fn(fn(a) -> b) -> fn(a) -> b
pub fn print(dyn: a) -> Nil
pub fn start(app app: App(a, b, c), with flags: a) -> Nil
Search Document