logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

wresize - resize a curses window

Authors

       Thomas Dickey

Description

wresize,  an  ncurses  extension  to  the  curses  library,  reallocates  storage  for win, adjusting its
       dimensions to lines and columns.  If either dimension is larger than its current value, ncurses fills the
       expanded part of the window with the window's background character as  configured  by  wbkgdset(3NCURSES)
       (wide-character API: wbkgrndset(3NCURSES)).

Extensions

wresize is an ncurses(3NCURSES) extension, and is not found in SVr4 curses, 4.4BSD curses, or  any  other
       previous curses implementation.

History

       Thomas Dickey developed wresize as an extension to BSD curses in 1988,  and  brought  it  to  ncurses  in
       mid-1995.

Name

wresize - resize a curses window

Notes

       The only restriction placed on the values of lines and columns is that they be greater than  zero.   They
       are  not  compared  to  the dimensions of the curses screen; this keeps the logic of resizeterm(3NCURSES)
       simple.  The caller must ensure that win's dimensions fit within those of the screen.

Portability

       Applications  employing  ncurses  extensions  should  condition  their  use  on  the  visibility  of  the
       NCURSES_VERSION preprocessor macro.

       NetBSD curses adopted wresize in 2001 (release 1.5.3), and PDCurses in 2004 (version 2.7).

       It is not possible to resize windows with SVr4 curses.

Return Value

wresize  returns  OK  on success and ERR on failure.  It fails if either lines or columns is less than or
       equal to zero, or if an error occurs while (re)allocating memory for win.

See Also

resizeterm(3NCURSES)

ncurses 6.5                                        2025-01-18                                  wresize(3NCURSES)

Synopsis

#include<curses.h>intwresize(WINDOW*win,intlines,intcolumns);

See Also