Files

12 lines
216 B
Go
Raw Permalink Normal View History

2022-12-06 20:55:56 +11:00
//go:build windows
package win32
import "unsafe"
func GetCursorPos() (x, y int, ok bool) {
pt := POINT{}
ret, _, _ := procGetCursorPos.Call(uintptr(unsafe.Pointer(&pt)))
return int(pt.X), int(pt.Y), ret != 0
}