Exemple #1
0
// Driver controls how the menu is activated. Action usually corresponds
// to the string return by the Key() function in goncurses.
func (m *Menu) Driver(daction int) error {
	err := C.menu_driver(m.menu, C.int(daction))
	return ncursesError(syscall.Errno(err))
}
Exemple #2
0
func (menu *Menu) Drive(req int) bool {
	return isOk(C.menu_driver((*C.MENU)(menu), C.int(req)))
}
Exemple #3
0
func (m *Menu) Drive(req int) error {
	if C.menu_driver(m.menu, C.int(req)) == ERR {
		return Error
	}
	return nil
}