Documentation
¶
Overview ¶
Package termios implements the low level termios(3) terminal line discipline facilities.
For a higher level interface please use the github.com/go-curses/term package.
Index ¶
- Constants
- func Cfgetispeed(attr *unix.Termios) uint32
- func Cfgetospeed(attr *unix.Termios) uint32
- func Cfmakecbreak(attr *unix.Termios)
- func Cfmakeraw(attr *unix.Termios)
- func Ptsname(fd uintptr) (string, error)
- func Pty() (*os.File, *os.File, error)
- func Tcdrain(fd uintptr) error
- func Tcflush(fd, selector uintptr) error
- func Tcgetattr(fd uintptr) (*unix.Termios, error)
- func Tcsendbreak(fd uintptr, duration int) error
- func Tcsetattr(fd, action uintptr, argp *unix.Termios) error
- func Tiocgwinsz(fd uintptr) (w, h int, err error)
- func Tiocinq(fd uintptr) (int, error)
- func Tiocmbic(fd uintptr, status int) error
- func Tiocmbis(fd uintptr, status int) error
- func Tiocmget(fd uintptr) (int, error)
- func Tiocmset(fd uintptr, status int) error
- func Tiocoutq(fd uintptr) (int, error)
Constants ¶
const ( TCIFLUSH = 0 TCOFLUSH = 1 TCIOFLUSH = 2 TCSANOW = 0 TCSADRAIN = 1 TCSAFLUSH = 2 )
const ( IXON = 0x00000400 IXANY = 0x00000800 IXOFF = 0x00001000 CRTSCTS = 0x80000000 )
Variables ¶
This section is empty.
Functions ¶
func Cfgetispeed ¶
Cfgetispeed returns the input baud rate stored in the termios structure.
func Cfgetospeed ¶
Cfgetospeed returns the output baud rate stored in the termios structure.
func Cfmakecbreak ¶
Cfmakecbreak modifies attr for cbreak mode.
func Pty ¶
Pty returns a UNIX 98 pseudoterminal device. Pty returns a pair of fds representing the master and slave pair.
func Tcdrain ¶
Tcdrain waits until all output written to the object referred to by fd has been transmitted.
func Tcflush ¶
Tcflush discards data written to the object referred to by fd but not transmitted, or data received but not read, depending on the value of selector.
func Tcsendbreak ¶
Tcsendbreak transmits a continuous stream of zero-valued bits for a specific duration, if the terminal is using asynchronous serial data transmission. If duration is zero, it transmits zero-valued bits for at least 0.25 seconds, and not more that 0.5 seconds. If duration is not zero, it sends zero-valued bits for some implementation-defined length of time.
func Tiocgwinsz ¶
Tiocgwinsz return the width and height of the screen
Types ¶
This section is empty.