opencv/highgui.go
func (win *Window) SetMouseCallback(on_mouse MouseFunc, param ...interface{}) {

	switch f := on_mouse.(type) {
	case MouseFuncA:
		win.mouseHandle = MouseFunc(f)
	case MouseFuncB:
		win.mouseHandle = MouseFunc(f)
	case func(event, x, y, flags int):
		win.mouseHandle = MouseFunc(f)
	case func(event, x, y, flags int, param ...interface{}):
		win.mouseHandle = MouseFunc(f)
	default:
		panic("unknow func type!")
	}

	if len(param) > 0 {
		win.param = param
	} else {
		win.param = nil
	}
}
func (win *Window) SetMouseCallback(on_mouse MouseFunc, param ...interface{}) {

	switch f := on_mouse.(type) {
	case MouseFuncA:
		win.mouseHandle = MouseFunc(f)
	case MouseFuncB:
		win.mouseHandle = MouseFunc(f)
	case func(event, x, y, flags int):
		win.mouseHandle = MouseFunc(f)
	case func(event, x, y, flags int, param ...interface{}):
		win.mouseHandle = MouseFunc(f)
	default:
		panic("unknow func type!")
	}

	if len(param) > 0 {
		win.param = param
	} else {
		win.param = nil
	}
}
/* assign callback for mouse events */