Skip to content

Commit 6feb3aa

Browse files
committed
Updated PDC_VER_MONTH, PDC_VER_DAY; marked button-move events as deprecated; added possible future key modifiers.
- BUTTONn_MOVED is a PDCurses*-only extension. Use REPORT_MOUSE_POSITION and keep track of button presses/releases for portability. - Almost all keyboards supply CapsLock and Super (Windows/Tux) keys. Many supply a Menu key. It would be quite possible to support these on many (WinGUI, WinCon, SDLn, X11, maybe framebuffer/DRM) platforms.
1 parent 967c486 commit 6feb3aa

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

curses.h

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ Defined by this header:
4141
#define PDC_VER_MINOR 5
4242
#define PDC_VER_CHANGE 1
4343
#define PDC_VER_YEAR 2025
44-
#define PDC_VER_MONTH 5
45-
#define PDC_VER_DAY 20
44+
#define PDC_VER_MONTH 6
45+
#define PDC_VER_DAY 12
4646

4747
#define PDC_STRINGIZE( x) #x
4848
#define PDC_stringize( x) PDC_STRINGIZE( x)
@@ -285,10 +285,10 @@ keep track of press/release events to determine which button(s) are
285285
held at a given time. */
286286

287287
#ifdef PDC_LONG_MMASK
288-
#define BUTTON1_MOVED (mmask_t)0x20 /* PDCurses */
288+
#define BUTTON1_MOVED (mmask_t)0x20 /* PDCurses* only; deprecated */
289289
#define PDC_BITS_PER_BUTTON 6
290290
#else
291-
#define BUTTON1_MOVED (mmask_t)0x10 /* PDCurses */
291+
#define BUTTON1_MOVED (mmask_t)0x10 /* PDCurses* only; deprecated */
292292
#define PDC_BITS_PER_BUTTON 5
293293
#endif
294294

@@ -299,6 +299,7 @@ held at a given time. */
299299
#define BUTTON2_CLICKED PDC_SHIFTED_BUTTON( BUTTON1_CLICKED, 2)
300300
#define BUTTON2_DOUBLE_CLICKED PDC_SHIFTED_BUTTON( BUTTON1_DOUBLE_CLICKED, 2)
301301
#define BUTTON2_TRIPLE_CLICKED PDC_SHIFTED_BUTTON( BUTTON1_TRIPLE_CLICKED, 2)
302+
/* mouse move events are PDCurses*-only; deprecated */
302303
#define BUTTON2_MOVED PDC_SHIFTED_BUTTON( BUTTON1_MOVED, 2)
303304

304305
#define BUTTON3_RELEASED PDC_SHIFTED_BUTTON( BUTTON1_RELEASED, 3)
@@ -1871,6 +1872,15 @@ PDCEX int wunderscore(WINDOW *);
18711872
#define PDC_KEY_MODIFIER_NUMLOCK 8
18721873
#define PDC_KEY_MODIFIER_REPEAT 16
18731874

1875+
/* Modifier masks not used at present, but which could be added to at */
1876+
/* least some platforms. 'Super' usually corresponds to the 'Windows' key. */
1877+
1878+
#define PDC_KEY_MODIFIER_SUPER 0x20
1879+
#define PDC_KEY_MODIFIER_CAPSLOCK 0x40
1880+
#define PDC_KEY_MODIFIER_META 0x80
1881+
#define PDC_KEY_MODIFIER_HYPER 0x100
1882+
#define PDC_KEY_MODIFIER_MENU 0x200
1883+
18741884
/* Bitflags for trace(), curses_trace(), for ncurses compatibility.
18751885
Values were copied from ncurses. Note that those involving terminfo,
18761886
termcap, and TTY control bits are meaningless in PDCurses and will be

0 commit comments

Comments
 (0)