Modules

Extended color’s, color pairs and attributes module

Compiled in ncursesw features

NCurses Form module

NCurses Menu module

NCurses Mouse module

Normal color’s, color pairs and attributes module

NCurses Panels module

NCurses API shims module

Structs

Ascii character and rendition.

Ascii string and rendition.

Complex character (wide character and rendition).

Complex character string (wide characters and renditions).

Origin using y and x axis

A region of a window.

A size (usually a window).

Wide character (UTF-8 character).

Wide character string (UTF-8).

Enums

Normal and extended attributes and color pair returned by ncurses functions.

Make a line look like it’s been touched since last wrefresh, used by wtouchln.

Return a GetCharacterType from the getch() and get_wch() families of functions.

Cursor type.

Justification.

Keys returned by NCurses getch() and get_wch() families of functions.

Override locale-encoding checks.

The color type that ncursesw is running under. by default it will be ColorType::Normal until a ColorPair structure is generated.

NCursesw Errors/Events.

The screen region (top or bottom) to rip a line off.

The soft-label layout type

Traits

Attributes.

Color attribute type in the NCurses library.

Color pair’s colors.

Color pair.

Color.

Background and foreground colors.

ncursesw get function type.

Functions

Return the number of colors available.

COLOR_PAIRDeprecated

Return the attribute value of a given normal color pair.

Return the number of color pairs available.

Return the number of columns (x-axis) available on the terminal.

Return the delay used to interpret termianl keyboard escape sequences.

Return the number of lines (y-axis) available on the terminal.

PAIR_NUMBERDeprecated

Return the color pair number from given normal attributes value.

Return the number of columns a tab represents on the terminal.

Equivalent of wadd_wch() using stdscr() as window handle.

Equivalent of wadd_wchnstr() using stdscr() as window handle.

Equivalent of wadd_wchstr() using stdscr() as window handle.

Equivalent of waddch() using stdscr() as window handle.

Equivalent of waddchnstr() using stdscr() as window handle.

Equivalent of waddchstr() using stdscr() as window handle.

Equivalent of waddnstr() using stdscr() as window handle.

Equivalent of waddnwstr() using stdscr() as window handle.

Equivalent of waddstr() using stdscr() as window handle.

Equivalent of waddwstr() using stdscr() as window handle.

This defines which colors to paint for color pair 0. This function recognizes a special color Color::TerminalDefault, which denotes the default terminal color.

Screen function of assume_default_colors().

Equivalent of wattr_get() using stdscr() as window handle.

Equivalent of wattr_off() using stdscr() as window handle.

Equivalent of wattr_on() using stdscr() as window handle.

Equivalent of wattr_set() using stdscr() as window handle.

Equivalent of wattroff() using stdscr() as window handle.

Equivalent of wattron() using stdscr() as window handle.

Equivalent of wattron() using stdscr() as window handle.

Return the output speed of the terminal in bits per second. On software terminal emulators it will have a fixed high value. Included for historical reasons; in former times, it was used to write output loops for time delays and occasionally to change interfaces depending on the line speed.

Screen function of baudrate().

Emit a short attention sound.

Screen function of beep().

Set the background property of the window to the character ch. The change is then applied to every character position in that window:

Set the window’s background. A window’s background consists of a character and it’s combination of attributes. The attribute part of the background is combined (OR’ed) with all non-blank characters that are written into the window. Both the character and attribute parts of the background are combined with the blank characters. The background becomes a property of the character and moves with the character through any scrolling and insert/delete line/character operations.

Equivalent of wbkgrnd() using stdscr() as window handle.

Equivalent of wbkgrndset() using stdscr() as window handle.

Equivalent of wborder() using stdscr() as window handle.

Equivalent of wborder_set() using stdscr() as window handle.

Similar to border(), but both ls and rs are vertch and both ts and bs are horch. The default corner characters are always used by this function.

Similar to border_set(), but both ls and rs are vertch and both ts and bs are horch. The default corner characters are always used by this function.

Return true or false, depending on whether the programmer can change the colors displayed by the terminal.

Screen function of can_change_color().

Enter cbreak mode. In cbreak mode (sometimes called “rare” mode) normal tty line buffering is turned off and characters are available to be read one by one. However, unlike raw mode, special characters (interrupt, quit, suspend, and flow control) retain their effects on the tty driver and calling program. Calling first raw() then cbreak() leaves the terminal in cbreak mode.

Screen function of cbreak().

Equivalent of wchgat() using stdscr() as window handle.

Equivalent of wclear() using stdscr() as window handle.

If flag is true, the next call to refresh() will clear the window completely.

Equivalent of wclrtobot() using stdscr() as window handle.

Equivalent of wclrtoeol() using stdscr() as window handle.

color_contentDeprecated

Return the intensity of the red, green, and blue (RGB) components in the color, which must be between 0 and COLORS. Return a structure, containing the R,G,B values for the given color, which will be between 0 (no component) and 1000 (maximum amount of component).

Screen function of color_content().

Equivalent of wcolor_set() using stdscr() as window handle.

The copywin() routine provides a finer granularity of control over the overlay() and overwrite() routines. As in the prefresh() routine, a rectangle is specified in the destination window, (dmin) and (dmax), and the upper-left-corner coordinates of the source window, (smin). If the argument overlay is true, then copying is non-destructive, as in overlay().

