1curs_sp_funcs(3X)                                            curs_sp_funcs(3X)
2
3
4

NAME

6       curs_sp_funcs - curses screen-pointer extension
7

SYNOPSIS

9       #include <curses.h>
10
11       int alloc_pair_sp(SCREEN* sp, int fg, int bg);
12       int assume_default_colors_sp(SCREEN* sp, int fg, int bg);
13       int baudrate_sp(SCREEN* sp);
14       int beep_sp(SCREEN* sp);
15       bool can_change_color_sp(SCREEN* sp);
16       int cbreak_sp(SCREEN* sp);
17       int color_content_sp(SCREEN* sp, short color, short* r, short* g, short* b);
18       int curs_set_sp(SCREEN* sp, int visibility);
19       int def_prog_mode_sp(SCREEN* sp);
20       int def_shell_mode_sp(SCREEN* sp);
21
22       int define_key_sp(SCREEN* sp, const char * definition, int keycode);
23       int delay_output_sp(SCREEN* sp, int ms);
24       int doupdate_sp(SCREEN* sp);
25       int echo_sp(SCREEN* sp);
26       int endwin_sp(SCREEN* sp);
27       char erasechar_sp(SCREEN* sp);
28       int extended_color_content_sp(SCREEN * sp, int color, int * r, int * g, int * b);
29       int extended_pair_content_sp(SCREEN* sp, int pair, int * fg, int * bg);
30       int extended_slk_color_sp(SCREEN* sp, int pair);
31       void filter_sp(SCREEN* sp);
32
33       int find_pair_sp(SCREEN* sp, int fg, int bg);
34       int flash_sp(SCREEN* sp);
35       int flushinp_sp(SCREEN* sp);
36       int free_pair_sp(SCREEN* sp, int pair);
37       int get_escdelay_sp(SCREEN* sp);
38       int getmouse_sp(SCREEN* sp, MEVENT* event);
39       WINDOW* getwin_sp(SCREEN* sp, FILE* filep);
40       int halfdelay_sp(SCREEN* sp, int tenths);
41       bool has_colors_sp(SCREEN* sp);
42       bool has_ic_sp(SCREEN* sp);
43
44       bool has_il_sp(SCREEN* sp);
45       int has_key_sp(SCREEN* sp, int ch);
46       bool has_mouse_sp(SCREEN* sp);
47       int init_color_sp(SCREEN* sp, short color, short r, short g, short b);
48       int init_extended_color_sp(SCREEN* sp, int color, int r, int g, int b);
49       int init_extended_pair_sp(SCREEN* sp, int pair, int fg, int bg);
50       int init_pair_sp(SCREEN* sp, short pair, short fg, short bg);
51       int intrflush_sp(SCREEN* sp, WINDOW* win, bool bf);
52       bool is_term_resized_sp(SCREEN* sp, int lines, int columns);
53       bool isendwin_sp(SCREEN* sp);
54
55       int key_defined_sp(SCREEN* sp, const char *definition);
56       char* keybound_sp(SCREEN* sp, int keycode, int count);
57       NCURSES_CONST char * keyname_sp(SCREEN* sp, int c);
58       int keyok_sp(SCREEN* sp, int keycode, bool enable);
59       char killchar_sp(SCREEN* sp);
60       char* longname_sp(SCREEN* sp);
61       int mcprint_sp(SCREEN* sp, char *data, int len);
62       int mouseinterval_sp(SCREEN* sp, int erval);
63       mmask_t mousemask_sp(SCREEN* sp, mmask_t newmask, mmask_t *oldmask);
64       int mvcur_sp(SCREEN* sp, int oldrow, int oldcol, int newrow, int newcol);
65
66       int napms_sp(SCREEN* sp, int ms);
67       WINDOW* newpad_sp(SCREEN* sp, int nrows, int ncols);
68       SCREEN* new_prescr(void);
69       SCREEN* newterm_sp(SCREEN* sp, const char *type, FILE *outfd, FILE *infd);
70       WINDOW* newwin_sp(SCREEN* sp, int nlines, int ncols, int begin_y, int begin_x);
71       int nl_sp(SCREEN* sp);
72       int nocbreak_sp(SCREEN* sp);
73       int noecho_sp(SCREEN* sp);
74       void nofilter_sp(SCREEN* sp);
75       int nonl_sp(SCREEN* sp);
76
77       void noqiflush_sp(SCREEN* sp);
78       int noraw_sp(SCREEN* sp);
79       int pair_content_sp(SCREEN* sp, short pair, short* fg, short* bg);
80       void qiflush_sp(SCREEN* sp);
81       int raw_sp(SCREEN* sp);
82       int reset_prog_mode_sp(SCREEN* sp);
83       void reset_color_pairs_sp(SCREEN* sp);
84       int reset_shell_mode_sp(SCREEN* sp);
85       int resetty_sp(SCREEN* sp);
86       int resize_term_sp(SCREEN* sp, int lines, int columns);
87
88       int resizeterm_sp(SCREEN* sp, int lines, int columns);
89       int ripoffline_sp(SCREEN* sp, int line, int (*init)(WINDOW* win, int fmt));
90       int savetty_sp(SCREEN* sp);
91       int scr_init_sp(SCREEN* sp, const char *filename);
92       int scr_restore_sp(SCREEN* sp, const char *filename);
93       int scr_set_sp(SCREEN* sp, const char *filename);
94       int set_escdelay_sp(SCREEN* sp, int ms);
95       int set_tabsize_sp(SCREEN* sp, int cols);
96       int slk_attr_set_sp(SCREEN* sp, const attr_t attrs, short pair, void*opts);
97
98       int slk_attrset_sp(SCREEN* sp, const chtype a);
99       int slk_attroff_sp(SCREEN* sp, const chtype a);
100       int slk_attron_sp(SCREEN* sp, const chtype a);
101       attr_t slk_attr_sp(SCREEN* sp);
102       int slk_clear_sp(SCREEN* sp);
103       int slk_color_sp(SCREEN* sp, short pair);
104       int slk_init_sp(SCREEN* sp, int fmt);
105       char* slk_label_sp(SCREEN* sp, int labnum);
106       int slk_noutrefresh_sp(SCREEN* sp);
107       int slk_refresh_sp(SCREEN* sp);
108
109       int slk_restore_sp(SCREEN* sp);
110       int slk_set_sp(SCREEN* sp, int labnum, const char * label, int fmt);
111       int slk_touch_sp(SCREEN* sp);
112       int start_color_sp(SCREEN* sp);
113       attr_t term_attrs_sp(SCREEN* sp);
114       chtype termattrs_sp(SCREEN* sp);
115       char* termname_sp(SCREEN* sp);
116       int typeahead_sp(SCREEN* sp, int fd);
117       int unget_wch_sp(SCREEN* sp, const wchar_t wch);
118       int ungetch_sp(SCREEN* sp, int ch);
119
120       int ungetmouse_sp(SCREEN* sp,MEVENT * event);
121       int use_default_colors_sp(SCREEN* sp);
122       void use_env_sp(SCREEN* sp, bool bf);
123       int use_legacy_coding_sp(SCREEN* sp, int level);
124       void use_tioctl_sp(SCREEN *sp, bool bf);
125       int vid_attr_sp(SCREEN* sp, attr_t attrs, short pair, void * opts);
126       int vid_puts_sp(SCREEN* sp, attr_t attrs, short pair, void * opts, NCURSES_SP_OUTC putc);
127       int vidattr_sp(SCREEN* sp, chtype attrs);
128       int vidputs_sp(SCREEN* sp, chtype attrs, NCURSES_SP_OUTC putc);
129       wchar_t* wunctrl_sp(SCREEN* sp, cchar_t *ch);
130
131       #include <form.h>
132
133       FORM* new_form_sp(SCREEN* sp, FIELD **fields);
134
135       #include <menu.h>
136
137       MENU* new_menu_sp(SCREEN* sp, ITEM **items);
138
139       #include <panel.h>
140
141       PANEL* ceiling_panel(SCREEN* sp);
142       PANEL* ground_panel(SCREEN* sp);
143       void update_panels_sp(SCREEN* sp);
144
145       #include <term.h>
146
147       int del_curterm_sp(SCREEN* sp, TERMINAL *oterm);
148       int putp_sp(SCREEN* sp, const char *str);
149       int restartterm_sp(SCREEN* sp, NCURSES_CONST char*term, int filedes, int *errret);
150       TERMINAL* set_curterm_sp(SCREEN* sp, TERMINAL*nterm);
151       int tgetent_sp(SCREEN* sp, char *bp, const char *name);
152       int tgetflag_sp(SCREEN* sp, const char *capname);
153       int tgetnum_sp(SCREEN* sp, const char *capname);
154       char* tgetstr_sp(SCREEN* sp, const char *capname, char **area);
155       char* tgoto_sp(SCREEN* sp, const char *capname, int col, int row);
156       int tigetflag_sp(SCREEN* sp, const char *capname);
157       int tigetnum_sp(SCREEN* sp, const char *capname);
158       char* tigetstr_sp(SCREEN* sp, const char *capname);
159       /* may instead use 9 long parameters */
160       char* tparm_sp(SCREEN* sp, const char *str, ...);
161       int tputs_sp(SCREEN* sp, const char *str, int affcnt, NCURSES_SP_OUTC putc);
162
163       #include <unctrl.h>
164
165       NCURSES_CONST char* unctrl_sp(SCREEN* sp, chtype c);
166

