package term

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

+build windows

Index

Functions

func DisableEcho

func DisableEcho(fd uintptr, state *State) error

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

func GetFdInfo

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

GetFdInfo returns file descriptor and bool indicating whether the file is 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 sets the size of the given terminal connected to the passed file descriptor.

func StdStreams

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

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 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 of the terminal so that it can be restored.

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 retrieves the window size of the terminal connected to the passed file descriptor.

Source Files

term_windows.go

Directories

PathSynopsis
pkg/term/winconsole
Version
v1.6.0-rc6
Published
Apr 13, 2015
Platform
windows/amd64
Imports
4 packages
Last checked
24 minutes ago

Tools for package owners.