diff options
-rw-r--r-- | lib/libcurses/Makefile | 6 | ||||
-rw-r--r-- | lib/libcurses/curs_resize.3 | 45 |
2 files changed, 48 insertions, 3 deletions
diff --git a/lib/libcurses/Makefile b/lib/libcurses/Makefile index 3de99d58687..cee8244f217 100644 --- a/lib/libcurses/Makefile +++ b/lib/libcurses/Makefile @@ -17,9 +17,9 @@ MAN= curs_addch.3 curs_addchstr.3 curs_addstr.3 curs_attr.3 curs_beep.3 \ curs_deleteln.3 curs_getch.3 curs_getstr.3 curs_getyx.3 curs_inch.3 \ curs_inchstr.3 curs_initscr.3 curs_inopts.3 curs_insch.3 curs_insstr.3 \ curs_instr.3 curs_kernel.3 curs_mouse.3 curs_move.3 curs_outopts.3 \ - curs_overlay.3 curs_pad.3 curs_printw.3 curs_refresh.3 curs_scanw.3 \ - curs_scr_dmp.3 curs_scroll.3 curs_slk.3 curs_termattrs.3 curs_touch.3 \ - curs_util.3 curs_window.3 curses.3 + curs_overlay.3 curs_pad.3 curs_printw.3 curs_refresh.3 curs_resize.3 \ + curs_scanw.3 curs_scr_dmp.3 curs_scroll.3 curs_slk.3 curs_termattrs.3 \ + curs_touch.3 curs_util.3 curs_window.3 curses.3 MLINKS+=curses.3 ncurses.3 CLEANFILES+= lib_keyname.c keys.tries diff --git a/lib/libcurses/curs_resize.3 b/lib/libcurses/curs_resize.3 new file mode 100644 index 00000000000..1ec283e97e1 --- /dev/null +++ b/lib/libcurses/curs_resize.3 @@ -0,0 +1,45 @@ +.TH wresize 3X "" + +.SH NAME +\fBwresize\fR - resize a curses window + +.SH SYNOPSIS +\fB#include <curses.h>\fR + +\fBint wresize(WINDOW *win, int lines, int columns);\fR + +.SH DESCRIPTION +The \fBwresize\fR function adjusts the dimensions of an \fBncurses\fR +window to the specified values, reallocating storage as necessary. + +If either dimension is larger than the current values, the window's +data is filled with blanks that have the current background rendition +(as set by \fBwbkgndset\fR) merged into them. If the current cursor +position is outside the retained area of the window, the cursor is +moved to within the nearest window edge. Window data is otherwise +preserved. + +This function will fail if either of the new dimensions less than or +equal to zero, or if memory cannot be allocated or reallocated for the +window. + +Note that \fBwresize\fR performs non-reentrant \fBmalloc\fR(3x) +operations, so it isn't advisable to resize from within an interrupt handler. +Instead, have your handler set an event flag to be interpreted next time +around your program's command loop. + +.SH PORTABILITY +This call was designed for \fBncurses\fR(3x), and is not found in SVr4 +curses, 4.4BSD curses, or any other previous version of curses. It +is recommended that you conditionalize all code depending on it with +the symbol NCURSES. + +.SH RETURN VALUE +The function returns the integer \fBERR\fR upon failure and \fBOK\fR +on success. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: |