DESCRIPTION

168       This  implementation  can  be  configured to provide a set of functions
169       which improve the ability to manage multiple screens.  This feature can
170       be added to any of the configurations supported by ncurses; it adds new
171       entrypoints without changing the meaning of any of the existing ones.
172
173   IMPROVED FUNCTIONS
174       Most of the functions are new versions of existing functions.  A param‐
175       eter  is  added  at  the  front  of the parameter list.  It is a SCREEN
176       pointer.
177
178       The existing functions all use the current screen, which  is  a  static
179       variable.  The extended functions use the specified screen, thereby re‐
180       ducing the number of variables which must be modified to update  multi‐
181       ple screens.
182
183   NEW FUNCTIONS
184       Here are the new functions:
185
186       ceiling_panel
187            this returns a pointer to the topmost panel in the given screen.
188
189       ground_panel
190            this returns a pointer to the lowest panel in the given screen.
191
192       new_prescr
193            when  creating  a  new  screen,  the library uses static variables
194            which have been preset, e.g.,  by  use_env(3X),  filter(3X),  etc.
195            With  the  screen-pointer extension, there are situations where it
196            must create a current screen before the unextended  library  does.
197            The  new_prescr function is used internally to handle these cases.
198            It is also provided as an entrypoint to allow applications to cus‐
199            tomize the library initialization.
200

