Ejemplo n.º 1
0
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))
}
Ejemplo n.º 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))
}