Documentation ¶
Index ¶
- Constants
- type Event
- type EventCallBack
- type EventHandler
- type EventProcessor
- func (processor *EventProcessor) EventHandler(ev *Event)
- func (processor *EventProcessor) GetEventChan() chan Event
- func (processor *EventProcessor) RegEventReciverFunc(eventType EventType, reciver IEventHandler, callback EventCallBack)
- func (processor *EventProcessor) SetEventChannel(channelNum int) bool
- func (processor *EventProcessor) UnRegEventReciverFun(eventType EventType, reciver IEventHandler)
- type EventType
- type IEventHandler
- type IEventProcessor
Constants ¶
View Source
const DefaultEventChannelLen = 10000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventHandler ¶
type EventHandler struct {
// contains filtered or unexported fields
}
func (*EventHandler) Destroy ¶
func (handler *EventHandler) Destroy()
func (*EventHandler) GetEventProcessor ¶
func (handler *EventHandler) GetEventProcessor() IEventProcessor
func (*EventHandler) Init ¶
func (handler *EventHandler) Init(processor IEventProcessor)
func (*EventHandler) NotifyEvent ¶
func (handler *EventHandler) NotifyEvent(ev *Event)
type EventProcessor ¶
type EventProcessor struct {
// contains filtered or unexported fields
}
func (*EventProcessor) EventHandler ¶
func (processor *EventProcessor) EventHandler(ev *Event)
func (*EventProcessor) GetEventChan ¶
func (processor *EventProcessor) GetEventChan() chan Event
func (*EventProcessor) RegEventReciverFunc ¶
func (processor *EventProcessor) RegEventReciverFunc(eventType EventType, reciver IEventHandler, callback EventCallBack)
func (*EventProcessor) SetEventChannel ¶
func (processor *EventProcessor) SetEventChannel(channelNum int) bool
func (*EventProcessor) UnRegEventReciverFun ¶
func (processor *EventProcessor) UnRegEventReciverFun(eventType EventType, reciver IEventHandler)
type IEventHandler ¶
type IEventHandler interface { Init(processor IEventProcessor) GetEventProcessor() IEventProcessor //获得事件 NotifyEvent(*Event) Destroy() // contains filtered or unexported methods }
func NewEventHandler ¶
func NewEventHandler() IEventHandler
type IEventProcessor ¶
type IEventProcessor interface { EventHandler(ev *Event) //同一个IEventHandler,只能接受一个EventType类型回调 RegEventReciverFunc(eventType EventType, reciver IEventHandler, callback EventCallBack) UnRegEventReciverFun(eventType EventType, reciver IEventHandler) SetEventChannel(channelNum int) bool GetEventChan() chan Event // contains filtered or unexported methods }
func NewEventProcessor ¶
func NewEventProcessor() IEventProcessor
Click to show internal directories.
Click to hide internal directories.