Example #1
0
//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)
}
Example #2
0
File: glfw.go Project: 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)
}
Example #3
0
// 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)
}