forked from Bill-Gray/PDCursesMod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
curses.h
1828 lines (1640 loc) · 75.4 KB
/
curses.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* Public Domain Curses */
/*----------------------------------------------------------------------*
* PDCurses *
*----------------------------------------------------------------------*/
#ifndef __PDCURSES__
#define __PDCURSES__ 1
/*man-start**************************************************************
PDCurses definitions list: (Only define those needed)
XCURSES True if compiling for X11.
PDC_RGB True if you want to use RGB color definitions
(Red = 1, Green = 2, Blue = 4) instead of BGR.
PDC_WIDE True if building wide-character support.
PDC_DLL_BUILD True if building a Win32 DLL.
NCURSES_MOUSE_VERSION Use the ncurses mouse API instead
of PDCurses' traditional mouse API.
PDCurses portable platform definitions list:
PDC_BUILD Defines API build version.
PDCURSES Enables access to PDCurses-only routines.
XOPEN Always true.
SYSVcurses True if you are compiling for SYSV portability.
BSDcurses True if you are compiling for BSD portability.
**man-end****************************************************************/
#define PDCURSES 1 /* PDCurses-only routines */
#define XOPEN 1 /* X/Open Curses routines */
#define SYSVcurses 1 /* System V Curses routines */
#define BSDcurses 1 /* BSD Curses routines */
#if defined( CHTYPE_32)
#define CHTYPE_LONG 1 /* chtypes will be 32 bits */
#elif !defined( CHTYPE_16)
#define CHTYPE_LONG 2 /* chtypes will be (default) 64 bits */
#endif
/*----------------------------------------------------------------------*/
#include <stdarg.h>
#include <stdint.h>
#include <stddef.h>
#include <stdio.h> /* Required by X/Open usage below */
#ifdef PDC_WIDE
# include <wchar.h>
#endif
#if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS)
extern "C"
{
# define bool _bool
#endif
/*----------------------------------------------------------------------
*
* PDCurses Manifest Constants
*
*/
#ifndef FALSE
# define FALSE 0
#endif
#ifndef TRUE
# define TRUE 1
#endif
#ifndef NULL
# define NULL (void *)0
#endif
#ifndef ERR
# define ERR (-1)
#endif
#ifndef OK
# define OK 0
#endif
/*----------------------------------------------------------------------
*
* PDCurses Type Declarations
*
*/
typedef unsigned char bool; /* PDCurses Boolean type */
#ifdef CHTYPE_LONG
#if(CHTYPE_LONG >= 2) /* "non-standard" 64-bit chtypes */
typedef uint64_t chtype;
#else /* "Standard" CHTYPE_LONG case, 32-bit: */
typedef uint32_t chtype;
# endif
#else
typedef uint16_t chtype; /* 8-bit attr + 8-bit char */
#endif
#ifdef PDC_WIDE
typedef chtype cchar_t;
#endif
typedef chtype attr_t;
/* Version constants, available as of version 4.0 : */
/* Don't forget to update 'version.mif' if MAJOR/MINOR changes! */
#define PDC_VER_MAJOR 4
#define PDC_VER_MINOR 0
#define PDC_VER_CHANGE 2
#define PDC_VER_YEAR 2017
#define PDC_VER_MONTH 07
#define PDC_VER_DAY 26
#define PDC_BUILD (PDC_VER_MAJOR*1000 + PDC_VER_MINOR *100 + PDC_VER_CHANGE)
/* When using PDCurses as a DLL (Windows) or shared library (BSD or *nix),
it's possible to switch the DLL or shared library. One may therefore want
to inquire of the DLL/shared library the port, version numbers, and
chtype_size used, and make sure they're what one was expecting. The
'PDC_version' structure lets you do just that. */
enum PDC_port
{
PDC_PORT_X11 = 0,
PDC_PORT_WIN32 = 1,
PDC_PORT_WINGUI = 2,
PDC_PORT_DOS = 3,
PDC_PORT_OS2 = 4,
PDC_PORT_SDL1 = 5,
PDC_PORT_SDL2 = 6
};
/* Detailed PDC version information */
#define PDC_HAS_VERSION_INFO 1
typedef struct
{
const enum PDC_port port;
const int ver_major;
const int ver_minor;
const int ver_change;
const size_t chtype_size;
const bool is_wide;
const bool is_forced_utf8;
} PDC_version_info;
/*----------------------------------------------------------------------
*
* PDCurses Mouse Interface -- SYSVR4, with extensions
*
*/
/* Most flavors of PDCurses support three buttons. WinGUI supports */
/* these plus two "extended" buttons. But we'll set this macro to */
/* six, allowing future versions to support up to nine total buttons. */
/* (The button states are broken up into two arrays to allow for the */
/* possibility of backward compatibility to DLLs compiled with only */
/* three mouse buttons.) */
#define PDC_MAX_MOUSE_BUTTONS 9
#define PDC_N_EXTENDED_MOUSE_BUTTONS 6
typedef struct
{
int x; /* absolute column, 0 based, measured in characters */
int y; /* absolute row, 0 based, measured in characters */
short button[3]; /* state of three "normal" buttons */
int changes; /* flags indicating what has changed with the mouse */
short xbutton[PDC_N_EXTENDED_MOUSE_BUTTONS]; /* state of ext buttons */
} MOUSE_STATUS;
#define BUTTON_RELEASED 0x0000
#define BUTTON_PRESSED 0x0001
#define BUTTON_CLICKED 0x0002
#define BUTTON_DOUBLE_CLICKED 0x0003
#define BUTTON_TRIPLE_CLICKED 0x0004
#define BUTTON_MOVED 0x0005 /* PDCurses */
#define WHEEL_SCROLLED 0x0006 /* PDCurses */
#define BUTTON_ACTION_MASK 0x0007 /* PDCurses */
#define PDC_BUTTON_SHIFT 0x0008 /* PDCurses */
#define PDC_BUTTON_CONTROL 0x0010 /* PDCurses */
#define PDC_BUTTON_ALT 0x0020 /* PDCurses */
#define BUTTON_MODIFIER_MASK 0x0038 /* PDCurses */
#define MOUSE_X_POS (Mouse_status.x)
#define MOUSE_Y_POS (Mouse_status.y)
/*
* Bits associated with the .changes field:
* 3 2 1 0
* 210987654321098765432109876543210
* 1 <- button 1 has changed 0
* 10 <- button 2 has changed 1
* 100 <- button 3 has changed 2
* 1000 <- mouse has moved 3
* 10000 <- mouse position report 4
* 100000 <- mouse wheel up 5
* 1000000 <- mouse wheel down 6
* 10000000 <- mouse wheel left 7
* 100000000 <- mouse wheel right 8
* 1000000000 <- button 4 has changed 9
* (NOTE: buttons 6 to 10000000000 <- button 5 has changed 10
* 9 aren't implemented 100000000000 <- button 6 has changed 11
* in any flavor of 1000000000000 <- button 7 has changed 12
* PDCurses yet!) 10000000000000 <- button 8 has changed 13
* 100000000000000 <- button 9 has changed 14
*/
#define PDC_MOUSE_MOVED 0x0008
#define PDC_MOUSE_POSITION 0x0010
#define PDC_MOUSE_WHEEL_UP 0x0020
#define PDC_MOUSE_WHEEL_DOWN 0x0040
#define PDC_MOUSE_WHEEL_LEFT 0x0080
#define PDC_MOUSE_WHEEL_RIGHT 0x0100
#define A_BUTTON_CHANGED (Mouse_status.changes & 7)
#define MOUSE_MOVED (Mouse_status.changes & PDC_MOUSE_MOVED)
#define MOUSE_POS_REPORT (Mouse_status.changes & PDC_MOUSE_POSITION)
#define BUTTON_CHANGED(x) (Mouse_status.changes & (1 << ((x) - ((x)<4 ? 1 : -5))))
#define BUTTON_STATUS(x) (Mouse_status.button[(x) - 1])
#define MOUSE_WHEEL_UP (Mouse_status.changes & PDC_MOUSE_WHEEL_UP)
#define MOUSE_WHEEL_DOWN (Mouse_status.changes & PDC_MOUSE_WHEEL_DOWN)
#define MOUSE_WHEEL_LEFT (Mouse_status.changes & PDC_MOUSE_WHEEL_LEFT)
#define MOUSE_WHEEL_RIGHT (Mouse_status.changes & PDC_MOUSE_WHEEL_RIGHT)
/* mouse bit-masks */
#define BUTTON1_RELEASED 0x00000001L
#define BUTTON1_PRESSED 0x00000002L
#define BUTTON1_CLICKED 0x00000004L
#define BUTTON1_DOUBLE_CLICKED 0x00000008L
#define BUTTON1_TRIPLE_CLICKED 0x00000010L
#define BUTTON1_MOVED 0x00000010L /* PDCurses */
#define BUTTON2_RELEASED 0x00000020L
#define BUTTON2_PRESSED 0x00000040L
#define BUTTON2_CLICKED 0x00000080L
#define BUTTON2_DOUBLE_CLICKED 0x00000100L
#define BUTTON2_TRIPLE_CLICKED 0x00000200L
#define BUTTON2_MOVED 0x00000200L /* PDCurses */
#define BUTTON3_RELEASED 0x00000400L
#define BUTTON3_PRESSED 0x00000800L
#define BUTTON3_CLICKED 0x00001000L
#define BUTTON3_DOUBLE_CLICKED 0x00002000L
#define BUTTON3_TRIPLE_CLICKED 0x00004000L
#define BUTTON3_MOVED 0x00004000L /* PDCurses */
/* For the ncurses-compatible functions only, BUTTON4_PRESSED and
BUTTON5_PRESSED are returned for mouse scroll wheel up and down;
otherwise PDCurses doesn't support buttons 4 and 5... except
as described above for WinGUI, and perhaps to be extended to
other PDCurses flavors */
#define BUTTON4_RELEASED 0x00008000L
#define BUTTON4_PRESSED 0x00010000L
#define BUTTON4_CLICKED 0x00020000L
#define BUTTON4_DOUBLE_CLICKED 0x00040000L
#define BUTTON4_TRIPLE_CLICKED 0x00080000L
#define BUTTON5_RELEASED 0x00100000L
#define BUTTON5_PRESSED 0x00200000L
#define BUTTON5_CLICKED 0x00400000L
#define BUTTON5_DOUBLE_CLICKED 0x00800000L
#define BUTTON5_TRIPLE_CLICKED 0x01000000L
#define MOUSE_WHEEL_SCROLL 0x02000000L /* PDCurses */
#define BUTTON_MODIFIER_SHIFT 0x04000000L /* PDCurses */
#define BUTTON_MODIFIER_CONTROL 0x08000000L /* PDCurses */
#define BUTTON_MODIFIER_ALT 0x10000000L /* PDCurses */
#define ALL_MOUSE_EVENTS 0x1fffffffL
#define REPORT_MOUSE_POSITION 0x20000000L
/* ncurses mouse interface */
typedef unsigned long mmask_t;
typedef struct
{
short id; /* unused, always 0 */
int x, y, z; /* x, y same as MOUSE_STATUS; z unused */
mmask_t bstate; /* equivalent to changes + button[], but
in the same format as used for mousemask() */
} MEVENT;
#ifdef NCURSES_MOUSE_VERSION
# define BUTTON_SHIFT BUTTON_MODIFIER_SHIFT
# define BUTTON_CONTROL BUTTON_MODIFIER_CONTROL
# define BUTTON_CTRL BUTTON_MODIFIER_CONTROL
# define BUTTON_ALT BUTTON_MODIFIER_ALT
#else
# define BUTTON_SHIFT PDC_BUTTON_SHIFT
# define BUTTON_CONTROL PDC_BUTTON_CONTROL
# define BUTTON_ALT PDC_BUTTON_ALT
#endif
/*----------------------------------------------------------------------
*
* PDCurses Structure Definitions
*
*/
typedef struct _win /* definition of a window */
{
int _cury; /* current pseudo-cursor */
int _curx;
int _maxy; /* max window coordinates */
int _maxx;
int _begy; /* origin on screen */
int _begx;
int _flags; /* window properties */
chtype _attrs; /* standard attributes and colors */
chtype _bkgd; /* background, normally blank */
bool _clear; /* causes clear at next refresh */
bool _leaveit; /* leaves cursor where it is */
bool _scroll; /* allows window scrolling */
bool _nodelay; /* input character wait flag */
bool _immed; /* immediate update flag */
bool _sync; /* synchronise window ancestors */
bool _use_keypad; /* flags keypad key mode active */
chtype **_y; /* pointer to line pointer array */
int *_firstch; /* first changed character in line */
int *_lastch; /* last changed character in line */
int _tmarg; /* top of scrolling region */
int _bmarg; /* bottom of scrolling region */
int _delayms; /* milliseconds of delay for getch() */
int _parx, _pary; /* coords relative to parent (0,0) */
struct _win *_parent; /* subwin's pointer to parent win */
} WINDOW;
/* Avoid using the SCREEN struct directly -- use the corresponding
functions if possible. This struct may eventually be made private. */
typedef struct
{
bool alive; /* if initscr() called, and not endwin() */
bool autocr; /* if cr -> lf */
bool cbreak; /* if terminal unbuffered */
bool echo; /* if terminal echo */
bool raw_inp; /* raw input mode (v. cooked input) */
bool raw_out; /* raw output mode (7 v. 8 bits) */
bool audible; /* FALSE if the bell is visual */
bool mono; /* TRUE if current screen is mono */
bool resized; /* TRUE if TERM has been resized */
bool orig_attr; /* TRUE if we have the original colors */
short orig_fore; /* original screen foreground color */
short orig_back; /* original screen foreground color */
int cursrow; /* position of physical cursor */
int curscol; /* position of physical cursor */
int visibility; /* visibility of cursor */
int orig_cursor; /* original cursor size */
int lines; /* new value for LINES */
int cols; /* new value for COLS */
unsigned long _trap_mbe; /* trap these mouse button events */
unsigned long _map_mbe_to_key; /* map mouse buttons to slk */
int mouse_wait; /* time to wait (in ms) for a
button release after a press, in
order to count it as a click */
int slklines; /* lines in use by slk_init() */
WINDOW *slk_winptr; /* window for slk */
int linesrippedoff; /* lines ripped off via ripoffline() */
int linesrippedoffontop; /* lines ripped off on
top via ripoffline() */
int delaytenths; /* 1/10ths second to wait block
getch() for */
bool _preserve; /* TRUE if screen background
to be preserved */
int _restore; /* specifies if screen background
to be restored, and how */
bool save_key_modifiers; /* TRUE if each key modifiers saved
with each key press */
bool return_key_modifiers; /* TRUE if modifier keys are
returned as "real" keys */
bool key_code; /* TRUE if last key is a special key;
used internally by get_wch() */
#ifdef XCURSES
int XcurscrSize; /* size of Xcurscr shared memory block */
bool sb_on;
int sb_viewport_y;
int sb_viewport_x;
int sb_total_y;
int sb_total_x;
int sb_cur_y;
int sb_cur_x;
int exit_key;
#endif
short line_color; /* color of line attributes - default -1 */
} SCREEN;
/*----------------------------------------------------------------------
*
* PDCurses External Variables
*
*/
#ifdef PDC_DLL_BUILD
# ifdef CURSES_LIBRARY
# define PDCEX __declspec(dllexport) extern
# else
# define PDCEX __declspec(dllimport)
# endif
#else
# define PDCEX extern
#endif
PDCEX int LINES; /* terminal height */
PDCEX int COLS; /* terminal width */
PDCEX WINDOW *stdscr; /* the default screen window */
PDCEX WINDOW *curscr; /* the current screen image */
PDCEX SCREEN *SP; /* curses variables */
PDCEX MOUSE_STATUS Mouse_status;
PDCEX int COLORS;
PDCEX int COLOR_PAIRS;
PDCEX int TABSIZE;
PDCEX chtype acs_map[]; /* alternate character set map */
PDCEX char ttytype[]; /* terminal name/description */
PDCEX PDC_version_info PDC_version;
/*man-start**************************************************************
PDCurses Text Attributes
========================
Originally, PDCurses used a short (16 bits) for its chtype. To include
color, a number of things had to be sacrificed from the strict Unix and
System V support. The main problem was fitting all character attributes
and color into an unsigned char (all 8 bits!).
Today, PDCurses by default uses a long (32 bits) for its chtype, as in
System V. The short chtype is still available, by undefining CHTYPE_LONG
and rebuilding the library.
The following is the structure of a win->_attrs chtype:
short form:
+-----------------------------------------------+
|15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
+-----------------------------------------------+
color number | attrs | character eg 'a'
The available non-color attributes are bold, reverse and blink. Others
have no effect. The high order char is an index into an array of
physical colors (defined in color.c) -- 32 foreground/background color
pairs (5 bits) plus 3 bits for other attributes.
long form:
+--------------------------------------------------------------------+
|31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|..| 2| 1| 0|
+--------------------------------------------------------------------+
color number | modifiers | character eg 'a'
The available non-color attributes are bold, underline, invisible,
right-line, left-line, protect, reverse and blink. 256 color pairs (8
bits), 8 bits for other attributes, and 16 bits for character data.
Note that there is now a "super-long" 64-bit form, available by
defining CHTYPE_LONG to be 2:
-------------------------------------------------------------------------------
|63|62|61|60|59|..|34|33|32|31|30|29|28|..|22|21|20|19|18|17|16|..| 3| 2| 1| 0|
-------------------------------------------------------------------------------
color number | modifiers | character eg 'a'
We take five more bits for the character (thus allowing Unicode values
past 64K; UTF-16 can go up to 0x10ffff, requiring 21 bits total), and
four more bits for attributes. Three are currently used as A_OVERLINE, A_DIM,
and A_STRIKEOUT; one more is reserved for future use. 31 bits are then used
for color. These are usually just treated as the usual palette
indices, and range from 0 to 255. However, if bit 63 is
set, the remaining 30 bits are interpreted as foreground RGB (first
fifteen bits, five bits for each of the three channels) and background RGB
(same scheme using the remaining 15 bits.)
**man-end****************************************************************/
/*** Video attribute macros ***/
#define A_NORMAL (chtype)0
#ifdef CHTYPE_LONG
# if(CHTYPE_LONG >= 2) /* 64-bit chtypes */
# define PDC_CHARTEXT_BITS 21
# define A_CHARTEXT (chtype)( ((chtype)0x1 << PDC_CHARTEXT_BITS) - 1)
# define A_ALTCHARSET ((chtype)0x001 << PDC_CHARTEXT_BITS)
# define A_RIGHTLINE ((chtype)0x002 << PDC_CHARTEXT_BITS)
# define A_LEFTLINE ((chtype)0x004 << PDC_CHARTEXT_BITS)
# define A_INVIS ((chtype)0x008 << PDC_CHARTEXT_BITS)
# define A_UNDERLINE ((chtype)0x010 << PDC_CHARTEXT_BITS)
# define A_REVERSE ((chtype)0x020 << PDC_CHARTEXT_BITS)
# define A_BLINK ((chtype)0x040 << PDC_CHARTEXT_BITS)
# define A_BOLD ((chtype)0x080 << PDC_CHARTEXT_BITS)
# define A_OVERLINE ((chtype)0x100 << PDC_CHARTEXT_BITS)
# define A_STRIKEOUT ((chtype)0x200 << PDC_CHARTEXT_BITS)
# define A_DIM ((chtype)0x400 << PDC_CHARTEXT_BITS)
#if 0
/* May come up with a use for this bit */
/* someday; reserved for the future: */
# define A_FUTURE_2 ((chtype)0x800 << PDC_CHARTEXT_BITS)
#endif
# define PDC_COLOR_SHIFT (PDC_CHARTEXT_BITS + 12)
# define A_COLOR ((chtype)0x7fffffff << PDC_COLOR_SHIFT)
# define A_RGB_COLOR ((chtype)0x40000000 << PDC_COLOR_SHIFT)
# define A_ATTRIBUTES (((chtype)0xfff << PDC_CHARTEXT_BITS) | A_COLOR)
# define A_RGB( rfore, gfore, bfore, rback, gback, bback) \
(( (((chtype)(bfore) << 25) \
| ((chtype)(gfore) << 20) \
| ((chtype)(rfore) << 15) \
| ((chtype)(bback) << 10) \
| ((chtype)(gback) << 5) \
| ((chtype)(rback) )) << PDC_COLOR_SHIFT) | A_RGB_COLOR)
# else /* plain ol' 32-bit chtypes */
# define A_ALTCHARSET (chtype)0x00010000
# define A_RIGHTLINE (chtype)0x00020000
# define A_LEFTLINE (chtype)0x00040000
# define A_INVIS (chtype)0x00080000
# define A_UNDERLINE (chtype)0x00100000
# define A_REVERSE (chtype)0x00200000
# define A_BLINK (chtype)0x00400000
# define A_BOLD (chtype)0x00800000
# define A_COLOR (chtype)0xff000000
# define A_RGB_COLOR A_NORMAL
#ifdef PDC_WIDE
# define A_CHARTEXT (chtype)0x0000ffff
# define A_ATTRIBUTES (chtype)0xffff0000
# define A_DIM A_NORMAL
# define A_OVERLINE A_NORMAL
# define A_STRIKEOUT A_NORMAL
#else /* with 8-bit chars, we have bits for these attribs : */
# define A_CHARTEXT (chtype)0x000000ff
# define A_ATTRIBUTES (chtype)0xffffe000
# define A_DIM (chtype)0x00008000
# define A_OVERLINE (chtype)0x00004000
# define A_STRIKEOUT (chtype)0x00002000
#endif
# define PDC_COLOR_SHIFT 24
#endif
# define A_ITALIC A_INVIS
# define A_PROTECT (A_UNDERLINE | A_LEFTLINE | A_RIGHTLINE)
#else /* 16-bit chtypes */
# define A_BOLD (chtype)0x0100 /* X/Open */
# define A_REVERSE (chtype)0x0200 /* X/Open */
# define A_BLINK (chtype)0x0400 /* X/Open */
# define A_ATTRIBUTES (chtype)0xff00 /* X/Open */
# define A_CHARTEXT (chtype)0x00ff /* X/Open */
# define A_COLOR (chtype)0xf800 /* System V */
# define A_ALTCHARSET A_NORMAL /* X/Open */
# define A_PROTECT A_NORMAL /* X/Open */
# define A_UNDERLINE A_NORMAL /* X/Open */
# define A_OVERLINE A_NORMAL /* X/Open */
# define A_STRIKEOUT A_NORMAL /* X/Open */
# define A_LEFTLINE A_NORMAL
# define A_RIGHTLINE A_NORMAL
# define A_ITALIC A_NORMAL
# define A_INVIS A_NORMAL
# define A_RGB_COLOR A_NORMAL
# define A_DIM A_NORMAL
# define PDC_COLOR_SHIFT 11
#endif
#define A_STANDOUT (A_REVERSE | A_BOLD) /* X/Open */
#define CHR_MSK A_CHARTEXT /* Obsolete */
#define ATR_MSK A_ATTRIBUTES /* Obsolete */
#define ATR_NRM A_NORMAL /* Obsolete */
/* For use with attr_t -- X/Open says, "these shall be distinct", so
this is a non-conforming implementation. */
#define WA_NORMAL A_NORMAL
#define WA_ALTCHARSET A_ALTCHARSET
#define WA_BLINK A_BLINK
#define WA_BOLD A_BOLD
#define WA_DIM A_DIM
#define WA_INVIS A_INVIS
#define WA_LEFT A_LEFTLINE
#define WA_PROTECT A_PROTECT
#define WA_REVERSE A_REVERSE
#define WA_RIGHT A_RIGHTLINE
#define WA_STANDOUT A_STANDOUT
#define WA_UNDERLINE A_UNDERLINE
#define WA_HORIZONTAL A_NORMAL
#define WA_LOW A_NORMAL
#define WA_TOP A_NORMAL
#define WA_VERTICAL A_NORMAL
#define WA_ATTRIBUTES A_ATTRIBUTES
/*** Alternate character set macros ***/
/* 'w' = 32-bit chtype; acs_map[] index | A_ALTCHARSET
'n' = 16-bit chtype; it gets the fallback set because no bit is
available for A_ALTCHARSET */
#ifdef CHTYPE_LONG
# define ACS_PICK(w, n) ((chtype)w | A_ALTCHARSET)
#else
# define ACS_PICK(w, n) ((chtype)n)
#endif
/* VT100-compatible symbols -- box chars */
#define ACS_LRCORNER ACS_PICK('V', '+')
#define ACS_URCORNER ACS_PICK('W', '+')
#define ACS_ULCORNER ACS_PICK('X', '+')
#define ACS_LLCORNER ACS_PICK('Y', '+')
#define ACS_PLUS ACS_PICK('Z', '+')
#define ACS_LTEE ACS_PICK('[', '+')
#define ACS_RTEE ACS_PICK('\\', '+')
#define ACS_BTEE ACS_PICK(']', '+')
#define ACS_TTEE ACS_PICK('^', '+')
#define ACS_HLINE ACS_PICK('_', '-')
#define ACS_VLINE ACS_PICK('`', '|')
/* PDCurses-only ACS chars. Don't use if ncurses compatibility matters.
Some won't work in non-wide X11 builds (see 'acs_defs.h' for details). */
#define ACS_CENT ACS_PICK('{', 'c')
#define ACS_YEN ACS_PICK('|', 'y')
#define ACS_PESETA ACS_PICK('}', 'p')
#define ACS_HALF ACS_PICK('&', '/')
#define ACS_QUARTER ACS_PICK('\'', '/')
#define ACS_LEFT_ANG_QU ACS_PICK(')', '<')
#define ACS_RIGHT_ANG_QU ACS_PICK('*', '>')
#define ACS_D_HLINE ACS_PICK('a', '-')
#define ACS_D_VLINE ACS_PICK('b', '|')
#define ACS_CLUB ACS_PICK( 11, 'C')
#define ACS_HEART ACS_PICK( 12, 'H')
#define ACS_SPADE ACS_PICK( 13, 'S')
#define ACS_SMILE ACS_PICK( 14, 'O')
#define ACS_REV_SMILE ACS_PICK( 15, 'O')
#define ACS_MED_BULLET ACS_PICK( 16, '.')
#define ACS_WHITE_BULLET ACS_PICK( 17, 'O')
#define ACS_PILCROW ACS_PICK( 18, 'O')
#define ACS_SECTION ACS_PICK( 19, 'O')
#define ACS_SUP2 ACS_PICK(',', '2')
#define ACS_ALPHA ACS_PICK('.', 'a')
#define ACS_BETA ACS_PICK('/', 'b')
#define ACS_GAMMA ACS_PICK('0', 'y')
#define ACS_UP_SIGMA ACS_PICK('1', 'S')
#define ACS_LO_SIGMA ACS_PICK('2', 's')
#define ACS_MU ACS_PICK('4', 'u')
#define ACS_TAU ACS_PICK('5', 't')
#define ACS_UP_PHI ACS_PICK('6', 'F')
#define ACS_THETA ACS_PICK('7', 't')
#define ACS_OMEGA ACS_PICK('8', 'w')
#define ACS_DELTA ACS_PICK('9', 'd')
#define ACS_INFINITY ACS_PICK('-', 'i')
#define ACS_LO_PHI ACS_PICK( 22, 'f')
#define ACS_EPSILON ACS_PICK(':', 'e')
#define ACS_INTERSECT ACS_PICK('e', 'u')
#define ACS_TRIPLE_BAR ACS_PICK('f', '=')
#define ACS_DIVISION ACS_PICK('c', '/')
#define ACS_APPROX_EQ ACS_PICK('d', '~')
#define ACS_SM_BULLET ACS_PICK('g', '.')
#define ACS_SQUARE_ROOT ACS_PICK('i', '!')
#define ACS_UBLOCK ACS_PICK('p', '^')
#define ACS_BBLOCK ACS_PICK('q', '_')
#define ACS_LBLOCK ACS_PICK('r', '<')
#define ACS_RBLOCK ACS_PICK('s', '>')
#define ACS_A_ORDINAL ACS_PICK(20, 'a')
#define ACS_O_ORDINAL ACS_PICK(21, 'o')
#define ACS_INV_QUERY ACS_PICK(24, '?')
#define ACS_REV_NOT ACS_PICK(25, '!')
#define ACS_NOT ACS_PICK(26, '!')
#define ACS_INV_BANG ACS_PICK(23, '!')
#define ACS_UP_INTEGRAL ACS_PICK(27, '|')
#define ACS_LO_INTEGRAL ACS_PICK(28, '|')
#define ACS_SUP_N ACS_PICK(29, 'n')
#define ACS_CENTER_SQU ACS_PICK(30, 'x')
#define ACS_F_WITH_HOOK ACS_PICK(31, 'f')
#define ACS_SD_LRCORNER ACS_PICK(';', '+')
#define ACS_SD_URCORNER ACS_PICK('<', '+')
#define ACS_SD_ULCORNER ACS_PICK('=', '+')
#define ACS_SD_LLCORNER ACS_PICK('>', '+')
#define ACS_SD_PLUS ACS_PICK('?', '+')
#define ACS_SD_LTEE ACS_PICK('@', '+')
#define ACS_SD_RTEE ACS_PICK('A', '+')
#define ACS_SD_BTEE ACS_PICK('B', '+')
#define ACS_SD_TTEE ACS_PICK('C', '+')
#define ACS_D_LRCORNER ACS_PICK('D', '+')
#define ACS_D_URCORNER ACS_PICK('E', '+')
#define ACS_D_ULCORNER ACS_PICK('F', '+')
#define ACS_D_LLCORNER ACS_PICK('G', '+')
#define ACS_D_PLUS ACS_PICK('H', '+')
#define ACS_D_LTEE ACS_PICK('I', '+')
#define ACS_D_RTEE ACS_PICK('J', '+')
#define ACS_D_BTEE ACS_PICK('K', '+')
#define ACS_D_TTEE ACS_PICK('L', '+')
#define ACS_DS_LRCORNER ACS_PICK('M', '+')
#define ACS_DS_URCORNER ACS_PICK('N', '+')
#define ACS_DS_ULCORNER ACS_PICK('O', '+')
#define ACS_DS_LLCORNER ACS_PICK('P', '+')
#define ACS_DS_PLUS ACS_PICK('Q', '+')
#define ACS_DS_LTEE ACS_PICK('R', '+')
#define ACS_DS_RTEE ACS_PICK('S', '+')
#define ACS_DS_BTEE ACS_PICK('T', '+')
#define ACS_DS_TTEE ACS_PICK('U', '+')
/* VT100-compatible symbols -- other */
#define ACS_S1 ACS_PICK('l', '-')
#define ACS_S9 ACS_PICK('o', '_')
#define ACS_DIAMOND ACS_PICK('j', '+')
#define ACS_CKBOARD ACS_PICK('k', ':')
#define ACS_DEGREE ACS_PICK('w', '\'')
#define ACS_PLMINUS ACS_PICK('x', '#')
#define ACS_BULLET ACS_PICK('h', 'o')
/* Teletype 5410v1 symbols -- these are defined in SysV curses, but
are not well-supported by most terminals. Stick to VT100 characters
for optimum portability. */
#define ACS_LARROW ACS_PICK('!', '<')
#define ACS_RARROW ACS_PICK(' ', '>')
#define ACS_DARROW ACS_PICK('#', 'v')
#define ACS_UARROW ACS_PICK('"', '^')
#define ACS_BOARD ACS_PICK('+', '#')
#define ACS_LTBOARD ACS_PICK('y', '#')
#define ACS_LANTERN ACS_PICK('z', '*')
#define ACS_BLOCK ACS_PICK('t', '#')
/* That goes double for these -- undocumented SysV symbols. Don't use
them. */
#define ACS_S3 ACS_PICK('m', '-')
#define ACS_S7 ACS_PICK('n', '-')
#define ACS_LEQUAL ACS_PICK('u', '<')
#define ACS_GEQUAL ACS_PICK('v', '>')
#define ACS_PI ACS_PICK('$', 'n')
#define ACS_NEQUAL ACS_PICK('%', '+')
#define ACS_STERLING ACS_PICK('~', 'L')
/* Box char aliases */
#define ACS_BSSB ACS_ULCORNER
#define ACS_SSBB ACS_LLCORNER
#define ACS_BBSS ACS_URCORNER
#define ACS_SBBS ACS_LRCORNER
#define ACS_SBSS ACS_RTEE
#define ACS_SSSB ACS_LTEE
#define ACS_SSBS ACS_BTEE
#define ACS_BSSS ACS_TTEE
#define ACS_BSBS ACS_HLINE
#define ACS_SBSB ACS_VLINE
#define ACS_SSSS ACS_PLUS
/* cchar_t aliases */
#ifdef PDC_WIDE
# define WACS_LRCORNER (&(acs_map['V']))
# define WACS_URCORNER (&(acs_map['W']))
# define WACS_ULCORNER (&(acs_map['X']))
# define WACS_LLCORNER (&(acs_map['Y']))
# define WACS_PLUS (&(acs_map['Z']))
# define WACS_LTEE (&(acs_map['[']))
# define WACS_RTEE (&(acs_map['\\']))
# define WACS_BTEE (&(acs_map[']']))
# define WACS_TTEE (&(acs_map['^']))
# define WACS_HLINE (&(acs_map['_']))
# define WACS_VLINE (&(acs_map['`']))
# define WACS_CENT (&(acs_map['{']))
# define WACS_YEN (&(acs_map['|']))
# define WACS_PESETA (&(acs_map['}']))
# define WACS_HALF (&(acs_map['&']))
# define WACS_QUARTER (&(acs_map['\'']))
# define WACS_LEFT_ANG_QU (&(acs_map[')']))
# define WACS_RIGHT_ANG_QU (&(acs_map['*']))
# define WACS_D_HLINE (&(acs_map['a']))
# define WACS_D_VLINE (&(acs_map['b']))
# define WACS_CLUB (&(acs_map[ 11]))
# define WACS_HEART (&(acs_map[ 12]))
# define WACS_SPADE (&(acs_map[ 13]))
# define WACS_SMILE (&(acs_map[ 14]))
# define WACS_REV_SMILE (&(acs_map[ 15]))
# define WACS_MED_BULLET (&(acs_map[ 16]))
# define WACS_WHITE_BULLET (&(acs_map[ 17]))
# define WACS_PILCROW (&(acs_map[ 18]))
# define WACS_SECTION (&(acs_map[ 19]))
# define WACS_SUP2 (&(acs_map[',']))
# define WACS_ALPHA (&(acs_map['.']))
# define WACS_BETA (&(acs_map['/']))
# define WACS_GAMMA (&(acs_map['0']))
# define WACS_UP_SIGMA (&(acs_map['1']))
# define WACS_LO_SIGMA (&(acs_map['2']))
# define WACS_MU (&(acs_map['4']))
# define WACS_TAU (&(acs_map['5']))
# define WACS_UP_PHI (&(acs_map['6']))
# define WACS_THETA (&(acs_map['7']))
# define WACS_OMEGA (&(acs_map['8']))
# define WACS_DELTA (&(acs_map['9']))
# define WACS_INFINITY (&(acs_map['-']))
# define WACS_LO_PHI (&(acs_map[ 22]))
# define WACS_EPSILON (&(acs_map[':']))
# define WACS_INTERSECT (&(acs_map['e']))
# define WACS_TRIPLE_BAR (&(acs_map['f']))
# define WACS_DIVISION (&(acs_map['c']))
# define WACS_APPROX_EQ (&(acs_map['d']))
# define WACS_SM_BULLET (&(acs_map['g']))
# define WACS_SQUARE_ROOT (&(acs_map['i']))
# define WACS_UBLOCK (&(acs_map['p']))
# define WACS_BBLOCK (&(acs_map['q']))
# define WACS_LBLOCK (&(acs_map['r']))
# define WACS_RBLOCK (&(acs_map['s']))
# define WACS_A_ORDINAL (&(acs_map[20]))
# define WACS_O_ORDINAL (&(acs_map[21]))
# define WACS_INV_QUERY (&(acs_map[24]))
# define WACS_REV_NOT (&(acs_map[25]))
# define WACS_NOT (&(acs_map[26]))
# define WACS_INV_BANG (&(acs_map[23]))
# define WACS_UP_INTEGRAL (&(acs_map[27]))
# define WACS_LO_INTEGRAL (&(acs_map[28]))
# define WACS_SUP_N (&(acs_map[29]))
# define WACS_CENTER_SQU (&(acs_map[30]))
# define WACS_F_WITH_HOOK (&(acs_map[31]))
# define WACS_SD_LRCORNER (&(acs_map[';']))
# define WACS_SD_URCORNER (&(acs_map['<']))
# define WACS_SD_ULCORNER (&(acs_map['=']))
# define WACS_SD_LLCORNER (&(acs_map['>']))
# define WACS_SD_PLUS (&(acs_map['?']))
# define WACS_SD_LTEE (&(acs_map['@']))
# define WACS_SD_RTEE (&(acs_map['A']))
# define WACS_SD_BTEE (&(acs_map['B']))
# define WACS_SD_TTEE (&(acs_map['C']))
# define WACS_D_LRCORNER (&(acs_map['D']))
# define WACS_D_URCORNER (&(acs_map['E']))
# define WACS_D_ULCORNER (&(acs_map['F']))
# define WACS_D_LLCORNER (&(acs_map['G']))
# define WACS_D_PLUS (&(acs_map['H']))
# define WACS_D_LTEE (&(acs_map['I']))
# define WACS_D_RTEE (&(acs_map['J']))
# define WACS_D_BTEE (&(acs_map['K']))
# define WACS_D_TTEE (&(acs_map['L']))
# define WACS_DS_LRCORNER (&(acs_map['M']))
# define WACS_DS_URCORNER (&(acs_map['N']))
# define WACS_DS_ULCORNER (&(acs_map['O']))
# define WACS_DS_LLCORNER (&(acs_map['P']))
# define WACS_DS_PLUS (&(acs_map['Q']))
# define WACS_DS_LTEE (&(acs_map['R']))
# define WACS_DS_RTEE (&(acs_map['S']))
# define WACS_DS_BTEE (&(acs_map['T']))
# define WACS_DS_TTEE (&(acs_map['U']))
# define WACS_S1 (&(acs_map['l']))
# define WACS_S9 (&(acs_map['o']))
# define WACS_DIAMOND (&(acs_map['j']))
# define WACS_CKBOARD (&(acs_map['k']))
# define WACS_DEGREE (&(acs_map['w']))
# define WACS_PLMINUS (&(acs_map['x']))
# define WACS_BULLET (&(acs_map['h']))
# define WACS_LARROW (&(acs_map['!']))
# define WACS_RARROW (&(acs_map[' ']))
# define WACS_DARROW (&(acs_map['#']))
# define WACS_UARROW (&(acs_map['"']))
# define WACS_BOARD (&(acs_map['+']))
# define WACS_LTBOARD (&(acs_map['y']))
# define WACS_LANTERN (&(acs_map['z']))
# define WACS_BLOCK (&(acs_map['t']))
# define WACS_S3 (&(acs_map['m']))
# define WACS_S7 (&(acs_map['n']))
# define WACS_LEQUAL (&(acs_map['u']))
# define WACS_GEQUAL (&(acs_map['v']))
# define WACS_PI (&(acs_map['$']))
# define WACS_NEQUAL (&(acs_map['%']))
# define WACS_STERLING (&(acs_map['~']))
# define WACS_BSSB WACS_ULCORNER
# define WACS_SSBB WACS_LLCORNER
# define WACS_BBSS WACS_URCORNER
# define WACS_SBBS WACS_LRCORNER
# define WACS_SBSS WACS_RTEE
# define WACS_SSSB WACS_LTEE
# define WACS_SSBS WACS_BTEE
# define WACS_BSSS WACS_TTEE
# define WACS_BSBS WACS_HLINE
# define WACS_SBSB WACS_VLINE
# define WACS_SSSS WACS_PLUS
#endif
/*** Color macros ***/
#define COLOR_BLACK 0
#ifdef PDC_RGB /* RGB */
# define COLOR_RED 1
# define COLOR_GREEN 2
# define COLOR_BLUE 4
#else /* BGR */
# define COLOR_BLUE 1
# define COLOR_GREEN 2
# define COLOR_RED 4
#endif
#define COLOR_CYAN (COLOR_BLUE | COLOR_GREEN)
#define COLOR_MAGENTA (COLOR_RED | COLOR_BLUE)
#define COLOR_YELLOW (COLOR_RED | COLOR_GREEN)
#define COLOR_WHITE 7
/*----------------------------------------------------------------------
*
* Function and Keypad Key Definitions.
* Many are just for compatibility.
*
*/
#ifdef PDC_WIDE
#define KEY_OFFSET 0xec00
#else
#define KEY_OFFSET 0x100
#endif
#define KEY_CODE_YES (KEY_OFFSET + 0x00) /* If get_wch() gives a key code */
#define KEY_BREAK (KEY_OFFSET + 0x01) /* Not on PC KBD */
#define KEY_DOWN (KEY_OFFSET + 0x02) /* Down arrow key */
#define KEY_UP (KEY_OFFSET + 0x03) /* Up arrow key */
#define KEY_LEFT (KEY_OFFSET + 0x04) /* Left arrow key */
#define KEY_RIGHT (KEY_OFFSET + 0x05) /* Right arrow key */
#define KEY_HOME (KEY_OFFSET + 0x06) /* home key */
#define KEY_BACKSPACE (KEY_OFFSET + 0x07) /* not on pc */
#define KEY_F0 (KEY_OFFSET + 0x08) /* function keys; 64 reserved */
#define KEY_DL (KEY_OFFSET + 0x48) /* delete line */
#define KEY_IL (KEY_OFFSET + 0x49) /* insert line */
#define KEY_DC (KEY_OFFSET + 0x4a) /* delete character */
#define KEY_IC (KEY_OFFSET + 0x4b) /* insert char or enter ins mode */
#define KEY_EIC (KEY_OFFSET + 0x4c) /* exit insert char mode */
#define KEY_CLEAR (KEY_OFFSET + 0x4d) /* clear screen */
#define KEY_EOS (KEY_OFFSET + 0x4e) /* clear to end of screen */
#define KEY_EOL (KEY_OFFSET + 0x4f) /* clear to end of line */
#define KEY_SF (KEY_OFFSET + 0x50) /* scroll 1 line forward */
#define KEY_SR (KEY_OFFSET + 0x51) /* scroll 1 line back (reverse) */
#define KEY_NPAGE (KEY_OFFSET + 0x52) /* next page */
#define KEY_PPAGE (KEY_OFFSET + 0x53) /* previous page */
#define KEY_STAB (KEY_OFFSET + 0x54) /* set tab */
#define KEY_CTAB (KEY_OFFSET + 0x55) /* clear tab */
#define KEY_CATAB (KEY_OFFSET + 0x56) /* clear all tabs */
#define KEY_ENTER (KEY_OFFSET + 0x57) /* enter or send (unreliable) */
#define KEY_SRESET (KEY_OFFSET + 0x58) /* soft/reset (partial/unreliable) */
#define KEY_RESET (KEY_OFFSET + 0x59) /* reset/hard reset (unreliable) */
#define KEY_PRINT (KEY_OFFSET + 0x5a) /* print/copy */
#define KEY_LL (KEY_OFFSET + 0x5b) /* home down/bottom (lower left) */
#define KEY_ABORT (KEY_OFFSET + 0x5c) /* abort/terminate key (any) */
#define KEY_SHELP (KEY_OFFSET + 0x5d) /* short help */
#define KEY_LHELP (KEY_OFFSET + 0x5e) /* long help */
#define KEY_BTAB (KEY_OFFSET + 0x5f) /* Back tab key */
#define KEY_BEG (KEY_OFFSET + 0x60) /* beg(inning) key */
#define KEY_CANCEL (KEY_OFFSET + 0x61) /* cancel key */
#define KEY_CLOSE (KEY_OFFSET + 0x62) /* close key */
#define KEY_COMMAND (KEY_OFFSET + 0x63) /* cmd (command) key */
#define KEY_COPY (KEY_OFFSET + 0x64) /* copy key */
#define KEY_CREATE (KEY_OFFSET + 0x65) /* create key */
#define KEY_END (KEY_OFFSET + 0x66) /* end key */
#define KEY_EXIT (KEY_OFFSET + 0x67) /* exit key */
#define KEY_FIND (KEY_OFFSET + 0x68) /* find key */
#define KEY_HELP (KEY_OFFSET + 0x69) /* help key */
#define KEY_MARK (KEY_OFFSET + 0x6a) /* mark key */
#define KEY_MESSAGE (KEY_OFFSET + 0x6b) /* message key */
#define KEY_MOVE (KEY_OFFSET + 0x6c) /* move key */
#define KEY_NEXT (KEY_OFFSET + 0x6d) /* next object key */
#define KEY_OPEN (KEY_OFFSET + 0x6e) /* open key */
#define KEY_OPTIONS (KEY_OFFSET + 0x6f) /* options key */
#define KEY_PREVIOUS (KEY_OFFSET + 0x70) /* previous object key */
#define KEY_REDO (KEY_OFFSET + 0x71) /* redo key */
#define KEY_REFERENCE (KEY_OFFSET + 0x72) /* ref(erence) key */
#define KEY_REFRESH (KEY_OFFSET + 0x73) /* refresh key */
#define KEY_REPLACE (KEY_OFFSET + 0x74) /* replace key */
#define KEY_RESTART (KEY_OFFSET + 0x75) /* restart key */
#define KEY_RESUME (KEY_OFFSET + 0x76) /* resume key */
#define KEY_SAVE (KEY_OFFSET + 0x77) /* save key */
#define KEY_SBEG (KEY_OFFSET + 0x78) /* shifted beginning key */