hint_js.go 688 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //go:build js
  2. // +build js
  3. package glfw
  4. var hints = make(map[Hint]int)
  5. type Hint int
  6. const (
  7. AlphaBits Hint = iota
  8. DepthBits
  9. StencilBits
  10. Samples
  11. Focused
  12. Iconified
  13. Maximized
  14. Visible
  15. Hovered
  16. Resizable
  17. Decorated
  18. Floating
  19. AutoIconify
  20. CenterCursor
  21. TransparentFramebuffer
  22. FocusOnShow
  23. ScaleToMonitor
  24. ClientAPI
  25. ContextVersionMajor
  26. ContextVersionMinor
  27. ContextRobustness
  28. ContextReleaseBehavior
  29. OpenGLForwardCompatible
  30. OpenGLDebugContext
  31. OpenGLProfile
  32. // goxjs/glfw-specific hints for WebGL.
  33. PremultipliedAlpha
  34. PreserveDrawingBuffer
  35. PreferLowPowerToHighPerformance
  36. FailIfMajorPerformanceCaveat
  37. )
  38. func WindowHint(target Hint, hint int) {
  39. hints[target] = hint
  40. }