diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2011-06-26 10:34:56 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2011-06-26 10:34:56 (GMT) |
commit | 4850d52b4debbd8ed8ba6a41e697fa8fdaf7ae96 (patch) | |
tree | 5128c119b4ae5f11a7c2999557b95ae6d14ff4ab /Doc/library | |
parent | b6b7371329aaf23695acbe13665a4f5b89f8c759 (diff) | |
download | cpython-4850d52b4debbd8ed8ba6a41e697fa8fdaf7ae96.zip cpython-4850d52b4debbd8ed8ba6a41e697fa8fdaf7ae96.tar.gz cpython-4850d52b4debbd8ed8ba6a41e697fa8fdaf7ae96.tar.bz2 |
#11363: add missing functions from curses doc. Patch by Sandro Tosi.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/curses.rst | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Doc/library/curses.rst b/Doc/library/curses.rst index b88dc1a..fb57e76 100644 --- a/Doc/library/curses.rst +++ b/Doc/library/curses.rst @@ -296,6 +296,12 @@ The module :mod:`curses` defines the following functions: 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() Return ``True`` if :func:`endwin` has been called (that is, the curses library has @@ -465,6 +471,35 @@ The module :mod:`curses` defines the following functions: :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, :func:`resize_term` blank-fills the areas that are + extended. The calling application should fill in these areas with + appropriate data. The :func:`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) Set the virtual screen cursor to *y*, *x*. If *y* and *x* are both -1, then @@ -798,6 +833,11 @@ the following methods: 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 @@ -1043,6 +1083,14 @@ the following methods: *sminrow*, or *smincol* are treated as if they were zero. +.. method:: window.resize(nlines, ncols) + + Reallocate storage for a 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. |