new_prescr − curses screen-pointer extension


#include <ncurses/curses.h>

int assume_default_colors_sp(SCREEN*, int, int);
int baudrate_sp(SCREEN*);
int beep_sp(SCREEN*);
bool can_change_color_sp(SCREEN*);
int cbreak_sp(SCREEN*);
int color_content_sp(SCREEN*, short, short*, short*, short*);
int curs_set_sp(SCREEN*, int);
int define_key_sp(SCREEN*, const char *, int);
int def_prog_mode_sp(SCREEN*);
int def_shell_mode_sp(SCREEN*);
int delay_output_sp(SCREEN*, int);
int doupdate_sp(SCREEN*);
int echo_sp(SCREEN*);
int endwin_sp(SCREEN*);
int erasechar_sp(SCREEN*);
int filter_sp(SCREEN*);
int flash_sp(SCREEN*);
int flushinp_sp(SCREEN*);
int get_escdelay_sp(SCREEN*);
int getmouse_sp(SCREEN*, MEVENT*);
WINDOW* getwin_sp(SCREEN*, FILE*);
int halfdelay_sp(SCREEN*);
bool has_colors_sp(SCREEN*);
bool has_ic_sp(SCREEN*);
bool has_il_sp(SCREEN*);
int has_key_sp(SCREEN*, int);
bool has_mouse_sp(SCREEN*);
int init_color_sp(SCREEN*, short, short, short, short);
int init_pair_sp(SCREEN*, short, short, short);
int intrflush_sp(SCREEN*, WINDOW*, bool);
bool isendwin_sp(SCREEN*);
bool is_term_resized_sp(SCREEN*, int, int);
char* keybound_sp(SCREEN*, int, int);
int key_defined_sp(SCREEN*, const char *);
NCURSES_CONST char * keyname_sp(SCREEN*, int);
int keyok_sp(SCREEN*, int, bool);
char killchar_sp(SCREEN*);
int mcprint_sp(SCREEN*, char *, int);
int mouseinterval_sp(SCREEN*, int);
mmask_t mousemask_sp(SCREEN*, mmask_t, mmask_t *);
int mvcur_sp(SCREEN*, int, int, int, int);
int napms_sp(SCREEN*, int);
WINDOW* newpad_sp(SCREEN*, int, int);
SCREEN* new_prescr(void);
SCREEN* newterm_sp(SCREEN*, NCURSES_CONST char *, FILE *, FILE *);
WINDOW* newwin_sp(SCREEN*, int, int, int, int);
int nl_sp(SCREEN*);
int nocbreak_sp(SCREEN*);
int noecho_sp(SCREEN*);
int nofilter_sp(SCREEN*);
int nonl_sp(SCREEN*);
void noqiflush_sp(SCREEN*);
int noraw_sp(SCREEN*);
int pair_content_sp(SCREEN*, short, short*, short*);
void qiflush_sp(SCREEN*);
int raw_sp(SCREEN*);
int reset_prog_mode_sp(SCREEN*);
int reset_shell_mode_sp(SCREEN*);
int resetty_sp(SCREEN*);
int resize_term_sp(SCREEN*, int, int);
int resizeterm_sp(SCREEN*, int, int);
int restartterm_sp(SCREEN*, NCURSES_CONST char*, int, int *);
int ripoffline_sp(SCREEN*, int, int (*)(WINDOW*, int));
int savetty_sp(SCREEN*);
int scr_init_sp(SCREEN*, const char *);
int scr_restore_sp(SCREEN*, const char *);
int scr_set_sp(SCREEN*, const char *);
TERMINAL* set_curterm_sp(SCREEN*, TERMINAL*);
int set_escdelay_sp(SCREEN*, int);
int set_tabsize_sp(SCREEN*, int);
int slk_attroff_sp(SCREEN*, const chtype);
int slk_attron_sp(SCREEN*, const chtype);
int slk_attr_set_sp(SCREEN*, const attr_t, short, void*);
int slk_attrset_sp(SCREEN*, const chtype);
int slk_attr_sp(SCREEN*);
int slk_clear_sp(SCREEN*);
int slk_color_sp(SCREEN*, short);
int slk_init_sp(SCREEN*, int);
int slk_label_sp(SCREEN*, int);
int slk_noutrefresh_sp(SCREEN*);
int slk_refresh_sp(SCREEN*);
int slk_restore_sp(SCREEN*);
int slk_set_sp(SCREEN*, int, const char *, int);
int slk_touch_sp(SCREEN*);
int start_color_sp(SCREEN*);
attr_t term_attrs_sp(SCREEN*);
chtype termattrs_sp(SCREEN*);
char* termname_sp(SCREEN*);
int typeahead_sp(SCREEN*, int);
NCURSES_CONST char* unctrl_sp(SCREEN*, chtype);
int ungetch_sp(SCREEN*, int);
int ungetmouse_sp(SCREEN*,MEVENT *);
int unget_wch_sp(SCREEN*, const wchar_t);
int use_default_colors_sp(SCREEN*);
void use_env_sp(SCREEN*, bool);
int use_legacy_coding_sp(SCREEN*, int);
int vid_attr_sp(SCREEN*, attr_t, short, void *);
int vidattr_sp(SCREEN*, chtype);
int vid_puts_sp(SCREEN*, attr_t, short, void *, NCURSES_SP_OUTC);
int vidputs_sp(SCREEN*, chtype, NCURSES_SP_OUTC);
wchar_t* wunctrl_sp(SCREEN*, cchar_t *);

