package term

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

Index

Constants

const (
	IGNBRK = syscall.IGNBRK
	PARMRK = syscall.PARMRK
	INLCR  = syscall.INLCR
	IGNCR  = syscall.IGNCR
	ECHONL = syscall.ECHONL
	CSIZE  = syscall.CSIZE
	ICRNL  = syscall.ICRNL
	ISTRIP = syscall.ISTRIP
	PARENB = syscall.PARENB
	ECHO   = syscall.ECHO
	ICANON = syscall.ICANON
	ISIG   = syscall.ISIG
	IXON   = syscall.IXON
	BRKINT = syscall.BRKINT
	INPCK  = syscall.INPCK
	OPOST  = syscall.OPOST
	CS8    = syscall.CS8
	IEXTEN = syscall.IEXTEN
)

Variables

var (
	ErrInvalidState = errors.New("Invalid terminal state")
)

Functions

func DisableEcho

func DisableEcho(fd uintptr, state *State) error

func IsTerminal

func IsTerminal(fd uintptr) bool

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

func RestoreTerminal

func RestoreTerminal(fd uintptr, state *State) error

Restore restores the terminal connected to the given file descriptor to a previous 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 SaveState

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

func SetRawTerminal

func SetRawTerminal(fd uintptr) (*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 {
	Height uint16
	Width  uint16
	// contains filtered or unexported fields
}

func GetWinsize

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

Source Files

term.go termios_darwin.go

Version
v0.11.0
Published
May 7, 2014
Platform
darwin/amd64
Imports
5 packages
Last checked
1 hour ago

Tools for package owners.