示例#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)
}
示例#2
0
文件: video.go 项目: DeedleFake/sdl
func (win *Window) GetPosition() (x, y int) {
	C.SDL_GetWindowPosition(win.c,
		(*C.int)(unsafe.Pointer(&x)),
		(*C.int)(unsafe.Pointer(&y)),
	)

	return
}
示例#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)
}
示例#4
0
文件: video.go 项目: flazz/go-sdl2
// 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)
}
示例#5
0
文件: video.go 项目: 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)
}