示例#1
0
文件: monitor.go 项目: godispy/glfw
//GetName returns a human-readable name of the monitor, encoded as UTF-8.
func (m *Monitor) GetName() (string, error) {
	mn := C.glfwGetMonitorName(m.data)
	if mn == nil {
		return "", errors.New("Can't get monitor name.")
	}

	return C.GoString(mn), nil
}
示例#2
0
文件: monitor.go 项目: godispy/glfw
// GetName returns a human-readable name of the monitor, encoded as UTF-8.
func (m *Monitor) GetName() string {
	mn := C.glfwGetMonitorName(m.data)
	panicError()
	if mn == nil {
		return ""
	}
	return C.GoString(mn)
}