]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_sp_funcs.3x
ncurses 6.1 - patch 20190525
[ncurses.git] / man / curs_sp_funcs.3x
1 .\"***************************************************************************
2 .\" Copyright (c) 2010-2018,2019 Free Software Foundation, Inc.              *
3 .\"                                                                          *
4 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
5 .\" copy of this software and associated documentation files (the            *
6 .\" "Software"), to deal in the Software without restriction, including      *
7 .\" without limitation the rights to use, copy, modify, merge, publish,      *
8 .\" distribute, distribute with modifications, sublicense, and/or sell       *
9 .\" copies of the Software, and to permit persons to whom the Software is    *
10 .\" furnished to do so, subject to the following conditions:                 *
11 .\"                                                                          *
12 .\" The above copyright notice and this permission notice shall be included  *
13 .\" in all copies or substantial portions of the Software.                   *
14 .\"                                                                          *
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
16 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
17 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
18 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
19 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
20 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
21 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
22 .\"                                                                          *
23 .\" Except as contained in this notice, the name(s) of the above copyright   *
24 .\" holders shall not be used in advertising or otherwise to promote the     *
25 .\" sale, use or other dealings in this Software without prior written       *
26 .\" authorization.                                                           *
27 .\"***************************************************************************
28 .\"
29 .\" $Id: curs_sp_funcs.3x,v 1.16 2019/04/13 16:41:08 tom Exp $
30 .TH curs_sp_funcs 3X ""
31 .na
32 .hy 0
33 .SH NAME
34 curs_sp_funcs \- \fBcurses\fR screen-pointer extension
35 .ad
36 .hy
37 .SH SYNOPSIS
38 \fB#include <curses.h>\fR
39 \fB#include <term.h>\fR
40 .nf
41 .sp
42 \fBint alloc_pair_sp(SCREEN*, int, int);\fR
43 .br
44 \fBint assume_default_colors_sp(SCREEN*, int, int);\fR
45 .br
46 \fBint baudrate_sp(SCREEN*);\fR
47 .br
48 \fBint beep_sp(SCREEN*);\fR
49 .br
50 \fBbool can_change_color_sp(SCREEN*);\fR
51 .br
52 \fBint cbreak_sp(SCREEN*);\fR
53 .br
54 \fBint color_content_sp(SCREEN*, short, short*, short*, short*);\fR
55 .br
56 \fBint curs_set_sp(SCREEN*, int);\fR
57 .br
58 \fBint define_key_sp(SCREEN*, const char *, int);\fR
59 .br
60 \fBint def_prog_mode_sp(SCREEN*);\fR
61 .br
62 \fBint def_shell_mode_sp(SCREEN*);\fR
63 .br
64 \fBint delay_output_sp(SCREEN*, int);\fR
65 .br
66 \fBint doupdate_sp(SCREEN*);\fR
67 .br
68 \fBint echo_sp(SCREEN*);\fR
69 .br
70 \fBint endwin_sp(SCREEN*);\fR
71 .br
72 \fBchar erasechar_sp(SCREEN*);\fR
73 .br
74 \fBint extended_color_content_sp(SCREEN *, int, int *, int *, int *);\fR
75 .br
76 \fBint extended_pair_content_sp(SCREEN*, int, int *, int *);\fR
77 .br
78 \fBint extended_slk_color_sp(SCREEN*, int);\fR
79 .br
80 \fBvoid filter_sp(SCREEN*);\fR
81 .br
82 \fBint find_pair_sp(SCREEN*, int, int);\fR
83 .br
84 \fBint free_pair_sp(SCREEN*, int);\fR
85 .br
86 \fBint flash_sp(SCREEN*);\fR
87 .br
88 \fBint flushinp_sp(SCREEN*);\fR
89 .br
90 \fBint get_escdelay_sp(SCREEN*);\fR
91 .br
92 \fBint getmouse_sp(SCREEN*, MEVENT*);\fR
93 .br
94 \fBWINDOW* getwin_sp(SCREEN*, FILE*);\fR
95 .br
96 \fBint halfdelay_sp(SCREEN*, int);\fR
97 .br
98 \fBbool has_colors_sp(SCREEN*);\fR
99 .br
100 \fBbool has_ic_sp(SCREEN*);\fR
101 .br
102 \fBbool has_il_sp(SCREEN*);\fR
103 .br
104 \fBint has_key_sp(SCREEN*, int);\fR
105 .br
106 \fBbool has_mouse_sp(SCREEN*);\fR
107 .br
108 \fBint init_color_sp(SCREEN*, short, short, short, short);\fR
109 .br
110 \fBint init_extended_color_sp(SCREEN*, int, int, int, int);\fR
111 .br
112 \fBint init_extended_pair_sp(SCREEN*, int, int, int);\fR
113 .br
114 \fBint init_pair_sp(SCREEN*, short, short, short);\fR
115 .br
116 \fBint intrflush_sp(SCREEN*, WINDOW*, bool);\fR
117 .br
118 \fBbool isendwin_sp(SCREEN*);\fR
119 .br
120 \fBbool is_term_resized_sp(SCREEN*, int, int);\fR
121 .br
122 \fBchar* keybound_sp(SCREEN*, int, int);\fR
123 .br
124 \fBint key_defined_sp(SCREEN*, const char *);\fR
125 .br
126 \fBNCURSES_CONST char * keyname_sp(SCREEN*, int);\fR
127 .br
128 \fBint keyok_sp(SCREEN*, int, bool);\fR
129 .br
130 \fBchar killchar_sp(SCREEN*);\fR
131 .br
132 \fBchar* longname_sp(SCREEN*);\fR
133 .br
134 \fBint mcprint_sp(SCREEN*, char *, int);\fR
135 .br
136 \fBint mouseinterval_sp(SCREEN*, int);\fR
137 .br
138 \fBmmask_t mousemask_sp(SCREEN*, mmask_t, mmask_t *);\fR
139 .br
140 \fBint mvcur_sp(SCREEN*, int, int, int, int);\fR
141 .br
142 \fBint napms_sp(SCREEN*, int);\fR
143 .br
144 \fBWINDOW* newpad_sp(SCREEN*, int, int);\fR
145 .br
146 \fBSCREEN* new_prescr(void);\fR
147 .br
148 \fBSCREEN* newterm_sp(SCREEN*, const char *, FILE *, FILE *);\fR
149 .br
150 \fBWINDOW* newwin_sp(SCREEN*, int, int, int, int);\fR
151 .br
152 \fBint nl_sp(SCREEN*);\fR
153 .br
154 \fBint nocbreak_sp(SCREEN*);\fR
155 .br
156 \fBint noecho_sp(SCREEN*);\fR
157 .br
158 \fBvoid nofilter_sp(SCREEN*);\fR
159 .br
160 \fBint nonl_sp(SCREEN*);\fR
161 .br
162 \fBvoid noqiflush_sp(SCREEN*);\fR
163 .br
164 \fBint noraw_sp(SCREEN*);\fR
165 .br
166 \fBint pair_content_sp(SCREEN*, short, short*, short*);\fR
167 .br
168 \fBvoid qiflush_sp(SCREEN*);\fR
169 .br
170 \fBint raw_sp(SCREEN*);\fR
171 .br
172 \fBint reset_prog_mode_sp(SCREEN*);\fR
173 .br
174 \fBint reset_shell_mode_sp(SCREEN*);\fR
175 .br
176 \fBint resetty_sp(SCREEN*);\fR
177 .br
178 \fBint resize_term_sp(SCREEN*, int, int);\fR
179 .br
180 \fBint resizeterm_sp(SCREEN*, int, int);\fR
181 .br
182 \fBint restartterm_sp(SCREEN*, NCURSES_CONST char*, int, int *);\fR
183 .br
184 \fBint ripoffline_sp(SCREEN*, int, int (*)(WINDOW*, int));\fR
185 .br
186 \fBint savetty_sp(SCREEN*);\fR
187 .br
188 \fBint scr_init_sp(SCREEN*, const char *);\fR
189 .br
190 \fBint scr_restore_sp(SCREEN*, const char *);\fR
191 .br
192 \fBint scr_set_sp(SCREEN*, const char *);\fR
193 .br
194 \fBTERMINAL* set_curterm_sp(SCREEN*, TERMINAL*);\fR
195 .br
196 \fBint set_escdelay_sp(SCREEN*, int);\fR
197 .br
198 \fBint set_tabsize_sp(SCREEN*, int);\fR
199 .br
200 \fBint slk_attroff_sp(SCREEN*, const chtype);\fR
201 .br
202 \fBint slk_attron_sp(SCREEN*, const chtype);\fR
203 .br
204 \fBint slk_attr_set_sp(SCREEN*, const attr_t, short, void*);\fR
205 .br
206 \fBint slk_attrset_sp(SCREEN*, const chtype);\fR
207 .br
208 \fBattr_t slk_attr_sp(SCREEN*);\fR
209 .br
210 \fBint slk_clear_sp(SCREEN*);\fR
211 .br
212 \fBint slk_color_sp(SCREEN*, short);\fR
213 .br
214 \fBint slk_init_sp(SCREEN*, int);\fR
215 .br
216 \fBchar* slk_label_sp(SCREEN*, int);\fR
217 .br
218 \fBint slk_noutrefresh_sp(SCREEN*);\fR
219 .br
220 \fBint slk_refresh_sp(SCREEN*);\fR
221 .br
222 \fBint slk_restore_sp(SCREEN*);\fR
223 .br
224 \fBint slk_set_sp(SCREEN*, int, const char *, int);\fR
225 .br
226 \fBint slk_touch_sp(SCREEN*);\fR
227 .br
228 \fBint start_color_sp(SCREEN*);\fR
229 .br
230 \fBattr_t term_attrs_sp(SCREEN*);\fR
231 .br
232 \fBchtype termattrs_sp(SCREEN*);\fR
233 .br
234 \fBchar* termname_sp(SCREEN*);\fR
235 .br
236 \fBint typeahead_sp(SCREEN*, int);\fR
237 .br
238 \fBNCURSES_CONST char* unctrl_sp(SCREEN*, chtype);\fR
239 .br
240 \fBint ungetch_sp(SCREEN*, int);\fR
241 .br
242 \fBint ungetmouse_sp(SCREEN*,MEVENT *);\fR
243 .br
244 \fBint unget_wch_sp(SCREEN*, const wchar_t);\fR
245 .br
246 \fBint use_default_colors_sp(SCREEN*);\fR
247 .br
248 \fBvoid use_env_sp(SCREEN*, bool);\fR
249 .br
250 \fBvoid use_tioctl_sp(SCREEN *, bool);\fR
251 .br
252 \fBint use_legacy_coding_sp(SCREEN*, int);\fR
253 .br
254 \fBint vid_attr_sp(SCREEN*, attr_t, short, void *);\fR
255 .br
256 \fBint vidattr_sp(SCREEN*, chtype);\fR
257 .br
258 \fBint vid_puts_sp(SCREEN*, attr_t, short, void *, NCURSES_SP_OUTC);\fR
259 .br
260 \fBint vidputs_sp(SCREEN*, chtype, NCURSES_SP_OUTC);\fR
261 .br
262 \fBwchar_t* wunctrl_sp(SCREEN*, cchar_t *);\fR
263 .sp
264 \fB#include <form.h>\fR
265 .sp
266 \fBFORM* new_form_sp(SCREEN*, FIELD **);\fR
267 .sp
268 \fB#include <menu.h>\fR
269 .sp
270 \fBMENU* new_menu_sp(SCREEN*, ITEM **);\fR
271 .sp
272 \fB#include <panel.h>\fR
273 .sp
274 \fBPANEL* ceiling_panel(SCREEN*);\fR
275 .br
276 \fBPANEL* ground_panel(SCREEN*);\fR
277 .br
278 \fBvoid update_panels_sp(SCREEN*);\fR
279 .sp
280 \fB#include <term.h>\fR
281 .sp
282 \fBint del_curterm_sp(SCREEN*, TERMINAL *);\fR
283 .br
284 \fBint putp_sp(SCREEN*, const char *);\fR
285 .br
286 \fBint tgetflag_sp(SCREEN*, const char *);\fR
287 .br
288 \fBint tgetent_sp(SCREEN*, char *, const char *);\fR
289 .br
290 \fBint tgetnum_sp(SCREEN*, const char *);\fR
291 .br
292 \fBchar* tgetstr_sp(SCREEN*, const char *, char **);\fR
293 .br
294 \fBint tigetflag_sp(SCREEN*, const char *);\fR
295 .br
296 \fBint tigetnum_sp(SCREEN*, const char *);\fR
297 .br
298 \fBchar* tigetstr_sp(SCREEN*, const char *);\fR
299 .br
300 \fBint tputs_sp(SCREEN*, const char *, int, NCURSES_SP_OUTC);\fR
301 .ad
302 .br
303 .SH DESCRIPTION
304 This implementation can be configured to provide a set of functions which
305 improve the ability to manage multiple screens.
306 This feature can be added to any of the configurations supported by ncurses;
307 it adds new entrypoints
308 without changing the meaning of any of the existing ones.
309 .PP
310 .\" ***************************************************************************
311 .SS IMPROVED FUNCTIONS
312 Most of the functions are new versions of existing functions.
313 A parameter is added at the front of the parameter list.
314 It is a SCREEN pointer.
315 .PP
316 The existing functions all use the current screen,
317 which is a static variable.
318 The extended functions use the specified screen,
319 thereby reducing the number of variables which must be modified
320 to update multiple screens.
321 .\" ***************************************************************************
322 .SS NEW FUNCTIONS
323 Here are the new functions:
324 .TP 5
325 ceiling_panel
326 this returns a pointer to the topmost panel in the given screen.
327 .TP 5
328 ground_panel
329 this returns a pointer to the lowest panel in the given screen.
330 .TP 5
331 new_prescr
332 when creating a new screen, the library uses static variables which
333 have been preset, e.g., by \fBuse_env\fP(3X), \fBfilter\fP(3X), etc.
334 With the screen-pointer extension,
335 there are situations where it must create a current screen before
336 the unextended library does.
337 The \fBnew_prescr\fP function is used internally to handle these cases.
338 It is also provided as an entrypoint to allow applications to customize
339 the library initialization.
340 .\" ***************************************************************************
341 .SH NOTES
342 This extension introduces some new names:
343 .TP 5
344 NCURSES_SP_FUNCS
345 This is set to the library patch-level number.
346 In the unextended library, this is zero (0),
347 to make it useful for checking if the extension is provided.
348 .TP 5
349 NCURSES_SP_NAME
350 The new functions are named using the macro \fINCURSES_SP_NAME\fP,
351 which hides the actual implementation.
352 Currently this adds a "_sp" suffix to the name of the unextended function.
353 This manual page indexes the extensions showing the full name.
354 However the proper usage of these functions uses the macro,
355 to provide for the possibility of changing the naming convention
356 for specific library configurations.
357 .TP 5
358 NCURSES_SP_OUTC
359 This is a new function-pointer type to use in the screen-pointer functions
360 where an \fINCURSES_OUTC\fP is used in the unextended library.
361 .TP 5
362 NCURSES_OUTC
363 This is a function-pointer type used for the cases where a function passes
364 characters to the output stream, e.g., \fBvidputs\fP(3X).
365 .PP
366 .SH PORTABILITY
367 These routines are specific to ncurses.
368 They were not supported on Version 7, BSD or System V implementations.
369 It is recommended that any code depending on ncurses extensions
370 be conditioned using \fINCURSES_SP_FUNCS\fP.
371 .SH SEE ALSO
372 \fBcurses\fR(3X),
373 \fBcurs_opaque\fR(3X),
374 \fBcurs_threads\fR(3X).