generated from atomicgo/template
-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
syscall_windows.go
43 lines (36 loc) · 919 Bytes
/
syscall_windows.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package cursor
import (
"syscall"
)
var (
kernel32 = syscall.NewLazyDLL("kernel32.dll")
procFillConsoleOutputCharacter = kernel32.NewProc("FillConsoleOutputCharacterW")
procGetConsoleCursorInfo = kernel32.NewProc("GetConsoleCursorInfo")
procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo")
procSetConsoleCursorInfo = kernel32.NewProc("SetConsoleCursorInfo")
procSetConsoleCursorPosition = kernel32.NewProc("SetConsoleCursorPosition")
)
type short int16
type dword uint32
type word uint16
type coord struct {
x short
y short
}
type smallRect struct {
bottom short
left short
right short
top short
}
type consoleScreenBufferInfo struct {
size coord
cursorPosition coord
attributes word
window smallRect
maximumWindowSize coord
}
type consoleCursorInfo struct {
size dword
visible int32
}