5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 19:01:02 +08:00
wails/v2/pkg/options/mac/mac.go
Andrey Pshenkin 6c46f6b41c
Implement file association Open a file from Finder/Explorer (#2918)
* implement MacOS openFile/openFiles events

* wip: windows file association

* fix macro import

* add file icon copy

* try copy icon

* keep only required part of scripts

* update config schema

* fix json

* set fileAssociation for mac via config

* proper iconName handling

* add fileAssociation icon generator

* fix file association icons bundle

* don't break compatibility

* remove mimeType as not supported linux for now

* add documentation

* adjust config schema

* restore formatting

* remove unused option in file association

* get rid of openFiles mac os. change configuration structure

* remove unused channel

* fix documentation

* fix typo

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-10-22 06:44:38 +11:00

29 lines
704 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
WebviewIsTransparent bool
WindowIsTranslucent bool
Preferences *Preferences
//ActivationPolicy ActivationPolicy
About *AboutInfo
OnFileOpen func(filePath string) `json:"-"`
//URLHandlers map[string]func(string)
}