diff --git a/Doc/library/curses.rst b/Doc/library/curses.rst --- a/Doc/library/curses.rst +++ b/Doc/library/curses.rst @@ -300,6 +300,12 @@ cause the interpreter to exit. +.. function:: is_term_resized(nlines, ncols) + + Return True if :func:`resize_term` would modify the window structure, False + otherwise. + + .. function:: isendwin() Returns true if :func:`endwin` has been called (that is, the curses library has @@ -469,6 +475,35 @@ :func:`def_shell_mode`. +.. function:: resetty() + + Restore the state of the terminal modes to what it was at the last call to + :func:`savetty`. + + +.. function:: resize_term(nlines, ncols) + + Backend function used by :func:`resizeterm`, performing most of the work; + 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. + + +.. function:: resizeterm(nlines, ncols) + + Resize the standard and current windows to the specified dimensions, and + adjusts other bookkeeping data used by the curses library that record the + window dimensions (in particular the SIGWINCH handler). + + +.. function:: savetty() + + Save the current state of the terminal modes in a buffer, usable by + :func:`resetty`. + + .. function:: setsyx(y, x) Sets the virtual screen cursor to *y*, *x*. If *y* and *x* are both -1, then @@ -789,6 +824,11 @@ Return a tuple ``(y, x)`` of co-ordinates of upper-left corner. +.. method:: window.getbkgd() + + Return the given window's current background character/attribute pair. + + .. method:: window.getch([y, x]) Get a character. Note that the integer returned does *not* have to be in ASCII @@ -1034,6 +1074,14 @@ *sminrow*, or *smincol* are treated as if they were zero. +.. method:: window.resize(nlines, ncols) + + Reallocate storage for an curses window to adjust its dimensions to the + specified values. 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 :meth:`bkgdset`) merged into them. + + .. method:: window.scroll([lines=1]) Scroll the screen or scrolling region upward by *lines* lines.