Set the cursor state. visibility can be set to invisible, normal, or very visible. If the terminal supports the visibility requested, return the previous cursor state; otherwise raise an exception. On many terminals, the “visible” mode is an underline cursor and the “very visible” mode is a block cursor.

Screen function of curs_set().

Return the raw pointer to the current screen.

Return the version number, including patch level of the underlying library, e.g., 6.1.20180127.

Save the current terminal mode as the “program” mode, the mode when the running program is using NCurses. (Its counterpart is the “shell” mode, for when the program is not in NCurses.) Subsequent calls to reset_prog_mode() will restore this mode.

Screen function of def_prog_mode().

Save the current terminal mode as the “shell” mode, the mode when the running program is not using NCurses. (Its counterpart is the “program” mode, when the program is using NCurses capabilities.) Subsequent calls to reset_shell_mode() will restore this mode.

Screen function of def_shell_mode().

Permits an application to define keycodes with their corresponding control strings, so that the NCurses library will interpret them just as it would the predefined codes in the terminfo database.

Screen function of define_key().

Insert an ms millisecond pause in output.

Screen function of delay_output().

Equivalent of wdelch() using stdscr() as window handle.

Delete the line under the cursor. All following lines are moved up by one line.

The delscreen() routine frees storage associated with the SCREEN data structure. The endwin() routine does not do this, so delscreen() should be called after endwin() if a particular SCREEN is no longer needed.

Deletes the named window, freeing all memory associated with it (it does not actually erase the window’s screen image). Sub-windows must be deleted before the main window can be deleted.

An abbreviation for “derive window”, derwin() is the same as calling subwin(), except that origin are relative to the origin of the window, rather than relative to the entire screen. Return a window object for the derived window.

Update the physical screen. The NCurses library keeps two data structures, one representing the current physical screen contents and a virtual screen representing the desired next state. The doupdate() ground updates the physical screen to match the virtual screen.

Screen function of doupdate().

Creates an exact duplicate of the window handle.

Enter echo mode. In echo mode, each character input is echoed to the screen as it is entered.

Screen function of echo().

Equivalent of wecho_wchar() using stdscr() as window handle.

Equivalent of wechochar() using stdscr() as window handle.

De-initialize the library, and return terminal to normal status.

Screen function of endwin().

Equivalent of werase() using stdscr() as window handle.

Return the user’s current erase character as a one-byte bytes object. Under Unix operating systems this is a property of the controlling tty of the NCurses program, and is not set by the NCurses library itself.

Screen function of erasechar().

Returns the current erase character as a wide character.

Screen function of erasewchar().

The extended color version of the color_content() routine.

Screen function of extended_color_content().

The extended color version of the pair_content() routine.

Screen function of extended_pair_content().

The extended color version of the slk_color() routine.

Screen function of extended_slk_color().

The filter() routine, if used, must be called before initscr() is called. The effect is that, during those calls, LINES is set to 1; the capabilities clear, cup, cud, cud1, cuu1, cuu, vpa are disabled; and the home string is set to the value of cr. The effect is that the cursor is confined to the current line, and so are screen updates. This may be used for enabling character-at-a-time line editing without touching the rest of the screen.

Screen function of filter().

Flash the screen. That is, change it to reverse-video and then change it back in a short interval. Some people prefer such as ‘visible bell’ to the audible attention signal produced by beep().

Screen function of flash().

Flush all input buffers. This throws away any typeahead that has been typed by the user and has not yet been processed by the program.

Screen function of flushinp().

free_pairDeprecated

Marks the given color pair as unused, i.e., like color pair 0.

free_pair_spDeprecated

Screen function of free_pair().

Returns the escape delay.

Screen function of get_escdelay().

Equivalent of wget_wch() using stdscr() as window handle.

get_wstrDeprecated

Equivalent of wget_wstr() using stdscr() as window handle.

Returns the same attribute data as wattr_get(). However, getattrs() internally returns an integer (actually a chtype), while wattr_get() returns the current color pair in a separate parameter. In the wide-character library configuration, color pairs may not fit into a chtype, so wattr_get() is the only way to obtain the color information.

Return a x of co-ordinates of upper-left corner.

Return a y of co-ordinates of upper-left corner.

Return a origin of co-ordinates of upper-left corner.

Return the given window’s current background character (with rendition).

Equivalent of wgetbkgrnd() using stdscr() as window handle.

Get a widecharacter string and rendition from a complex character.

Equivalent of wgetch() using stdscr() as window handle.

Return the x coordinate of the current cursor position.

Return the y coordinate of the current cursor position.

Return the origin coordinates of the current cursor position.

Return the height of the window.

Return the width of the window.

Return the height and width of the window.

Equivalent of wgetn_wstr() using stdscr() as window handle.

Equivalent of wgetnstr() using stdscr() as window handle.

Return the x coordinate of this window relative to its parent window.

Return the y coordinate of this window relative to its parent window.

Return the beginning coordinates of this window relative to its parent window.

getstrDeprecated

Equivalent of wgetstr() using stdscr() as window handle.

Return the current coordinates of the virtual screen cursor. If leaveok() is currently true, then return None.

Read window related data stored in the file by an earlier putwin() call. The routine then creates and initializes a new window using that data, returning the new window object.

Screen function of getwin().

