1curs_getcchar(3X)                                            curs_getcchar(3X)
2
3
4

NAME

6       getcchar,  setcchar  - Get a wide character string and rendition from a
7       cchar_t or set a cchar_t from a wide-character string
8

SYNOPSIS

10       #include <curses.h>
11
12       int getcchar(
13               const cchar_t *wcval,
14               wchar_t *wch,
15               attr_t *attrs,
16               short *color_pair,
17               void *opts );
18
19       int setcchar(
20               cchar_t *wcval,
21               const wchar_t *wch,
22               const attr_t attrs,
23               short color_pair,
24               void *opts );
25

DESCRIPTION

27       The getcchar function gets a wide-character string and rendition from a
28       cchar_t  argument.   When wch is not a null pointer, the getcchar func‐
29       tion does the following:
30
31       ·   Extracts information from a cchar_t value wcval
32
33       ·   Stores the character attributes in the location pointed to by attrs
34
35       ·   Stores the color-pair in the location pointed to by color_pair
36
37       ·   Stores the wide-character string, characters referenced  by  wcval,
38           into the array pointed to by wch.
39
40       When wch is a null pointer, the getcchar function does the following:
41
42       ·   Obtains the number of wide characters pointed to by wcval
43
44       ·   Does not change the data referenced by attrs or color_pair
45
46       The  setcchar  function initializes the location pointed to by wcval by
47       using:
48
49       ·   The character attributes in attrs
50
51       ·   The color pair in color_pair
52
53       ·   The wide-character string pointed to by wch.  The  string  must  be
54           L'\0' terminated, contain at most one spacing character, which must
55           be the first.
56
57           Up to CCHARW_MAX-1 nonspacing characters  may  follow.   Additional
58           nonspacing characters are ignored.
59
60           The string may contain a single control character instead.  In that
61           case, no nonspacing characters are allowed.
62

NOTES

64       The opts argument is reserved for future use.  Currently,  an  applica‐
65       tion must provide a null pointer as opts.
66
67       The wcval argument may be a value generated by a call to setcchar or by
68       a function that has a cchar_t output argument.  If wcval is constructed
69       by any other means, the effect is unspecified.
70

RETURN VALUE

72       When wch is a null pointer, getcchar returns the number of wide charac‐
73       ters referenced by wcval, including one for a trailing null.
74
75       When wch is not a null pointer, getcchar  returns  OK  upon  successful
76       completion, and ERR otherwise.
77
78       Upon successful completion, setcchar returns OK.  Otherwise, it returns
79       ERR.
80

SEE ALSO

82       Functions: curs_attr(3X), curs_color(3X), curses(3X), wcwidth(3).
83
84
85
86                                                             curs_getcchar(3X)
Impressum