mirror of
https://github.com/python/cpython.git
synced 2026-06-04 16:50:51 +00:00
gh-150285: Fix too long docstrings in the curses module (GH-150286)
This commit is contained in:
parent
0f32750fe2
commit
4c0fe2d134
5 changed files with 381 additions and 347 deletions
|
|
@ -23,7 +23,8 @@ class Textbox:
|
|||
Ctrl-A Go to left edge of window.
|
||||
Ctrl-B Cursor left, wrapping to previous line if appropriate.
|
||||
Ctrl-D Delete character under cursor.
|
||||
Ctrl-E Go to right edge (stripspaces off) or end of line (stripspaces on).
|
||||
Ctrl-E Go to right edge (stripspaces off) or end of line
|
||||
(stripspaces on).
|
||||
Ctrl-F Cursor right, wrapping to next line when appropriate.
|
||||
Ctrl-G Terminate, returning the window contents.
|
||||
Ctrl-H Delete character backward.
|
||||
|
|
@ -34,11 +35,12 @@ class Textbox:
|
|||
Ctrl-O Insert a blank line at cursor location.
|
||||
Ctrl-P Cursor up; move up one line.
|
||||
|
||||
Move operations do nothing if the cursor is at an edge where the movement
|
||||
is not possible. The following synonyms are supported where possible:
|
||||
Move operations do nothing if the cursor is at an edge where the
|
||||
movement is not possible. The following synonyms are supported where
|
||||
possible:
|
||||
|
||||
KEY_LEFT = Ctrl-B, KEY_RIGHT = Ctrl-F, KEY_UP = Ctrl-P, KEY_DOWN = Ctrl-N
|
||||
KEY_BACKSPACE = Ctrl-h
|
||||
KEY_LEFT = Ctrl-B, KEY_RIGHT = Ctrl-F, KEY_UP = Ctrl-P,
|
||||
KEY_DOWN = Ctrl-N, KEY_BACKSPACE = Ctrl-h
|
||||
"""
|
||||
def __init__(self, win, insert_mode=False):
|
||||
self.win = win
|
||||
|
|
|
|||
|
|
@ -360,17 +360,17 @@ _curses_panel_panel_bottom_impl(PyCursesPanelObject *self)
|
|||
}
|
||||
|
||||
/*[clinic input]
|
||||
@permit_long_docstring_body
|
||||
_curses_panel.panel.hide
|
||||
|
||||
Hide the panel.
|
||||
|
||||
This does not delete the object, it just makes the window on screen invisible.
|
||||
This does not delete the object, it just makes the window on screen
|
||||
invisible.
|
||||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
_curses_panel_panel_hide_impl(PyCursesPanelObject *self)
|
||||
/*[clinic end generated code: output=a7bbbd523e1eab49 input=9071b463a39a1a6a]*/
|
||||
/*[clinic end generated code: output=a7bbbd523e1eab49 input=9456aca9b264dde1]*/
|
||||
{
|
||||
int rtn = hide_panel(self->pan);
|
||||
return curses_panel_panel_check_err(self, rtn, "hide_panel", "hide");
|
||||
|
|
@ -772,12 +772,13 @@ _curses_panel.update_panels
|
|||
|
||||
Updates the virtual screen after changes in the panel stack.
|
||||
|
||||
This does not call curses.doupdate(), so you'll have to do this yourself.
|
||||
This does not call curses.doupdate(), so you'll have to do this
|
||||
yourself.
|
||||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
_curses_panel_update_panels_impl(PyObject *module)
|
||||
/*[clinic end generated code: output=2f3b4c2e03d90ded input=5299624c9a708621]*/
|
||||
/*[clinic end generated code: output=2f3b4c2e03d90ded input=0d0db79f05ec3ef4]*/
|
||||
{
|
||||
PyCursesInitialised;
|
||||
update_panels();
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
8
Modules/clinic/_curses_panel.c.h
generated
8
Modules/clinic/_curses_panel.c.h
generated
|
|
@ -28,7 +28,8 @@ PyDoc_STRVAR(_curses_panel_panel_hide__doc__,
|
|||
"\n"
|
||||
"Hide the panel.\n"
|
||||
"\n"
|
||||
"This does not delete the object, it just makes the window on screen invisible.");
|
||||
"This does not delete the object, it just makes the window on screen\n"
|
||||
"invisible.");
|
||||
|
||||
#define _CURSES_PANEL_PANEL_HIDE_METHODDEF \
|
||||
{"hide", (PyCFunction)_curses_panel_panel_hide, METH_NOARGS, _curses_panel_panel_hide__doc__},
|
||||
|
|
@ -328,7 +329,8 @@ PyDoc_STRVAR(_curses_panel_update_panels__doc__,
|
|||
"\n"
|
||||
"Updates the virtual screen after changes in the panel stack.\n"
|
||||
"\n"
|
||||
"This does not call curses.doupdate(), so you\'ll have to do this yourself.");
|
||||
"This does not call curses.doupdate(), so you\'ll have to do this\n"
|
||||
"yourself.");
|
||||
|
||||
#define _CURSES_PANEL_UPDATE_PANELS_METHODDEF \
|
||||
{"update_panels", (PyCFunction)_curses_panel_update_panels, METH_NOARGS, _curses_panel_update_panels__doc__},
|
||||
|
|
@ -341,4 +343,4 @@ _curses_panel_update_panels(PyObject *module, PyObject *Py_UNUSED(ignored))
|
|||
{
|
||||
return _curses_panel_update_panels_impl(module);
|
||||
}
|
||||
/*[clinic end generated code: output=db2fe491582784aa input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=62f20ef03eefdf44 input=a9049054013a1b77]*/
|
||||
|
|
|
|||
282
Modules/clinic/_cursesmodule.c.h
generated
282
Modules/clinic/_cursesmodule.c.h
generated
|
|
@ -422,10 +422,10 @@ PyDoc_STRVAR(_curses_window_border__doc__,
|
|||
" br\n"
|
||||
" Bottom-right corner.\n"
|
||||
"\n"
|
||||
"Each parameter specifies the character to use for a specific part of the\n"
|
||||
"border. The characters can be specified as integers or as one-character\n"
|
||||
"strings. A 0 value for any parameter will cause the default character to be\n"
|
||||
"used for that parameter.");
|
||||
"Each parameter specifies the character to use for a specific part of\n"
|
||||
"the border. The characters can be specified as integers or as\n"
|
||||
"one-character strings. A 0 value for any parameter will cause the\n"
|
||||
"default character to be used for that parameter.");
|
||||
|
||||
#define _CURSES_WINDOW_BORDER_METHODDEF \
|
||||
{"border", _PyCFunction_CAST(_curses_window_border), METH_FASTCALL, _curses_window_border__doc__},
|
||||
|
|
@ -500,8 +500,9 @@ PyDoc_STRVAR(_curses_window_box__doc__,
|
|||
" horch\n"
|
||||
" Top and bottom side.\n"
|
||||
"\n"
|
||||
"Similar to border(), but both ls and rs are verch and both ts and bs are\n"
|
||||
"horch. The default corner characters are always used by this function.");
|
||||
"Similar to border(), but both ls and rs are verch and both ts and bs\n"
|
||||
"are horch. The default corner characters are always used by this\n"
|
||||
"function.");
|
||||
|
||||
#define _CURSES_WINDOW_BOX_METHODDEF \
|
||||
{"box", (PyCFunction)_curses_window_box, METH_VARARGS, _curses_window_box__doc__},
|
||||
|
|
@ -593,9 +594,9 @@ PyDoc_STRVAR(_curses_window_derwin__doc__,
|
|||
" begin_x\n"
|
||||
" Left side x-coordinate.\n"
|
||||
"\n"
|
||||
"derwin() is the same as calling subwin(), except that begin_y and begin_x\n"
|
||||
"are relative to the origin of the window, rather than relative to the entire\n"
|
||||
"screen.");
|
||||
"derwin() is the same as calling subwin(), except that begin_y and\n"
|
||||
"begin_x are relative to the origin of the window, rather than\n"
|
||||
"relative to the entire screen.");
|
||||
|
||||
#define _CURSES_WINDOW_DERWIN_METHODDEF \
|
||||
{"derwin", (PyCFunction)_curses_window_derwin, METH_VARARGS, _curses_window_derwin__doc__},
|
||||
|
|
@ -751,9 +752,10 @@ PyDoc_STRVAR(_curses_window_getch__doc__,
|
|||
" x\n"
|
||||
" X-coordinate.\n"
|
||||
"\n"
|
||||
"The integer returned does not have to be in ASCII range: function keys,\n"
|
||||
"keypad keys and so on return numbers higher than 256. In no-delay mode, -1\n"
|
||||
"is returned if there is no input, else getch() waits until a key is pressed.");
|
||||
"The integer returned does not have to be in ASCII range: function\n"
|
||||
"keys, keypad keys and so on return numbers higher than 256. In\n"
|
||||
"no-delay mode, -1 is returned if there is no input, else getch()\n"
|
||||
"waits until a key is pressed.");
|
||||
|
||||
#define _CURSES_WINDOW_GETCH_METHODDEF \
|
||||
{"getch", (PyCFunction)_curses_window_getch, METH_VARARGS, _curses_window_getch__doc__},
|
||||
|
|
@ -798,9 +800,10 @@ PyDoc_STRVAR(_curses_window_getkey__doc__,
|
|||
" x\n"
|
||||
" X-coordinate.\n"
|
||||
"\n"
|
||||
"Returning a string instead of an integer, as getch() does. Function keys,\n"
|
||||
"keypad keys and other special keys return a multibyte string containing the\n"
|
||||
"key name. In no-delay mode, an exception is raised if there is no input.");
|
||||
"Returning a string instead of an integer, as getch() does. Function\n"
|
||||
"keys, keypad keys and other special keys return a multibyte string\n"
|
||||
"containing the key name. In no-delay mode, an exception is raised\n"
|
||||
"if there is no input.");
|
||||
|
||||
#define _CURSES_WINDOW_GETKEY_METHODDEF \
|
||||
{"getkey", (PyCFunction)_curses_window_getkey, METH_VARARGS, _curses_window_getkey__doc__},
|
||||
|
|
@ -969,8 +972,8 @@ PyDoc_STRVAR(_curses_window_insch__doc__,
|
|||
" attr\n"
|
||||
" Attributes for the character.\n"
|
||||
"\n"
|
||||
"All characters to the right of the cursor are shifted one position right, with\n"
|
||||
"the rightmost characters on the line being lost.");
|
||||
"All characters to the right of the cursor are shifted one position\n"
|
||||
"right, with the rightmost characters on the line being lost.");
|
||||
|
||||
#define _CURSES_WINDOW_INSCH_METHODDEF \
|
||||
{"insch", (PyCFunction)_curses_window_insch, METH_VARARGS, _curses_window_insch__doc__},
|
||||
|
|
@ -1035,7 +1038,8 @@ PyDoc_STRVAR(_curses_window_inch__doc__,
|
|||
" x\n"
|
||||
" X-coordinate.\n"
|
||||
"\n"
|
||||
"The bottom 8 bits are the character proper, and upper bits are the attributes.");
|
||||
"The bottom 8 bits are the character proper, and upper bits are the\n"
|
||||
"attributes.");
|
||||
|
||||
#define _CURSES_WINDOW_INCH_METHODDEF \
|
||||
{"inch", (PyCFunction)_curses_window_inch, METH_VARARGS, _curses_window_inch__doc__},
|
||||
|
|
@ -1084,11 +1088,11 @@ PyDoc_STRVAR(_curses_window_insstr__doc__,
|
|||
" attr\n"
|
||||
" Attributes for characters.\n"
|
||||
"\n"
|
||||
"Insert a character string (as many characters as will fit on the line)\n"
|
||||
"before the character under the cursor. All characters to the right of\n"
|
||||
"the cursor are shifted right, with the rightmost characters on the line\n"
|
||||
"being lost. The cursor position does not change (after moving to y, x,\n"
|
||||
"if specified).");
|
||||
"Insert a character string (as many characters as will fit on the\n"
|
||||
"line) before the character under the cursor. All characters to the\n"
|
||||
"right of the cursor are shifted right, with the rightmost characters\n"
|
||||
"on the line being lost. The cursor position does not change (after\n"
|
||||
"moving to y, x, if specified).");
|
||||
|
||||
#define _CURSES_WINDOW_INSSTR_METHODDEF \
|
||||
{"insstr", (PyCFunction)_curses_window_insstr, METH_VARARGS, _curses_window_insstr__doc__},
|
||||
|
|
@ -1159,12 +1163,12 @@ PyDoc_STRVAR(_curses_window_insnstr__doc__,
|
|||
" attr\n"
|
||||
" Attributes for characters.\n"
|
||||
"\n"
|
||||
"Insert a character string (as many characters as will fit on the line)\n"
|
||||
"before the character under the cursor, up to n characters. If n is zero\n"
|
||||
"or negative, the entire string is inserted. All characters to the right\n"
|
||||
"of the cursor are shifted right, with the rightmost characters on the line\n"
|
||||
"being lost. The cursor position does not change (after moving to y, x, if\n"
|
||||
"specified).");
|
||||
"Insert a character string (as many characters as will fit on the\n"
|
||||
"line) before the character under the cursor, up to n characters. If\n"
|
||||
"n is zero or negative, the entire string is inserted. All\n"
|
||||
"characters to the right of the cursor are shifted right, with the\n"
|
||||
"rightmost characters on the line being lost. The cursor position\n"
|
||||
"does not change (after moving to y, x, if specified).");
|
||||
|
||||
#define _CURSES_WINDOW_INSNSTR_METHODDEF \
|
||||
{"insnstr", (PyCFunction)_curses_window_insnstr, METH_VARARGS, _curses_window_insnstr__doc__},
|
||||
|
|
@ -1230,7 +1234,8 @@ PyDoc_STRVAR(_curses_window_is_linetouched__doc__,
|
|||
" line\n"
|
||||
" Line number.\n"
|
||||
"\n"
|
||||
"Raise a curses.error exception if line is not valid for the given window.");
|
||||
"Raise a curses.error exception if line is not valid for the given\n"
|
||||
"window.");
|
||||
|
||||
#define _CURSES_WINDOW_IS_LINETOUCHED_METHODDEF \
|
||||
{"is_linetouched", (PyCFunction)_curses_window_is_linetouched, METH_O, _curses_window_is_linetouched__doc__},
|
||||
|
|
@ -1260,9 +1265,9 @@ PyDoc_STRVAR(_curses_window_noutrefresh__doc__,
|
|||
"noutrefresh([pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol])\n"
|
||||
"Mark for refresh but wait.\n"
|
||||
"\n"
|
||||
"This function updates the data structure representing the desired state of the\n"
|
||||
"window, but does not force an update of the physical screen. To accomplish\n"
|
||||
"that, call doupdate().");
|
||||
"This function updates the data structure representing the desired\n"
|
||||
"state of the window, but does not force an update of the physical\n"
|
||||
"screen. To accomplish that, call doupdate().");
|
||||
|
||||
#define _CURSES_WINDOW_NOUTREFRESH_METHODDEF \
|
||||
{"noutrefresh", (PyCFunction)_curses_window_noutrefresh, METH_VARARGS, _curses_window_noutrefresh__doc__},
|
||||
|
|
@ -1314,9 +1319,9 @@ PyDoc_STRVAR(_curses_window_noutrefresh__doc__,
|
|||
"\n"
|
||||
"Mark for refresh but wait.\n"
|
||||
"\n"
|
||||
"This function updates the data structure representing the desired state of the\n"
|
||||
"window, but does not force an update of the physical screen. To accomplish\n"
|
||||
"that, call doupdate().");
|
||||
"This function updates the data structure representing the desired\n"
|
||||
"state of the window, but does not force an update of the physical\n"
|
||||
"screen. To accomplish that, call doupdate().");
|
||||
|
||||
#define _CURSES_WINDOW_NOUTREFRESH_METHODDEF \
|
||||
{"noutrefresh", (PyCFunction)_curses_window_noutrefresh, METH_NOARGS, _curses_window_noutrefresh__doc__},
|
||||
|
|
@ -1336,14 +1341,15 @@ PyDoc_STRVAR(_curses_window_overlay__doc__,
|
|||
"overlay(destwin, [sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol])\n"
|
||||
"Overlay the window on top of destwin.\n"
|
||||
"\n"
|
||||
"The windows need not be the same size, only the overlapping region is copied.\n"
|
||||
"This copy is non-destructive, which means that the current background\n"
|
||||
"character does not overwrite the old contents of destwin.\n"
|
||||
"The windows need not be the same size, only the overlapping region\n"
|
||||
"is copied. This copy is non-destructive, which means that the\n"
|
||||
"current background character does not overwrite the old contents of\n"
|
||||
"destwin.\n"
|
||||
"\n"
|
||||
"To get fine-grained control over the copied region, the second form of\n"
|
||||
"overlay() can be used. sminrow and smincol are the upper-left coordinates\n"
|
||||
"of the source window, and the other variables mark a rectangle in the\n"
|
||||
"destination window.");
|
||||
"To get fine-grained control over the copied region, the second form\n"
|
||||
"of overlay() can be used. sminrow and smincol are the upper-left\n"
|
||||
"coordinates of the source window, and the other variables mark\n"
|
||||
"a rectangle in the destination window.");
|
||||
|
||||
#define _CURSES_WINDOW_OVERLAY_METHODDEF \
|
||||
{"overlay", (PyCFunction)_curses_window_overlay, METH_VARARGS, _curses_window_overlay__doc__},
|
||||
|
|
@ -1394,14 +1400,15 @@ PyDoc_STRVAR(_curses_window_overwrite__doc__,
|
|||
" dmaxcol])\n"
|
||||
"Overwrite the window on top of destwin.\n"
|
||||
"\n"
|
||||
"The windows need not be the same size, in which case only the overlapping\n"
|
||||
"region is copied. This copy is destructive, which means that the current\n"
|
||||
"background character overwrites the old contents of destwin.\n"
|
||||
"The windows need not be the same size, in which case only the\n"
|
||||
"overlapping region is copied. This copy is destructive, which means\n"
|
||||
"that the current background character overwrites the old contents of\n"
|
||||
"destwin.\n"
|
||||
"\n"
|
||||
"To get fine-grained control over the copied region, the second form of\n"
|
||||
"overwrite() can be used. sminrow and smincol are the upper-left coordinates\n"
|
||||
"of the source window, the other variables mark a rectangle in the destination\n"
|
||||
"window.");
|
||||
"To get fine-grained control over the copied region, the second form\n"
|
||||
"of overwrite() can be used. sminrow and smincol are the upper-left\n"
|
||||
"coordinates of the source window, the other variables mark\n"
|
||||
"a rectangle in the destination window.");
|
||||
|
||||
#define _CURSES_WINDOW_OVERWRITE_METHODDEF \
|
||||
{"overwrite", (PyCFunction)_curses_window_overwrite, METH_VARARGS, _curses_window_overwrite__doc__},
|
||||
|
|
@ -1520,16 +1527,17 @@ PyDoc_STRVAR(_curses_window_refresh__doc__,
|
|||
"Update the display immediately.\n"
|
||||
"\n"
|
||||
"Synchronize actual screen with previous drawing/deleting methods.\n"
|
||||
"The 6 optional arguments can only be specified when the window is a pad\n"
|
||||
"created with newpad(). The additional parameters are needed to indicate\n"
|
||||
"what part of the pad and screen are involved. pminrow and pmincol specify\n"
|
||||
"the upper left-hand corner of the rectangle to be displayed in the pad.\n"
|
||||
"sminrow, smincol, smaxrow, and smaxcol specify the edges of the rectangle to\n"
|
||||
"be displayed on the screen. The lower right-hand corner of the rectangle to\n"
|
||||
"be displayed in the pad is calculated from the screen coordinates, since the\n"
|
||||
"rectangles must be the same size. Both rectangles must be entirely contained\n"
|
||||
"within their respective structures. Negative values of pminrow, pmincol,\n"
|
||||
"sminrow, or smincol are treated as if they were zero.");
|
||||
"The 6 optional arguments can only be specified when the window is\n"
|
||||
"a pad created with newpad(). The additional parameters are needed\n"
|
||||
"to indicate what part of the pad and screen are involved. pminrow\n"
|
||||
"and pmincol specify the upper left-hand corner of the rectangle to\n"
|
||||
"be displayed in the pad. sminrow, smincol, smaxrow, and smaxcol\n"
|
||||
"specify the edges of the rectangle to be displayed on the screen.\n"
|
||||
"The lower right-hand corner of the rectangle to be displayed in the\n"
|
||||
"pad is calculated from the screen coordinates, since the rectangles\n"
|
||||
"must be the same size. Both rectangles must be entirely contained\n"
|
||||
"within their respective structures. Negative values of pminrow,\n"
|
||||
"pmincol, sminrow, or smincol are treated as if they were zero.");
|
||||
|
||||
#define _CURSES_WINDOW_REFRESH_METHODDEF \
|
||||
{"refresh", (PyCFunction)_curses_window_refresh, METH_VARARGS, _curses_window_refresh__doc__},
|
||||
|
|
@ -1627,8 +1635,8 @@ PyDoc_STRVAR(_curses_window_subwin__doc__,
|
|||
" begin_x\n"
|
||||
" Left side x-coordinate.\n"
|
||||
"\n"
|
||||
"By default, the sub-window will extend from the specified position to the\n"
|
||||
"lower right corner of the window.");
|
||||
"By default, the sub-window will extend from the specified position\n"
|
||||
"to the lower right corner of the window.");
|
||||
|
||||
#define _CURSES_WINDOW_SUBWIN_METHODDEF \
|
||||
{"subwin", (PyCFunction)_curses_window_subwin, METH_VARARGS, _curses_window_subwin__doc__},
|
||||
|
|
@ -1676,7 +1684,8 @@ PyDoc_STRVAR(_curses_window_scroll__doc__,
|
|||
" lines\n"
|
||||
" Number of lines to scroll.\n"
|
||||
"\n"
|
||||
"Scroll upward if the argument is positive and downward if it is negative.");
|
||||
"Scroll upward if the argument is positive and downward if it is\n"
|
||||
"negative.");
|
||||
|
||||
#define _CURSES_WINDOW_SCROLL_METHODDEF \
|
||||
{"scroll", (PyCFunction)_curses_window_scroll, METH_VARARGS, _curses_window_scroll__doc__},
|
||||
|
|
@ -1715,8 +1724,9 @@ PyDoc_STRVAR(_curses_window_touchline__doc__,
|
|||
"touchline(start, count, [changed=True])\n"
|
||||
"Pretend count lines have been changed, starting with line start.\n"
|
||||
"\n"
|
||||
"If changed is supplied, it specifies whether the affected lines are marked\n"
|
||||
"as having been changed (changed=True) or unchanged (changed=False).");
|
||||
"If changed is supplied, it specifies whether the affected lines are\n"
|
||||
"marked as having been changed (changed=True) or unchanged\n"
|
||||
"(changed=False).");
|
||||
|
||||
#define _CURSES_WINDOW_TOUCHLINE_METHODDEF \
|
||||
{"touchline", (PyCFunction)_curses_window_touchline, METH_VARARGS, _curses_window_touchline__doc__},
|
||||
|
|
@ -1910,11 +1920,12 @@ PyDoc_STRVAR(_curses_cbreak__doc__,
|
|||
" flag\n"
|
||||
" If false, the effect is the same as calling nocbreak().\n"
|
||||
"\n"
|
||||
"In cbreak mode (sometimes called \"rare\" mode) normal tty line buffering is\n"
|
||||
"turned off and characters are available to be read one by one. However,\n"
|
||||
"unlike raw mode, special characters (interrupt, quit, suspend, and flow\n"
|
||||
"control) retain their effects on the tty driver and calling program.\n"
|
||||
"Calling first raw() then cbreak() leaves the terminal in cbreak mode.");
|
||||
"In cbreak mode (sometimes called \"rare\" mode) normal tty line buffering\n"
|
||||
"is turned off and characters are available to be read one by one.\n"
|
||||
"However, unlike raw mode, special characters (interrupt, quit, suspend,\n"
|
||||
"and flow control) retain their effects on the tty driver and calling\n"
|
||||
"program. Calling first raw() then cbreak() leaves the terminal in\n"
|
||||
"cbreak mode.");
|
||||
|
||||
#define _CURSES_CBREAK_METHODDEF \
|
||||
{"cbreak", _PyCFunction_CAST(_curses_cbreak), METH_FASTCALL, _curses_cbreak__doc__},
|
||||
|
|
@ -1954,8 +1965,9 @@ PyDoc_STRVAR(_curses_color_content__doc__,
|
|||
" color_number\n"
|
||||
" The number of the color (0 - (COLORS-1)).\n"
|
||||
"\n"
|
||||
"A 3-tuple is returned, containing the R, G, B values for the given color,\n"
|
||||
"which will be between 0 (no component) and 1000 (maximum amount of component).");
|
||||
"A 3-tuple is returned, containing the R, G, B values for the given\n"
|
||||
"color, which will be between 0 (no component) and 1000 (maximum amount\n"
|
||||
"of component).");
|
||||
|
||||
#define _CURSES_COLOR_CONTENT_METHODDEF \
|
||||
{"color_content", (PyCFunction)_curses_color_content, METH_O, _curses_color_content__doc__},
|
||||
|
|
@ -1988,7 +2000,8 @@ PyDoc_STRVAR(_curses_color_pair__doc__,
|
|||
" The number of the color pair.\n"
|
||||
"\n"
|
||||
"This attribute value can be combined with A_STANDOUT, A_REVERSE, and the\n"
|
||||
"other A_* attributes. pair_number() is the counterpart to this function.");
|
||||
"other A_* attributes. pair_number() is the counterpart to this\n"
|
||||
"function.");
|
||||
|
||||
#define _CURSES_COLOR_PAIR_METHODDEF \
|
||||
{"color_pair", (PyCFunction)_curses_color_pair, METH_O, _curses_color_pair__doc__},
|
||||
|
|
@ -2022,9 +2035,9 @@ PyDoc_STRVAR(_curses_curs_set__doc__,
|
|||
" 0 for invisible, 1 for normal visible, or 2 for very visible.\n"
|
||||
"\n"
|
||||
"If the terminal supports the visibility requested, the previous cursor\n"
|
||||
"state is returned; otherwise, an exception is raised. On many terminals,\n"
|
||||
"the \"visible\" mode is an underline cursor and the \"very visible\" mode is\n"
|
||||
"a block cursor.");
|
||||
"state is returned; otherwise, an exception is raised. On many\n"
|
||||
"terminals, the \"visible\" mode is an underline cursor and the \"very\n"
|
||||
"visible\" mode is a block cursor.");
|
||||
|
||||
#define _CURSES_CURS_SET_METHODDEF \
|
||||
{"curs_set", (PyCFunction)_curses_curs_set, METH_O, _curses_curs_set__doc__},
|
||||
|
|
@ -2076,7 +2089,8 @@ PyDoc_STRVAR(_curses_def_shell_mode__doc__,
|
|||
"\n"
|
||||
"Save the current terminal mode as the \"shell\" mode.\n"
|
||||
"\n"
|
||||
"The \"shell\" mode is the mode when the running program is not using curses.\n"
|
||||
"The \"shell\" mode is the mode when the running program is not using\n"
|
||||
"curses.\n"
|
||||
"\n"
|
||||
"Subsequent calls to reset_shell_mode() will restore this mode.");
|
||||
|
||||
|
|
@ -2150,7 +2164,8 @@ PyDoc_STRVAR(_curses_echo__doc__,
|
|||
" flag\n"
|
||||
" If false, the effect is the same as calling noecho().\n"
|
||||
"\n"
|
||||
"In echo mode, each character input is echoed to the screen as it is entered.");
|
||||
"In echo mode, each character input is echoed to the screen as it is\n"
|
||||
"entered.");
|
||||
|
||||
#define _CURSES_ECHO_METHODDEF \
|
||||
{"echo", _PyCFunction_CAST(_curses_echo), METH_FASTCALL, _curses_echo__doc__},
|
||||
|
|
@ -2223,7 +2238,8 @@ PyDoc_STRVAR(_curses_flash__doc__,
|
|||
"\n"
|
||||
"Flash the screen.\n"
|
||||
"\n"
|
||||
"That is, change it to reverse-video and then change it back in a short interval.");
|
||||
"That is, change it to reverse-video and then change it back in a short\n"
|
||||
"interval.");
|
||||
|
||||
#define _CURSES_FLASH_METHODDEF \
|
||||
{"flash", (PyCFunction)_curses_flash, METH_NOARGS, _curses_flash__doc__},
|
||||
|
|
@ -2243,8 +2259,8 @@ PyDoc_STRVAR(_curses_flushinp__doc__,
|
|||
"\n"
|
||||
"Flush all input buffers.\n"
|
||||
"\n"
|
||||
"This throws away any typeahead that has been typed by the user and has not\n"
|
||||
"yet been processed by the program.");
|
||||
"This throws away any typeahead that has been typed by the user and has\n"
|
||||
"not yet been processed by the program.");
|
||||
|
||||
#define _CURSES_FLUSHINP_METHODDEF \
|
||||
{"flushinp", (PyCFunction)_curses_flushinp, METH_NOARGS, _curses_flushinp__doc__},
|
||||
|
|
@ -2614,8 +2630,9 @@ PyDoc_STRVAR(_curses_init_pair__doc__,
|
|||
" bg\n"
|
||||
" Background color number (-1 - (COLORS-1)).\n"
|
||||
"\n"
|
||||
"If the color-pair was previously initialized, the screen is refreshed and\n"
|
||||
"all occurrences of that color-pair are changed to the new definition.");
|
||||
"If the color-pair was previously initialized, the screen is refreshed\n"
|
||||
"and all occurrences of that color-pair are changed to the new\n"
|
||||
"definition.");
|
||||
|
||||
#define _CURSES_INIT_PAIR_METHODDEF \
|
||||
{"init_pair", _PyCFunction_CAST(_curses_init_pair), METH_FASTCALL, _curses_init_pair__doc__},
|
||||
|
|
@ -2774,9 +2791,9 @@ PyDoc_STRVAR(_curses_get_escdelay__doc__,
|
|||
"\n"
|
||||
"Gets the curses ESCDELAY setting.\n"
|
||||
"\n"
|
||||
"Gets the number of milliseconds to wait after reading an escape character,\n"
|
||||
"to distinguish between an individual escape character entered on the\n"
|
||||
"keyboard from escape sequences sent by cursor and function keys.");
|
||||
"Gets the number of milliseconds to wait after reading an escape\n"
|
||||
"character, to distinguish between an individual escape character entered\n"
|
||||
"on the keyboard from escape sequences sent by cursor and function keys.");
|
||||
|
||||
#define _CURSES_GET_ESCDELAY_METHODDEF \
|
||||
{"get_escdelay", (PyCFunction)_curses_get_escdelay, METH_NOARGS, _curses_get_escdelay__doc__},
|
||||
|
|
@ -2803,9 +2820,9 @@ PyDoc_STRVAR(_curses_set_escdelay__doc__,
|
|||
" ms\n"
|
||||
" length of the delay in milliseconds.\n"
|
||||
"\n"
|
||||
"Sets the number of milliseconds to wait after reading an escape character,\n"
|
||||
"to distinguish between an individual escape character entered on the\n"
|
||||
"keyboard from escape sequences sent by cursor and function keys.");
|
||||
"Sets the number of milliseconds to wait after reading an escape\n"
|
||||
"character, to distinguish between an individual escape character entered\n"
|
||||
"on the keyboard from escape sequences sent by cursor and function keys.");
|
||||
|
||||
#define _CURSES_SET_ESCDELAY_METHODDEF \
|
||||
{"set_escdelay", (PyCFunction)_curses_set_escdelay, METH_O, _curses_set_escdelay__doc__},
|
||||
|
|
@ -2839,8 +2856,8 @@ PyDoc_STRVAR(_curses_get_tabsize__doc__,
|
|||
"\n"
|
||||
"Gets the curses TABSIZE setting.\n"
|
||||
"\n"
|
||||
"Gets the number of columns used by the curses library when converting a tab\n"
|
||||
"character to spaces as it adds the tab to a window.");
|
||||
"Gets the number of columns used by the curses library when converting\n"
|
||||
"a tab character to spaces as it adds the tab to a window.");
|
||||
|
||||
#define _CURSES_GET_TABSIZE_METHODDEF \
|
||||
{"get_tabsize", (PyCFunction)_curses_get_tabsize, METH_NOARGS, _curses_get_tabsize__doc__},
|
||||
|
|
@ -2867,8 +2884,8 @@ PyDoc_STRVAR(_curses_set_tabsize__doc__,
|
|||
" size\n"
|
||||
" rendered cell width of a tab character.\n"
|
||||
"\n"
|
||||
"Sets the number of columns used by the curses library when converting a tab\n"
|
||||
"character to spaces as it adds the tab to a window.");
|
||||
"Sets the number of columns used by the curses library when converting\n"
|
||||
"a tab character to spaces as it adds the tab to a window.");
|
||||
|
||||
#define _CURSES_SET_TABSIZE_METHODDEF \
|
||||
{"set_tabsize", (PyCFunction)_curses_set_tabsize, METH_O, _curses_set_tabsize__doc__},
|
||||
|
|
@ -3039,8 +3056,8 @@ PyDoc_STRVAR(_curses_longname__doc__,
|
|||
"\n"
|
||||
"Return the terminfo long name field describing the current terminal.\n"
|
||||
"\n"
|
||||
"The maximum length of a verbose description is 128 characters. It is defined\n"
|
||||
"only after the call to initscr().");
|
||||
"The maximum length of a verbose description is 128 characters. It is\n"
|
||||
"defined only after the call to initscr().");
|
||||
|
||||
#define _CURSES_LONGNAME_METHODDEF \
|
||||
{"longname", (PyCFunction)_curses_longname, METH_NOARGS, _curses_longname__doc__},
|
||||
|
|
@ -3097,8 +3114,8 @@ PyDoc_STRVAR(_curses_mouseinterval__doc__,
|
|||
" Time in milliseconds.\n"
|
||||
"\n"
|
||||
"Set the maximum time that can elapse between press and release events in\n"
|
||||
"order for them to be recognized as a click, and return the previous interval\n"
|
||||
"value.");
|
||||
"order for them to be recognized as a click, and return the previous\n"
|
||||
"interval value.");
|
||||
|
||||
#define _CURSES_MOUSEINTERVAL_METHODDEF \
|
||||
{"mouseinterval", (PyCFunction)_curses_mouseinterval, METH_O, _curses_mouseinterval__doc__},
|
||||
|
|
@ -3133,9 +3150,10 @@ PyDoc_STRVAR(_curses_mousemask__doc__,
|
|||
"Set the mouse events to be reported, and return a tuple (availmask, oldmask).\n"
|
||||
"\n"
|
||||
"Return a tuple (availmask, oldmask). availmask indicates which of the\n"
|
||||
"specified mouse events can be reported; on complete failure it returns 0.\n"
|
||||
"oldmask is the previous value of the given window\'s mouse event mask.\n"
|
||||
"If this function is never called, no mouse events are ever reported.");
|
||||
"specified mouse events can be reported; on complete failure it returns\n"
|
||||
"0. oldmask is the previous value of the given window\'s mouse event\n"
|
||||
"mask. If this function is never called, no mouse events are ever\n"
|
||||
"reported.");
|
||||
|
||||
#define _CURSES_MOUSEMASK_METHODDEF \
|
||||
{"mousemask", (PyCFunction)_curses_mousemask, METH_O, _curses_mousemask__doc__},
|
||||
|
|
@ -3267,8 +3285,8 @@ PyDoc_STRVAR(_curses_newwin__doc__,
|
|||
" begin_x\n"
|
||||
" Left side x-coordinate.\n"
|
||||
"\n"
|
||||
"By default, the window will extend from the specified position to the lower\n"
|
||||
"right corner of the screen.");
|
||||
"By default, the window will extend from the specified position to the\n"
|
||||
"lower right corner of the screen.");
|
||||
|
||||
#define _CURSES_NEWWIN_METHODDEF \
|
||||
{"newwin", (PyCFunction)_curses_newwin, METH_VARARGS, _curses_newwin__doc__},
|
||||
|
|
@ -3318,8 +3336,9 @@ PyDoc_STRVAR(_curses_nl__doc__,
|
|||
" flag\n"
|
||||
" If false, the effect is the same as calling nonl().\n"
|
||||
"\n"
|
||||
"This mode translates the return key into newline on input, and translates\n"
|
||||
"newline into return and line-feed on output. Newline mode is initially on.");
|
||||
"This mode translates the return key into newline on input, and\n"
|
||||
"translates newline into return and line-feed on output. Newline mode\n"
|
||||
"is initially on.");
|
||||
|
||||
#define _CURSES_NL_METHODDEF \
|
||||
{"nl", _PyCFunction_CAST(_curses_nl), METH_FASTCALL, _curses_nl__doc__},
|
||||
|
|
@ -3396,8 +3415,8 @@ PyDoc_STRVAR(_curses_nonl__doc__,
|
|||
"\n"
|
||||
"Leave newline mode.\n"
|
||||
"\n"
|
||||
"Disable translation of return into newline on input, and disable low-level\n"
|
||||
"translation of newline into newline/return on output.");
|
||||
"Disable translation of return into newline on input, and disable\n"
|
||||
"low-level translation of newline into newline/return on output.");
|
||||
|
||||
#define _CURSES_NONL_METHODDEF \
|
||||
{"nonl", (PyCFunction)_curses_nonl, METH_NOARGS, _curses_nonl__doc__},
|
||||
|
|
@ -3613,8 +3632,8 @@ PyDoc_STRVAR(_curses_raw__doc__,
|
|||
" If false, the effect is the same as calling noraw().\n"
|
||||
"\n"
|
||||
"In raw mode, normal line buffering and processing of interrupt, quit,\n"
|
||||
"suspend, and flow control keys are turned off; characters are presented to\n"
|
||||
"curses input functions one by one.");
|
||||
"suspend, and flow control keys are turned off; characters are presented\n"
|
||||
"to curses input functions one by one.");
|
||||
|
||||
#define _CURSES_RAW_METHODDEF \
|
||||
{"raw", _PyCFunction_CAST(_curses_raw), METH_FASTCALL, _curses_raw__doc__},
|
||||
|
|
@ -3712,8 +3731,8 @@ PyDoc_STRVAR(_curses_resizeterm__doc__,
|
|||
" ncols\n"
|
||||
" Width.\n"
|
||||
"\n"
|
||||
"Adjusts other bookkeeping data used by the curses library that record the\n"
|
||||
"window dimensions (in particular the SIGWINCH handler).");
|
||||
"Adjusts other bookkeeping data used by the curses library that record\n"
|
||||
"the window dimensions (in particular the SIGWINCH handler).");
|
||||
|
||||
#define _CURSES_RESIZETERM_METHODDEF \
|
||||
{"resizeterm", _PyCFunction_CAST(_curses_resizeterm), METH_FASTCALL, _curses_resizeterm__doc__},
|
||||
|
|
@ -3791,10 +3810,11 @@ PyDoc_STRVAR(_curses_resize_term__doc__,
|
|||
" Width.\n"
|
||||
"\n"
|
||||
"When resizing the windows, resize_term() blank-fills the areas that are\n"
|
||||
"extended. The calling application should fill in these areas with appropriate\n"
|
||||
"data. The resize_term() function attempts to resize all windows. However,\n"
|
||||
"due to the calling convention of pads, it is not possible to resize these\n"
|
||||
"without additional interaction with the application.");
|
||||
"extended. The calling application should fill in these areas with\n"
|
||||
"appropriate data. The resize_term() function attempts to resize all\n"
|
||||
"windows. However, due to the calling convention of pads, it is not\n"
|
||||
"possible to resize these without additional interaction with the\n"
|
||||
"application.");
|
||||
|
||||
#define _CURSES_RESIZE_TERM_METHODDEF \
|
||||
{"resize_term", _PyCFunction_CAST(_curses_resize_term), METH_FASTCALL, _curses_resize_term__doc__},
|
||||
|
|
@ -3929,12 +3949,12 @@ PyDoc_STRVAR(_curses_start_color__doc__,
|
|||
"\n"
|
||||
"Initializes eight basic colors and global variables COLORS and COLOR_PAIRS.\n"
|
||||
"\n"
|
||||
"Must be called if the programmer wants to use colors, and before any other\n"
|
||||
"color manipulation routine is called. It is good practice to call this\n"
|
||||
"routine right after initscr().\n"
|
||||
"Must be called if the programmer wants to use colors, and before any\n"
|
||||
"other color manipulation routine is called. It is good practice to call\n"
|
||||
"this routine right after initscr().\n"
|
||||
"\n"
|
||||
"It also restores the colors on the terminal to the values they had when the\n"
|
||||
"terminal was just turned on.");
|
||||
"It also restores the colors on the terminal to the values they had when\n"
|
||||
"the terminal was just turned on.");
|
||||
|
||||
#define _CURSES_START_COLOR_METHODDEF \
|
||||
{"start_color", (PyCFunction)_curses_start_color, METH_NOARGS, _curses_start_color__doc__},
|
||||
|
|
@ -4036,8 +4056,8 @@ PyDoc_STRVAR(_curses_tigetnum__doc__,
|
|||
" capname\n"
|
||||
" The terminfo capability name.\n"
|
||||
"\n"
|
||||
"The value -2 is returned if capname is not a numeric capability, or -1 if\n"
|
||||
"it is canceled or absent from the terminal description.");
|
||||
"The value -2 is returned if capname is not a numeric capability, or -1\n"
|
||||
"if it is canceled or absent from the terminal description.");
|
||||
|
||||
#define _CURSES_TIGETNUM_METHODDEF \
|
||||
{"tigetnum", (PyCFunction)_curses_tigetnum, METH_O, _curses_tigetnum__doc__},
|
||||
|
|
@ -4079,8 +4099,8 @@ PyDoc_STRVAR(_curses_tigetstr__doc__,
|
|||
" capname\n"
|
||||
" The terminfo capability name.\n"
|
||||
"\n"
|
||||
"None is returned if capname is not a string capability, or is canceled or\n"
|
||||
"absent from the terminal description.");
|
||||
"None is returned if capname is not a string capability, or is canceled\n"
|
||||
"or absent from the terminal description.");
|
||||
|
||||
#define _CURSES_TIGETSTR_METHODDEF \
|
||||
{"tigetstr", (PyCFunction)_curses_tigetstr, METH_O, _curses_tigetstr__doc__},
|
||||
|
|
@ -4234,14 +4254,14 @@ PyDoc_STRVAR(_curses_use_env__doc__,
|
|||
"\n"
|
||||
"Use environment variables LINES and COLUMNS.\n"
|
||||
"\n"
|
||||
"If used, this function should be called before initscr() or newterm() are\n"
|
||||
"called.\n"
|
||||
"If used, this function should be called before initscr() or newterm()\n"
|
||||
"are called.\n"
|
||||
"\n"
|
||||
"When flag is False, the values of lines and columns specified in the terminfo\n"
|
||||
"database will be used, even if environment variables LINES and COLUMNS (used\n"
|
||||
"by default) are set, or if curses is running in a window (in which case\n"
|
||||
"default behavior would be to use the window size if LINES and COLUMNS are\n"
|
||||
"not set).");
|
||||
"When flag is False, the values of lines and columns specified in the\n"
|
||||
"terminfo database will be used, even if environment variables LINES and\n"
|
||||
"COLUMNS (used by default) are set, or if curses is running in a window\n"
|
||||
"(in which case default behavior would be to use the window size if LINES\n"
|
||||
"and COLUMNS are not set).");
|
||||
|
||||
#define _CURSES_USE_ENV_METHODDEF \
|
||||
{"use_env", (PyCFunction)_curses_use_env, METH_O, _curses_use_env__doc__},
|
||||
|
|
@ -4450,4 +4470,4 @@ _curses_has_extended_color_support(PyObject *module, PyObject *Py_UNUSED(ignored
|
|||
#ifndef _CURSES_ASSUME_DEFAULT_COLORS_METHODDEF
|
||||
#define _CURSES_ASSUME_DEFAULT_COLORS_METHODDEF
|
||||
#endif /* !defined(_CURSES_ASSUME_DEFAULT_COLORS_METHODDEF) */
|
||||
/*[clinic end generated code: output=135246e29163510c input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=e7c7932f4a4e9bce input=a9049054013a1b77]*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue