5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 20:21:01 +08:00
wails/v2/internal/frontend/desktop/windows/winc/eventmanager.go
2022-03-29 21:45:16 +11:00

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
}