Current section
Files
Jump to
Current section
Files
src/glink/use_stdin.gleam
pub type ReadStream
pub type EventEmitter
pub type Stdin {
Stdin(
/// Stdin stream passed to `render()` in `options.stdin` or `process.stdin` by default. Useful if your app needs to handle user input.
/// **NOTE: Not yet useable.**
stdin: ReadStream,
/// Ink exposes this function via own `<StdinContext>` to be able to handle Ctrl+C, that's why you should use Ink's `set_raw_mode`.
/// If the `stdin` stream passed to Ink does not support `set_raw_mode`, this function does nothing.
set_raw_mode: fn(Bool) -> Nil,
/// A boolean flag determining if the current `stdin` supports `set_raw_mode`. A component using `set_raw_mode` might want to use `is_raw_mode_supported` to nicely fall back in environments where raw mode is not supported.
is_raw_mode_supported: Bool,
internal_exit_on_ctrl_c: Bool,
internal_event_emitter: EventEmitter,
)
}