Ejemplo n.º 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)
}
Ejemplo n.º 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
}
Ejemplo n.º 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)
}
Ejemplo n.º 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)
}
Ejemplo n.º 5
0
Archivo: video.go Proyecto: salihdb/sdl
// 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)
}