Documentation ¶
Index ¶
- Constants
- func DisableEcho(fd uintptr, state *State) error
- func GetConsoleMode(fileDesc uintptr) (uint32, error)
- func IsTerminal(fd uintptr) bool
- func RestoreTerminal(fd uintptr, state *State) error
- func SetConsoleMode(fileDesc uintptr, mode uint32) error
- func SetWinsize(fd uintptr, ws *Winsize) error
- type CONSOLE_SCREEN_BUFFER_INFO
- type COORD
- type SHORT
- type SMALL_RECT
- type State
- type WORD
- type Winsize
Constants ¶
const ( // Consts for Get/SetConsoleMode function // see http://msdn.microsoft.com/en-us/library/windows/desktop/ms683167(v=vs.85).aspx ENABLE_ECHO_INPUT = 0x0004 ENABLE_INSERT_MODE = 0x0020 ENABLE_LINE_INPUT = 0x0002 ENABLE_MOUSE_INPUT = 0x0010 ENABLE_PROCESSED_INPUT = 0x0001 ENABLE_QUICK_EDIT_MODE = 0x0040 ENABLE_WINDOW_INPUT = 0x0008 // If parameter is a screen buffer handle, additional values ENABLE_PROCESSED_OUTPUT = 0x0001 ENABLE_WRAP_AT_EOL_OUTPUT = 0x0002 )
Variables ¶
This section is empty.
Functions ¶
func DisableEcho ¶
see http://msdn.microsoft.com/en-us/library/windows/desktop/ms683462(v=vs.85).aspx for these flag settings
func GetConsoleMode ¶ added in v1.4.0
func IsTerminal ¶
IsTerminal returns true if the given file descriptor is a terminal.
func RestoreTerminal ¶
Restore restores the terminal connected to the given file descriptor to a previous state.
func SetConsoleMode ¶ added in v1.4.0
func SetWinsize ¶
Types ¶
type CONSOLE_SCREEN_BUFFER_INFO ¶ added in v1.4.0
type CONSOLE_SCREEN_BUFFER_INFO struct {
// contains filtered or unexported fields
}
types for calling GetConsoleScreenBufferInfo see http://msdn.microsoft.com/en-us/library/windows/desktop/ms682093(v=vs.85).aspx
func GetConsoleScreenBufferInfo ¶ added in v1.4.0
func GetConsoleScreenBufferInfo(fileDesc uintptr) (*CONSOLE_SCREEN_BUFFER_INFO, error)
type COORD ¶ added in v1.4.0
types for calling GetConsoleScreenBufferInfo see http://msdn.microsoft.com/en-us/library/windows/desktop/ms682093(v=vs.85).aspx
type SHORT ¶ added in v1.4.0
type SHORT int16
types for calling GetConsoleScreenBufferInfo see http://msdn.microsoft.com/en-us/library/windows/desktop/ms682093(v=vs.85).aspx
type SMALL_RECT ¶ added in v1.4.0
types for calling GetConsoleScreenBufferInfo see http://msdn.microsoft.com/en-us/library/windows/desktop/ms682093(v=vs.85).aspx
type State ¶
type State struct {
// contains filtered or unexported fields
}
func MakeRaw ¶ added in v1.4.0
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 SetRawTerminal ¶
type WORD ¶ added in v1.4.0
type WORD uint16
types for calling GetConsoleScreenBufferInfo see http://msdn.microsoft.com/en-us/library/windows/desktop/ms682093(v=vs.85).aspx