コード例 #1
0
ファイル: window.go プロジェクト: juturnas/glfw3
//GetPosition returns the position, in screen coordinates, of the upper-left
//corner of the client area of the window.
func (w *Window) GetPosition() (x, y int) {
	var xpos, ypos C.int

	C.glfwGetWindowPos(w.data, &xpos, &ypos)
	return int(xpos), int(ypos)
}
コード例 #2
0
ファイル: glfw.go プロジェクト: maun/glfw
func WindowPos(window Window) (x, y int) {
	var cx, cy C.int
	C.glfwGetWindowPos(C.GLFWwindow(window), &cx, &cy)
	return int(cx), int(cy)
}
コード例 #3
0
ファイル: window.go プロジェクト: godispy/glfw
// GetPos returns the position, in screen coordinates, of the upper-left
// corner of the client area of the window.
func (w *Window) GetPos() (x, y int) {
	var xpos, ypos C.int
	C.glfwGetWindowPos(w.data, &xpos, &ypos)
	panicError()
	return int(xpos), int(ypos)
}