如果您必须知道,请阅读curses.h,但如上所述,您应该cchar_t使用库调用进行操作,例如setcchar和getcchar.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
引用一串宽字符
(它不是对字符串的引用,而是一个完整的"宽"字符本身).