]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/resizeterm.3x.html
ncurses 5.1
[ncurses.git] / doc / html / man / resizeterm.3x.html
1 <HTML>
2 <BODY>
3 <PRE>
4 <!-- Manpage converted by man2html 3.0.1 -->
5
6 </PRE>
7 <H2>NAME</H2><PRE>
8        <B>resizeterm</B> - change the curses terminal size
9
10
11 </PRE>
12 <H2>SYNOPSIS</H2><PRE>
13        <B>#include</B> <B>&lt;curses.h&gt;</B>
14
15        <B>int</B> <B>resizeterm(int</B> <B>lines,</B> <B>int</B> <B>columns);</B>
16
17
18 </PRE>
19 <H2>DESCRIPTION</H2><PRE>
20        This  is  an extension to the curses library.  It provides
21        callers with a hook into the <B>ncurses</B> data to  resize  win-
22        dows, primarily for use by programs running in an X Window
23        terminal (e.g., xterm).  The function  <B>resizeterm</B>  resizes
24        the  standard  and current windows to the specified dimen-
25        sions, and adjusts other  bookkeeping  data  used  by  the
26        <B>ncurses</B> library that record the window dimensions.
27
28        When  resizing  the  windows, the function blank-fills the
29        areas that are extended. The  calling  application  should
30        fill in these areas with appropriate data.
31
32        The function attempts to resize all windows.  However, due
33        to the calling convention of pads, it is not  possible  to
34        resize  these  without  additional  interaction  with  the
35        application.
36
37
38 </PRE>
39 <H2>RETURN VALUE</H2><PRE>
40        The function returns the integer <B>ERR</B> upon failure  and  <B>OK</B>
41        on success.  It will fail if either of the dimensions less
42        than or equal  to  zero,  or  if  an  error  occurs  while
43        (re)allocating memory for the windows.
44
45
46 </PRE>
47 <H2>NOTES</H2><PRE>
48        While  this  function  is intended to be used to support a
49        signal handler (i.e., for SIGWINCH), care should be  taken
50        to  avoid invoking it in a context where <B>malloc</B> or <B>realloc</B>
51        may have been interrupted, since it uses those  functions.
52
53        If  ncurses  is configured to supply its own SIGWINCH han-
54        dler, the <B>resizeterm</B> function ungetch's a <B>KEY_RESIZE</B> which
55        will  be  read on the next call to <B>getch</B>.  This is used to
56        alert an application that the screen size has changed, and
57        that  it should repaint special features such as pads that
58        cannot be done automatically.
59
60
61 </PRE>
62 <H2>SEE ALSO</H2><PRE>
63        <B><A HREF="wresize.3x.html">wresize(3x)</A></B>.
64
65
66 </PRE>
67 <H2>AUTHOR</H2><PRE>
68        Thomas Dickey (from an equivalent function written in 1988
69        for BSD curses).
70
71
72
73 </PRE>
74 <HR>
75 <ADDRESS>
76 Man(1) output converted with
77 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
78 </ADDRESS>
79 </BODY>
80 </HTML>