source: trunk/ncurses/man/curs_getcchar.3x@ 2787

Last change on this file since 2787 was 2621, checked in by bird, 19 years ago

GNU ncurses 5.5

File size: 4.9 KB
Line 
1.\"***************************************************************************
2.\" Copyright (c) 2001-2002,2003 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_getcchar.3x,v 1.7 2003/05/10 20:33:49 jmc Exp $
30.TH curs_getcchar 3X ""
31.SH NAME
32\fBgetcchar\fP,
33\fBsetcchar\fP \- Get a wide character string and rendition from a \fBcchar_t\fP or set a \fBcchar_t\fP from a wide-character string
34.SH SYNOPSIS
35\fB#include <curses.h>\fP
36.sp
37\fBint getcchar(\fP
38.br
39.B " const cchar_t *\fIwcval\fP,"
40.br
41.B " wchar_t *\fIwch\fP,"
42.br
43.B " attr_t *\fIattrs\fP,"
44.br
45.B " short *\fIcolor_pair\fP,"
46.br
47.B " void *\fIopts\fP );"
48.sp
49.B "int setcchar("
50.br
51.B " cchar_t *\fIwcval\fP,"
52.br
53.B " const wchar_t *\fIwch\fP,"
54.br
55.B " const attr_t \fIattrs\fP,"
56.br
57.B " short \fIcolor_pair\fP,"
58.br
59.B " void *\fIopts\fP );"
60.SH DESCRIPTION
61.PP
62The \fBgetcchar\fP function gets a wide-character string
63and rendition from a \fBcchar_t\fP argument.
64When \fIwch\fP is not a null pointer,
65the \fBgetcchar\fP function does the following:
66.TP 5
67-
68Extracts information from a \fBcchar_t\fP value \fIwcval\fP
69.TP 5
70-
71Stores the character attributes in the location pointed to by \fIattrs\fP
72.TP 5
73-
74Stores the color-pair in the location pointed to by \fIcolor_pair\fP
75.TP 5
76-
77Stores the wide-character string,
78characters referenced by \fIwcval\fP, into the array pointed to by \fIwch\fP.
79.PP
80When
81\fIwch\fP
82is a null pointer, the
83\fBgetcchar\fP
84function does the following:
85.TP 5
86-
87Obtains the number of wide characters pointed to by \fIwcval\fP
88.TP 5
89-
90Does not change the data referenced by
91\fIattrs\fP
92or
93\fIcolor_pair\fP
94.PP
95The \fBsetcchar\fP function initializes the location pointed to by \fIwcval\fP
96by using:
97.TP 5
98-
99The character attributes in
100\fIattrs\fP
101.TP 5
102-
103The color pair in
104\fIcolor_pair\fP
105.TP 5
106-
107The wide-character string pointed to by \fIwch\fP.
108The string must be L'\\0' terminated,
109contain at most one character with strictly positive width,
110which must be the first,
111and contain no characters of negative width.
112.SH NOTES
113.PP
114The \fIopts\fP argument is reserved for future use.
115Currently, an application must provide a null pointer as \fIopts\fP.
116.PP
117The \fIwcval\fP argument may be a value generated by a call to
118\fBsetcchar\fP or by a function that has a \fBcchar_t\fP output argument.
119If \fIwcval\fP is constructed by any other means, the effect is unspecified.
120.SH RETURN VALUES
121.PP
122When \fIwch\fP is a null pointer,
123\fBgetcchar\fP returns the number of wide characters referenced by
124\fIwcval\fP, including the null terminator.
125.PP
126When \fIwch\fP is not a null pointer,
127\fBgetcchar\fP returns \fBOK\fP upon successful completion,
128and \fBERR\fP otherwise.
129.PP
130Upon successful completion, \fBsetcchar\fP returns \fBOK\fP.
131Otherwise, it returns \fBERR\fP.
132.SH SEE ALSO
133.PP
134Functions:
135\fBcurses\fR(3X),
136\fBwcwidth\fR(3X),
137\fBcurs_attr_get\fR(3X),
138\fBcan_change_color\fR(3X).
139.\"#
140.\"# The following sets edit modes for GNU EMACS
141.\"# Local Variables:
142.\"# mode:nroff
143.\"# fill-column:79
144.\"# End:
Note: See TracBrowser for help on using the repository browser.