inch3ncurses
Get a curses character from a window
Usage
#include <curses.h>
chtype inch(void); chtype winch(WINDOW * win); chtype mvinch(int y, int x); chtype mvwinch(WINDOW * win, int y, int x);
Overview
winch returns the curses character, including its attributes and color pair identifier, at the cursor position in the window win. Subsection “Video Attributes” of attron(3NCURSES) explains how to extract these data from a chtype. ncurses(3NCURSES) describes the variants of this function.
Return value
These functions return OK on success and ERR on failure.
In ncurses, they return ERR if win is NULL.
Functions prefixed with “mv” first perform cursor movement and fail if the position (y, x) is outside the window boundaries.
Notes
inch, mvinch, and mvwinch may be implemented as macros.
These functions do not fail if the window contains cells of curses complex characters; that is, if they contain characters with codes wider than eight bits (or greater than 255 as an unsigned decimal integer). They instead extract only the low-order eight bits of the character code from the cell.
Portability
X/Open Curses Issue 4 describes these functions. It specifies no error conditions for them.
Releases
18 releases since Debian 1.1 (Buzz); the text changed 12 times.