I have looked and I can't seem to find this mentioned anywhere.
Asked
Active
Viewed 693 times
0
-
`wgetch()` expect a `WINDOW` reference/pointer, `getch()` does not. Check the parameter lists of these function. – Progman Jan 03 '21 at 17:58
-
@Progman This doesn't answer the question. What's the purpose of this parameter? – martinkunev Jul 29 '21 at 19:41
-
Most likely to reference a `WINDOW` instance from the ncurses library. Check https://code.woboq.org/linux/include/curses.h.html#WINDOW for its definition and the documentation of the available ncurse functions which work with `WINDOW` parameters. – Progman Jul 29 '21 at 19:47
1 Answers
2
getch()
is equivalent to wgetch(stdscr)
. The function wgetch
does wrefresh
of the specified window and then reads input. So getch()
would refresh stdscr
and then wait for input.
more info here: https://stackoverflow.com/a/22121866/515212

martinkunev
- 1,364
- 18
- 39