Beispiel #1
0
func DetachNotifyHandler(hwnd uint32) {
	key := uintptr(hwnd)
	if _, exists := notifyHandlers[key]; exists {
		C.HTMLayoutSetCallback(C.HWND(C.HANDLE(key)), nil, nil)
		delete(notifyHandlers, key)
	}
}
Beispiel #2
0
func AttachNotifyHandler(hwnd uint32, handler *NotifyHandler) {
	key := uintptr(hwnd)
	// Overwrite if it exists
	notifyHandlers[key] = handler
	C.HTMLayoutSetCallback(C.HWND(C.HANDLE(key)), (*[0]byte)(unsafe.Pointer(goNotifyProc)), C.LPVOID(key))
}