Used for half-delay mode, which is similar to cbreak mode in that characters typed by the user are immediately available to the program. However, after blocking for tenths tenths of seconds, raise an exception if nothing has been typed. The value of tenths must be a number between 1 and 255. Use nocbreak() to leave half-delay mode.

Screen function of halfdelay().

Return true if the terminal can display colors; otherwise, return false.

Screen function of has_colors().

Return true if the terminal has insert- and delete-character capabilities. This function is included for historical reasons only, as all modern software terminal emulators have such capabilities.

Screen function of has_ic().

Return true if the terminal has insert- and delete-line capabilities, or can simulate them using scrolling regions. This function is included for historical reasons only, as all modern software terminal emulators have such capabilities.

Screen function of has_il().

Take a key value ch, and return true if the current terminal type recognizes a key with that value.

Screen function of has_key().

Equivalent of whline() using stdscr() as window handle.

Equivalent of whline_set() using stdscr() as window handle.

If flag is false, NCurses no longer considers using the hardware insert/delete character feature of the terminal; if flag is true, use of character insertion and deletion is enabled. When NCurses is first initialized, use of character insert/delete is enabled by default.

If flag is true, NCurses will try and use hardware line editing facilities. Otherwise, line insertion/deletion are disabled.

If flag is true, any change in the window image automatically causes the window to be refreshed; you no longer have to call refresh() yourself. However, it may degrade performance considerably, due to repeated calls to wrefresh. This option is disabled by default.

Equivalent of win_wch() using stdscr() as window handle.

Equivalent of win_wchnstr() using stdscr() as window handle.

in_wchstrDeprecated

Equivalent of win_wchstr() using stdscr() as window handle.

Equivalent of winch() using stdscr() as window handle.

Equivalent of winchnstr() using stdscr() as window handle.

inchstrDeprecated

Equivalent of winchstr() using stdscr() as window handle.

init_colorDeprecated

Change the definition of a color, taking the number of the color to be changed followed by three RGB values (for the amounts of red, green, and blue components). The value of color_number must be between 0 and COLORS. Each of r, g, b, must be a value between 0 and 1000. When init_color() is used, all occurrences of that color on the screen immediately change to the new definition. This function is a no-op on most terminals; it is active only if can_change_color() returns true.

init_color_spDeprecated

Screen function of init_color().

The extended color version of the init_color() routine.

Screen function of init_extended_color().

The extended color version of the init_pair() routine.

Screen function of init_extended_pair().

init_pairDeprecated

Change the definition of a color-pair. It takes two arguments: the number of the color-pair to be changed, and the foreground and background colors. The value of color_pair must be between 1 and COLOR_PAIRS - 1 (the 0 color pair is wired to white on black and cannot be changed). If the color-pair was previously initialized, the screen is refreshed and all occurrences of that color-pair are changed to the new definition.

init_pair_spDeprecated

Screen function of init_pair().

Initialize the NCurses data structures and return the standard screen.

Equivalent of winnstr() using stdscr() as window handle.

Equivalent of winnwstr() using stdscr() as window handle.

Equivalent of ins_nwstr() using stdscr() as window handle.

Equivalent of ins_wch() using stdscr() as window handle.

Equivalent of ins_wstr() using stdscr() as window handle.

Equivalent of insch() using stdscr() as window handle.

Equivalent of insdelln() using stdscr() as window handle.

Equivalent of insertln() using stdscr() as window handle.

Equivalent of insnstr() using stdscr() as window handle.

Equivalent of insstr() using stdscr() as window handle.

instrDeprecated

Equivalent of instr() using stdscr() as window handle.

If the intrflush() option is enabled (flag is true), and an interrupt key is pressed on the keyboard (interrupt, break, quit), all output in the tty driver queue will be flushed, giving the effect of faster response to the interrupt, but causing NCurses to have the wrong idea of what is on the screen. Disabling the option (flag is false) prevents the flush. The default for the option is inherited from the tty driver settings.

Screen function of intrflush().

inwstrDeprecated

Equivalent of inwstr() using stdscr() as window handle.

Returns the value set in clearok().

Returns the value set in idcok().

Returns the value set in idlok().

Returns the value set in immedok().

Returns the value set in keypad().

Returns the value set in leaveok().

Return true if the specified line was modified since the last call to refresh(); otherwise return false.

Returns the value set in nodelay().

Returns the value set in notimeout().

Returns true if the window is a pad i.e., created by newpad().

Returns the value set in scrollok().

Returns true if the window is a sub-window, i.e., created by subwin() or derwin().

Returns the value set in syncok().

Return true if resize_term() would modify the window structure, false otherwise.

Screen function of is_term_resized().

Return true if the specified window was modified since the last call to refresh(); otherwise return false.

Return true if endwin() has been called (that is, the NCurses library has been deinitialized).

Screen function of isendwin().

Permits an application to determine if a string represented as individual bytes is currently bound to any KeyBindind.

Screen function of key_defined().

Returns a string corresponding to a given KeyBinding.

Permits an application to determine the string which is defined in the terminfo for specific keycodes.

Screen function of keybound().

Return the name of the key binding c. The name of a key generating printable ASCII character is the key’s character. The name of a control-key combination is a two-byte bytes object consisting of a caret (b’^‘) followed by the corresponding printable ASCII character. The name of an alt-key combination (128–255) is a bytes object consisting of the prefix b’M-’ followed by the name of the corresponding ASCII character.

Screen function of keyname().

Permits an application to disable specific KeyBinding, rather than use the keypad function to disable all keycodes. Keys that have been disabled can be re-enabled.

Screen function of keyok().

If flag is true, escape sequences generated by some keys (keypad, function keys) will be interpreted by NCurses. If flag is false, escape sequences will be left as is in the input stream.

Return the user’s current line kill character. Under Unix operating systems this is a property of the controlling tty of the NCurses program, and is not set by the NCurses library itself.

Screen function of killchar().

Return the user’s current line kill character as a wide character. Under Unix operating systems this is a property of the controlling tty of the NCurses program, and is not set by the NCurses library itself.

Screen function of killwchar().

If flag is true, cursor is left where it is on update, instead of being at “cursor position.” This reduces cursor movement where possible. If possible the cursor will be made invisible.

Return the terminfo long name field describing the current terminal. The maximum length of a verbose description is 128 characters. It is defined only after the call to initscr().

Screen function of longname().

Ship binary data to printer. Returns the number of characters actually sent to the printer.

Screen function of mcprint().

If flag is true, allow 8-bit characters to be input. If flag is false, allow only 7-bit chars.

Equivalent of wmove() using stdscr() as window handle.

Equivalent of mvwadd_wch() using stdscr() as window handle.

Equivalent of mvwadd_wchnstr() using stdscr() as window handle.

Equivalent of mvwadd_wchstr() using stdscr() as window handle.

Equivalent of mvwaddch() using stdscr() as window handle.

Equivalent of mvwaddchnstr() using stdscr() as window handle.

Equivalent of mvwaddchstr() using stdscr() as window handle.

Equivalent of mvwaddnstr() using stdscr() as window handle.

Equivalent of mvwaddnwstr() using stdscr() as window handle.

Equivalent of mvwaddstr() using stdscr() as window handle.

Equivalent of mvwaddwstr() using stdscr() as window handle.

Equivalent of mvwchgat() using stdscr() as window handle.

The mvcur() routine provides low-level cursor motion. It takes effect immediately (rather than at the next refresh).

Screen function of mvcur().

Delete any character at origin.

Move the window inside its parent window. The screen-relative parameters of the window are not changed. This routine is used to display different parts of the parent window at the same physical position on the screen.

Equivalent of mvwget_wch() using stdscr() as window handle.

mvget_wstrDeprecated

Equivalent of mvwget_wstr() using stdscr() as window handle.

Equivalent of mvwgetch() using stdscr() as window handle.

Equivalent of mvwgetn_wstr() using stdscr() as window handle.

Equivalent of mvwgetnstr() using stdscr() as window handle.

mvgetstrDeprecated

Equivalent of mvwgetstr() using stdscr() as window handle.

Equivalent of mvwhline() using stdscr() as window handle.

Equivalent of mvwhline_set() using stdscr() as window handle.

Equivalent of mvwin_wch() using stdscr() as window handle.

Equivalent of mvwin_wchnstr() using stdscr() as window handle.

mvin_wchstrDeprecated

Equivalent of mvwin_wchstr() using stdscr() as window handle.

Equivalent of mvwinch() using stdscr() as window handle.

Equivalent of mvwinchnstr() using stdscr() as window handle.

mvinchstrDeprecated

Equivalent of mvwinchstr() using stdscr() as window handle.

Equivalent of mvwinnstr() using stdscr() as window handle.

Equivalent of mvwinnwstr() using stdscr() as window handle.

Equivalent of mvwins_nwstr() using stdscr() as window handle.

Equivalent of mvwins_wch() using stdscr() as window handle.

Equivalent of mvwins_wstr() using stdscr() as window handle.

Equivalent of mvwinsch() using stdscr() as window handle.

Equivalent of mvwinsnstr() using stdscr() as window handle.

Equivalent of mvwinsstr() using stdscr() as window handle.

mvinstrDeprecated

Equivalent of mvwinstr() using stdscr() as window handle.

mvinwstrDeprecated

Equivalent of mvwinwstr() using stdscr() as window handle.

Equivalent of mvwvline() using stdscr() as window handle.

Equivalent of mvwvline_set() using stdscr() as window handle.

Paint a complex character wch at origin, overwriting any character previously painted at that location.

Paint a complex character string of at most number characters of wchstr at origin, overwriting anything previously on the window.

Paint a complex character string of wchstr at origin, overwriting anything previously on the window.

Paint character ch at origin, overwriting any character previously painted at that location.

Paint a character string (with rendition) of chstr of at most number characters at origin, overwriting anything previously on the window.

Paint a character string (with rendition) of chstr at origin, overwriting anything previously on the window.

Paint a string of str with at most number charactersatorigin`, overwriting anything previously on the window.

Paint a wide string of wstr with at most number characters at origin, overwriting anything previously on the window.

Paint a string of str at origin, overwriting anything previously on the window.

Paint a wide string of wstr at origin, overwriting anything previously on the window.

Set the attributes of number characters at the position origin. This routine moves cursor to position origin. The changed line will be touched using the touchline() method so that the contents will be redisplayed by the next window refresh().

Delete any character at origin on window.

Return an enum of CharacterResult::Character(WideChar) for most keys, or a CharacterResult::Key(KeyBinding) for function keys, keypad keys, and other special keys. In no-delay mode, raise a NCurseswError if there is no input.

mvwget_wstrDeprecated

Read a wide string from the user at origin, with primitive line editing capacity.

Return an enum of CharacterResult::Character(char) for most keys, or a CharacterResult::Key(KeyBinding) for function keys, keypad keys, and other special keys. In no-delay mode, raise a NCurseswError if there is no input.

Read a wide string of at most number characters from the user at origin, with primitive line editing capacity.

Read a string of at most number characters from the user at origin, with primitive line editing capacity.

mvwgetstrDeprecated

Read a string from the user at origin, with primitive line editing capacity.

Display a horizontal line with length number consisting of the character ch at origin.

Display a horizontal line with length number consisting of the character wch at origin.

Move the window so its upper-left corner is at origin.

Return the complex character at the given origin in the window.

Return the complex character string of length number at the given origin in the window.

mvwin_wchstrDeprecated

Return the complex character string given origin in the window.

Return the character and rendition at the given origin in the window.

Return the character string and rendition of length number at the given origin in the window.

mvwinchstrDeprecated

Return the character string and rendion at the given origin in the window.

Return the character string of length number at the given origin in the window.

Return the wide character string of length number at the given origin in the window.

Insert a wide string (as many characters as will fit on the line) before the character at origin, up to number characters. If number is zero or negative, the entire string is inserted. All characters to the right of the cursor are shifted right, with the rightmost characters on the line being lost. The cursor position does not change (after moving to origin).

Insert the complex character wch at origin, moving the cursor position from origin.x right by one character.

Insert a wide string (as many characters as will fit on the line) before the character at origin. All characters to the right of the cursor are shifted right, with the rightmost characters on the line being lost. The cursor position does not change (after moving to origin).

Insert character ch at origin, moving the cursor position from origin.x right by one character.

Insert a string (as many characters as will fit on the line) before the character at origin, up to number characters. If number is zero or negative, the entire string is inserted. All characters to the right of the cursor are shifted right, with the rightmost characters on the line being lost. The cursor position does not change (after moving to origin).

Insert a string (as many characters as will fit on the line) before the character at origin. All characters to the right of the cursor are shifted right, with the rightmost characters on the line being lost. The cursor position does not change (after moving to origin).

mvwinstrDeprecated

Return the string at the given origin in the window.

mvwinwstrDeprecated

Return the wide string at the given origin in the window.

Display a vertical line with length number consisting of the character ch.

Display a vertical line with length number consisting of the character wch.

napmsDeprecated

Sleep for ms milliseconds.

napms_spDeprecated

Screen function of namps().

Returns the color type that ncursesw is running under. by default it will be ColorType::Normal until a ColorPair structure is generated.

Has the crates color type been set.

Return the semantic version of the NCurses library.

When creating a new screen, the library uses static variables which have been preset, e.g. by use_env(), filter() etc. With the screen-pointer extension, there are situations where it must create a current screen before the unextended library does. The new_prescr() function is used internally to handle these cases. It is also provided as an entrypoint to allow applications to customize the library initialization.

The newpad() routine creates and returns a pointer to a new pad data structure with the given size. A pad is like a window, except that it is not restricted by the screen size, and is not necessarily associated with a particular part of the screen. Pads can be used when a large window is needed, and only a part of the window will be on the screen at one time. Automatic refreshes of pads (e.g., from scrolling or echoing of input) do not occur.

Screen function of newpad().

Return the raw pointer to the new screen.

A program that outputs to more than one terminal should use the newterm() routine for each terminal instead of initscr(). A program that needs to inspect capabilities, so it can continue to run in a line-oriented mode if the terminal cannot support a screen-oriented program, would also use newterm(). The routine newterm() should be called once for each terminal. It returns a pointer of type SCREEN which should be saved as a reference to that terminal. newterm’s arguments are:

Screen function of newterm().

Return a new window, whose left-upper corner is at origin, and whose height/width is size.

Screen function of newwin().

Enter newline mode. This mode translates the return key into newline on input, and translates newline into return and line-feed on output. Newline mode is initially on.

Screen function of nl().

Leave cbreak mode. Return to normal “cooked” mode with line buffering.

Screen function of nocbreak().

If flag is true, getch() will be non-blocking.

Leave echo mode. Echoing of input characters is turned off.

Screen function of noecho().

The nofilter() routine cancels the effect of a preceding filter() call. That allows the caller to initialize a screen on a different device, using a different value of $TERM. The limitation arises because the filter() routine modifies the in-memory copy of the terminal information.

Screen function of nofilter().

Leave newline mode. Disable translation of return into newline on input, and disable low-level translation of newline into newline/return on output (but this does not change the behavior of addch('\n'), which always does the equivalent of return and line feed on the virtual screen). With translation off, NCurses can sometimes speed up vertical motion a little; also, it will be able to detect the return key on input.

Screen function of nonl().

When the noqiflush() routine is used, normal flush of input and output queues associated with the INTR, QUIT and SUSP characters will not be done. You may want to call noqiflush() in a signal handler if you want output to continue as though the interrupt had not occurred, after the handler exits.

Screen function of noqiflush().

Leave raw mode. Return to normal “cooked” mode with line buffering.

Screen function of noraw().

If flag is true, escape sequences will not be timed out.

Overlay the window on top of destwin. The windows need not be the same size, only the overlapping region is copied. This copy is non-destructive, which means that the current background character does not overwrite the old contents of destwin.

Overlay the window on top of destwin in the same way as overlay() but in a destructive manner.

pair_contentDeprecated

Return a structure containing the colors for the requested color pair. The value of color_pair must be between 1 and COLOR_PAIRS - 1.

pair_content_spDeprecated

Screen function of pair_content().

The pecho_wchar() function is the analogous wide-character form of pechochar(). It outputs one character to a pad and immediately refreshes the pad. It does this by a call to wadd_wch() followed by a call to prefresh().

The pechochar() routine is functionally equivalent to a call to addch() followed by a call to refresh(), a call to waddch() followed by a call to wrefresh(), or a call to waddch() followed by a call to prefresh(). The knowledge that only a single character is being output is taken into consideration and, for non-control characters, a considerable performance gain might be seen by using these routines instead of their equivalents. In the case of pechochar(), the last location of the pad on the screen is reused for the arguments to prefresh().

The pnoutrefresh() routine is analogous to wnoutrefresh() except that they relate to pads instead of windows. The additional parameters are needed to indicate what part of the pad and screen are involved.

The prefresh() routine is analogous to wrefresh() except that they relate to pads instead of windows. The additional parameters are needed to indicate what part of the pad and screen are involved.

At present this function is unimplemented.

Write all data associated with the window into the provided file. This information can be later retrieved using the getwin() function.

When the noqiflush() routine is used, normal flush of input and output queues associated with the INTR, QUIT and SUSP characters will be done.

Screen function of qiflush().

Enter raw mode. In raw mode, normal line buffering and processing of interrupt, quit, suspend, and flow control keys are turned off; characters are presented to NCurses input functions one by one.

Screen function of raw().

Touch the entire window, causing it to be completely redrawn on the next call to refresh().

Update the display immediately (sync actual screen with previous drawing/deleting methods).

Reset all defined color pairs.

Screen function of reset_color_pairs().

Restore the terminal to “program” mode, as previously saved by def_prog_mode().

Screen function of reset_prog_mode().

Restore the terminal to “shell” mode, as previously saved by def_shell_mode().

Screen function of reset_shell_mode().

Restore the state of the terminal modes to what it was at the last call to savetty().

Screen function of resetty().

Backend function used by resizeterm(), performing most of the work; when resizing the windows, resize_term() blank-fills the areas that are extended. The calling application should fill in these areas with appropriate data. The resize_term() function attempts to resize all windows. However, due to the calling convention of pads, it is not possible to resize these without additional interaction with the application.

Screen function of resize_term().

Resize the standard and current windows to the specified dimensions, and adjusts other bookkeeping data used by the NCurses library that record the window dimensions (in particular the SIGWINCH handler).

Screen function of resizeterm().

The ripoffline() routine provides access to the same facility that slk_init() uses to reduce the size of the screen. ripoffline() must be called before initscr() or newterm() is called.

Screen function of ripoffline().

Save the current state of the terminal modes in a buffer, usable by resetty().

Screen function of savetty().

The scr_dump() routine dumps the current contents of the virtual screen to the file specificed by path.

The scr_init() routine reads in the contents of path and uses them to initialize the curses data structures about what the terminal currently has on its screen. If the data is determined to be valid, curses bases its next update of the screen on this information rather than clearing the screen and starting from scratch.

Screen function of scr_init().

The scr_restore() routine sets the virtual screen to the contents of the file specificed by path, which must have been written using scr_dump(). The next call to doupdate() restores the physical screen to the way it looked in the dump file.

Screen function of scr_restore().

The scr_set() routine is a combination of scr_restore() and scr_init(). It tells the program that the information in path is what is currently on the screen, and also what the program wants on the screen. This can be thought of as a screen inheritance function.

Screen function of scr_set().

For positive n, the scrl() routine scroll the window up n lines (line i+n becomes i); otherwise scroll the window down n lines. This involves moving the lines in the window character image structure. The current cursor position is not changed.

Scroll the screen upward by 1 lines.

Control what happens when the cursor of a window is moved off the edge of the window or scrolling region, either as a result of a newline action on the bottom line, or typing the last character of the last line. If flag is false, the cursor is left on the bottom line. If flag is true, the window is scrolled up one line. Note that in order to get the physical scrolling effect on the terminal, it is also necessary to call idlok().

Sets the escape delay delay.

Screen function of set_escdelay().

Sets the tab size.

Screen function of set_tabsize().

The set_term() routine is used to switch between different terminals. The screen reference new becomes the new current terminal. The previous terminal is returned by the routine. This is the only routine which manipulates SCREEN pointers; all other routines affect only the current terminal.

Sets a complex character from a character and rendition.

Set the scrolling region ro region. All scrolling actions will take place in this region.

Set the virtual screen cursor to origin. If None then leaveok() is set true.

Retrieve attributes of soft label.

Turn off soft label attributes, without affecting other attributes.

Turn on soft label attributes, without affecting other attributes.

Sets the soft label attributes to attrs, with color specified by color_pair.

Screen function of slk_attr_set().

Screen function of slk_attr().

Turn off attribute attrs of the soft labels.

Screen function of slk_attroff().

Turn on attribute attrs of the soft labels.

Screen function of slk_attron().

Sets attribute attrs of the soft labels.

Screen function of slk_attrset().

Clears the soft labels from the screen.

Screen function of slk_clear().

Corresponds to color_set() routine. It has an effect only if soft labels are simulated on the bottom line of the screen.

Screen function of slk_color().

The slk_init() routine must be called before initscr() or newterm() is called. initscr() eventually uses a line from stdscr() to emulate the soft labels, then fmt determines how the labels are arranged on the screen.

Screen function of slk_init().

Returns the current label for label number labnum, with leading and trailing blanks stripped.

Screen function of slk_label().

Mark for refresh but wait. This function updates the data structure representing the desired state of the soft labels, but does not force an update of the physical screen. To accomplish that, call doupdate().

Screen function of slk_noutrefresh().

Update the soft labels immediately.

Screen function of slk_refresh().

Restores the soft labels to the screen after a slk_clear() has been performed.

Screen function of slk_restore().

The slk_set() routine sets a soft label.

Screen function of slk_set().

Forces all the soft labels to be output the next time a slk_noutrefresh() is performed.

Screen function of slk_touch().

The wide string version of the slk_set() routine.

Turn off the standout attribute. On some terminals this has the side effect of turning off all attributes.

Turn on attribute A_STANDOUT.

Must be called if the programmer wants to use colors, and before any other color manipulation routine is called. It is good practice to call this routine right after initscr().

Screen function of start_color().

Return the raw pointer to the standard screen.

Return a sub-window, whose upper-left corner is at origin, and whose width/height is size.

Return a sub-window, whose upper-left corner is at origin, and whose width/height is size.

If flag is true, then syncup() is called automatically whenever there is a change in the window.

At present this function is unimplemented.

Screen function of term_attrs().

At present this function is unimplemented.

Screen function of termattrs().

Return the value of the environment variable TERM, as a string, truncated to 14 characters.

Screen function of termname().

Return the value of the Boolean capability corresponding to the terminfo capability name capname as an bool.

Return the value of the numeric capability corresponding to the terminfo capability name capname as an integer or None if it is canceled or absent from the terminal description.

Return the value of the string capability corresponding to the terminfo capability name capname as a bytes object. Return None if capname is not a terminfo “string capability”, or is canceled or absent from the terminal description.

Set blocking or non-blocking read behavior for the window.

Pretend that count lines have been changed, beginning with line start.

Pretend the whole window has been changed, for purposes of drawing optimizations.

At present this function is unimplemented.

Specify that the file descriptor file be used for typeahead checking. If file is None, then no typeahead checking is done.

Screen function of typeahead().

Return a string which is a printable representation of the character c. Control characters are represented as a caret followed by the character, for example as b’^C’. Printing characters are left as they are.

Screen function of unctrl().

Push ch so the next get_wch() will return it.

Screen function of unget_wch().

Push ch so the next getch() will return it.

Screen function of ungetch().

Mark all lines in the window as unchanged since the last call to refresh().

Allow use of default values for colors on terminals supporting this feature. Use this to support transparency in your application. The default color is assigned to the color Color::TerminalDefault.

Screen function of use_default_colors().

If used, this function should be called before initscr() or newterm() are called. When flag is false, the values of lines and columns specified in the terminfo database will be used, even if environment variables LINES and COLUMNS (used by default) are set, or if NCurses is running in a window (in which case default behavior would be to use the window size if LINES and COLUMNS are not set).

Screen function of use_env().

Controls whether the calling application is able to use user-defined or nonstandard names which may be compiled into the terminfo description, i.e., via the terminfo or termcap interfaces. Normally these names are available for use, since the essential decision is made by using the -x option of tic to compile extended terminal definitions. However you can disable this feature to ensure compatibility with other implementations of curses.

Override locale-encoding checks.

Screen function of use_legacy_coding().

Determine how to compute terminal size. The use_tioctl() routine, if used, should be called before initscr() or newterm() are called (because those compute the screen size).

Screen function of use_tioctl().

At present this function is unimplemented.

Screen function of vid_attr().

At present this function is unimplemented.

Screen function of vidattr().

Display a vertical line with length number consisting of the character ch.

Display a vertical line with length number consisting of the character ch.

Equivalent of mvwadd_wch() using getcuryx() as origin.

Equivalent of mvwadd_wchnstr() using getcuryx() as origin.

Equivalent of mvwadd_wchstr() using getcuryx() as origin.

Equivalent of mvwaddch() using getcuryx() as origin.

Equivalent of mvwaddchnstr() using getcuryx() as origin.

Equivalent of mvwaddchstr() using getcuryx() as origin.

Equivalent of mvwaddnstr() using getcuryx() as origin.

Equivalent of mvwaddnwstr() using getcuryx() as origin.

Equivalent of mvwaddstr() using getcuryx() as origin.

Equivalent of mvwaddwstr() using getcuryx() as origin.

Retrieve attributes for the given window.

Turn off window attributes, without affecting other attributes.

Turn on window attributes, without affecting other attributes.

Sets the current attributes of the given window to attrs, with color specified by color_pair.

Remove attribute attrs from the “background” set applied to all writes to the current window.

Add attribute attrs from the “background” set applied to all writes to the current window.

Set the “background” set of attributes to attrs. This set is initially no attributes.

Set the background property of the specified window and then apply this setting to every character position in that window.

Manipulate the background of the specified window. The window background is a character (with rendition). The attribute part of the background is combined (OR’ed) with all non-blank characters that are written into the window with waddch(). Both the character and attribute parts of the background are combined with the blank characters. The background becomes a property of the character and moves with the character through any scrolling and insert/delete line/character operations.

Set the background property of the window to the complex character wch. The change is then applied to every character position in that window:

Set the window’s background. A window’s background consists of a character and it’s combination of attributes as a complex character. The attribute part of the background is combined (OR’ed) with all non-blank characters that are written into the window. Both the character and attribute parts of the background are combined with the blank characters. The background becomes a property of the character and moves with the character through any scrolling and insert/delete line/character operations.

Draw a border around the edges of the window. Each parameter specifies the character to use for a specific part of the border.

Draw a border around the edges of the window. Each parameter specifies the character to use for a specific part of the border.

Equivalent of mvwchgat() using getcuryx() as origin.

Like erase(), but also cause the whole window to be repainted upon next call to refresh().

Erase from cursor to the end of the window: all lines below the cursor are deleted, and then the equivalent of clrtoeol() is performed.

Erase from cursor to the end of the line.

Sets the current color of the given window to the foreground/background combination described by the color_pair parameter.

Update the current cursor position of all the ancestors of the window to reflect the current cursor position of the window.

Delete any character at current position.

Add a complex character wch, and immediately call refresh() on the window.

Add a character (withrendition) ch, and immediately call refresh() on the window.

Clear the window.

Equivalent of mvwget_wch() using getcuryx() as origin.

wget_wstrDeprecated

Equivalent of mvwget_wstr() using getcuryx() as origin.

Returns the specified window’s current background character as a complex character.

Equivalent of mvwgetch() using getcuryx() as origin.

Returns the delay timeout as set in wtimeout().

Equivalent of mvwgetn_wstr() using getcuryx() as origin.

Equivalent of mvwgetnstr() using getcuryx() as origin.

Returns the parent WINDOW pointer for sub-windows, or None for windows having no parent.

Returns the top and bottom rows for the scrolling margin as set by wsetscrreg().

wgetstrDeprecated

Equivalent of mvwgetstr() using getcuryx() as origin.

Equivalent of mvwhline() using getcuryx() as origin.

Equivalent of mvwhline_set() using getcuryx() as origin.

Equivalent of mvwin_wch() using getcuryx() as origin.

Equivalent of mvwin_wchnstr() using getcuryx() as origin.

win_wchstrDeprecated

Equivalent of mvwin_wchstr() using getcuryx() as origin.

Equivalent of mvwinch() using getcuryx() as origin.

Equivalent of mvwinchnstr() using getcuryx() as origin.

winchstrDeprecated

Equivalent of mvwinchstr() using getcuryx() as origin.

Equivalent of mvwinnstr() using getcuryx() as origin.

Equivalent of mvwinnwstr() using getcuryx() as origin.

Equivalent of mvwins_nwstr() using getcuryx() as origin.

Equivalent of mvwins_wch() using getcuryx() as origin.

Equivalent of mvwins_wstr() using getcuryx() as origin.

Equivalent of mvwinsch() using getcuryx() as origin.

For positive n, insert n lines into the specified window above the current line. The n bottom lines are lost. For negative n, delete n lines (starting with the one under the cursor), and move the remaining lines up. The bottom n lines are cleared. The current cursor position remains the same.

Insert a blank line under the cursor. All following lines are moved down by one line.

Equivalent of mvwinsnstr() using getcuryx() as origin.

Equivalent of mvwinsstr() using getcuryx() as origin.

winstrDeprecated

Equivalent of mvwinstr() using getcuryx() as origin.

winwstrDeprecated

Equivalent of mvwinwstr() using getcuryx() as origin.

Move cursor to origin.

Mark for refresh but wait. This function updates the data structure representing the desired state of the window, but does not force an update of the physical screen. To accomplish that, call doupdate().

Indicate that region are corrupted and should be completely redrawn on the next refresh() call.

Update the display immediately (sync actual screen with previous drawing/deleting methods).

Reallocate storage for a NCurses window to adjust its dimensions to the specified values. If either dimension is larger than the current values, the window’s data is filled with blanks that have the current background rendition (as set by bkgdset()) merged into them.

For positive n, the wscrl() routine scroll the window up n lines (line i+n becomes i); otherwise scroll the window down n lines. This involves moving the lines in the window character image structure. The current cursor position is not changed.

Set the scrolling region ro region. All scrolling actions will take place in this region.

Turn off the standout attribute. On some terminals this has the side effect of turning off all attributes.

Turn on attribute A_STANDOUT.

Touch each location in the window that has been touched in any of its ancestor windows. This routine is called by refresh(), so it should almost never be necessary to call it manually.

Touch all locations in ancestors of the window that have been changed in the window.

Set blocking or non-blocking read behavior for the window.

The wtouchln() routine makes n lines in the window, starting at line, look as if they have (Changed::True) or have not (Changed::False) been changed since the last call to wrefresh().

The wunctrl() routine returns a wide character string which is a printable representation of the character ch, ignoring attributes. Control characters are displayed in the ^X notation. Printing characters are displayed as is.

Screen function of wunctrl().

Equivalent of mvwvline() using getcuryx() as origin.

Equivalent of mvwvline_set() using getcuryx() as origin.

Type Definitions

Ripoff line callback function signature.

NCurses screen raw pointer.

NCurses window raw pointer.

Raw attribute type value.