term

package
v0.0.0-...-9aae117 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2014 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package term provides the size and position of the current terminal window. This package supports Linux, Mac and Windows.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Width

func Width() uint16

Width returns the window column size for the standard window.

Types

type Window

type Window struct {
	Row, Col uint16
	X, Y     uint16
}

A Window contains window's row(height), col(width) pixel size and x, y point. Note that field declaration order is important.(Row, Col following by X, Y) The reason for this is from syscall.Syscall in the NewWindow function.

func NewWindow

func NewWindow() (*Window, error)

NewWindow returns a pointer of Window that contains the current terminal window size and position.

func (*Window) Width

func (w *Window) Width() uint16

Width returns the window column size.

Jump to

Keyboard shortcuts

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