Inputs a single-byte character and rendition from a window.
Curses Library (libcurses.a)
#include <curses.h>
chtype inch(void);
chtype mvinch(int y,
int x);
chtype mvwinch(WINDOW *win,
int y,
int x);
chtype winch(WINDOW *win);
The inch, winch, mvinch, and mvwinch subroutines return the character and rendition, of type chtype, at the current or specified position in the current or specified window.
Item | Description |
---|---|
*win | Specifies the window from which to get the character. |
x | |
y |
Upon successful completion, these subroutines return the specified character and rendition. Otherwise, they return (chtype) ERR.
chtype character;
character = inch();
WINDOW *my_window;
chtype character;
character = winch(my_window);
chtype character;
character = mvinch(0, 5);
WINDOW *my_window;
chtype character;
character = mvwinch(my_window, 0, 5);