FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-152325: Add curses.has_mouse() and curses.window.mouse_trafo() by serhiy-storchaka · Pull Request #152484 · python/cpython · GitHub

Repository navigation

gh-152325: Add curses.has_mouse() and curses.window.mouse_trafo() - #152484

Merged
serhiy-storchaka merged 3 commits into
python:mainfrom
serhiy-storchaka:curses-mouse
Jun 28, 2026
Merged

serhiy-storchaka merged 3 commits into
python:mainfrom
serhiy-storchaka:curses-mouse

Conversation

Copy link
Copy Markdown
Member

Add the two remaining pieces of the curses mouse interface.

curses.has_mouse() reports whether the mouse driver was successfully initialized.

curses.window.mouse_trafo(y, x, to_screen) converts a coordinate pair between window-relative and screen-relative (stdscr-relative) coordinates, returning the converted (y, x) tuple, or None if the point lies outside the window. Modeled on the existing window.enclose(), with the same NCURSES_MOUSE_VERSION guard.

🤖 Generated with Claude Code

has_mouse() reports whether the mouse driver was successfully initialized.

window.mouse_trafo(y, x, to_screen) converts a coordinate pair between
window-relative and screen-relative coordinates, returning the (y, x) pair or
None if it lies outside the window.  Together these complete the curses mouse
interface.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

read-the-docs-community Bot commented Jun 28, 2026 •
edited
Loading

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33343614 | 📁 Comparing bd11179 against main (65585ca)

  🔍 Preview build  

3 files changed
± library/curses.html
± whatsnew/3.16.html
± whatsnew/changelog.html

serhiy-storchaka enabled auto-merge (squash) June 28, 2026 13:39
serhiy-storchaka merged commit 306d7a7 into python:main Jun 28, 2026
53 of 54 checks passed
serhiy-storchaka deleted the curses-mouse branch July 1, 2026 16:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL