示例#1
0
// Get the current position of the mouse
// This function returns the current position of the mouse
// cursor relative to the given window.
func MouseGetPosition(win Window) (int, int) {
	v := C.sfMouse_getPosition(win.Cref)
	return int(v.x), int(v.y)
}
示例#2
0
// Get the current position of the mouse
// This function returns the current position of the mouse
// cursor relative to the desktop
func MouseGetPositionAbsolute() (int, int) {
	v := C.sfMouse_getPosition(nil)
	return int(v.x), int(v.y)
}