mizchi/tui/io does not have a README file

    InputResult

    pub(all) enum InputResult {
    Confirmed(String)
    Cancelled
    TabNext(String)
    TabPrev(String)
    ForceQuit
    }

    Result of an input session

    abort_input_session

    fn abort_input_session() -> Unit

    Abort input session (stub)

    cleanup_stdin

    fn cleanup_stdin() -> Unit

    Disable raw mode and restore terminal settings

    debug_stderr

    fn debug_stderr(s : String) -> Unit

    Debug print to stderr

    debug_stdin_state

    fn debug_stdin_state(_label : String) -> Unit

    Debug stdin state

    enable_raw_mode

    fn enable_raw_mode() -> Unit

    Enable raw mode for character-by-character input

    get_args

    fn get_args() -> Array[String]

    Get command line arguments (not available in native mode)

    get_env

    fn get_env(_name : String) -> String

    Get environment variable value (not available in native mode)

    get_terminal_size

    fn get_terminal_size() -> (Int, Int)

    Get terminal size (columns, rows)

    get_time_ms

    fn get_time_ms() -> Int

    Get current time in milliseconds (monotonic)

    is_headless

    fn is_headless() -> Bool

    Check if running in headless mode (always false for native)

    is_raw_mode

    fn is_raw_mode() -> Bool

    Check if terminal is in raw mode

    is_tty

    fn is_tty() -> Bool

    Check if stdin is a TTY

    keep_alive_nonblocking

    fn keep_alive_nonblocking(_ms : Int) -> Unit

    Keep alive non-blocking (no-op for native, used in JS for event loop)

    poll_keypress

    fn poll_keypress() -> Bool

    Poll for keypress (call this in a loop) - for manual polling if needed
    fn print_raw(s : String) -> Unit

    Print string to stdout without newline
    async fn print_raw_async(s : String) -> Unit

    Print string to stdout without newline (async version)

    read_key

    fn read_key() -> String

    Read a single key from stdin (raw mode) Returns the key as a string (may be escape sequence)

    read_line

    async fn read_line() -> String

    Read a line from stdin (line-buffered, cooked mode) Returns the line without trailing newline

    set_idle_handler

    fn set_idle_handler(handler : () -> Unit) -> Unit

    Set idle handler (called periodically when no key input)

    sleep

    fn sleep(ms : Int) -> Unit

    Sleep for milliseconds

    sleep_async

    async fn sleep_async(ms : Int) -> Unit

    Sleep for milliseconds (async version)

    start_inline_input

    fn start_inline_input(row : Int, col : Int, width : Int, height : Int, multiline : Bool, initial : String, on_result : (InputResult) -> Unit) -> Unit

    Start inline input (same as inplace input for native)

    start_inline_input_cooked

    fn start_inline_input_cooked(field_name : String, initial : String, on_result : (InputResult) -> Unit, confirm_on_shift_enter? : Bool, esc_cancels? : Bool) -> Unit

    Start inline input with cooked mode (native implementation)

    start_inplace_input

    fn start_inplace_input(row : Int, col : Int, width : Int, height : Int, multiline : Bool, initial : String, on_result : (InputResult) -> Unit, confirm_on_shift_enter? : Bool, esc_cancels? : Bool, on_lines_change? : (Int) -> Int?, on_completion? : (String, Int) -> String??) -> Unit

    Start inplace input (native implementation with raw mode editing) Blocks until user confirms, cancels, or tabs on_completion: Optional callback (text, cursor_pos) -> completion_suffix If provided and returns Some, Tab inserts the completion

    start_input_session_cb

    fn start_input_session_cb(row : Int, col : Int, width : Int, height : Int, multiline : Bool, initial : String, on_result : (InputResult) -> Unit) -> Unit

    Start input session with callback (wrapper for start_inplace_input)

    start_keypress_listener

    fn start_keypress_listener(handler : (String) -> Unit) -> Unit

    Start keypress listener (raw mode) - blocks until stop_keypress_listener is called This provides the same interface as JS where the listener runs until stopped If called from within a handler (e.g., from restore_tui), just updates the handler

    start_render_ticker

    fn start_render_ticker(_ms : Int, _callback : () -> Unit) -> Int

    Start render ticker (stub - native uses polling loop instead)

    start_resize_listener

    fn start_resize_listener(_callback : (Int, Int) -> Unit) -> Unit

    Start resize listener (stub - native does not emit resize events)

    stop_keypress_listener

    fn stop_keypress_listener() -> Unit

    Stop keypress listener

    stop_render_ticker

    fn stop_render_ticker(_ticker_id : Int) -> Unit

    Stop render ticker (stub)

    stop_resize_listener

    fn stop_resize_listener() -> Unit

    Stop resize listener (stub)

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io