mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-06 10:50:45 +08:00
67 lines
1.4 KiB
Go
67 lines
1.4 KiB
Go
package ffenestri
|
|
|
|
import "C"
|
|
|
|
/*
|
|
|
|
#cgo windows CXXFLAGS: -std=c++11
|
|
#cgo windows,amd64 LDFLAGS: -L./windows/x64 -lwebview -lWebView2Loader -lgdi32 -lole32 -lShlwapi -luser32 -loleaut32
|
|
|
|
#include "ffenestri.h"
|
|
|
|
*/
|
|
import "C"
|
|
|
|
func (a *Application) processPlatformSettings() error {
|
|
|
|
config := a.config.Windows
|
|
if config == nil {
|
|
return nil
|
|
}
|
|
|
|
// Check if the webview should be transparent
|
|
if config.WebviewIsTransparent {
|
|
C.WebviewIsTransparent(a.app)
|
|
}
|
|
|
|
if config.WindowBackgroundIsTranslucent {
|
|
C.WindowBackgroundIsTranslucent(a.app)
|
|
}
|
|
|
|
//// Process menu
|
|
////applicationMenu := options.GetApplicationMenu(a.config)
|
|
//applicationMenu := a.menuManager.GetApplicationMenuJSON()
|
|
//if applicationMenu != "" {
|
|
// C.SetApplicationMenu(a.app, a.string2CString(applicationMenu))
|
|
//}
|
|
//
|
|
//// Process tray
|
|
//trays, err := a.menuManager.GetTrayMenus()
|
|
//if err != nil {
|
|
// return err
|
|
//}
|
|
//if trays != nil {
|
|
// for _, tray := range trays {
|
|
// C.AddTrayMenu(a.app, a.string2CString(tray))
|
|
// }
|
|
//}
|
|
//
|
|
//// Process context menus
|
|
//contextMenus, err := a.menuManager.GetContextMenus()
|
|
//if err != nil {
|
|
// return err
|
|
//}
|
|
//if contextMenus != nil {
|
|
// for _, contextMenu := range contextMenus {
|
|
// C.AddContextMenu(a.app, a.string2CString(contextMenu))
|
|
// }
|
|
//}
|
|
//
|
|
//// Process URL Handlers
|
|
//if a.config.Mac.URLHandlers != nil {
|
|
// C.HasURLHandlers(a.app)
|
|
//}
|
|
|
|
return nil
|
|
}
|