Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Doc/library/curses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2211,6 +2211,17 @@ The :mod:`!curses` module defines the following data members:

.. versionadded:: 3.8

.. data:: pdcurses_version

A named tuple containing the three components of the PDCurses library
version: *major*, *minor*, and *patch*. All values are integers. The
components can also be accessed by name, so ``curses.pdcurses_version[0]``
is equivalent to ``curses.pdcurses_version.major`` and so on.

Availability: if the PDCurses library is used.

.. versionadded:: next

.. data:: COLORS

The maximum number of colors the terminal can support.
Expand Down
8 changes: 8 additions & 0 deletions Include/py_curses.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@
# define PDC_NCMOUSE
#endif

/* <windows.h>, which Python.h includes, defines MOUSE_MOVED as a console input
flag; PDCurses gives the name to a mouse event mask of its own. The module
uses the curses one, so drop the Windows definition before the header below
redefines it. */
#ifdef MOUSE_MOVED
# undef MOUSE_MOVED
#endif

/* On Solaris/illumos, the SVr4 <curses.h> does "typedef char bool;", which
clashes with C's bool from <stdbool.h>. Define _BOOL to suppress it, and
include <stdbool.h> for the bool the header then needs. ncurses ignores
Expand Down
343 changes: 234 additions & 109 deletions Lib/test/test_curses.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The :mod:`curses` and :mod:`curses.panel` modules can now be built on Windows
against a user-supplied `PDCurses <https://pdcurses.org/>`_ library by pointing
the ``PDCURSES_DIR`` environment variable at its source tree.
Loading
Loading