module

TTY

src/tty/macros.cr

Constants

CBAUD_MASK = 4111_u32
CC_NAMES = [{ControlChar::Intr, "intr"}, {ControlChar::Quit, "quit"}, {ControlChar::Erase, "erase"}, {ControlChar::Kill, "kill"}, {ControlChar::Eof, "eof"}, {ControlChar::Time, "time"}, {ControlChar::Min, "min"}, {ControlChar::Swtc, "swtch"}, {ControlChar::Start, "start"}, {ControlChar::Stop, "stop"}, {ControlChar::Susp, "susp"}, {ControlChar::Eol, "eol"}, {ControlChar::Reprint, "rprnt"}, {ControlChar::Discard, "flush"}, {ControlChar::WErase, "werase"}, {ControlChar::LNext, "lnext"}, {ControlChar::Eol2, "eol2"}]
NCCS = 19
POLL_ERROR = IOEvent::Error.value
POLL_HUP = IOEvent::HangUp.value
POLL_INVALID = IOEvent::Invalid.value
TCFLSH = 21515_u64
TCGETS = 21505_u64
TCGETS2 = 2150388778_u64
TCSBRK = 21513_u64
TCSETS = 21506_u64
TCSETS2 = 1076646955_u64
TCSETSF = 21508_u64
TCSETSW = 21507_u64
TCXONC = 21514_u64
TIOCCBRK = 21544_u64
TIOCEXCL = 21516_u64
TIOCGETD = 21540_u64
TIOCGEXCL = 2147767360_u64
TIOCGICOUNT = 21597_u64
TIOCGPGRP = 21519_u64
TIOCGPKT = 2147767352_u64
TIOCGPTLCK = 2147767353_u64
TIOCGPTN = 2147767344_u64
TIOCGPTPEER = 21569_u64
TIOCGSID = 21545_u64
TIOCGWINSZ = 21523_u64
TIOCINQ = 21531_u64
TIOCMBIC = 21527_u64
TIOCMBIS = 21526_u64
TIOCMGET = 21525_u64
TIOCMIWAIT = 21596_u64
TIOCMSET = 21528_u64
TIOCNOTTY = 21538_u64
TIOCNXCL = 21517_u64
TIOCOUTQ = 21521_u64
TIOCPKT = 21536_u64
TIOCSBRK = 21543_u64
TIOCSCTTY = 21518_u64
TIOCSERGETLSR = 21593_u64
TIOCSETD = 21539_u64
TIOCSPGRP = 21520_u64
TIOCSPTLCK = 1074025521_u64
TIOCSTI = 21522_u64
TIOCSWINSZ = 21524_u64

Class methods

cbreak(fd : Descriptor, action : SetAction = SetAction::Now, & : -> U) : U forall U
Source
clear_break(fd : Descriptor) : Nil
Source
clear_modem_lines(fd : Descriptor, lines : ModemLine) : Nil
Source
cloexec?(fd : Descriptor) : Bool
Source
drain(fd : Descriptor) : Nil
Source
fd_of(fd : Int32) : Int32
Source
flow_control(fd : Descriptor, action : FlowAction) : Nil
Source
flush(fd : Descriptor, queue : FlushQueue = FlushQueue::Both) : Nil
Source
inject(fd : Descriptor, byte : UInt8) : Nil
Source
modem_status(fd : Descriptor) : ModemLine
Source
modify_termios(fd : Descriptor, action : SetAction = SetAction::Now, & : Termios -> Termios) : Termios
Source
nonblocking?(fd : Descriptor) : Bool
Source
on_resize(fd : Descriptor, &block : Winsize -> ) : Nil
Source
output_empty?(fd : Descriptor) : Bool
Source
pending_input(fd : Descriptor) : Int32
Source
pending_output(fd : Descriptor) : Int32
Source
poll(fds : Array(PollFd), timeout : Timeout = nil) : Int32
Source
poll(fds : Slice(PollFd), timeout : Timeout = nil) : Int32
Source
raw(fd : Descriptor, action : SetAction = SetAction::Now, & : -> U) : U forall U
Source
send_break(fd : Descriptor) : Nil
Source
serial_icount(fd : Descriptor) : SerialICount
Source
set_cloexec(fd : Descriptor, enabled : Bool = true) : Nil
Source
set_modem_lines(fd : Descriptor, lines : ModemLine) : Nil
Source
set_modem_status(fd : Descriptor, lines : ModemLine) : Nil
Source
set_nonblocking(fd : Descriptor, enabled : Bool = true) : Nil
Source
signal_number(signal : Int32) : Int32
Source
signal_number(signal : Signal) : Int32
Source
termios(fd : Descriptor) : Termios
Source
timeout_ms(timeout : Nil) : Int32
Source
timeout_ms(timeout : Int32) : Int32
Source
timeout_ms(timeout : Time::Span) : Int32
Source
wait_io(fd : Descriptor, events : IOEvent, timeout : Timeout = nil) : Bool
Source
wait_modem(fd : Descriptor, lines : ModemLine) : Nil
Source
wait_priority(fd : Descriptor, timeout : Timeout = nil) : Bool
Source
wait_readable(fd : Descriptor, timeout : Timeout = nil) : Bool
Source
wait_writable(fd : Descriptor, timeout : Timeout = nil) : Bool
Source
winsize(fd : Descriptor) : Winsize
Source

Macros

configure(fd, &block)
Source
spawn(command, args = nil, &block)
Source
with_terminal(fd, **options, &block)
Source

Nested types