]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/resizeterm.3x
ncurses 5.0
[ncurses.git] / man / resizeterm.3x
1 .\"***************************************************************************
2 .\" Copyright (c) 1998 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 .\" Author: Thomas E. Dickey <dickey@clark.net> 1996,1997
30 .\"
31 .\" $Id: resizeterm.3x,v 1.7 1998/03/14 23:42:52 tom Exp $
32 .TH resizeterm 3X ""
33 .SH NAME
34 \fBresizeterm\fR - change the curses terminal size
35 ..
36 .SH SYNOPSIS
37 \fB#include <curses.h>\fR
38
39 \fBint resizeterm(int lines, int columns);\fR
40 ..
41 .SH DESCRIPTION
42 This is an extension to the curses library.
43 It provides callers with a hook into the \fBncurses\fR data to resize windows,
44 primarily for use by programs running in an X Window terminal (e.g., xterm).
45 The function \fBresizeterm\fR resizes the standard and current windows
46 to the specified dimensions, and adjusts other bookkeeping data used by
47 the \fBncurses\fR library that record the window dimensions.
48
49 When resizing the windows, the function blank-fills the areas that are
50 extended. The calling application should fill in these areas with
51 appropriate data.
52
53 The function attempts to resize all windows.
54 However, due to the calling convention of pads,
55 it is not possible to resize these
56 without additional interaction with the application.
57 ..
58 .SH RETURN VALUE
59 The function returns the integer \fBERR\fR upon failure and \fBOK\fR on success.
60 It will fail if either of the dimensions less than or equal to zero,
61 or if an error occurs while (re)allocating memory for the windows. 
62 ..
63 .SH NOTES
64 While this function is intended to be used to support a signal handler
65 (i.e., for SIGWINCH), care should be taken to avoid invoking it in a
66 context where \fBmalloc\fR or \fBrealloc\fR may have been interrupted,
67 since it uses those functions.
68 ..
69 .PP
70 If ncurses is configured to supply its own SIGWINCH handler,
71 the \fBresizeterm\fR function ungetch's a \fBKEY_RESIZE\fR which
72 will be read on the next call to \fBgetch\fR.
73 This is used to alert an application that the screen size has changed,
74 and that it should repaint special features such as pads that cannot
75 be done automatically.
76 ..
77 .SH SEE ALSO
78 \fBwresize\fR(3X).
79 ..
80 .SH AUTHOR
81 Thomas Dickey (from an equivalent function written in 1988 for BSD curses).
82 .\"#
83 .\"# The following sets edit modes for GNU EMACS
84 .\"# Local Variables:
85 .\"# mode:nroff
86 .\"# fill-column:79
87 .\"# End: