2020-01-25 23:28:21 -05:00
|
|
|
package d2input
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
2020-07-26 14:52:54 -04:00
|
|
|
|
|
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2interface"
|
2020-01-25 23:28:21 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2020-07-01 14:03:40 -04:00
|
|
|
// ErrHasReg shows the input system already has a registered handler
|
2020-02-09 14:12:04 -05:00
|
|
|
ErrHasReg = errors.New("input system already has provided handler")
|
2020-07-01 14:03:40 -04:00
|
|
|
// ErrNotReg shows the input system has no registered handler
|
2020-02-09 14:12:04 -05:00
|
|
|
ErrNotReg = errors.New("input system does not have provided handler")
|
2020-01-25 23:28:21 -05:00
|
|
|
)
|
2020-07-26 14:52:54 -04:00
|
|
|
|
|
|
|
// Static checks to confirm struct conforms to interface
|
|
|
|
var _ d2interface.InputEventHandler = &HandlerEvent{}
|
|
|
|
var _ d2interface.KeyEvent = &KeyEvent{}
|
|
|
|
var _ d2interface.KeyCharsEvent = &KeyCharsEvent{}
|
|
|
|
var _ d2interface.MouseEvent = &MouseEvent{}
|
|
|
|
var _ d2interface.MouseMoveEvent = &MouseMoveEvent{}
|