ncurses在cchar_t上找不到任何文档

TT-*_*392 1 c c++ unicode ncurses

我试图从我的ncurses终端读取一个字符,其中mvin_wch()返回一个cchar_t,我知道这是一个包含颜色信息和wchar_t等内容的结构.我似乎无法找到有关此cchar_t的任何信息.我只是不知道它的成员名字是什么.我不明白为什么ncursesw库的这么重要的部分没有在任何地方记录.

Tho*_*key 5

如果您必须知道,请阅读curses.h,但如上所述,您应该cchar_t使用库调用进行操作,例如setcchargetcchar.curses的每个实现都使用此结构的不同细节.该ncurses的手册页告诉所有你需要知道它的内容:

           cchar_t
                corresponds to chtype.  However it is a structure, because
                more data is stored than can fit  into  an  integer.   The
                characters  are  large  enough  to  require a full integer
                value - and there may be more than one character per cell.
                The  video  attributes  and  color  are stored in separate
                fields of the structure.

                Each cell (row and column) in a  WINDOW  is  stored  as  a
                cchar_t.
Run Code Online (Sandbox Code Playgroud)

对于视频属性,请注意属性手册页的" 可移植性"部分.

在注释中,有一个指向数据类型的 X/Open Curses页面.其中的描述cchar_t不准确:

cchar_t
引用一串宽字符

(它不是对字符串的引用,而是一个完整的"宽"字符本身).