5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 14:29:50 +08:00
wails/lib/interfaces/eventmanager.go
Lea Anthony 6c5d5e40f4
262 add wails shutdown method (#264)
* feat: support close in bridge mode

* feat: WailsShutdown callback

Now handles proper shutdown through:
  * runtime.Window.Close()
  * Killing the main window
  * Ctrl-C
2019-10-23 14:04:41 +11:00

13 lines
315 B
Go

package interfaces
import "github.com/wailsapp/wails/lib/messages"
// EventManager is the event manager interface
type EventManager interface {
PushEvent(*messages.EventData)
Emit(eventName string, optionalData ...interface{})
On(eventName string, callback func(...interface{}))
Start(Renderer)
Shutdown()
}