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