class

Opal::Terminal::Driver

Inherits Reference < Object

Abstract base interface for terminal input/output drivers.

Constructors

new(output : IO = STDOUT, input : IO = STDIN)
Source

Instance methods

check_resize

Checks if the terminal window size has changed since last check.

Source
clear
Source
disable_mouse
Source
enable_mouse
Source
enter_alternate_screen
Source
exit_alternate_screen
Source
flush
Source
hide_cursor
Source
input
Source
input=(input : IO)
Source
move_to(row : Int32, col : Int32) : Nil
Source
on_resize
Source
on_resize=(on_resize : Proc(Int32, Int32, Nil) | Nil)
Source
output
Source
output=(output : IO)
Source
poll_event(timeout_ms : Int32 = 0) : KeyEvent | MouseEvent | ResizeEvent | Nil

Non-blocking or timed check for input/resize events.

Source
raw_mode
Source
read_event

Reads the next key, mouse, or resize event from the terminal, consuming from the internal event queue if multiple events arrived in the same read chunk.

Source
show_cursor
Source
size
Source
write(str : String) : Nil
Source