mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 20:21:01 +08:00
23 lines
404 B
Go
23 lines
404 B
Go
/*
|
|
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
|
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
|
*/
|
|
|
|
package winc
|
|
|
|
type EventHandler func(arg *Event)
|
|
|
|
type EventManager struct {
|
|
handler EventHandler
|
|
}
|
|
|
|
func (evm *EventManager) Fire(arg *Event) {
|
|
if evm.handler != nil {
|
|
evm.handler(arg)
|
|
}
|
|
}
|
|
|
|
func (evm *EventManager) Bind(handler EventHandler) {
|
|
evm.handler = handler
|
|
}
|