2016-01-18 23:19:51 +01:00
|
|
|
package data // code.bitsetter.de/fun/gosl/data
|
|
|
|
|
2016-01-19 16:38:15 +01:00
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"log"
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/rthornton128/goncurses"
|
|
|
|
)
|
|
|
|
|
2016-01-18 23:19:51 +01:00
|
|
|
type Screen struct {
|
|
|
|
w, h int
|
|
|
|
data []rune
|
|
|
|
}
|
2016-01-19 16:38:15 +01:00
|
|
|
|
|
|
|
func TestNC() {
|
|
|
|
win, err := goncurses.Init()
|
|
|
|
if err != nil {
|
|
|
|
log.Fatal(err)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
win.Clear()
|
|
|
|
w, h := win.MaxYX()
|
|
|
|
goncurses.End()
|
|
|
|
fmt.Printf("screen: %d x %d", w, h)
|
|
|
|
|
|
|
|
}
|