コード例 #1
0
ファイル: monitor.go プロジェクト: godispy/glfw
//GetPosition returns the position, in screen coordinates, of the upper-left
//corner of the monitor.
func (m *Monitor) GetPosition() (x, y int) {
	var xpos, ypos C.int

	C.glfwGetMonitorPos(m.data, &xpos, &ypos)
	return int(xpos), int(ypos)
}
コード例 #2
0
ファイル: monitor.go プロジェクト: godispy/glfw
// GetPos returns the position, in screen coordinates, of the upper-left
// corner of the monitor.
func (m *Monitor) GetPos() (x, y int) {
	var xpos, ypos C.int
	C.glfwGetMonitorPos(m.data, &xpos, &ypos)
	panicError()
	return int(xpos), int(ypos)
}