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