[windows-x] Refactor runtime again

This commit is contained in:
Lea Anthony
2021-07-25 15:37:30 +10:00
parent 179d26b1c4
commit ca8d41dd3b
14 changed files with 142 additions and 98 deletions

15
v2/pkg/runtime/runtime.go Normal file
View File

@@ -0,0 +1,15 @@
// +build !experimental
package runtime
import (
"context"
"github.com/wailsapp/wails/v2/internal/servicebus"
)
// Quit the application
func Quit(ctx context.Context) {
bus := servicebus.ExtractBus(ctx)
// Start shutdown of Wails
bus.Publish("quit", "runtime.Quit()")
}