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  spacing  character,  which
56            must be the first.
57
58            Up  to  CCHARW_MAX-1 nonspacing characters may follow.  Additional
59            nonspacing characters are ignored.
60
61            The string may contain a single  control  character  instead.   In
62            that case, no nonspacing characters are allowed.
63

NOTES

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

RETURN VALUES

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

SEE ALSO

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