#include <form.h>

int new_form_sp(SCREEN*, FIELD **);

#include <menu.h>

int new_menu_sp(SCREEN*, ITEM **);

#include <panel.h>

int ceiling_panel(SCREEN*);
PANEL* ground_panel(SCREEN*);
int update_panels_sp(SCREEN*);

#include <term.h>

int del_curterm_sp(SCREEN*, TERMINAL *);
int putp_sp(SCREEN*, const char *);
int tgetflag_sp(SCREEN*, char *, const char *);
int tgetent_sp(SCREEN*, char *, const char *);
int tgetnum_sp(SCREEN*, NCURSES_CONST char *);
char* tgetstr_sp(SCREEN*, NCURSES_CONST char *, char **);
int tigetflag_sp(SCREEN*, NCURSES_CONST char *);
int tigetnum_sp(SCREEN*, NCURSES_CONST char *);
char* tigetstr_sp(SCREEN*, NCURSES_CONST char *);
int tputs_sp(SCREEN*, const char *, int, NCURSES_SP_OUTC);


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 entrypoints without changing the meaning of any of the existing ones.

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.

Here are the new functions:

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


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


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


This extension introduces some new names:

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.


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.


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


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


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.


ncurses(3NCURSES), opaque(3NCURSES), threads(3NCURSES).

More Linux Commands

unshar(1) - unpack a shar file (Commands - Linux man page)
Unshar scans mail messages looking for the start of a shell archive. It then passes the archive through a copy of the shell to unpack it. It will accept multipl

XDeviceBell(3) - ring a bell on a device supported through t
The XDeviceBell request causes the server to ring a bell on the specified feedback of the specified device, if possible. The specified volume is relative to the

iptables-apply(8) - a safer way to update iptables remotely
iptables-apply will try to apply a new ruleset (as output by iptables-save/read by iptables-restore) to iptables, then prompt the user whether the changes are o

gvgen(1) - generate graphs (Commands - Linux manual page)...
gvgen generates a variety of simple, regularly-structured abstract graphs. OPTIONS The following options are supported: -c n Generate a cycle with n vertices an

wscanw(3ncurses) - convert formatted input from a curses win
The scanw, wscanw and mvscanw routines are analogous to scanf [see scanf(3)]. The effect of these routines is as though wgetstr were called on the window, and t

fmin(3) - determine minimum of two floating-point numbers...
These functions return the lesser value of x and y. RETURN VALUE These functions return the minimum of x and y. If one argument is a NaN, the other argument is

Tk_CreateEventHandler(3) - associate procedure callback with
Tk_CreateEventHandler arranges for proc to be invoked in the future whenever one of the event types specified by mask occurs in the window specified by tkwin. T

SDL_JoystickUpdate(3) - Updates the state of all joysticks
Updates the state(position, buttons, etc.) of all open joysticks. If joystick events have been enabled with SDL_JoystickEventState then this is called automatic

glRotatef(3gl) - multiply the current matrix by a rotation m
glRotate produces a rotation of angle degrees around the vector $(x, y, z)$. The current matrix (see glMatrixMode) is multiplied by a rotation matrix with the p

mrtg-unix-guide(1) The MRTG 2.17.4 Linux Unix Installation G
MRTG comes to you in Source Code. This means that you have to compile parts of it before you can use it on a Unix machine. These instructions help you to do so.

config.sub(1) - validate and canonicalize a configuration tr
../build-aux/config.sub [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of

latin2(7) - ISO 8859-2 character set encoded in octal, decim
The ISO 8859 standard includes several 8-bit extensions to the ASCII character set (also known as ISO 646-IRV). ISO 8859-2, the Latin Alphabet No. 2 is used to

We can't live, work or learn in freedom unless the software we use is free.