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

DESCRIPTION

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

NOTES

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

PORTABILITY

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

SEE ALSO

235       curses(3X), curs_opaque(3X), curs_threads(3X).
236
237
238
239                                                             curs_sp_funcs(3X)
Impressum