# curs_sp_funcs

## NAME



           curs_sp_funcs - **curses** screen-pointer extension
    


## SYNOPSIS



           **#include <curses.h>**
    
           **int alloc_pair_sp(SCREEN***_sp_**, int** _fg_**, int** _bg_**);**
           **int assume_default_colors_sp(SCREEN***_sp_**, int** _fg_**, int** _bg_**);**
           **int baudrate_sp(SCREEN***_sp_**);**
           **int beep_sp(SCREEN***_sp_**);**
           **bool can_change_color_sp(SCREEN***_sp_**);**
           **int cbreak_sp(SCREEN***_sp_**);**
           **int color_content_sp(SCREEN***_sp_**, short** _color_**, short***_r_**, short***_g_**, short***_b_**);**
           **int curs_set_sp(SCREEN***_sp_**, int** _visibility_);
           **int def_prog_mode_sp(SCREEN***_sp_**);**
           **int def_shell_mode_sp(SCREEN***_sp_**);**
    
           **int define_key_sp(SCREEN***_sp_**, const char ***_definition_**, int** _keycode_**);**
           **int delay_output_sp(SCREEN***_sp_**, int** _ms_**);**
           **int doupdate_sp(SCREEN***_sp_**);**
           **int echo_sp(SCREEN***_sp_**);**
           **int endwin_sp(SCREEN***_sp_**);**
           **char erasechar_sp(SCREEN***_sp_**);**
           **int erasewchar_sp(SCREEN***_sp_**, wchar_t ***_ch_**);**
           **int extended_color_content_sp(SCREEN ***_sp_**, int** _color_**, int ***_r_**, int ***_g_**, int ***_b_**);**
           **int extended_pair_content_sp(SCREEN***_sp_**, int** _pair_**, int ***_fg_**, int ***_bg_**);**
           **int extended_slk_color_sp(SCREEN***_sp_**, int** _pair_**);**
    
           **void filter_sp(SCREEN***_sp_**);**
           **int find_pair_sp(SCREEN***_sp_**, int** _fg_**, int** _bg_**);**
           **int flash_sp(SCREEN***_sp_**);**
           **int flushinp_sp(SCREEN***_sp_**);**
           **int free_pair_sp(SCREEN***_sp_**, int** _pair_**);**
           **int get_escdelay_sp(SCREEN***_sp_**);**
           **int getmouse_sp(SCREEN***_sp_**, MEVENT* event);**
           **WINDOW* getwin_sp(SCREEN***_sp_**, FILE***_filep_**);**
           **int halfdelay_sp(SCREEN***_sp_**, int** _tenths_**);**
           **bool has_colors_sp(SCREEN***_sp_**);**
    
           **bool has_ic_sp(SCREEN***_sp_**);**
           **bool has_il_sp(SCREEN***_sp_**);**
           **int has_key_sp(SCREEN***_sp_**, int** _ch_**);**
           **bool has_mouse_sp(SCREEN***_sp_**);**
           **int init_color_sp(SCREEN***_sp_**, short** _color_**, short** _r_**, short** _g_**, short** _b_**);**
           **int init_extended_color_sp(SCREEN***_sp_**, int** _color_**, int** _r_**, int** _g_**, int** _b_**);**
           **int init_extended_pair_sp(SCREEN***_sp_**, int** _pair_**, int** _fg_**, int** _bg_**);**
           **int init_pair_sp(SCREEN***_sp_**, short** _pair_**, short** _fg_**, short** _bg_**);**
           **int intrflush_sp(SCREEN***_sp_**, WINDOW***_win_**, bool** _bf_**);**
           **bool is_term_resized_sp(SCREEN***_sp_**, int** _lines_**, int** _columns_**);**
    
           **bool isendwin_sp(SCREEN***_sp_**);**
           **int key_defined_sp(SCREEN***_sp_**, const char ***_definition_**);**
           **char* keybound_sp(SCREEN***_sp_**, int** _keycode_**, int** _count_**);**
           **NCURSES_CONST char * keyname_sp(SCREEN***_sp_**, int** _c_**);**
           **int keyok_sp(SCREEN***_sp_**, int** _keycode_**, bool** _enable_**);**
           **char killchar_sp(SCREEN***_sp_**);**
           **int killwchar_sp(SCREEN***_sp_**, wchar_t ***_ch_**);**
           **char* longname_sp(SCREEN***_sp_**);**
           **int mcprint_sp(SCREEN***_sp_**, char ***_data_**, int** _len_**);**
           **int mouseinterval_sp(SCREEN***_sp_**, int** _erval_**);**
    
           **mmask_t mousemask_sp(SCREEN***_sp_**, mmask_t** _newmask_**, mmask_t ***_oldmask_**);**
           **int mvcur_sp(SCREEN***_sp_**, int** _oldrow_**, int** _oldcol_**, int** _newrow_**, int** _newcol_**);**
           **int napms_sp(SCREEN***_sp_**, int** _ms_**);**
           **WINDOW* newpad_sp(SCREEN***_sp_**, int** _nrows_**, int** _ncols_**);**
           **SCREEN* new_prescr(void);**
           **SCREEN* newterm_sp(SCREEN***_sp_**, const char ***_type_**, FILE ***_outfd_**, FILE ***_infd_**);**
           **WINDOW* newwin_sp(SCREEN***_sp_**, int** _nlines_**, int** _ncols_**, int** _begin_y_**, int** _begin_x_**);**
           **int nl_sp(SCREEN***_sp_**);**
           **int nocbreak_sp(SCREEN***_sp_**);**
           **int noecho_sp(SCREEN***_sp_**);**
    
           **void nofilter_sp(SCREEN***_sp_**);**
           **int nonl_sp(SCREEN***_sp_**);**
           **void noqiflush_sp(SCREEN***_sp_**);**
           **int noraw_sp(SCREEN***_sp_**);**
           **int pair_content_sp(SCREEN***_sp_**, short** _pair_**, short***_fg_**, short***_bg_**);**
           **void qiflush_sp(SCREEN***_sp_**);**
           **int raw_sp(SCREEN***_sp_**);**
           **int reset_prog_mode_sp(SCREEN***_sp_**);**
           **void reset_color_pairs_sp(SCREEN***_sp_**);**
           **int reset_shell_mode_sp(SCREEN***_sp_**);**
    
           **int resetty_sp(SCREEN***_sp_**);**
           **int resize_term_sp(SCREEN***_sp_**, int** _lines_**, int** _columns_**);**
           **int resizeterm_sp(SCREEN***_sp_**, int** _lines_**, int** _columns_**);**
           **int ripoffline_sp(SCREEN***_sp_**, int** _line_**, int (***_init_**)(WINDOW***_win_**, int** _fmt_**));**
           **int savetty_sp(SCREEN***_sp_**);**
           **int scr_init_sp(SCREEN***_sp_**, const char ***_filename_**);**
           **int scr_restore_sp(SCREEN***_sp_**, const char ***_filename_**);**
           **int scr_set_sp(SCREEN***_sp_**, const char ***_filename_**);**
           **int set_escdelay_sp(SCREEN***_sp_**, int** _ms_**);**
           **int set_tabsize_sp(SCREEN***_sp_**, int** _cols_**);**
    
           **int slk_attr_set_sp(SCREEN***_sp_**, const attr_t** _attrs_**, short** _pair_**, void***_opts_**);**
           **int slk_attrset_sp(SCREEN***_sp_**, const chtype** _a_**);**
           **int slk_attroff_sp(SCREEN***_sp_**, const chtype** _a_**);**
           **int slk_attron_sp(SCREEN***_sp_**, const chtype** _a_**);**
           **attr_t slk_attr_sp(SCREEN***_sp_**);**
           **int slk_clear_sp(SCREEN***_sp_**);**
           **int slk_color_sp(SCREEN***_sp_**, short** _pair_**);**
           **int slk_init_sp(SCREEN***_sp_**, int** _fmt_**);**
           **char* slk_label_sp(SCREEN***_sp_**, int** _labnum_**);**
           **int slk_noutrefresh_sp(SCREEN***_sp_**);**
    
           **int slk_refresh_sp(SCREEN***_sp_**);**
           **int slk_restore_sp(SCREEN***_sp_**);**
           **int slk_set_sp(SCREEN***_sp_**, int** _labnum_**, const char ***_label_**, int** _fmt_**);**
           **int slk_touch_sp(SCREEN***_sp_**);**
           **int start_color_sp(SCREEN***_sp_**);**
           **attr_t term_attrs_sp(SCREEN***_sp_**);**
           **chtype termattrs_sp(SCREEN***_sp_**);**
           **char* termname_sp(SCREEN***_sp_**);**
           **int typeahead_sp(SCREEN***_sp_**, int** _fd_**);**
           **int unget_wch_sp(SCREEN***_sp_**, const wchar_t** _wch_**);**
    
           **int ungetch_sp(SCREEN***_sp_**, int** _ch_**);**
           **int ungetmouse_sp(SCREEN***_sp_**,MEVENT * event);**
           **int use_default_colors_sp(SCREEN***_sp_**);**
           **void use_env_sp(SCREEN***_sp_**, bool** _bf_**);**
           **int use_legacy_coding_sp(SCREEN***_sp_**, int** _level_**);**
           **void use_tioctl_sp(SCREEN ***_sp_**, bool** _bf_**);**
           **int vid_attr_sp(SCREEN***_sp_**, attr_t** _attrs_**, short** _pair_**, void ***_opts_**);**
           **int vid_puts_sp(SCREEN***_sp_**, attr_t** _attrs_**, short** _pair_**, void ***_opts_**, NCURSES_SP_OUTC** _putc_**);**
           **int vidattr_sp(SCREEN***_sp_**, chtype** _attrs_**);**
           **int vidputs_sp(SCREEN***_sp_**, chtype** _attrs_**, NCURSES_SP_OUTC** _putc_**);**
           **wchar_t* wunctrl_sp(SCREEN***_sp_**, cchar_t ***_ch_**);**
    
           **#include <form.h>**
    
           **FORM* new_form_sp(SCREEN***_sp_**, FIELD ****_fields_**);**
    
           **#include <menu.h>**
    
           **MENU* new_menu_sp(SCREEN***_sp_**, ITEM ****_items_**);**
    
           **#include <panel.h>**
    
           **PANEL* ceiling_panel(SCREEN***_sp_**);**
           **PANEL* ground_panel(SCREEN***_sp_**);**
           **void update_panels_sp(SCREEN***_sp_**);**
    
           **#include <term.h>**
    
           **int del_curterm_sp(SCREEN***_sp_**, TERMINAL ***_oterm_**);**
           **int putp_sp(SCREEN***_sp_**, const char ***_str_**);**
           **int restartterm_sp(SCREEN***_sp_**, NCURSES_CONST char***_term_**, int** _filedes_**, int ***_errret_**);**
           **TERMINAL* set_curterm_sp(SCREEN***_sp_**, TERMINAL***_nterm_**);**
           **int tgetent_sp(SCREEN***_sp_**, char ***_bp_**, const char ***_name_**);**
           **int tgetflag_sp(SCREEN***_sp_**, const char ***_capname_**);**
           **int tgetnum_sp(SCREEN***_sp_**, const char ***_capname_**);**
           **char* tgetstr_sp(SCREEN***_sp_**, const char ***_capname_**, char ****_area_**);**
           **char* tgoto_sp(SCREEN***_sp_**, const char ***_capname_**, int** _col_**, int** _row_**);**
           **int tigetflag_sp(SCREEN***_sp_**, const char ***_capname_**);**
           **int tigetnum_sp(SCREEN***_sp_**, const char ***_capname_**);**
           **char* tigetstr_sp(SCREEN***_sp_**, const char ***_capname_**);**
           /* may instead use 9 long parameters */
           **char* tparm_sp(SCREEN***_sp_**, const char ***_str_**, ...);**
           **int tputs_sp(SCREEN***_sp_**, const char ***_str_**, int** _affcnt_**, NCURSES_SP_OUTC** _putc_**);**
    
           **#include <unctrl.h>**
    
           **NCURSES_CONST char* unctrl_sp(SCREEN***_sp_**, chtype** _c_**);**
    


## DESCRIPTION



           This  implementation  can  be configured to provide a set of func‐
           tions 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.
    
       **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 sta‐
           tic  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**(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.
    


## NOTES



           This extension introduces some new names:
    
           NCURSES_SP_FUNCS
                This is set to the library patch-level number.  In the unex‐
                tended 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 conven‐
                tion 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 unex‐
                tended library.
    
           NCURSES_OUTC
                This is a function-pointer type used for the cases where a
                function passes characters to the output stream, e.g., **vid‐**
                **puts**(3X).
    


## 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_.
    


* * *