Claudius.BaseMain Claudius entry point.
A module representing a set of key codes.
module PlatformKey : module type of KeysdlA module that provides platform-specific key handling, based on the Keysdl module.
module PlatformMouse : module type of MousesdlA module that provides platform-specific mouse handling, based on the Mousesdl module.
type input_state = {keys : KeyCodeSet.t;events : Event.t list;Accumulated unified input events for the current frame.
*)mouse : Mouse.t;}Represents the current state of user input, including:
keys: The set of currently pressed keys.mouse: The current state of the mouse, including position and button presses.type boot_func = Screen.t -> Framebuffer.tFunction called once a start of run
type tick_func =
int ->
Screen.t ->
Framebuffer.t ->
input_state ->
Framebuffer.tFunction called once a frame during run
type functional_tick_func = int -> Screen.t -> input_state -> Primitives.t listA functional-style tick function that returns a list of primitives.
run title boot tick screen Creates the runloop
val run_functional : string -> functional_tick_func -> Screen.t -> unitrun_functional title tick_f screen runs Claudius in a functional style.
tick_f screen returns a list of primitives rather than a complete framebuffer.val is_key_pressed : input_state -> Key.t -> boolReturns true if key is currently pressed.
val was_key_just_pressed : input_state -> Key.t -> boolReturns true if key was pressed during the current frame.
val was_key_just_released : input_state -> Key.t -> boolReturns true if key was released during the current frame.