@@ -85,6 +85,20 @@ The module :mod:`!curses` defines the following functions:
8585 .. versionadded :: 3.14
8686
8787
88+ .. function :: alloc_pair(fg, bg)
89+
90+ Allocate a color pair for foreground color *fg * and background color *bg *,
91+ and return its number. If a color pair for the same combination of colors
92+ already exists, return its number. Otherwise allocate a new color pair and
93+ return its number.
94+
95+ This function is only available if Python was built against a wide-character
96+ version of the underlying curses library with extended-color support (see
97+ :func: `has_extended_color_support `).
98+
99+ .. versionadded :: next
100+
101+
88102.. function :: baudrate()
89103
90104 Return the output speed of the terminal in bits per second. On software
@@ -226,6 +240,19 @@ The module :mod:`!curses` defines the following functions:
226240 .. versionadded :: next
227241
228242
243+ .. function :: find_pair(fg, bg)
244+
245+ Return the number of a color pair for foreground color *fg * and background
246+ color *bg *, or ``-1 `` if no color pair for this combination of colors has
247+ been allocated.
248+
249+ This function is only available if Python was built against a wide-character
250+ version of the underlying curses library with extended-color support (see
251+ :func: `has_extended_color_support `).
252+
253+ .. versionadded :: next
254+
255+
229256.. function :: flash()
230257
231258 Flash the screen. That is, change it to reverse-video and then change it back
@@ -239,6 +266,18 @@ The module :mod:`!curses` defines the following functions:
239266 by the user and has not yet been processed by the program.
240267
241268
269+ .. function :: free_pair(pair_number)
270+
271+ Free the color pair *pair_number *, which must have been allocated by
272+ :func: `alloc_pair `. The pair must not be in use.
273+
274+ This function is only available if Python was built against a wide-character
275+ version of the underlying curses library with extended-color support (see
276+ :func: `has_extended_color_support `).
277+
278+ .. versionadded :: next
279+
280+
242281.. function :: getmouse()
243282
244283 After :meth: `~window.getch ` returns :const: `KEY_MOUSE ` to signal a mouse event, this
@@ -359,6 +398,41 @@ The module :mod:`!curses` defines the following functions:
359398 no flushing is done.
360399
361400
401+ .. function :: is_cbreak()
402+
403+ Return ``True `` if cbreak mode (see :func: `cbreak `) is enabled,
404+ ``False `` otherwise.
405+ Availability: ncurses 6.5 or later.
406+
407+ .. versionadded :: next
408+
409+
410+ .. function :: is_echo()
411+
412+ Return ``True `` if echo mode (see :func: `echo `) is enabled,
413+ ``False `` otherwise.
414+ Availability: ncurses 6.5 or later.
415+
416+ .. versionadded :: next
417+
418+
419+ .. function :: is_nl()
420+
421+ Return ``True `` if nl mode (see :func: `nl `) is enabled, ``False `` otherwise.
422+ Availability: ncurses 6.5 or later.
423+
424+ .. versionadded :: next
425+
426+
427+ .. function :: is_raw()
428+
429+ Return ``True `` if raw mode (see :func: `raw `) is enabled,
430+ ``False `` otherwise.
431+ Availability: ncurses 6.5 or later.
432+
433+ .. versionadded :: next
434+
435+
362436.. function :: is_term_resized(nlines, ncols)
363437
364438 Return ``True `` if :func: `resize_term ` would modify the window structure,
@@ -570,6 +644,18 @@ The module :mod:`!curses` defines the following functions:
570644 presented to curses input functions one by one.
571645
572646
647+ .. function :: reset_color_pairs()
648+
649+ Discard all color-pair definitions, releasing the color pairs allocated by
650+ :func: `init_pair ` and :func: `alloc_pair `.
651+
652+ This function is only available if Python was built against a wide-character
653+ version of the underlying curses library with extended-color support (see
654+ :func: `has_extended_color_support `).
655+
656+ .. versionadded :: next
657+
658+
573659.. function :: reset_prog_mode()
574660
575661 Restore the terminal to "program" mode, as previously saved by
@@ -1103,6 +1189,16 @@ Window objects
11031189 .. versionadded :: 3.3
11041190
11051191
1192+ .. method :: window.getdelay()
1193+
1194+ Return the window's read timeout in milliseconds,
1195+ as set by :meth: `nodelay ` or :meth: `timeout `:
1196+ ``-1 `` for blocking, ``0 `` for non-blocking,
1197+ or a positive number of milliseconds.
1198+
1199+ .. versionadded :: next
1200+
1201+
11061202.. method :: window.getkey([y, x])
11071203
11081204 Get a character, returning a string instead of an integer, as :meth: `getch `
@@ -1116,13 +1212,29 @@ Window objects
11161212 Return a tuple ``(y, x) `` of the height and width of the window.
11171213
11181214
1215+ .. method :: window.getparent()
1216+
1217+ Return the parent window of this subwindow,
1218+ or ``None `` if this window is not a subwindow.
1219+
1220+ .. versionadded :: next
1221+
1222+
11191223.. method :: window.getparyx()
11201224
11211225 Return the beginning coordinates of this window relative to its parent window
11221226 as a tuple ``(y, x) ``. Return ``(-1, -1) `` if this window has no
11231227 parent.
11241228
11251229
1230+ .. method :: window.getscrreg()
1231+
1232+ Return a tuple ``(top, bottom) `` of the window's current scrolling region,
1233+ as set by :meth: `setscrreg `.
1234+
1235+ .. versionadded :: next
1236+
1237+
11261238.. method :: window.getstr()
11271239 window.getstr(n)
11281240 window.getstr(y, x)
@@ -1268,13 +1380,98 @@ Window objects
12681380 .. versionadded :: next
12691381
12701382
1383+ .. method :: window.is_cleared()
1384+
1385+ Return the current value set by :meth: `clearok `.
1386+
1387+ .. versionadded :: next
1388+
1389+
1390+ .. method :: window.is_idcok()
1391+
1392+ Return the current value set by :meth: `idcok `.
1393+
1394+ .. versionadded :: next
1395+
1396+
1397+ .. method :: window.is_idlok()
1398+
1399+ Return the current value set by :meth: `idlok `.
1400+
1401+ .. versionadded :: next
1402+
1403+
1404+ .. method :: window.is_immedok()
1405+
1406+ Return the current value set by :meth: `immedok `.
1407+
1408+ .. versionadded :: next
1409+
1410+
1411+ .. method :: window.is_keypad()
1412+
1413+ Return the current value set by :meth: `keypad `.
1414+
1415+ .. versionadded :: next
1416+
1417+
1418+ .. method :: window.is_leaveok()
1419+
1420+ Return the current value set by :meth: `leaveok `.
1421+
1422+ .. versionadded :: next
1423+
1424+
12711425.. method :: window.is_linetouched(line)
12721426
12731427 Return ``True `` if the specified line was modified since the last call to
12741428 :meth: `refresh `; otherwise return ``False ``. Raise a :exc: `curses.error `
12751429 exception if *line * is not valid for the given window.
12761430
12771431
1432+ .. method :: window.is_nodelay()
1433+
1434+ Return the current value set by :meth: `nodelay `.
1435+
1436+ .. versionadded :: next
1437+
1438+
1439+ .. method :: window.is_notimeout()
1440+
1441+ Return the current value set by :meth: `notimeout `.
1442+
1443+ .. versionadded :: next
1444+
1445+
1446+ .. method :: window.is_pad()
1447+
1448+ Return ``True `` if the window is a pad created by :func: `newpad `.
1449+
1450+ .. versionadded :: next
1451+
1452+
1453+ .. method :: window.is_scrollok()
1454+
1455+ Return the current value set by :meth: `scrollok `.
1456+
1457+ .. versionadded :: next
1458+
1459+
1460+ .. method :: window.is_subwin()
1461+
1462+ Return ``True `` if the window is a subwindow created by :meth: `subwin `
1463+ or :meth: `derwin `.
1464+
1465+ .. versionadded :: next
1466+
1467+
1468+ .. method :: window.is_syncok()
1469+
1470+ Return the current value set by :meth: `syncok `.
1471+
1472+ .. versionadded :: next
1473+
1474+
12781475.. method :: window.is_wintouched()
12791476
12801477 Return ``True `` if the specified window was modified since the last call to
0 commit comments