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
34            attrs
35
36       -    Stores the color-pair in the location pointed to by color_pair
37
38       -    Stores  the wide-character string, characters referenced by wcval,
39            into the array pointed to by wch.
40
41       When wch is a null pointer, the getcchar function does the following:
42
43       -    Obtains the number of wide characters pointed to by wcval
44
45       -    Does not change the data referenced by attrs or color_pair
46
47       The setcchar function initializes the location pointed to by  wcval  by
48       using:
49
50       -    The character attributes in attrs
51
52       -    The color pair in color_pair
53
54       -    The  wide-character  string pointed to by wch.  The string must be
55            L'\0' terminated, contain at most one character with strictly pos‐
56            itive width, which must be the first, and contain no characters of
57            negative width.
58

NOTES

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

RETURN VALUES

68       When wch is a null pointer, getcchar returns the number of wide charac‐
69       ters referenced by wcval.
70
71       When wch is not a null pointer, getcchar  returns  OK  upon  successful
72       completion, and ERR otherwise.
73
74       Upon successful completion, setcchar returns OK.  Otherwise, it returns
75       ERR.
76

SEE ALSO

78       Functions: curs_attr(3X), curs_color(3X), curses(3X), wcwidth(3).
79
80
81
82                                                             curs_getcchar(3X)
Impressum