resizeterm(3ncurses)


NAME

   is_term_resized,  resize_term,  resizeterm - change the curses terminal
   size

SYNOPSIS

   #include <curses.h>

   bool is_term_resized(int lines, int columns);
   int resize_term(int lines, int columns);
   int resizeterm(int lines, int columns);

DESCRIPTION

   This is an extension to the curses library.  It provides callers with a
   hook  into  the  ncurses  data  to resize windows, primarily for use by
   programs running in an X Window terminal (e.g., xterm).

   resizeterm
   The function resizeterm resizes the standard and current windows to the
   specified  dimensions,  and  adjusts other bookkeeping data used by the
   ncurses library that record the window dimensions such as the LINES and
   COLS variables.

   resize_term
   Most  of the work is done by the inner function resize_term.  The outer
   function resizeterm adds bookkeeping for the  SIGWINCH  handler.   When
   resizing  the  windows,  resize_term  blank-fills  the  areas  that are
   extended.  The calling application should  fill  in  these  areas  with
   appropriate  data.   The  resize_term  function  attempts to resize all
   windows.  However, due to the calling convention of  pads,  it  is  not
   possible  to  resize  these  without  additional  interaction  with the
   application.

   is_term_resized
   A support function is_term_resized is provided so that applications can
   check  if  the resize_term function would modify the window structures.
   It returns TRUE if the windows would be modified, and FALSE otherwise.

RETURN VALUE

   Except as noted, these functions return the integer  ERR  upon  failure
   and OK on success.  They will fail if either of the dimensions are less
   than or equal to zero, or  if  an  error  occurs  while  (re)allocating
   memory for the windows.

NOTES

   While  these  functions  are  intended  to  be used to support a signal
   handler (i.e., for SIGWINCH), care should be taken  to  avoid  invoking
   them  in  a  context where malloc or realloc may have been interrupted,
   since it uses those functions.

   If ncurses is configured to supply its own SIGWINCH handler,

   *   on receipt of a SIGWINCH, the handler sets a flag

   *   which is tested in wgetch and doupdate,

   *   in turn, calling the resizeterm function,

   *   which ungetch's a KEY_RESIZE which will be read on the next call to
       wgetch.

       The  KEY_RESIZE  alerts  an  application  that  the screen size has
       changed, and that it should repaint special features such  as  pads
       that cannot be done automatically.

       Calling resizeterm or resize_term directly from a signal handler is
       unsafe.  This indirect method is used to  provide  a  safe  way  to
       resize the ncurses data structures.

   If  the  environment variables LINES or COLUMNS are set, this overrides
   the library's use of  the  window  size  obtained  from  the  operating
   system.   Thus,  even  if a SIGWINCH is received, no screen size change
   may be recorded.

PORTABILITY

   It is possible to resize the screen with SVr4 curses, by

   *   exiting curses with endwin(3X) and

   *   resuming using refresh(3X).

   Doing that clears the screen and is visually distracting.

   This extension of ncurses was introduced in mid-1995.  It  was  adopted
   in NetBSD curses (2001) and PDCurses (2003).

SEE ALSO

   getch(3NCURSES), curses_variables(3NCURSES), wresize(3NCURSES).

AUTHOR

   Thomas  Dickey  (from  an  equivalent  function written in 1988 for BSD
   curses).

                                                      resizeterm(3NCURSES)


More Linux Commands

manpages/Tk_GetOptionValue.3.html
Tk_GetOptionValue(3) - process configuration options........
These procedures handle most of the details of parsing configuration options such as those for Tk widgets. Given a description of what options are supported, th

manpages/set_field_init.3form.html
set_field_init(3form) - set hooks for automatic invocation b
These functions make it possible to set hook functions to be called at various points in the automatic processing of input event codes by form_driver. The funct

manpages/ScreenWhitePointOfCCC.3.html
ScreenWhitePointOfCCC(3) - Color Conversion Context macros
The DisplayOfCCC macro returns the display associated with the specified CCC. The VisualOfCCC macro returns the visual associated with the specified CCC. The Sc

manpages/scalbnl.3.html
scalbnl(3) - multiply floating-point number by integral powe
These functions multiply their first argument x by FLT_RADIX (probably 2) to the power of exp, that is: x * FLT_RADIX ** exp The definition of FLT_RADIX can be

manpages/oowriter.html
oowriter(1) - LibreOffice office suite - Linux manual page
Writer is a full-featured word processing and desktop publishing tool. It is powerful enough to create complete books with content diagrams, indexes, and more.

manpages/pivot_root.2.html
pivot_root(2) - change the root file system - Linux man page
pivot_root() moves the root filesystem of the calling process to the directory put_old and makes new_root the new root filesystem of the calling process. The ty

manpages/mcd.1.html
mcd(1) - change MSDOS directory (Commands - Linux man page)
The mcd command is used to change the mtools working directory on the MS-DOS disk. It uses the following syntax: mcd [msdosdirectory] Without arguments, mcd rep

manpages/warnings.3pm.html
warnings(3pm) - Perl pragma to control optional warnings....
The warnings pragma gives control over which warnings are enabled in which parts of a Perl program. Its a more flexible alternative for both the command line fl

manpages/strtoimax.3.html
strtoimax(3) - convert string to integer - Linux man page...
These functions are just like strtol(3) and strtoul(3), except that they return a value of type intmax_t and uintmax_t, respectively. RETURN VALUE On success, t

manpages/XkbGetKeyTypes.3.html
XkbGetKeyTypes(3) - Obtain the list of available key types i
XkbGetKeyTypes queries the server for the desired types, waits for a reply, and returns the desired types in the xkb-&gt;map-&gt;types. If successful, it returns Succ

manpages/Tk_RestoreSavedOptions.3.html
Tk_RestoreSavedOptions(3) - process configuration options...
These procedures handle most of the details of parsing configuration options such as those for Tk widgets. Given a description of what options are supported, th

manpages/iso_8859_3.7.html
iso_8859_3(7) - ISO 8859-3 character set encoded in octal, d
The ISO 8859 standard includes several 8-bit extensions to the ASCII character set (also known as ISO 646-IRV). ISO 8859-3 encodes the characters used in Southe





We can't live, work or learn in freedom unless the software we use is free.