]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/html/resizeterm.3x.html
ncurses 4.2
[ncurses.git] / Ada95 / html / resizeterm.3x.html
1 <HTML>
2 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
3 <PRE>
4        <STRONG>resizeterm</STRONG> - change the curses terminal size
5
6
7 </PRE>
8 <H2>SYNOPSIS</H2><PRE>
9        <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
10
11        <STRONG>int</STRONG> <STRONG>resizeterm(int</STRONG> <STRONG>lines,</STRONG> <STRONG>int</STRONG> <STRONG>columns);</STRONG>
12
13
14 </PRE>
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.
23
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.
27
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
31        application.
32
33
34 </PRE>
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.
40
41
42 </PRE>
43 <H2>NOTES</H2><PRE>
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.
48
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.
55
56
57 </PRE>
58 <H2>SEE ALSO</H2><PRE>
59        <STRONG><A HREF="wresize.3x.html">wresize(3X)</A></STRONG>.
60
61
62 </PRE>
63 <H2>AUTHOR</H2><PRE>
64        Thomas Dickey (from an equivalent function written in 1988
65        for BSD curses).
66
67
68 </PRE>
69 </BODY>
70 </HTML>