Exemple #1
0
func (osx *osxSystemObject) GetCursorPos() (int, int) {
	globalLock.Lock()
	var x, y C.int
	C.GetMousePos(&x, &y)
	globalLock.Unlock()
	wx, wy, _, dy := osx.GetWindowDims()
	return int(x) - wx, dy + wy - int(y)
}
Exemple #2
0
func (osx *osxSystemObject) GetCursorPos() (int, int) {
	var x, y C.int
	C.GetMousePos(&x, &y)
	return osx.rawCursorToWindowCoords(int(x), int(y))
}