wails/v3/pkg/application/messageprocessor_application.go
2023-08-18 09:58:43 +10:00

25 lines
496 B
Go

package application
import (
"net/http"
)
func (m *MessageProcessor) processApplicationMethod(method string, rw http.ResponseWriter, r *http.Request, window *WebviewWindow, params QueryParams) {
switch method {
case "Quit":
globalApplication.Quit()
m.ok(rw)
case "Hide":
globalApplication.Hide()
m.ok(rw)
case "Show":
globalApplication.Show()
m.ok(rw)
default:
m.httpError(rw, "Unknown event method: %s", method)
}
m.Info("Runtime:", "method", "Application."+method)
}