2 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
4 <STRONG>resizeterm</STRONG> - change the curses terminal size
9 <STRONG>#include</STRONG> <STRONG><curses.h></STRONG>
11 <STRONG>int</STRONG> <STRONG>resizeterm(int</STRONG> <STRONG>lines,</STRONG> <STRONG>int</STRONG> <STRONG>columns);</STRONG>
15 <H2>DESCRIPTION</H2><PRE>
16 This is an extension to the curses library. It provides
17 callers with a hook into the <STRONG>ncurses</STRONG> data to resize win-
18 dows, primarily for use by programs running in an X Window
19 terminal (e.g., xterm). The function <STRONG>resizeterm</STRONG> resizes
20 the standard and current windows to the specified dimen-
21 sions, and adjusts other bookkeeping data used by the
22 <STRONG>ncurses</STRONG> library that record the window dimensions.
24 When resizing the windows, the function blank-fills the
25 areas that are extended. The calling application should
26 fill in these areas with appropriate data.
28 The function attempts to resize all windows. However, due
29 to the calling convention of pads, it is not possible to
30 resize these without additional interaction with the
35 <H2>RETURN VALUE</H2><PRE>
36 The function returns the integer <STRONG>ERR</STRONG> upon failure and <STRONG>OK</STRONG>
37 on success. It will fail if either of the dimensions less
38 than or equal to zero, or if an error occurs while
39 (re)allocating memory for the windows.
44 While this function is intended to be used to support a
45 signal handler (i.e., for SIGWINCH), care should be taken
46 to avoid invoking it in a context where <STRONG>malloc</STRONG> or <STRONG>realloc</STRONG>
47 may have been interrupted, since it uses those functions.
49 If ncurses is configured to supply its own SIGWINCH han-
50 dler, the <STRONG>resizeterm</STRONG> function ungetch's a <STRONG>KEY_RESIZE</STRONG> which
51 will be read on the next call to <STRONG>getch</STRONG>. This is used to
52 alert an application that the screen size has changed, and
53 that it should repaint special features such as pads that
54 cannot be done automatically.
58 <H2>SEE ALSO</H2><PRE>
59 <STRONG><A HREF="wresize.3x.html">wresize(3X)</A></STRONG>.
64 Thomas Dickey (from an equivalent function written in 1988