'\" te .\" Copyright (c) 1990, 1995 by Mortice Kern Systems Inc. All Rights Reserved Portions Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH ADDNWSTR 3XCURSES "Jun 5, 2002" .SH NAME addnwstr, addwstr, mvaddnwstr, mvaddwstr, mvwaddnwstr, mvwaddwstr, waddnwstr, waddwstr \- add a wide-character string to a window .SH SYNOPSIS .LP .nf \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-I\fR /usr/xpg4/include \fB -L \fR /usr/xpg4/lib \e \fB -R \fR /usr/xpg4/lib \fB -lcurses \fR [ \fIlibrary\fR... ] \fBc89\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lcurses\fR [ \fIlibrary\fR ... ] #include \fBint\fR \fBaddnwstr\fR(\fBconst wchar_t *\fR\fIwstr\fR, \fBint\fR \fIn\fR); .fi .LP .nf \fBint\fR \fBaddwstr\fR(\fBconst wchar_t *\fR\fIwstr\fR); .fi .LP .nf \fBint\fR \fBmvaddnwstr\fR(\fBint\fR \fIy\fR, \fBint\fR \fIx\fR, \fBconst wchar_t *\fR\fIwstr\fR, \fBint\fR \fIn\fR); .fi .LP .nf \fBint\fR \fBmvaddwstr\fR(\fBint\fR \fIy\fR, \fBint\fR \fIx\fR, \fBconst wchar_t *\fR\fIwstr\fR); .fi .LP .nf \fBint\fR \fBmvwaddnwstr\fR(\fBWINDOW*\fR\fIwin\fR, \fBint\fR \fIy\fR, \fBint\fR \fIx\fR, \fBconst wchar_t *\fR\fIwstr\fR, \fBint\fR \fIn\fR); .fi .LP .nf \fBint\fR \fBmvwaddwstr\fR(\fBWINDOW*\fR\fIwin\fR, \fBint\fR \fIy\fR, \fBint\fR \fIx\fR, \fBconst wchar_t *\fR\fIwstr\fR); .fi .LP .nf \fBint\fR \fBwaddnwstr\fR(\fBWINDOW*\fR\fIwin\fR, \fBconst wchar_t *\fR\fIwstr\fR, \fBint\fR \fIn\fR); .fi .LP .nf \fBint\fR \fBwaddwstr\fR(\fBWINDOW*\fR\fIwin\fR, \fBconst wchar_t *\fR\fIwstr\fR); .fi .SH DESCRIPTION .sp .LP The \fBaddwstr()\fR function writes a null-terminated wide-character string to the \fBstdscr\fR window at the current cursor position. The \fBwaddwstr()\fR function performs an identical action, but writes the string to the window specified by \fIwin\fR. The \fBmvaddwstr()\fR and \fBmvwaddwstr()\fR functions write the string to the position indicated by the \fIx\fR (column) and \fIy\fR (row) parameters (the former to the \fBstdscr\fR window; the latter to window \fIwin\fR). .sp .LP The \fBaddnwstr()\fR, \fBwaddnwstr()\fR, \fBmvaddnwstr()\fR, and \fBmvwaddnwstr()\fR functions write at most \fIn\fR characters to the window. If \fIn\fR is less than 0, the entire string is written. The former two functions place the characters at the current cursor position; the latter two commands use the position specified by the \fIx\fR and \fIy\fR parameters. .sp .LP All of these functions advance the cursor after writing the string. .sp .LP These functions are functionally equivalent to building a \fBcchar_t\fR from the \fBwchar_t\fR and the window rendition (or background character and rendition) and calling the \fBwadd_wch\fR(3XCURSES) function once for each \fBwchar_t\fR in the string. Refer to the \fBcurses\fR(3XCURSES) man page for a complete description of special character handling and of the interaction between the window rendition (or background character and rendition) and the character written. .sp .LP Note that these functions differ from the \fBadd_wchnstr\fR(3XCURSES) set of functions in that the latter copy the string as is (without combining each character with the foreground and background attributes of the window). .SH PARAMETERS .sp .ne 2 .na \fB\fIwstr\fR\fR .ad .RS 8n Is a pointer to the wide-character string that is to be written to the window. .RE .sp .ne 2 .na \fB\fIn\fR\fR .ad .RS 8n Is the maximum number of characters to be copied from \fIwstr\fR. If \fIn\fR is less than 0, the entire string is written or as much of it as fits on the line. .RE .sp .ne 2 .na \fB\fIy\fR\fR .ad .RS 8n Is the y (row) coordinate of the starting position of \fIwstr\fR in the window. .RE .sp .ne 2 .na \fB\fIx\fR\fR .ad .RS 8n Is the x (column) coordinate of the starting position of \fIwstr\fR in the window. .RE .sp .ne 2 .na \fB\fIwin\fR\fR .ad .RS 8n Is a pointer to the window in which the string is to be written. .RE .SH RETURN VALUES .sp .LP On success, these functions return \fBOK\fR. Otherwise, they return \fBERR\fR. .SH ERRORS .sp .LP None. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS box; c | c l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Standard _ MT-Level Unsafe .TE .SH SEE ALSO .sp .LP \fBadd_wch\fR(3XCURSES), \fBadd_wchnstr\fR(3XCURSES), \fBcurses\fR(3XCURSES), \fBlibcurses\fR(3XCURSES), \fBattributes\fR(5), \fBstandards\fR(5)