package term

import "github.com/docker/docker/term"

Index

Constants

const (
	HUPCL   = 0x4000
	ICANON  = 0x100
	ICRNL   = 0x100
	IEXTEN  = 0x400
	BRKINT  = 0x2
	CFLUSH  = 0xf
	CLOCAL  = 0x8000
	CREAD   = 0x800
	CS5     = 0x0
	CS6     = 0x100
	CS7     = 0x200
	CS8     = 0x300
	CSIZE   = 0x300
	CSTART  = 0x11
	CSTATUS = 0x14
	CSTOP   = 0x13
	CSTOPB  = 0x400
	CSUSP   = 0x1a
	IGNBRK  = 0x1
	IGNCR   = 0x80
	IGNPAR  = 0x4
	IMAXBEL = 0x2000
	INLCR   = 0x40
	INPCK   = 0x10
	ISIG    = 0x80
	ISTRIP  = 0x20
	IUTF8   = 0x4000
	IXANY   = 0x800
	IXOFF   = 0x400
	IXON    = 0x200
	NOFLSH  = 0x80000000
	OCRNL   = 0x10
	OFDEL   = 0x20000
	OFILL   = 0x80
	ONLCR   = 0x2
	ONLRET  = 0x40
	ONOCR   = 0x20
	ONOEOT  = 0x8
	OPOST   = 0x1
	RENB    = 0x1000
	PARMRK  = 0x8
	PARODD  = 0x2000

	TOSTOP   = 0x400000
	VDISCARD = 0xf
	VDSUSP   = 0xb
	VEOF     = 0x0
	VEOL     = 0x1
	VEOL2    = 0x2
	VERASE   = 0x3
	VINTR    = 0x8
	VKILL    = 0x5
	VLNEXT   = 0xe
	VMIN     = 0x10
	VQUIT    = 0x9
	VREPRINT = 0x6
	VSTART   = 0xc
	VSTATUS  = 0x12
	VSTOP    = 0xd
	VSUSP    = 0xa
	VT0      = 0x0
	VT1      = 0x10000
	VTDLY    = 0x10000
	VTIME    = 0x11
	ECHO     = 0x00000008

	PENDIN = 0x20000000
)

Functions

func IsTerminal

func IsTerminal(fd int) bool

IsTerminal returns true if the given file descriptor is a terminal.

func Restore

func Restore(fd int, state *State) error

Restore restores the terminal connected to the given file descriptor to a previous state.

func RestoreTerminal

func RestoreTerminal(state *State)

func SetWinsize

func SetWinsize(fd uintptr, ws *Winsize) error

Types

type State

type State struct {
	// contains filtered or unexported fields
}

func SetRawTerminal

func SetRawTerminal() (*State, error)

type Termios

type Termios struct {
	Iflag  uintptr
	Oflag  uintptr
	Cflag  uintptr
	Lflag  uintptr
	Cc     [20]byte
	Ispeed uintptr
	Ospeed uintptr
}

type Winsize

type Winsize struct {
	Width  uint16
	Height uint16
	// contains filtered or unexported fields
}

func GetWinsize

func GetWinsize(fd uintptr) (*Winsize, error)

Source Files

term.go

Version
v0.3.4
Published
May 31, 2013
Platform
js/wasm
Imports
4 packages
Last checked
1 minute ago

Tools for package owners.