Beispiel #1
0
// GetChar retrieves a character from standard input stream and returns it.
// In the event of an error or if the input timeout has expired (ie. if
// Timeout() has been set to zero or a positive value and no characters have
// been received) the value returned will be zero (0)
func (w *Window) GetChar() Key {
	ch := C.wgetch(w.win)
	if ch == C.ERR {
		ch = 0
	}
	return Key(ch)
}
Beispiel #2
0
func (win *Window) GetChar() int {
	return int(C.wgetch((*C.WINDOW)(win)))
}
Beispiel #3
0
/* Gets a single character from the input stream */
func (w *Window) GetCh() int {
	return int(C.wgetch((*C.WINDOW)(w)))
}
Beispiel #4
0
func (w *Window) Getch() int {
	return int(C.wgetch(w.win))
}
Beispiel #5
0
// Get char from the standard in.
func (win *Window) Getch() int {
	return int(C.wgetch(win.cwin))
}