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
|
---|
62 | The \fBgetcchar\fP function gets a wide-character string
|
---|
63 | and rendition from a \fBcchar_t\fP argument.
|
---|
64 | When \fIwch\fP is not a null pointer,
|
---|
65 | the \fBgetcchar\fP function does the following:
|
---|
66 | .TP 5
|
---|
67 | -
|
---|
68 | Extracts information from a \fBcchar_t\fP value \fIwcval\fP
|
---|
69 | .TP 5
|
---|
70 | -
|
---|
71 | Stores the character attributes in the location pointed to by \fIattrs\fP
|
---|
72 | .TP 5
|
---|
73 | -
|
---|
74 | Stores the color-pair in the location pointed to by \fIcolor_pair\fP
|
---|
75 | .TP 5
|
---|
76 | -
|
---|
77 | Stores the wide-character string,
|
---|
78 | characters referenced by \fIwcval\fP, into the array pointed to by \fIwch\fP.
|
---|
79 | .PP
|
---|
80 | When
|
---|
81 | \fIwch\fP
|
---|
82 | is a null pointer, the
|
---|
83 | \fBgetcchar\fP
|
---|
84 | function does the following:
|
---|
85 | .TP 5
|
---|
86 | -
|
---|
87 | Obtains the number of wide characters pointed to by \fIwcval\fP
|
---|
88 | .TP 5
|
---|
89 | -
|
---|
90 | Does not change the data referenced by
|
---|
91 | \fIattrs\fP
|
---|
92 | or
|
---|
93 | \fIcolor_pair\fP
|
---|
94 | .PP
|
---|
95 | The \fBsetcchar\fP function initializes the location pointed to by \fIwcval\fP
|
---|
96 | by using:
|
---|
97 | .TP 5
|
---|
98 | -
|
---|
99 | The character attributes in
|
---|
100 | \fIattrs\fP
|
---|
101 | .TP 5
|
---|
102 | -
|
---|
103 | The color pair in
|
---|
104 | \fIcolor_pair\fP
|
---|
105 | .TP 5
|
---|
106 | -
|
---|
107 | The wide-character string pointed to by \fIwch\fP.
|
---|
108 | The string must be L'\\0' terminated,
|
---|
109 | contain at most one character with strictly positive width,
|
---|
110 | which must be the first,
|
---|
111 | and contain no characters of negative width.
|
---|
112 | .SH NOTES
|
---|
113 | .PP
|
---|
114 | The \fIopts\fP argument is reserved for future use.
|
---|
115 | Currently, an application must provide a null pointer as \fIopts\fP.
|
---|
116 | .PP
|
---|
117 | The \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.
|
---|
119 | If \fIwcval\fP is constructed by any other means, the effect is unspecified.
|
---|
120 | .SH RETURN VALUES
|
---|
121 | .PP
|
---|
122 | When \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
|
---|
126 | When \fIwch\fP is not a null pointer,
|
---|
127 | \fBgetcchar\fP returns \fBOK\fP upon successful completion,
|
---|
128 | and \fBERR\fP otherwise.
|
---|
129 | .PP
|
---|
130 | Upon successful completion, \fBsetcchar\fP returns \fBOK\fP.
|
---|
131 | Otherwise, it returns \fBERR\fP.
|
---|
132 | .SH SEE ALSO
|
---|
133 | .PP
|
---|
134 | Functions:
|
---|
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:
|
---|