wails/v2/pkg/options/mac/mac.go
Taite Nazifi 7002f2e943
Content Privacy flag for Windows and MacOS (#4241)
* feat(options): add ContentProtection bool config to macos and windows options

* feat(darwin): implement ContentProtection for darwin

* feat(windows): implement ContentProtection for windows

* chore(website): add feature to changelog

* feat(examples): add an example showcasing the ContentPrivacy flag

* chore(examples): update readme

* fix(example): format and build

* fix(winc): rename to wda and add version check

* chore(reference): add docs for ContentProtection

* fix(darwin): future-proof setting the sharing type

* fix(example): wording consistency

* chore(examples): remove privatewindow example

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2025-07-19 16:58:34 +10:00

31 lines
805 B
Go

package mac
//type ActivationPolicy int
//
//const (
// NSApplicationActivationPolicyRegular ActivationPolicy = 0
// NSApplicationActivationPolicyAccessory ActivationPolicy = 1
// NSApplicationActivationPolicyProhibited ActivationPolicy = 2
//)
type AboutInfo struct {
Title string
Message string
Icon []byte
}
// Options are options specific to Mac
type Options struct {
TitleBar *TitleBar
Appearance AppearanceType
ContentProtection bool
WebviewIsTransparent bool
WindowIsTranslucent bool
Preferences *Preferences
DisableZoom bool
// ActivationPolicy ActivationPolicy
About *AboutInfo
OnFileOpen func(filePath string) `json:"-"`
OnUrlOpen func(filePath string) `json:"-"`
// URLHandlers map[string]func(string)
}