aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2021-01-14 02:40:09 -0700
committerGitHub <noreply@github.com>2021-01-14 11:40:09 +0200
commit14cfa325c298ceb9eaf6b585a3cdcabf6c6378a9 (patch)
treed296971ebb25971ee313ef27e532d06f43f24686 /Modules
parentbpo-40956: Fix sqlite3.Cursor.fetchmany() default value (GH-24214) (diff)
downloadcpython-14cfa325c298ceb9eaf6b585a3cdcabf6c6378a9.tar.gz
cpython-14cfa325c298ceb9eaf6b585a3cdcabf6c6378a9.tar.bz2
cpython-14cfa325c298ceb9eaf6b585a3cdcabf6c6378a9.zip
bpo-39273: Expose BUTTON5_* constants in the curses module if available (GH-17996)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_cursesmodule.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 7175c722965..7ab68c78c31 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -4870,6 +4870,14 @@ PyInit__curses(void)
SetDictInt("BUTTON4_DOUBLE_CLICKED", BUTTON4_DOUBLE_CLICKED);
SetDictInt("BUTTON4_TRIPLE_CLICKED", BUTTON4_TRIPLE_CLICKED);
+#if NCURSES_MOUSE_VERSION > 1
+ SetDictInt("BUTTON5_PRESSED", BUTTON5_PRESSED);
+ SetDictInt("BUTTON5_RELEASED", BUTTON5_RELEASED);
+ SetDictInt("BUTTON5_CLICKED", BUTTON5_CLICKED);
+ SetDictInt("BUTTON5_DOUBLE_CLICKED", BUTTON5_DOUBLE_CLICKED);
+ SetDictInt("BUTTON5_TRIPLE_CLICKED", BUTTON5_TRIPLE_CLICKED);
+#endif
+
SetDictInt("BUTTON_SHIFT", BUTTON_SHIFT);
SetDictInt("BUTTON_CTRL", BUTTON_CTRL);
SetDictInt("BUTTON_ALT", BUTTON_ALT);