Mosaic_mlx.CmdSourceSide-effects issued by the application.
Commands are values returned alongside a new model from app.init and app.update. The runtime executes them after each update cycle. Compose multiple commands with Cmd.batch.
type 'msg t = | NoneNo command. Equivalent to batch [].
| Batch of 'msg t listExecute all commands in the list. Order is not guaranteed.
*)| Perform of ('msg -> unit) -> unitExecute an arbitrary side-effecting function. The function receives a dispatch callback and may call it zero or more times, from any thread. See perform.
| QuitRequest orderly termination of the application.
*)| Set_title of stringSet the terminal window title to the given string.
*)| Focus of stringMove keyboard focus to the element identified by the given id. Has no effect if no element carries that id.
| Static_commit of 'msg option Mosaic_ui.Vnode.tRender a vnode snapshot and write it to the static area with ANSI styling preserved. The row count is computed automatically from the rendered grid.
*)| Static_clearClear all previously written static content.
*)The type for commands.
batch cmds is a command that executes every command in cmds. Execution order among the commands is not specified.
perform f is a command that calls f dispatch asynchronously.
f may call dispatch msg any number of times; each call enqueues msg for the next update cycle. By default the runtime runs f on a fresh native thread so that long-running operations never block the UI loop. This behaviour can be overridden with the process_perform argument of run.
quit requests orderly application termination after the current update cycle completes.
focus id moves keyboard focus to the element whose id attribute equals id. Has no effect when no matching element exists.
static_commit view renders view offscreen at the current terminal width and appends the styled result to static output.