term

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2013 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableEcho added in v0.6.2

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 added in v0.3.3

func RestoreTerminal(fd uintptr, state *State) error

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

func SetWinsize added in v0.3.4

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 added in v0.6.2

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

func SetRawTerminal added in v0.3.3

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

type Termios

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

type Winsize added in v0.3.4

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

func GetWinsize added in v0.3.4

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL