package term

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

Index

Constants

const (
	ECHO   = 0x00000008
	ONLCR  = 0x2
	ISTRIP = 0x20
	INLCR  = 0x40
	ISIG   = 0x80
	IGNCR  = 0x80
	ICANON = 0x100
	ICRNL  = 0x100
	IXOFF  = 0x400
	IXON   = 0x200
)

Functions

func IsTerminal

func IsTerminal(fd uintptr) bool

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

func Restore

func Restore(fd uintptr, 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 MakeRaw

func MakeRaw(fd uintptr) (*State, error)

MakeRaw put the terminal connected to the given file descriptor into raw mode and returns the previous state of the terminal so that it can be restored.

func SetRawTerminal

func SetRawTerminal() (*State, error)

type Termios

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

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 termios_darwin.go

Version
v0.4.6
Published
Jun 22, 2013
Platform
darwin/amd64
Imports
4 packages
Last checked
37 minutes ago

Tools for package owners.