5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-04 17:30:17 +08:00
wails/v3/pkg/application/events_common_windows.go

18 lines
461 B
Go

//go:build windows
package application
import "github.com/wailsapp/wails/v3/pkg/events"
var commonApplicationEventMap = map[events.ApplicationEventType]events.ApplicationEventType{
events.Windows.SystemThemeChanged: events.Common.ThemeChanged,
}
func (m *windowsApp) setupCommonEvents() {
for sourceEvent, targetEvent := range commonApplicationEventMap {
m.parent.On(sourceEvent, func(event *Event) {
applicationEvents <- uint(targetEvent)
})
}
}