func NewWindow(name string, flags ...int) *Window {
	win_flags := C.int(CV_WINDOW_AUTOSIZE)
	if len(flags) > 0 {
		win_flags = C.int(flags[0])
	}

	win := &Window{
		name:   name,
		name_c: C.CString(name),
		flags:  win_flags,

		trackbarHandle: make(map[string]TrackbarFunc, 50),
		trackbarMax:    make(map[string]int, 50),
		trackbarVal:    make(map[string]int, 50),
		trackbarName:   make(map[string](*C.char), 50),
		trackbarParam:  make(map[string]([]interface{}), 50),
	}
	C.cvNamedWindow(win.name_c, win.flags)
	C.GoOpenCV_SetMouseCallback(win.name_c)

	allWindows[win.name] = win
	return win
}
func NewWindow(name string, flags ...int) *Window {
	win_flags := C.int(CV_WINDOW_AUTOSIZE)
	if len(flags) > 0 {
		win_flags = C.int(flags[0])
	}

	win := &Window{
		name:   name,
		name_c: C.CString(name),
		flags:  win_flags,

		trackbarHandle: make(map[string]TrackbarFunc, 50),
		trackbarMax:    make(map[string]int, 50),
		trackbarVal:    make(map[string]int, 50),
		trackbarName:   make(map[string](*C.char), 50),
		trackbarParam:  make(map[string]([]interface{}), 50),
	}
	C.cvNamedWindow(win.name_c, win.flags)
	C.GoOpenCV_SetMouseCallback(win.name_c)

	allWindows[win.name] = win
	return win
}
/* create window */