Documentation
¶
Overview ¶
Package macoslite is a minimal macOS-native window host for small utility windows (settings, updaters, prompts). It talks to AppKit, CoreGraphics and CoreText directly through purego and does not load the Tango App, WebView, ui.Runner, layout, accessibility or GPU renderer, so an idle window costs far less memory than a full Tango surface.
Experimental: the API may change incompatibly between minor releases.
It is independent of uihost.Open and does not replace it. On platforms other than macOS, New returns ErrUnsupported. See docs/specs/macos-native-lite-design.md.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrUnsupported is returned by New on platforms other than macOS. ErrUnsupported = errors.New("macoslite: unsupported platform") // ErrInvalidOptions wraps option validation failures. ErrInvalidOptions = errors.New("macoslite: invalid options") // ErrNilView is returned when New is given a nil View. ErrNilView = errors.New("macoslite: nil view") )
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct{}
App is unavailable on this platform; New always fails.
func (*App) Invalidate ¶
func (*App) Invalidate()
func (*App) TrimCaches ¶
func (*App) TrimCaches()
type Frame ¶
type Frame struct {
Width, Height, Scale float64
}
Frame describes the frame being drawn, in points; Scale is the backing scale factor (2 on Retina).
type KeyEvent ¶
KeyEvent is a key press or release. Key is "Escape", "Enter", "Tab", "Backspace" or the typed characters; Code is the hardware key code.
type MouseEvent ¶
MouseEvent is a pointer event in view coordinates.
type Options ¶
type Options struct {
Name, Title string
Width, Height float64 // content size in points; both must be > 0
}
Options configures the single window of an App.