blob: 51ac1a4b5c35e38edbc63163eb38181d3c0b38cc [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301.\"***************************************************************************
2.\" Copyright (c) 2001-2002,2006 Free Software Foundation, Inc. *
3.\" *
4.\" Permission is hereby granted, free of charge, to any person obtaining a *
5.\" copy of this software and associated documentation files (the *
6.\" "Software"), to deal in the Software without restriction, including *
7.\" without limitation the rights to use, copy, modify, merge, publish, *
8.\" distribute, distribute with modifications, sublicense, and/or sell *
9.\" copies of the Software, and to permit persons to whom the Software is *
10.\" furnished to do so, subject to the following conditions: *
11.\" *
12.\" The above copyright notice and this permission notice shall be included *
13.\" in all copies or substantial portions of the Software. *
14.\" *
15.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
16.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
17.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
18.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
19.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
20.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
21.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
22.\" *
23.\" Except as contained in this notice, the name(s) of the above copyright *
24.\" holders shall not be used in advertising or otherwise to promote the *
25.\" sale, use or other dealings in this Software without prior written *
26.\" authorization. *
27.\"***************************************************************************
28.\"
29.\" $Id: curs_add_wch.3x,v 1.6 2006/12/24 15:22:22 tom Exp $
30.TH curs_add_wch 3X ""
31.SH NAME
32\fBadd_wch\fP,
33\fBwadd_wch\fP,
34\fBmvadd_wch\fP,
35\fBmvwadd_wch\fP,
36\fBecho_wchar\fP,
37\fBwecho_wchar\fP - add a complex character and rendition to a \fBcurses\fR window, then advance the cursor
38.SH SYNOPSIS
39.PP
40\fB#include <curses.h>\fP
41.sp
42.B "int add_wch( const cchar_t *\fIwch\fB );"
43.br
44.B "int wadd_wch( WINDOW *\fIwin\fP, const cchar_t *\fIwch\fB );"
45.br
46.B "int mvadd_wch( int \fIy\fP, int \fIx\fP, const cchar_t *\fIwch\fB );"
47.br
48.B "int mvwadd_wch( WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const cchar_t *\fIwch\fB );"
49.br
50.B "int echo_wchar( const cchar_t *\fIwch\fB );"
51.br
52.B "int wecho_wchar( WINDOW *\fIwin\fP, const cchar_t *\fIwch\fB );"
53.br
54.SH DESCRIPTION
55.PP
56The
57\fBadd_wch\fP,
58\fBwadd_wch\fP,
59\fBmvadd_wch\fP, and
60\fBmvwadd_wch\fP
61functions put the complex character \fIwch\fP into the given
62window at its current position,
63which is then advanced.
64These functions perform
65wrapping and special-character processing as follows:
66.TP 5
67-
68If \fIwch\fP refers to a spacing character,
69then any previous character at that location is removed.
70A new character specified by \fIwch\fP is
71placed at that location with rendition specified by \fIwch\fP.
72The cursor then advances to
73the next spacing character on the screen.
74.TP 5
75-
76If \fIwch\fP refers to a non-spacing character,
77all previous characters at that location are preserved.
78The non-spacing characters of \fIwch\fP
79are added to the spacing complex character,
80and the rendition specified by \fIwch\fP is ignored.
81.TP 5
82-
83If the character part of \fIwch\fP is
84a tab, newline, backspace or other control character,
85the window is updated and the cursor moves as if \fBaddch\fR were called.
86.PP
87The \fBecho_wchar\fP
88function is functionally equivalent to a call to
89\fBadd_wch\fP
90followed by a call to
91\fBrefresh\fP.
92Similarly, the
93\fBwecho_wchar\fP
94is functionally equivalent to a call to
95\fBwadd_wch\fP
96followed by a call to
97\fBwrefresh\fP.
98The knowledge
99that only a single character is being output is taken into consideration and,
100for non-control characters, a considerable performance gain might be seen
101by using the *\fBecho\fP* functions instead of their equivalents.
102.SH RETURN VALUES
103.PP
104All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success.
105.SH NOTES
106.PP
107Note that
108\fBadd_wch\fP,
109\fBmvadd_wch\fP,
110\fBmvwadd_wch\fP, and
111\fBecho_wchar\fP
112may be macros.
113.SH PORTABILITY
114.PP
115All these functions are described in the XSI Curses standard, Issue 4.
116The defaults specified for forms-drawing characters apply in the POSIX locale.
117.PP
118XSI documents constants beginning with \fBWACS_\fP which are used for
119line-drawing.
120Those are not currently implemented in \fBncurses\fP.
121.SH SEE ALSO
122.PP
123\fBcurses\fR(3X),
124\fBcurs_addch\fR(3X),
125\fBcurs_attr\fR(3X),
126\fBcurs_clear\fR(3X),
127\fBcurs_outopts\fR(3X),
128\fBcurs_refresh\fR(3X),
129\fBputwc\fR(3)
130.\"#
131.\"# The following sets edit modes for GNU EMACS
132.\"# Local Variables:
133.\"# mode:nroff
134.\"# fill-column:79
135.\"# End: