carta
filter_sp(3ncurses)

filter_sp3ncurses

Curses screen-pointer extension

Part of sp_funcs(3ncurses).

Usage

PANEL * ceiling_panel(SCREEN * sp); PANEL * ground_panel(SCREEN * sp); void update_panels_sp(SCREEN * sp);

Overview

This implementation can be configured to provide a set of functions which improve the ability to manage multiple screens. This feature can be added to any of the configurations supported by ncurses; it adds new symbols without changing the meaning of any of the existing ones.

Improved Functions

Most of the functions are new versions of existing functions. A parameter is added at the front of the parameter list. It is a SCREEN pointer.

The existing functions all use the current screen, which is a static variable. The extended functions use the specified screen, thereby reducing the number of variables which must be modified to update multiple screens.

New Functions

Here are the new functions:

ceiling_panel

this returns a pointer to the topmost panel in the given screen.

ground_panel

this returns a pointer to the lowest panel in the given screen.

new_prescr

when creating a new screen, the library uses static variables which have been preset, e.g., by use_env(3NCURSES), filter(3NCURSES), 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 to allow applications to customize library initialization.

Notes

This extension introduces some new names:

NCURSES_SP_FUNCS

This is set to the library patch-level number. In the unextended library, this is zero (0), to make it useful for checking if the extension is provided.

NCURSES_SP_NAME

The new functions are named using the macro NCURSES_SP_NAME, which hides the actual implementation. Currently this adds a “_sp” suffix to the name of the unextended function. This manual page indexes the extensions showing the full name. However the proper usage of these functions uses the macro, to provide for the possibility of changing the naming convention for specific library configurations.

NCURSES_SP_OUTC

This is a new function-pointer type to use in the screen-pointer functions where an NCURSES_OUTC is used in the unextended library.

NCURSES_OUTC

This is a function-pointer type used for the cases where a function passes characters to the output stream, e.g., vidputs(3NCURSES).

Portability

These routines are specific to ncurses. They were not supported on Version 7, BSD or System V implementations. It is recommended that any code depending on ncurses extensions be conditioned using NCURSES_SP_FUNCS.

History

  • Debian 13 (Trixie): the text shown here
  • Debian 12 (Bookworm)
  • Debian 11 (Bullseye)
  • Debian 10 (Buster)
  • Debian 9 (Stretch)
  • Debian 8 (Jessie)
  • Debian 7 (Wheezy)

From ncurses-doc 6.5+20250216-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.