inswstr(3) — Subroutines
NAME
inswstr, insnwstr, winswstr, winnswstr, mvinswstr, mvinsnwstr, mvwinswstr, mvwinsnwstr − Insert a string of wchar_t characters before the character under the cursor in a curses window
LIBRARY
The curses library (libcurses.so, libcurses.a)
SYNOPSIS
#include <curses.h>
int inswstr( wchar_t ∗wstr );
int insnwstr(
wchar_t ∗wstr,
int n );
int winswstr(
WINDOW ∗win,
wchar_t ∗wstr );
int winsnwstr(
WINDOW ∗win,
wchar_t ∗wstr,
int n );
int mvinswstr(
int y,
int x,
wchar_t ∗wstr );
int mvinsnwstr(
int y,
int x,
wchar_t ∗wstr,
int n );
int mvwinswstr(
WINDOW ∗win,
int y,
int x,
wchar_t ∗wstr );
int mvwinsnwstr(
WINDOW ∗win,
int y,
int x,
wchar_t ∗wstr,
int n );
PARAMETERS
wstrSpecifies the wide-character string to be inserted on the window.
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.
nSpecifies the maximum number of wide characters to be inserted from the string.
DESCRIPTION
The inswstr routine inserts a string of wchar_t characters on the default window at the current coordinates.
The insnwstr routine inserts at most n characters in the wchar_t character string wstr on the default window at the current coordinates.
The winswstr routine inserts a string of wchar_t characters on window win at the current coordinates.
The winsnwstr routine inserts at most n characters in the wchar_t character string wstr on window win at the current coordinates.
The mvinswstr routine inserts a string of wchar_t characters on the default window at the coordinates (y, x).
The mvinsnwstr routine inserts at most n characters in the wchar_t character string wstr on the default window at the coordinates (y, x).
The mvwinswstr routine inserts a string of wchar_t characters on window win at the coordinates (y, x).
The mvwinsnwstr routine inserts at most n characters in the wchar_t character string wstr on window win at the coordinates (y, x).
The preceding routines insert as many wchar_t characters as will fit on the line. For the four routines with n as the last argument, only the first n wchar_t characters are inserted. If n is equal to −1, the whole string is inserted. After insertion, all characters from the cursor position to the right edge of the window are moved to the right. The rightmost characters on the line may be lost, even if they are blanks. The cursor position does not change (after moving to y, x, if specified).
If any wchar_t character in wstr is a tab, newline, or backspace, the cursor is moved appropriately within the window. A tab moves the cursor to the next tab position within the window. A newline calls clrtoeol() before moving the cursor to the beginning of the next line. If newline mapping is off, newline moves the cursor to the next line, but the x coordinate is unchanged. If a character in wstr is another control character, it is drawn in the ^X notation. Calling the winwch routine after adding a control character returns the representation of the control character, not the control character.
The inswstr, insnwstr, winswstr, mvinswstr, mvinsnwstr, mvwinswstr, and mvwinsnwstr routines are macros.
RETURN VALUES
The inswstr, insnwstr, winswstr, winsnwstr, mvinswstr, mvinsnwstr, mvwinswstr, and mvwinsnwstr functions return OK on success and ERR on error.
RELATED INFORMATION
Functions: addwstr(3), curses(3), curses_intro(3).