NOTES

202       This extension introduces some new names:
203
204       NCURSES_SP_FUNCS
205            This  is set to the library patch-level number.  In the unextended
206            library, this is zero (0), to make it useful for checking  if  the
207            extension is provided.
208
209       NCURSES_SP_NAME
210            The new functions are named using the macro NCURSES_SP_NAME, which
211            hides the actual implementation.  Currently this adds a “_sp” suf‐
212            fix  to the name of the unextended function.  This manual page in‐
213            dexes the extensions showing the full name.   However  the  proper
214            usage of these functions uses the macro, to provide for the possi‐
215            bility of changing the naming convention for specific library con‐
216            figurations.
217
218       NCURSES_SP_OUTC
219            This  is  a new function-pointer type to use in the screen-pointer
220            functions where an NCURSES_OUTC is used in the unextended library.
221
222       NCURSES_OUTC
223            This is a function-pointer type used for the cases where  a  func‐
224            tion passes characters to the output stream, e.g., vidputs(3X).
225

PORTABILITY

227       These  routines  are  specific  to ncurses.  They were not supported on
228       Version 7, BSD or System V implementations.  It is recommended that any
229       code  depending  on  ncurses  extensions  be  conditioned  using NCURS‐
230       ES_SP_FUNCS.
231

SEE ALSO

233       curses(3X), curs_opaque(3X), curs_threads(3X).
234
235
236
237                                                             curs_sp_funcs(3X)
Impressum