Movatterモバイル変換


[0]ホーム

URL:


man7.org > Linux >man-pages

Linux/UNIX system programming training


curs_variables(3x) — Linux manual page

NAME |SYNOPSIS |DESCRIPTION |NOTES |PORTABILITY |SEE ALSO |COLOPHON

curs_variables(3X)curs_variables(3X)

NAME        top

COLORS,COLOR_PAIRS,COLS,ESCDELAY,LINES,TABSIZE,curscr,newscr,stdscr-cursesglobal variables

SYNOPSIS        top

#include <curses.h>int COLOR_PAIRS;int COLORS;int COLS;int ESCDELAY;int LINES;int TABSIZE;WINDOW * curscr;WINDOW * newscr;WINDOW * stdscr;

DESCRIPTION        top

       This  page summarizes variables provided by thecurseslibrary.  A       more complete description is given in thecurses(3X) manual page.       Depending on the configuration, these may be actual variables,  or       macros  (seecurs_threads(3X)  andcurs_opaque(3X)) which provide       read-only access tocurses's state.  In either case,  applications       should treat them as read-only to avoid confusing the library.COLOR_PAIRS       After  initializing  curses,  this variable contains the number of       color pairs which the terminal can support.  Usually the number of       color pairs will be the productCOLORS*COLORS, however this is not       always true:       •   a few terminals use HLS colors, which do not follow this rule       •   terminals supporting a large number of colors are limited by           the number of color pairs that can be represented in asignedshort value.COLORS       After initializing curses, this variable contains the number of       colors which the terminal can support.COLS       After initializing curses, this variable contains the width of the       screen, i.e., the number of columns.ESCDELAY       This variable holds the number of milliseconds to wait after read‐       ing an escape character, to distinguish between an individual es‐       cape character entered on the keyboard from escape sequences sent       by cursor- and function-keys (see curses(3X)).LINES       After initializing curses, this variable contains the height of       the screen, i.e., the number of lines.TABSIZE       This variable holds the number of columns used by thecurses li‐       brary when converting a tab character to spaces as it adds the tab       to a window (seecurs_addch(3X).The Current Screen       This implementation of curses uses a special windowcurscrto       record its updates to the terminal screen.       This is referred to as the “physical screen” in thecurs_re‐fresh(3X) andcurs_outopts(3X) manual pages.The New Screen       This implementation of curses uses a special windownewscrto hold       updates to the terminal screen before applying them tocurscr.       This is referred to as the “virtual screen” in thecurs_ker‐nel(3X),curs_refresh(3X) andcurs_outopts(3X) manual pages.The Standard Screen       Upon initializing curses, a default window calledstdscr, which is       the size of the terminal screen, is created.  Many curses func‐       tions use this window.

NOTES        top

       The curses library is initialized using eitherinitscr(3X), ornewterm(3X).       Ifcursesis configured to use separate curses/terminfo libraries,       most of these variables reside in the curses library.

PORTABILITY        top

TABSIZEis a feature of SVr4 curses which is not documented by       X/Open curses.       •   In SVr4 curses,TABSIZEis initially set from the terminal de‐           scription'sinit_tabscapability.  After that, it can be al‐           tered by the applications using SVr4 curses.           SVr4 curses uses the current value ofTABSIZEto compute the           position of tabstops for updating both the virtual screen withaddch(3X) as well as the physical screen withmvcur(3X).       •   This implementation uses the current value ofTABSIZEonly for           updating the virtual screen.  It uses the terminal descrip‐           tion'sit(init_tabs) capability for computing hardware tabs           (i.e., tab stops on the physical screen).       •   Other implementations differ.  For instance, NetBSD curses al‐           lowsTABSIZEto be set through an environment variable.  This           implementation does not.           NetBSD curses does not support hardware tabs; it uses theinit_tabscapability and theTABSIZEvariable only for updat‐           ing the virtual screen.ESCDELAYis an extension in AIX curses:       •   In AIX, the units forESCDELAYarefifths of a millisecond.       •   The default value for AIX'sESCDELAYis 0.1 seconds.       •   AIX also enforces a limit of 10,000 seconds forESCDELAY; this           implementation currently has no upper limit.       This implementation has long usedESCDELAYwith units of millisec‐       onds, making it impossible to be completely compatible with AIX.       Likewise, most users have either decided to override the value, or       rely upon its default value.

SEE ALSO        top

curses(3X),curs_opaque(3X),curs_terminfo(3X),curs_threads(3X),term_variables(3X),terminfo(5).

COLOPHON        top

       This page is part of thencurses (new curses) project.  Informa‐       tion about the project can be found at        ⟨https://www.gnu.org/software/ncurses/ncurses.html⟩.  If you have a       bug report for this manual page, send it to       bug-ncurses-request@gnu.org.  This page was obtained from the       project's upstream Git mirror of the CVS repository       ⟨https://github.com/mirror/ncurses.git⟩ on 2025-08-11.  (At that       time, the date of the most recent commit that was found in the       repository was 2023-03-12.)  If you discover any rendering       problems in this HTML version of the page, or you believe there is       a better or more up-to-date source for the page, or you have       corrections or improvements to the information in this COLOPHON       (which isnot part of the original manual page), send a mail to       man-pages@man7.orgcurs_variables(3X)


HTML rendering created 2025-09-06 byMichael Kerrisk, author ofThe Linux Programming Interface.

For details of in-depthLinux/UNIX system programming training courses that I teach, lookhere.

Hosting byjambit GmbH.

Cover of TLPI


[8]ページ先頭

©2009-2025 Movatter.jp