Beispiel #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)
}
Beispiel #2
0
Datei: glfw.go Projekt: 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)
}
Beispiel #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)
}