Có thể bạn quan tâm
Objects
The <curses.h> header provides a declaration for COLOR_PAIRS, COLORS, COLS, curscr, LINES and stdscr.Constants
The following constants are defined: EOFFunction return value for end-of-file ERRFunction return value for failure FALSEBoolean false value OKFunction return value for success TRUEBoolean true value WEOFWide-character function return value for end-of-file, as defined in <wchar.h>.The following constant is defined if the implementation supports the indicated revision of the X/Open Curses specification: _XOPEN_CURSESX/Open Curses, Issue 4, Version 2, July 1996, (ISBN: 1-85912-171-3, C610) (this document).
Data Types
The following data types are defined through typedef: attr_tAn OR-ed set of attributes boolBoolean data type chtypeA character, attributes and a colour-pair SCREENAn opaque terminal representation wchar_tAs described in <stddef.h> wint_tAs described in <wchar.h> cchar_tReferences a string of wide characters WINDOWAn opaque window representationThese data types are described in more detail in Data Types.
The inclusion of <curses.h> may make visible all symbols from the headers <stdio.h>, <term.h>, <termios.h> and <wchar.h>.
Attribute Bits
The following symbolic constants are used to manipulate objects of type attr_t: WA_ALTCHARSET Alternate character set WA_BLINK Blinking WA_BOLD Extra bright or bold WA_DIM Half bright WA_HORIZONTAL Horizontal highlight WA_INVIS Invisible WA_LEFT Left highlight WA_LOW Low highlight WA_PROTECT Protected WA_REVERSE Reverse video WA_RIGHT Right highlight WA_STANDOUT Best highlighting mode of the terminal WA_TOP Top highlight WA_UNDERLINE Underlining WA_VERTICAL Vertical highlight These attribute flags shall be distinct.The following symbolic constants are used to manipulate attribute bits in objects of type chtype: A_ALTCHARSET Alternate character set A_BLINK Blinking A_BOLD Extra bright or bold A_DIM Half bright A_INVIS Invisible A_PROTECT Protected A_REVERSE Reverse video A_STANDOUT Best highlighting mode of the terminal A_UNDERLINE Underlining These attribute flags need not be distinct except when _XOPEN_CURSES is defined and the application sets _XOPEN_SOURCE_EXTENDED to 1.
The following symbolic constants can be used as bit-masks to extract the components of a chtype: A_ATTRIBUTES Bit-mask to extract attributes A_CHARTEXT Bit-mask to extract a character A_COLOR Bit-mask to extract colour-pair information
Line-drawing Constants
The <curses.h> header defines the symbolic constants shown in the leftmost two columns of the following table for use in drawing lines. The symbolic constants that begin with ACS_ are char constants. The symbolic constants that begin with WACS_ are cchar_t constants for use with the wide-character interfaces that take a pointer to a cchar_t.In the POSIX locale, the characters shown in the POSIX Locale Default column are used when the terminal database does not specify a value using the acsc capability.
char Constant | cchar_t Constant | POSIX Locale Default | Glyph Description |
---|---|---|---|
ACS_ULCORNER | WACS_ULCORNER | + | upper left-hand corner |
ACS_LLCORNER | WACS_LLCORNER | + | lower left-hand corner |
ACS_URCORNER | WACS_URCORNER | + | upper right-hand corner |
ACS_LRCORNER | WACS_LRCORNER | + | lower right-hand corner |
ACS_RTEE | WACS_RTEE | + | right tee |
ACS_LTEE | WACS_LTEE | + | left tee |
ACS_BTEE | WACS_BTEE | + | bottom tee |
ACS_TTEE | WACS_TTEE | + | top tee |
ACS_HLINE | WACS_HLINE | - | horizontal line |
ACS_VLINE | WACS_VLINE | | | vertical line |
ACS_PLUS | WACS_PLUS | + | plus |
ACS_S1 | WACS_S1 | - | scan line 1 |
ACS_S9 | WACS_S9 | _ | scan line 9 |
ACS_DIAMOND | WACS_DIAMOND | + | diamond |
ACS_CKBOARD | WACS_CKBOARD | : | checker board (stipple) |
ACS_DEGREE | WACS_DEGREE | ' | degree symbol |
ACS_PLMINUS | WACS_PLMINUS | # | plus/minus |
ACS_BULLET | WACS_BULLET | o | bullet |
ACS_LARROW | WACS_LARROW | < | arrow pointing left |
ACS_RARROW | WACS_RARROW | > | arrow pointing right |
ACS_DARROW | WACS_DARROW | v | arrow pointing down |
ACS_UARROW | WACS_UARROW | ^ | arrow pointing up |
ACS_BOARD | WACS_BOARD | # | board of squares |
ACS_LANTERN | WACS_LANTERN | # | lantern symbol |
ACS_BLOCK | WACS_BLOCK | # | solid square block |
Colour-related Macros
The following colour-related macros are defined:
Từ khóa » Thư Viện Ncurses
-
Lập Trình Giao Diện Console: NCurses Menu
-
Ncurses Archives
-
Chủ đề: Cài đặt Thư Viện "ncurses" - Diễn Đàn Tin Học
-
Làm Sao để Thêm Thư Viện Curses Cho Python - Dạy Nhau Học
-
Pdcurses: Một Thư Viện Terminal Cho Windows - Cộng đồng C Việt
-
NCURSES Tiếng Việt Là Gì - Trong Tiếng Việt Dịch
-
Thư Viện Lời Nguyền Không Tìm Thấy - HelpEx
-
Thư Viện Giống Như Lời Nguyền Cho ứng Dụng Bảng điều Khiển đa ...
-
Curses (programming Library) - Wikipedia
-
Là Termcap Trên Cygwin
-
Trao đổi Bài Tập Lớn C - HUT - Hedspi - 2E
-
Sự Khác Nhau Cơ Bản Giữa Lập Trình C++ Trong Linux Và Windows Doc
-
Thu01b0 Viu1ec7n cx - Course Hero