Пример #1
0
func (w *Window) Close() (err error) {
	ecode := C.closeWindow(w.cw)
	if ecode != 0 {
		err = errors.New(fmt.Sprintf("error:%d", ecode))
	}
	return
}
Пример #2
0
func (w *Window) Close() (err error) {
	w.oplock.Lock()
	defer w.oplock.Unlock()

	ecode := C.closeWindow(w.cw)
	if ecode != 0 {
		err = errors.New(fmt.Sprintf("error:%d", ecode))
	}
	return
}