示例#1
0
文件: window.go 项目: juturnas/glfw3
//GetMonitor returns the handle of the monitor that the window is in
//fullscreen on.
func (w *Window) GetMonitor() (*Monitor, error) {
	m := C.glfwGetWindowMonitor(w.data)

	if m == nil {
		return nil, errors.New("Can't get the monitor.")
	}
	return &Monitor{m}, nil
}
示例#2
0
文件: window.go 项目: godispy/glfw
// GetMonitor returns the handle of the monitor that the window is in
// fullscreen on.
//
// Returns nil if the window is in windowed mode.
func (w *Window) GetMonitor() *Monitor {
	m := C.glfwGetWindowMonitor(w.data)
	panicError()
	if m == nil {
		return nil
	}
	return &Monitor{m}
}