package term

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

Index

Functions

func DisableEcho

func DisableEcho(fd uintptr, state *State) error

DisableEcho disables echo for the terminal connected to the given file descriptor. -- See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683462(v=vs.85).aspx

func GetFdInfo

func GetFdInfo(in interface{}) (uintptr, bool)

GetFdInfo returns the file descriptor for an os.File and indicates whether the file represents a terminal.

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

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

func SetWinsize

func SetWinsize(fd uintptr, ws *Winsize) error

SetWinsize tries to set the specified window size for the specified file descriptor.

func StdStreams

func StdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer)

StdStreams returns the standard streams (stdin, stdout, stedrr).

Types

type State

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

State holds the console mode for the terminal.

func MakeRaw

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

MakeRaw puts the terminal (Windows Console) 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)

SaveState saves the state of the terminal connected to the given file descriptor.

func SetRawTerminal

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

SetRawTerminal puts the terminal connected to the given file descriptor into raw mode and returns the previous state.

type Winsize

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

Winsize is used for window size.

func GetWinsize

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

GetWinsize returns the window size based on the specified file descriptor.

Source Files

term_windows.go

Directories

PathSynopsis
pkg/term/windows
Version
v1.9.0-rc1
Published
Oct 14, 2015
Platform
windows/amd64
Imports
7 packages
Last checked
45 minutes ago

Tools for package owners.