Пример #1
0
// Mark sets the indicator for the currently selected menu item
func (m *Menu) Mark(mark string) error {
	cmark := C.CString(mark)
	defer C.free(unsafe.Pointer(cmark))

	err := C.set_menu_mark(m.menu, cmark)
	return ncursesError(syscall.Errno(err))
}
Пример #2
0
func (menu *Menu) SetMark(mark string) bool {
	return isOk(C.set_menu_mark((*C.MENU)(menu), C.CString(mark)))
}
Пример #3
0
func (m *Menu) SetMark(mark string) error {
	if C.set_menu_mark(m.menu, C.CString(mark)) == ERR {
		return Error
	}
	return nil
}