Beispiel #1
0
func (window *Window) GetPosition(x *int, y *int) {
	var _x, _y C.int
	_window := (*C.SDL_Window)(unsafe.Pointer(window))
	C.SDL_GetWindowPosition(_window, &_x, &_y)
	*x = int(_x)
	*y = int(_y)
}
Beispiel #2
0
func (win *Window) GetPosition() (x, y int) {
	C.SDL_GetWindowPosition(win.c,
		(*C.int)(unsafe.Pointer(&x)),
		(*C.int)(unsafe.Pointer(&y)),
	)

	return
}
Beispiel #3
0
func (window *Window) GetPosition() (x, y int) {
	var _x, _y C.int
	_window := (*C.SDL_Window)(unsafe.Pointer(window))
	C.SDL_GetWindowPosition(_window, &_x, &_y)
	return int(_x), int(_y)
}
Beispiel #4
0
// Window (https://wiki.libsdl.org/SDL_GetWindowPosition)
func (window *Window) GetPosition() (x, y int) {
	var _x, _y C.int
	C.SDL_GetWindowPosition(window.cptr(), &_x, &_y)
	return int(_x), int(_y)
}
Beispiel #5
0
// Position returns the position of the window.
func (win *Window) Position() (x, y int) {
	var cX, cY C.int
	C.SDL_GetWindowPosition(win.cWin, &cX, &cY)
	return int(cX), int(cY)
}