// VideoModes returns all available video modes for the monitor.
427744
func (m *Monitor) VideoModes() (vmodes []VideoMode) {
	var modes []*glfw.VidMode
	mainthread.Call(func() {
		modes = m.monitor.GetVideoModes()
	})
	for _, mode := range modes {
		vmodes = append(vmodes, VideoMode{
			Width:       mode.Width,
			Height:      mode.Height,
			RefreshRate: mode.RefreshRate,
		})
	}
	return
}
190774
func (s *spiConfig) GetModeOrDefault(d int) int {
	if s.mode == NotInitialized {
		return d
	}
	return s.mode
}
1287204
func (d *GrovePiDriver) PinMode(pin byte, mode string) error {
	var b []byte
	if mode == "output" {
		b = []byte{CommandPinMode, pin, 1, 0}
	} else {
		b = []byte{CommandPinMode, pin, 0, 0}
	}
	_, err := d.connection.Write(b)

	time.Sleep(2 * time.Millisecond)

	_, err = d.connection.ReadByte()

	return err
}
426318
func getCopyMode(mode string, def bool) (bool, bool) {
	for _, o := range strings.Split(mode, ",") {
		if isEnabled, exists := copyModes[o]; exists {
			return isEnabled, true
		}
	}
	return def, false
}
266110
func (fif *FileInfoFast) Mode() os.FileMode {
	mode := os.FileMode(0400)
	switch fif.ei.Type {
	case data.Dir:
		mode |= os.ModeDir | 0100
	case data.Sym:
		mode |= os.ModeSymlink
	case data.Exec:
		mode |= 0100
	}
	return mode
}
421853
func (fn *GaussDecayFunction) MultiValueMode(mode string) *GaussDecayFunction {
	fn.multiValueMode = mode
	return fn
}
1275271
func (s *StartAutomationExecutionInput) SetMode(v string) *StartAutomationExecutionInput {
	s.Mode = &v
	return s
}
139705
func (p *Player) OnlineMode(m bool, secret []byte) {
	p.crypto = m
	if m {
		p.Conn = cfb8.New(p.net, secret)
	}
}
886499
func (p *pin) SetMode(mode Mode) {
	p.err = p.setMode(mode)
}
166146
func (a *MatrixStatsAggregation) Mode(mode string) *MatrixStatsAggregation {
	a.mode = mode
	return a
}
830035
func (s *Session) Mode() Mode {
	s.m.RLock()
	mode := s.consistency
	s.m.RUnlock()
	return mode
}
750200
func (d *DRV2605LDriver) SetMode(newMode DRV2605Mode) (err error) {
	mode, err := d.connection.ReadByteData(drv2605RegMode)
	if err != nil {
		return err
	}

	// clear mode bits (lower three bits)
	mode &= 0xf8
	// set new mode bits
	mode |= uint8(newMode)

	err = d.connection.WriteByteData(drv2605RegMode, mode)

	return err
}
1365308
func (d *dataEncoder) modeIndicator(dataMode dataMode) *bitset.Bitset {
	switch dataMode {
	case dataModeNumeric:
		return d.numericModeIndicator
	case dataModeAlphanumeric:
		return d.alphanumericModeIndicator
	case dataModeByte:
		return d.byteModeIndicator
	default:
		log.Panic("Unknown data mode")
	}

	return nil
}
987999
func (s *PutRestApiInput) SetMode(v string) *PutRestApiInput {
	s.Mode = &v
	return s
}
845283
func GetNumDisplayModes(displayIndex int) (int, error) {
	n := int(C.SDL_GetNumDisplayModes(C.int(displayIndex)))
	return n, errorFromInt(n)
}
732843
func (s *HlsGroupSettings) SetMode(v string) *HlsGroupSettings {
	s.Mode = &v
	return s
}
322326
func RawMode(t *Term) error {
	var a attr
	if err := termios.Tcgetattr(uintptr(t.fd), (*syscall.Termios)(&a)); err != nil {
		return err
	}
	termios.Cfmakeraw((*syscall.Termios)(&a))
	return termios.Tcsetattr(uintptr(t.fd), termios.TCSANOW, (*syscall.Termios)(&a))
}