// MaxWindow set the window max
434989
func MaxWindow(pid int32, args ...interface{}) {
	var (
		state = true
		hwnd  int
	)

	if len(args) > 0 {
		state = args[0].(bool)
	}
	if len(args) > 1 {
		hwnd = args[1].(int)
	}

	C.max_window(C.uintptr(pid), C.bool(state), C.uintptr(hwnd))
}
475542
func (s *IntegerParameterRange) SetMaxValue(v string) *IntegerParameterRange {
	s.MaxValue = &v
	return s
}
937650
func (s *RestoreDBClusterFromS3Input) SetPreferredBackupWindow(v string) *RestoreDBClusterFromS3Input {
	s.PreferredBackupWindow = &v
	return s
}
855554
func (a *StartScreencastArgs) SetMaxHeight(maxHeight int) *StartScreencastArgs {
	a.MaxHeight = &maxHeight
	return a
}
340947
func (s *ContinuousParameterRangeSpecification) SetMaxValue(v string) *ContinuousParameterRangeSpecification {
	s.MaxValue = &v
	return s
}
4312
func (s *FieldStats) SetMax(v string) *FieldStats {
	s.Max = &v
	return s
}
120194
func (pb *ProgressBar) SetMaxWidth(width int) *ProgressBar {
	pb.Width = width
	pb.ForceWidth = false
	return pb
}
764210
func (ta *TrackAttributes) MaxKey(key int) *TrackAttributes {
	ta.intAttributes["max_key"] = key
	return ta
}
784212
func (a *Astilectron) NewWindow(url string, o *WindowOptions) (*Window, error) {
	return newWindow(a.options, a.Paths(), url, o, a.canceller, a.dispatcher, a.identifier, a.writer)
}
152092
func MinWindow(pid int32, args ...interface{}) {
	var (
		state = true
		hwnd  int
	)

	if len(args) > 0 {
		state = args[0].(bool)
	}
	if len(args) > 1 {
		hwnd = args[1].(int)
	}

	C.min_window(C.uintptr(pid), C.bool(state), C.uintptr(hwnd))
}
935353
func SetMaxInt(max int64) integerRuleOpt {
	return func(i *rpc.IntegerRule) {
		i.Maximum = max
		i.HasMax = true
	}
}
525041
func (d *compressor) fillWindow(b []byte) {
	// Do not fill window if we are in store-only mode,
	// use constant or Snappy compression.
	switch d.compressionLevel.level {
	case 0, 1, 2:
		return
	}
	// If we are given too much, cut it.
	if len(b) > windowSize {
		b = b[len(b)-windowSize:]
	}
	// Add all to window.
	n := copy(d.window[d.windowEnd:], b)

	// Calculate 256 hashes at the time (more L1 cache hits)
	loops := (n + 256 - minMatchLength) / 256
	for j := 0; j < loops; j++ {
		startindex := j * 256
		end := startindex + 256 + minMatchLength - 1
		if end > n {
			end = n
		}
		tocheck := d.window[startindex:end]
		dstSize := len(tocheck) - minMatchLength + 1

		if dstSize <= 0 {
			continue
		}

		dst := d.hashMatch[:dstSize]
		d.bulkHasher(tocheck, dst)
		var newH uint32
		for i, val := range dst {
			di := i + startindex
			newH = val & hashMask
			// Get previous value with the same hash.
			// Our chain should point to the previous value.
			d.hashPrev[di&windowMask] = d.hashHead[newH]
			// Set the head of the hash chain to us.
			d.hashHead[newH] = uint32(di + d.hashOffset)
		}
		d.hash = newH
	}
	// Update window information.
	d.windowEnd += n
	d.index = n
}
113891
func CreateWindow(title string, width, height int, fullscreen bool, msaa int) {
	CurrentBackEnd = BackEndSDL

	err := sdl.Init(sdl.INIT_EVERYTHING)
	fatalErr(err)

	if !opts.HeadlessMode {
		cursorNone = sdl.CreateSystemCursor(sdl.SYSTEM_CURSOR_NO)
		cursorArrow = sdl.CreateSystemCursor(sdl.SYSTEM_CURSOR_ARROW)
		cursorIBeam = sdl.CreateSystemCursor(sdl.SYSTEM_CURSOR_IBEAM)
		cursorCrosshair = sdl.CreateSystemCursor(sdl.SYSTEM_CURSOR_CROSSHAIR)
		cursorHand = sdl.CreateSystemCursor(sdl.SYSTEM_CURSOR_HAND)
		cursorHResize = sdl.CreateSystemCursor(sdl.SYSTEM_CURSOR_SIZENS)
		cursorVResize = sdl.CreateSystemCursor(sdl.SYSTEM_CURSOR_SIZEWE)
	}

	sdl.GLSetAttribute(sdl.GL_CONTEXT_MAJOR_VERSION, 2)
	sdl.GLSetAttribute(sdl.GL_CONTEXT_MINOR_VERSION, 1)

	if msaa > 0 {
		sdl.GLSetAttribute(sdl.GL_MULTISAMPLEBUFFERS, 1)
		sdl.GLSetAttribute(sdl.GL_MULTISAMPLESAMPLES, msaa)
	}

	SetVSync(opts.VSync)

	Window, err = sdl.CreateWindow(title, sdl.WINDOWPOS_UNDEFINED,
		sdl.WINDOWPOS_UNDEFINED, int32(width), int32(height), sdl.WINDOW_OPENGL)
	fatalErr(err)

	sdlGLContext, err = Window.GLCreateContext()
	fatalErr(err)

	Gl = gl.NewContext()

	if fullscreen {
		Window.SetFullscreen(sdl.WINDOW_FULLSCREEN)
	}
	if opts.NotResizable {
		Window.SetResizable(false)
	} else {
		Window.SetResizable(true)
	}

	gameWidth, gameHeight = float32(width), float32(height)

	w, h := Window.GetSize()
	windowWidth, windowHeight = float32(w), float32(h)

	fw, fh := Window.GLGetDrawableSize()
	canvasWidth, canvasHeight = float32(fw), float32(fh)

	if windowWidth <= canvasWidth && windowHeight <= canvasHeight {
		scale = canvasWidth / windowWidth
	}
}
201530
func (s *JobRun) SetMaxCapacity(v float64) *JobRun {
	s.MaxCapacity = &v
	return s
}
175630
func (s *RelationalDatabase) SetPreferredBackupWindow(v string) *RelationalDatabase {
	s.PreferredBackupWindow = &v
	return s
}
648170
func (s *GetSampledRequestsOutput) SetTimeWindow(v *TimeWindow) *GetSampledRequestsOutput {
	s.TimeWindow = v
	return s
}
1225829
func goWindowCloseCB(window unsafe.Pointer) {
	w := windows.get((*C.GLFWwindow)(window))
	w.fCloseHolder(w)
}