mirror of
https://github.com/gdamore/tcell.git
synced 2025-04-24 13:48:51 +08:00
Version 2.0 work in progress.
This commit is contained in:
parent
5bef26acc2
commit
8a32d2b0c8
50
README.adoc
50
README.adoc
@ -17,7 +17,11 @@ a|[.right]
|
||||
image::logos/tcell.png[float="right"]
|
||||
|===
|
||||
|
||||
## Examples
|
||||
NOTE: Work has begun on version 2.0 of mangos. There are breaking changes (and more coming.)
|
||||
Version 1.x is available using the import `github.com/gdamore/tcell`.
|
||||
The new work in progress is available using master and `github.com/gdamore/tcell/v2`.
|
||||
|
||||
== Examples
|
||||
|
||||
* https://github.com/gdamore/proxima5[proxima5] - space shooter (https://youtu.be/jNxKTCmY_bQ[video])
|
||||
* https://github.com/gdamore/govisor[govisor] - service management UI (http://2.bp.blogspot.com/--OsvnfzSNow/Vf7aqMw3zXI/AAAAAAAAARo/uOMtOvw4Sbg/s1600/Screen%2BShot%2B2015-09-20%2Bat%2B9.08.41%2BAM.png[screenshot])
|
||||
@ -39,7 +43,7 @@ image::logos/tcell.png[float="right"]
|
||||
* https://gitlab.com/tslocum/cbind[cbind] - Provides key event encoding, decoding and handling
|
||||
* https://github.com/spinzed/tpong[tpong] - The old-school Pong remade in terminal
|
||||
|
||||
## Pure Go Terminfo Database
|
||||
== Pure Go Terminfo Database
|
||||
|
||||
_Tcell_ includes a full parser and expander for terminfo capability strings,
|
||||
so that it can avoid hard coding escape strings for formatting. It also favors
|
||||
@ -48,7 +52,7 @@ portability, and includes support for all POSIX systems.
|
||||
The database is also flexible & extensible, and can modified by either running
|
||||
a program to build the entire database, or an entry for just a single terminal.
|
||||
|
||||
## More Portable
|
||||
== More Portable
|
||||
|
||||
_Tcell_ is portable to a wide variety of systems.
|
||||
_Tcell_ is believed
|
||||
@ -57,7 +61,7 @@ the exception of nacl (which lacks any kind of a terminal interface).
|
||||
(Plan9 is not supported by _Tcell_, but it is experimental status only
|
||||
in golang.) _Tcell_ is pure Go, without any need for CGO.
|
||||
|
||||
## No Async IO
|
||||
== No Async IO
|
||||
|
||||
_Tcell_ is able to operate without requiring `SIGIO` signals (unlike _termbox_),
|
||||
or asynchronous I/O, and can instead use standard Go file
|
||||
@ -68,7 +72,7 @@ tty streams.
|
||||
This model is also much closer to idiomatic Go, leading
|
||||
to fewer surprises.
|
||||
|
||||
## Rich Unicode & non-Unicode support
|
||||
== Rich Unicode & non-Unicode support
|
||||
|
||||
_Tcell_ includes enhanced support for Unicode, including wide characters and
|
||||
combining characters, provided your terminal can support them.
|
||||
@ -81,11 +85,11 @@ _Tcell_ tries hard to convert to native characters on both input and output, and
|
||||
on output _Tcell_ even makes use of the alternate character set to facilitate
|
||||
drawing certain characters.
|
||||
|
||||
## More Function Keys
|
||||
== More Function Keys
|
||||
|
||||
_Tcell_ also has richer support for a larger number of special keys that some terminals can send.
|
||||
|
||||
## Better Color Handling
|
||||
== Better Color Handling
|
||||
|
||||
_Tcell_ will respect your terminal's color space as specified within your terminfo
|
||||
entries, so that for example attempts to emit color sequences on VT100 terminals
|
||||
@ -99,7 +103,7 @@ Modern Windows 10 can benefit from much richer colors however.
|
||||
_Tcell_ maps 16 colors down to 8, for terminals that need it.
|
||||
(The upper 8 colors are just brighter versions of the lower 8.)
|
||||
|
||||
## Better Mouse Support
|
||||
== Better Mouse Support
|
||||
|
||||
_Tcell_ supports enhanced mouse tracking mode, so your application can receive
|
||||
regular mouse motion events, and wheel events, if your terminal supports it.
|
||||
@ -108,13 +112,13 @@ regular mouse motion events, and wheel events, if your terminal supports it.
|
||||
and does not support mouse interaction. The stock Windows 10 console host
|
||||
fired up with cmd.exe or PowerShell works fine however.)
|
||||
|
||||
## _Termbox_ Compatibility
|
||||
== _Termbox_ Compatibility
|
||||
|
||||
A compatibility layer for _termbox_ is provided in the `compat` directory.
|
||||
To use it, try importing `github.com/gdamore/tcell/termbox` instead.
|
||||
Most _termbox-go_ programs will probably work without further modification.
|
||||
|
||||
## Working With Unicode
|
||||
== Working With Unicode
|
||||
|
||||
Internally Tcell uses UTF-8, just like Go.
|
||||
However, Tcell understands how to
|
||||
@ -124,7 +128,7 @@ Your application must supply
|
||||
them, as the full set of the most common ones bloats the program by about 2MB.
|
||||
If you're lazy, and want them all anyway, see the `encoding` sub-directory.
|
||||
|
||||
## Wide & Combining Characters
|
||||
== Wide & Combining Characters
|
||||
|
||||
The `SetContent()` API takes a primary rune, and an optional list of combining runes.
|
||||
If any of the runes is a wide (East Asian) rune occupying two cells,
|
||||
@ -137,7 +141,7 @@ Experience has shown that the vanilla Windows 8 console application does not
|
||||
support any of these characters properly, but at least some options like
|
||||
_ConEmu_ do support Wide characters.
|
||||
|
||||
## Colors
|
||||
== Colors
|
||||
|
||||
_Tcell_ assumes the ANSI/XTerm color model, including the 256 color map that
|
||||
XTerm uses when it supports 256 colors. The terminfo guidance will be
|
||||
@ -146,7 +150,7 @@ terminals which expose ANSI style `setaf` and `setab` will support color;
|
||||
if you have a color terminal that only has `setf` and `setb`, please let me
|
||||
know; it wouldn't be hard to add that if there is need.
|
||||
|
||||
## 24-bit Color
|
||||
== 24-bit Color
|
||||
|
||||
_Tcell_ _supports true color_! (That is, if your terminal can support it,
|
||||
_Tcell_ can accurately display 24-bit color.)
|
||||
@ -170,14 +174,14 @@ If you find this undesirable, you can either use a `TERM` variable
|
||||
that lacks the `TRUECOLOR` setting, or set `TCELL_TRUECOLOR=disable` in your
|
||||
environment.
|
||||
|
||||
## Performance
|
||||
== Performance
|
||||
|
||||
Reasonable attempts have been made to minimize sending data to terminals,
|
||||
avoiding repeated sequences or drawing the same cell on refresh updates.
|
||||
|
||||
## Terminfo
|
||||
== Terminfo
|
||||
|
||||
(Not relevent for Windows users.)
|
||||
(Not relevant for Windows users.)
|
||||
|
||||
The Terminfo implementation operates with two forms of database. The first
|
||||
is the built-in go database, which contains a number of real database entries
|
||||
@ -202,7 +206,7 @@ Terminals without absolute cursor addressability are not supported.
|
||||
This is unlikely to be a problem; such terminals have not been mass produced
|
||||
since the early 1970s.
|
||||
|
||||
## Mouse Support
|
||||
== Mouse Support
|
||||
|
||||
Mouse support is detected via the `kmous` terminfo variable, however,
|
||||
enablement/disablement and decoding mouse events is done using hard coded
|
||||
@ -216,16 +220,16 @@ Mouse wheel buttons on various terminals are known to work, but the support
|
||||
in terminal emulators, as well as support for various buttons and
|
||||
live mouse tracking, varies widely. Modern _xterm_, macOS _Terminal_, and _iTerm_ all work well.
|
||||
|
||||
## Testablity
|
||||
== Testablity
|
||||
|
||||
There is a `SimulationScreen`, that can be used to simulate a real screen
|
||||
for automated testing. The supplied tests do this. The simulation contains
|
||||
event delivery, screen resizing support, and capabilities to inject events
|
||||
and examine "`physical`" screen contents.
|
||||
|
||||
## Platforms
|
||||
== Platforms
|
||||
|
||||
### POSIX (Linux, FreeBSD, macOS, Solaris, etc.)
|
||||
=== POSIX (Linux, FreeBSD, macOS, Solaris, etc.)
|
||||
|
||||
For mainstream systems with a suitably well defined system call interface
|
||||
to tty settings, everything works using pure Go.
|
||||
@ -233,7 +237,7 @@ to tty settings, everything works using pure Go.
|
||||
For the remainder (right now means only Solaris/illumos) we use POSIX function
|
||||
calls to manage termios, which implies that CGO is required on those platforms.
|
||||
|
||||
### Windows
|
||||
=== Windows
|
||||
|
||||
Windows console mode applications are supported. Unfortunately _mintty_
|
||||
and other _cygwin_ style applications are not supported.
|
||||
@ -247,7 +251,7 @@ has either. If anyone has suggestions, let me know! Really, if you're
|
||||
using a Windows application, you should use the native Windows console or a
|
||||
fully compatible console implementation.
|
||||
|
||||
### Plan9 and Native Client (Nacl)
|
||||
=== Plan9 and Native Client (Nacl)
|
||||
|
||||
The nacl and plan9 platforms won't work, but compilation stubs are supplied
|
||||
for folks that want to include parts of this in software targetting those
|
||||
@ -257,7 +261,7 @@ allocate a real screen object on those platforms, `NewScreen()` will fail.
|
||||
If anyone has wisdom about how to improve support for either of these,
|
||||
please let me know. PRs are especially welcome.
|
||||
|
||||
### Commercial Support
|
||||
=== Commercial Support
|
||||
|
||||
_Tcell_ is absolutely free, but if you want to obtain commercial, professional support, there are options.
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
// +build ignore
|
||||
|
||||
// Copyright 2019 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -20,7 +22,7 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -1,3 +1,5 @@
|
||||
// +build ignore
|
||||
|
||||
// Copyright 2015 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -22,7 +24,7 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
func makebox(s tcell.Screen) {
|
||||
|
@ -1,3 +1,5 @@
|
||||
// +build ignore
|
||||
|
||||
// Copyright 2019 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -26,7 +28,7 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
var red = int32(rand.Int() % 256)
|
||||
|
@ -20,8 +20,8 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/encoding"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/gdamore/tcell/v2/encoding"
|
||||
|
||||
"github.com/mattn/go-runewidth"
|
||||
)
|
||||
|
@ -23,8 +23,8 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/encoding"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/gdamore/tcell/v2/encoding"
|
||||
|
||||
"github.com/mattn/go-runewidth"
|
||||
)
|
||||
|
@ -1,3 +1,5 @@
|
||||
// +build ignore
|
||||
|
||||
// Copyright 2019 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -20,8 +22,8 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/encoding"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/gdamore/tcell/v2/encoding"
|
||||
runewidth "github.com/mattn/go-runewidth"
|
||||
)
|
||||
|
||||
|
@ -16,7 +16,7 @@ package encoding
|
||||
|
||||
import (
|
||||
"github.com/gdamore/encoding"
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
|
||||
"golang.org/x/text/encoding/charmap"
|
||||
"golang.org/x/text/encoding/japanese"
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
"github.com/gdamore/tcell/terminfo"
|
||||
"github.com/gdamore/tcell/v2/terminfo"
|
||||
)
|
||||
|
||||
var (
|
||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
||||
module github.com/gdamore/tcell
|
||||
module github.com/gdamore/tcell/v2
|
||||
|
||||
go 1.12
|
||||
|
||||
|
@ -19,7 +19,7 @@ package termbox
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
var screen tcell.Screen
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package adm3a
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package aixterm
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package alacritty
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package ansi
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package aterm
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package beterm
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package bsdos_pc
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2019 The TCell Authors
|
||||
// Copyright 2020 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
@ -24,9 +24,9 @@ package base
|
||||
import (
|
||||
// The following imports just register themselves --
|
||||
// thse are the terminal types we aggregate in this package.
|
||||
_ "github.com/gdamore/tcell/terminfo/a/ansi"
|
||||
_ "github.com/gdamore/tcell/terminfo/v/vt100"
|
||||
_ "github.com/gdamore/tcell/terminfo/v/vt102"
|
||||
_ "github.com/gdamore/tcell/terminfo/v/vt220"
|
||||
_ "github.com/gdamore/tcell/terminfo/x/xterm"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/a/ansi"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/v/vt100"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/v/vt102"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/v/vt220"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/x/xterm"
|
||||
)
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package cygwin
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package d200
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package d210
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package dtterm
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -29,7 +29,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/gdamore/tcell/terminfo"
|
||||
"github.com/gdamore/tcell/v2/terminfo"
|
||||
)
|
||||
|
||||
type termcap struct {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package emacs
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package eterm
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2019 The TCell Authors
|
||||
// Copyright 2020 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
@ -21,49 +21,49 @@ package extended
|
||||
import (
|
||||
// The following imports just register themselves --
|
||||
// these are the terminal types we aggregate in this package.
|
||||
_ "github.com/gdamore/tcell/terminfo/a/adm3a"
|
||||
_ "github.com/gdamore/tcell/terminfo/a/aixterm"
|
||||
_ "github.com/gdamore/tcell/terminfo/a/alacritty"
|
||||
_ "github.com/gdamore/tcell/terminfo/a/ansi"
|
||||
_ "github.com/gdamore/tcell/terminfo/a/aterm"
|
||||
_ "github.com/gdamore/tcell/terminfo/b/beterm"
|
||||
_ "github.com/gdamore/tcell/terminfo/b/bsdos_pc"
|
||||
_ "github.com/gdamore/tcell/terminfo/c/cygwin"
|
||||
_ "github.com/gdamore/tcell/terminfo/d/d200"
|
||||
_ "github.com/gdamore/tcell/terminfo/d/d210"
|
||||
_ "github.com/gdamore/tcell/terminfo/d/dtterm"
|
||||
_ "github.com/gdamore/tcell/terminfo/e/emacs"
|
||||
_ "github.com/gdamore/tcell/terminfo/e/eterm"
|
||||
_ "github.com/gdamore/tcell/terminfo/g/gnome"
|
||||
_ "github.com/gdamore/tcell/terminfo/h/hpterm"
|
||||
_ "github.com/gdamore/tcell/terminfo/h/hz1500"
|
||||
_ "github.com/gdamore/tcell/terminfo/k/konsole"
|
||||
_ "github.com/gdamore/tcell/terminfo/k/kterm"
|
||||
_ "github.com/gdamore/tcell/terminfo/l/linux"
|
||||
_ "github.com/gdamore/tcell/terminfo/p/pcansi"
|
||||
_ "github.com/gdamore/tcell/terminfo/r/rxvt"
|
||||
_ "github.com/gdamore/tcell/terminfo/s/screen"
|
||||
_ "github.com/gdamore/tcell/terminfo/s/simpleterm"
|
||||
_ "github.com/gdamore/tcell/terminfo/s/sun"
|
||||
_ "github.com/gdamore/tcell/terminfo/t/termite"
|
||||
_ "github.com/gdamore/tcell/terminfo/t/tvi910"
|
||||
_ "github.com/gdamore/tcell/terminfo/t/tvi912"
|
||||
_ "github.com/gdamore/tcell/terminfo/t/tvi921"
|
||||
_ "github.com/gdamore/tcell/terminfo/t/tvi925"
|
||||
_ "github.com/gdamore/tcell/terminfo/t/tvi950"
|
||||
_ "github.com/gdamore/tcell/terminfo/t/tvi970"
|
||||
_ "github.com/gdamore/tcell/terminfo/v/vt100"
|
||||
_ "github.com/gdamore/tcell/terminfo/v/vt102"
|
||||
_ "github.com/gdamore/tcell/terminfo/v/vt220"
|
||||
_ "github.com/gdamore/tcell/terminfo/v/vt320"
|
||||
_ "github.com/gdamore/tcell/terminfo/v/vt400"
|
||||
_ "github.com/gdamore/tcell/terminfo/v/vt420"
|
||||
_ "github.com/gdamore/tcell/terminfo/v/vt52"
|
||||
_ "github.com/gdamore/tcell/terminfo/w/wy50"
|
||||
_ "github.com/gdamore/tcell/terminfo/w/wy60"
|
||||
_ "github.com/gdamore/tcell/terminfo/w/wy99_ansi"
|
||||
_ "github.com/gdamore/tcell/terminfo/x/xfce"
|
||||
_ "github.com/gdamore/tcell/terminfo/x/xnuppc"
|
||||
_ "github.com/gdamore/tcell/terminfo/x/xterm"
|
||||
_ "github.com/gdamore/tcell/terminfo/x/xterm_kitty"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/a/adm3a"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/a/aixterm"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/a/alacritty"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/a/ansi"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/a/aterm"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/b/beterm"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/b/bsdos_pc"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/c/cygwin"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/d/d200"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/d/d210"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/d/dtterm"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/e/emacs"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/e/eterm"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/g/gnome"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/h/hpterm"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/h/hz1500"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/k/konsole"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/k/kterm"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/l/linux"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/p/pcansi"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/r/rxvt"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/s/screen"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/s/simpleterm"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/s/sun"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/t/termite"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/t/tvi910"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/t/tvi912"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/t/tvi921"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/t/tvi925"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/t/tvi950"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/t/tvi970"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/v/vt100"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/v/vt102"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/v/vt220"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/v/vt320"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/v/vt400"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/v/vt420"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/v/vt52"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/w/wy50"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/w/wy60"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/w/wy99_ansi"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/x/xfce"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/x/xnuppc"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/x/xterm"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/x/xterm_kitty"
|
||||
)
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package gnome
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package hpterm
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package hz1500
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package konsole
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package kterm
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package linux
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
// -go specifies Go output into the named file. Use - for stdout.
|
||||
// -nofatal indicates that errors loading definitions should not be fatal
|
||||
// -P pkg use the supplied package name
|
||||
// -I import use the named import instead of github.com/gdamore/tcell/terminfo
|
||||
// -I import use the named import instead of github.com/gdamore/tcell/v2/terminfo
|
||||
//
|
||||
|
||||
package main
|
||||
@ -42,7 +42,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/gdamore/tcell/terminfo"
|
||||
"github.com/gdamore/tcell/v2/terminfo"
|
||||
)
|
||||
|
||||
type termcap struct {
|
||||
@ -661,7 +661,7 @@ func dotGoInfo(w io.Writer, terms []*TData) {
|
||||
}
|
||||
|
||||
var packname = ""
|
||||
var tipackname = "github.com/gdamore/tcell/terminfo"
|
||||
var tipackname = "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func dotGoFile(fname string, terms []*TData) error {
|
||||
w := os.Stdout
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package pcansi
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package rxvt
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package screen
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package simpleterm
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package sun
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package termite
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package tvi910
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package tvi912
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package tvi921
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package tvi925
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package tvi950
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package tvi970
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package vt100
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package vt102
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package vt220
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package vt320
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package vt400
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package vt420
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package vt52
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package wy50
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package wy60
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package wy99_ansi
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package xfce
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package xnuppc
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package xterm
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package xterm_kitty
|
||||
|
||||
import "github.com/gdamore/tcell/terminfo"
|
||||
import "github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
func init() {
|
||||
|
||||
|
@ -19,5 +19,5 @@ package tcell
|
||||
import (
|
||||
// This imports the default terminal entries. To disable, use the
|
||||
// tcell_minimal build tag.
|
||||
_ "github.com/gdamore/tcell/terminfo/extended"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/extended"
|
||||
)
|
||||
|
@ -24,8 +24,8 @@ import (
|
||||
// also don't support Android here, because you really don't want
|
||||
// to run external programs there. Generally the android terminals
|
||||
// will be automatically included anyway.
|
||||
"github.com/gdamore/tcell/terminfo"
|
||||
"github.com/gdamore/tcell/terminfo/dynamic"
|
||||
"github.com/gdamore/tcell/v2/terminfo"
|
||||
"github.com/gdamore/tcell/v2/terminfo/dynamic"
|
||||
)
|
||||
|
||||
func loadDynamicTerminfo(term string) (*terminfo.Terminfo, error) {
|
||||
|
@ -19,9 +19,9 @@ package tcell
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/gdamore/tcell/terminfo"
|
||||
"github.com/gdamore/tcell/v2/terminfo"
|
||||
)
|
||||
|
||||
func loadDynamicTerminfo(term string) (*terminfo.Terminfo, error) {
|
||||
func loadDynamicTerminfo(_ string) (*terminfo.Terminfo, error) {
|
||||
return nil, errors.New("terminal type unsupported")
|
||||
}
|
||||
|
@ -25,10 +25,10 @@ import (
|
||||
|
||||
"golang.org/x/text/transform"
|
||||
|
||||
"github.com/gdamore/tcell/terminfo"
|
||||
"github.com/gdamore/tcell/v2/terminfo"
|
||||
|
||||
// import the stock terminals
|
||||
_ "github.com/gdamore/tcell/terminfo/base"
|
||||
_ "github.com/gdamore/tcell/v2/terminfo/base"
|
||||
)
|
||||
|
||||
// NewTerminfoScreen returns a Screen that uses the stock TTY interface
|
||||
|
@ -1,3 +1,5 @@
|
||||
// +build ignore
|
||||
|
||||
// Copyright 2016 The Tcell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -18,8 +20,8 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/views"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/gdamore/tcell/v2/views"
|
||||
)
|
||||
|
||||
var app = &views.Application{}
|
||||
|
@ -1,3 +1,5 @@
|
||||
// +build ignore
|
||||
|
||||
// Copyright 2015 The Tops'l Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -18,8 +20,8 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/views"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/gdamore/tcell/v2/views"
|
||||
)
|
||||
|
||||
type boxL struct {
|
||||
|
@ -1,3 +1,5 @@
|
||||
// +build ignore
|
||||
|
||||
// Copyright 2015 The Tops'l Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -18,8 +20,8 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/views"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/gdamore/tcell/v2/views"
|
||||
)
|
||||
|
||||
type boxL struct {
|
||||
|
@ -17,7 +17,7 @@ package views
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
// Application represents an event-driven application running on a screen.
|
||||
|
@ -15,7 +15,7 @@
|
||||
package views
|
||||
|
||||
import (
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
// BoxLayout is a container Widget that lays out its child widgets in
|
||||
|
@ -17,7 +17,7 @@ package views
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
// CellModel models the content of a CellView. The dimensions used within
|
||||
|
@ -15,7 +15,7 @@
|
||||
package views
|
||||
|
||||
import (
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
// Spacer is a Widget that occupies no visible real-estate. It is useful to
|
||||
|
@ -15,8 +15,9 @@
|
||||
package views
|
||||
|
||||
import (
|
||||
"github.com/gdamore/tcell"
|
||||
"unicode"
|
||||
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
// SimpleStyledText is a form of Text that offers highlighting of the text
|
||||
|
@ -17,7 +17,7 @@ package views
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
// SimpleStyledTextBar is a Widget that provides a single line of text, but
|
||||
|
@ -17,7 +17,7 @@ package views
|
||||
import (
|
||||
"github.com/mattn/go-runewidth"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
// Text is a Widget with containing a block of text, which can optionally
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
// TextArea is a pannable 2 dimensional text widget. It wraps both
|
||||
|
@ -17,7 +17,7 @@ package views
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
// TextBar is a Widget that provides a single line of text, but with
|
||||
|
@ -15,7 +15,7 @@
|
||||
package views
|
||||
|
||||
import (
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
// View represents a logical view on an area. It will have some underlying
|
||||
|
@ -15,7 +15,7 @@
|
||||
package views
|
||||
|
||||
import (
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
// Widget is the base object that all onscreen elements implement.
|
||||
|
Loading…
x
Reference in New Issue
Block a user