inwch(3) — Subroutines
NAME
inwch, winwch, mvinwch, mvwinwch − Return a wchar_t character and its attribute from a curses window
LIBRARY
The curses library (libcurses.so, libcurses.a)
SYNOPSIS
#include <curses.h>
chtype inwch();
chtype winwch( WINDOW ∗win );
chtype mvinwch(
int y,
int x );
chtype mvwinwch(
WINDOW ∗win,
int y,
int x );
PARAMETERS
winSpecifies a curses window. If not specified, the window is the default window stdscr.
y, xSpecifies the line (y) and column (x) coordinates of the target position on the window. If coordinates are not specified, the target position is the current position of the logical cursor.
DESCRIPTION
The inwch routine returns the wchar_t character of type chtype at the current cursor position in the default window. If any attributes are set for that character, a logical OR operation combines their values into the value returned.
The mvinwch routine returns the wchar_t character of type chtype at position (y, x) in the default window. If any attributes are set for that character, a logical OR operation combines their values into the value returned.
The winwch routine returns the wchar_t character of type chtype at the current position in window win. If any attributes are set for that character, a logical OR operation combines their values into the value returned.
The mvwinwch routine returns the wchar_t character of type chtype at position (y, x) in window win. If any attributes are set for that character, a logical OR operation combines their values into the value returned.
For all the preceding routines, you can use the constants A_CHARTEXT and A_ATTRIBUTES with the & (logical and) operator to extract the character or attributes alone. The A_CHARTEXT and A_ATTRIBUTES constants are defined in curses.h.
The inwch, mvinwch, and mvwinwch routines are macros.
RETURN VALUES
Upon successful completion, the inwch, mvinwch, mvwinwch, and winwch routines return the character at the selected position. Otherwise, the mvinwch and mvwinwch functions return ERR.
RELATED INFORMATION
Functions: curses(3), curses_intro(3), inwstr(3).