package term

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

+build windows

Index

Functions

func DisableEcho

func DisableEcho(fd uintptr, state *State) error

DisableEcho disbales the echo for given file descriptor and returns previous state see http://msdn.microsoft.com/en-us/library/windows/desktop/ms683462(v=vs.85).aspx for these flag settings

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 terminal connected to the given file descriptor to a given size.

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 given console

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 gets the window size of the given terminal

Source Files

term_windows.go

Directories

PathSynopsis
pkg/term/winconsole
Version
v1.6.0-rc1
Published
Mar 23, 2015
Platform
windows/amd64
Imports
3 packages
Last checked
1 hour ago

Tools for package owners.