1// +build windows
2
3package readline
4
5import (
6	"io"
7	"syscall"
8)
9
10func SuspendMe() {
11}
12
13func GetStdin() int {
14	return int(syscall.Stdin)
15}
16
17func init() {
18	isWindows = true
19}
20
21// get width of the terminal
22func GetScreenWidth() int {
23	info, _ := GetConsoleScreenBufferInfo()
24	if info == nil {
25		return -1
26	}
27	return int(info.dwSize.x)
28}
29
30// ClearScreen clears the console screen
31func ClearScreen(_ io.Writer) error {
32	return SetConsoleCursorPosition(&_COORD{0, 0})
33}
34
35func DefaultIsTerminal() bool {
36	return true
37}
38
39func DefaultOnWidthChanged(func()) {
40
41}
42