示例#1
0
文件: evthandler.go 项目: nzlov/wxgo
func (h *evtHandler) bind(f *EventFunc, eventType EventType, id int, lastId int, userData Object) {
	p := ptr(h)
	if p == nil {
		return
	}
	if userData != nil {
		globalObjectTable.unhold(userData)
	}
	C.wxEvtHandler_Bind(p, unsafe.Pointer(f), C.int(eventType), C.int(id), C.int(lastId), ptr(userData))
}
示例#2
0
func (h *evtHandler) bind(f *EventFunc, eventType EventType, id int, lastId int, userData Object) {
	if f == nil {
		panic(nilEventFunc)
	}
	p := wxPtr(h)
	if p == nil {
		return
	}
	userData.unhold()
	C.wxEvtHandler_Bind(p, unsafe.Pointer(f), C.int(eventType), C.int(id), C.int(lastId), wxPtr(userData))
}