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