settings.go 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. package fyne
  2. // BuildType defines different modes that an application can be built using.
  3. type BuildType int
  4. const (
  5. // BuildStandard is the normal build mode - it is not debug, test or release mode.
  6. BuildStandard BuildType = iota
  7. // BuildDebug is used when a developer would like more information and visual output for app debugging.
  8. BuildDebug
  9. // BuildRelease is a final production build, it is like BuildStandard but will use distribution certificates.
  10. // A release build is typically going to connect to live services and is not usually used during development.
  11. BuildRelease
  12. )
  13. // Settings describes the application configuration available.
  14. type Settings interface {
  15. Theme() Theme
  16. SetTheme(Theme)
  17. // ThemeVariant defines which preferred version of a theme should be used (i.e. light or dark)
  18. //
  19. // Since: 2.0
  20. ThemeVariant() ThemeVariant
  21. Scale() float32
  22. // PrimaryColor indicates a user preference for a named primary color
  23. //
  24. // Since: 1.4
  25. PrimaryColor() string
  26. AddChangeListener(chan Settings)
  27. BuildType() BuildType
  28. ShowAnimations() bool
  29. }