missing ncurses sources
[tomato.git] / release / src / router / libncurses / doc / html / man / resizeterm.3x.html
blobd675ee3acd03e27f90328089945cf6a76a16524e
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
2 <!--
3 ****************************************************************************
4 * Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
5 * *
6 * Permission is hereby granted, free of charge, to any person obtaining a *
7 * copy of this software and associated documentation files (the *
8 * "Software"), to deal in the Software without restriction, including *
9 * without limitation the rights to use, copy, modify, merge, publish, *
10 * distribute, distribute with modifications, sublicense, and/or sell *
11 * copies of the Software, and to permit persons to whom the Software is *
12 * furnished to do so, subject to the following conditions: *
13 * *
14 * The above copyright notice and this permission notice shall be included *
15 * in all copies or substantial portions of the Software. *
16 * *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
20 * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
21 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
22 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
23 * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
24 * *
25 * Except as contained in this notice, the name(s) of the above copyright *
26 * holders shall not be used in advertising or otherwise to promote the *
27 * sale, use or other dealings in this Software without prior written *
28 * authorization. *
29 ****************************************************************************
30 * Author: Thomas E. Dickey 1996-2005
31 * @Id: resizeterm.3x,v 1.14 2010/12/04 18:38:55 tom Exp @
32 -->
33 <HTML>
34 <HEAD>
35 <TITLE>resizeterm 3x</TITLE>
36 <link rev=made href="mailto:bug-ncurses@gnu.org">
37 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
38 </HEAD>
39 <BODY>
40 <H1>resizeterm 3x</H1>
41 <HR>
42 <PRE>
43 <!-- Manpage converted by man2html 3.0.1 -->
44 <STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG> <STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG>
49 </PRE>
50 <H2>NAME</H2><PRE>
51 <STRONG>is_term_resized</STRONG>, <STRONG>resize_term</STRONG>, <STRONG>resizeterm</STRONG> - change the
52 curses terminal size
55 </PRE>
56 <H2>SYNOPSIS</H2><PRE>
57 <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
59 <STRONG>bool</STRONG> <STRONG>is_term_resized(int</STRONG> <STRONG>lines,</STRONG> <STRONG>int</STRONG> <STRONG>columns);</STRONG>
60 <STRONG>int</STRONG> <STRONG>resize_term(int</STRONG> <STRONG>lines,</STRONG> <STRONG>int</STRONG> <STRONG>columns);</STRONG>
61 <STRONG>int</STRONG> <STRONG>resizeterm(int</STRONG> <STRONG>lines,</STRONG> <STRONG>int</STRONG> <STRONG>columns);</STRONG>
64 </PRE>
65 <H2>DESCRIPTION</H2><PRE>
66 This is an extension to the curses library. It provides
67 callers with a hook into the <STRONG>ncurses</STRONG> data to resize win-
68 dows, primarily for use by programs running in an X Window
69 terminal (e.g., xterm). The function <STRONG>resizeterm</STRONG> resizes
70 the standard and current windows to the specified dimen-
71 sions, and adjusts other bookkeeping data used by the
72 <STRONG>ncurses</STRONG> library that record the window dimensions.
74 Most of the work is done by the inner function
75 <STRONG>resize_term</STRONG>. The outer function <STRONG>resizeterm</STRONG> adds bookkeep-
76 ing for the SIGWINCH handler. When resizing the windows,
77 <STRONG>resize_term</STRONG> blank-fills the areas that are extended. The
78 calling application should fill in these areas with appro-
79 priate data. The <STRONG>resize_term</STRONG> function attempts to resize
80 all windows. However, due to the calling convention of
81 pads, it is not possible to resize these without addi-
82 tional interaction with the application.
84 A support function <STRONG>is_term_resized</STRONG> is provided so that
85 applications can check if the <STRONG>resize_term</STRONG> function would
86 modify the window structures. It returns TRUE if the win-
87 dows would be modified, and FALSE otherwise.
90 </PRE>
91 <H2>RETURN VALUE</H2><PRE>
92 Except as notes, these function return the integer <STRONG>ERR</STRONG>
93 upon failure and <STRONG>OK</STRONG> on success. They will fail if either
94 of the dimensions are less than or equal to zero, or if an
95 error occurs while (re)allocating memory for the windows.
98 </PRE>
99 <H2>NOTES</H2><PRE>
100 While these functions are intended to be used to support a
101 signal handler (i.e., for SIGWINCH), care should be taken
102 to avoid invoking them in a context where <STRONG>malloc</STRONG> or <STRONG>real-</STRONG>
103 <STRONG>loc</STRONG> may have been interrupted, since it uses those func-
104 tions.
106 If ncurses is configured to supply its own SIGWINCH han-
107 dler, the <STRONG>resizeterm</STRONG> function ungetch's a <STRONG>KEY_RESIZE</STRONG> which
108 will be read on the next call to <STRONG>getch</STRONG>. This is used to
109 alert an application that the screen size has changed, and
110 that it should repaint special features such as pads that
111 cannot be done automatically.
113 If the environment variables <STRONG>LINES</STRONG> or <STRONG>COLUMNS</STRONG> are set,
114 this overrides the library's use of the window size
115 obtained from the operating system. Thus, even if a SIG-
116 WINCH is received, no screen size change may be recorded.
117 In that case, no <STRONG>KEY_RESIZE</STRONG> is queued for the next call to
118 <STRONG>getch</STRONG>; an <STRONG>ERR</STRONG> will be returned instead.
121 </PRE>
122 <H2>SEE ALSO</H2><PRE>
123 <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>, <STRONG><A HREF="wresize.3x.html">wresize(3x)</A></STRONG>.
126 </PRE>
127 <H2>AUTHOR</H2><PRE>
128 Thomas Dickey (from an equivalent function written in 1988
129 for BSD curses).
133 <STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG>
134 </PRE>
135 <HR>
136 <ADDRESS>
137 Man(1) output converted with
138 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
139 </ADDRESS>
140 </BODY>
141 </HTML>