Subversion Repositories tendra.SVN

Rev

Rev 80 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
80 7u83 1
#ifndef __TENDRA_CURSES_H
2
#define __TENDRA_CURSES_H
3
 
4
 
5
#include <stdbool.h>
6
 
7
typedef unsigned long chtype;
8
 
9
 
10
/* VT100 symbols begin here */
11
#define ACS_ULCORNER	NCURSES_ACS('l') /* upper left corner */
12
#define ACS_LLCORNER	NCURSES_ACS('m') /* lower left corner */
13
#define ACS_URCORNER	NCURSES_ACS('k') /* upper right corner */
14
#define ACS_LRCORNER	NCURSES_ACS('j') /* lower right corner */
15
#define ACS_LTEE	NCURSES_ACS('t') /* tee pointing right */
16
#define ACS_RTEE	NCURSES_ACS('u') /* tee pointing left */
17
#define ACS_BTEE	NCURSES_ACS('v') /* tee pointing up */
18
#define ACS_TTEE	NCURSES_ACS('w') /* tee pointing down */
19
#define ACS_HLINE	NCURSES_ACS('q') /* horizontal line */
20
#define ACS_VLINE	NCURSES_ACS('x') /* vertical line */
21
#define ACS_PLUS	NCURSES_ACS('n') /* large plus or crossover */
22
#define ACS_S1		NCURSES_ACS('o') /* scan line 1 */
23
#define ACS_S9		NCURSES_ACS('s') /* scan line 9 */
24
#define ACS_DIAMOND	NCURSES_ACS('`') /* diamond */
25
#define ACS_CKBOARD	NCURSES_ACS('a') /* checker board (stipple) */
26
#define ACS_DEGREE	NCURSES_ACS('f') /* degree symbol */
27
#define ACS_PLMINUS	NCURSES_ACS('g') /* plus/minus */
28
#define ACS_BULLET	NCURSES_ACS('~') /* bullet */
29
/* Teletype 5410v1 symbols begin here */
30
#define ACS_LARROW	NCURSES_ACS(',') /* arrow pointing left */
31
#define ACS_RARROW	NCURSES_ACS('+') /* arrow pointing right */
32
#define ACS_DARROW	NCURSES_ACS('.') /* arrow pointing down */
33
#define ACS_UARROW	NCURSES_ACS('-') /* arrow pointing up */
34
#define ACS_BOARD	NCURSES_ACS('h') /* board of squares */
35
#define ACS_LANTERN	NCURSES_ACS('i') /* lantern symbol */
36
#define ACS_BLOCK	NCURSES_ACS('0') /* solid square block */
37
 
38
 
39
/* colors */
40
#define COLOR_BLACK	0
41
#define COLOR_RED	1
42
#define COLOR_GREEN	2
43
#define COLOR_YELLOW	3
44
#define COLOR_BLUE	4
45
#define COLOR_MAGENTA	5
46
#define COLOR_CYAN	6
47
#define COLOR_WHITE	7
48
 
49
/* attributes */
50
 
51
#define A_NORMAL	(1UL - 1UL)
52
 
53
 
54
 
55
 
56
/*
57
 * Pseudo-character tokens outside ASCII range.  The curses wgetch() function
58
 * will return any given one of these only if the corresponding k- capability
59
 * is defined in your terminal's terminfo entry.
60
 *
61
 * Some keys (KEY_A1, etc) are arranged like this:
62
 *	a1     up    a3
63
 *	left   b2    right
64
 *	c1     down  c3
65
 *
66
 * A few key codes do not depend upon the terminfo entry.
67
 */
68
#define KEY_CODE_YES	0400		/* A wchar_t contains a key code */
69
#define KEY_MIN		0401		/* Minimum curses key */
70
#define KEY_BREAK	0401		/* Break key (unreliable) */
71
#define KEY_SRESET	0530		/* Soft (partial) reset (unreliable) */
72
#define KEY_RESET	0531		/* Reset or hard reset (unreliable) */
73
 
74
 
75
 
76
 
77
/*
78
 * These definitions were generated by ./MKkey_defs.sh ./Caps
79
 */
80
#define KEY_DOWN	0402		/* down-arrow key */
81
#define KEY_UP		0403		/* up-arrow key */
82
#define KEY_LEFT	0404		/* left-arrow key */
83
#define KEY_RIGHT	0405		/* right-arrow key */
84
#define KEY_HOME	0406		/* home key */
85
#define KEY_BACKSPACE	0407		/* backspace key */
86
#define KEY_F0		0410		/* Function keys.  Space for 64 */
87
#define KEY_F(n)	(KEY_F0+(n))	/* Value of function key n */
88
#define KEY_DL		0510		/* delete-line key */
89
#define KEY_IL		0511		/* insert-line key */
90
#define KEY_DC		0512		/* delete-character key */
91
#define KEY_IC		0513		/* insert-character key */
92
#define KEY_EIC		0514		/* sent by rmir or smir in insert mode */
93
#define KEY_CLEAR	0515		/* clear-screen or erase key */
94
#define KEY_EOS		0516		/* clear-to-end-of-screen key */
95
#define KEY_EOL		0517		/* clear-to-end-of-line key */
96
#define KEY_SF		0520		/* scroll-forward key */
97
#define KEY_SR		0521		/* scroll-backward key */
98
#define KEY_NPAGE	0522		/* next-page key */
99
#define KEY_PPAGE	0523		/* previous-page key */
100
#define KEY_STAB	0524		/* set-tab key */
101
#define KEY_CTAB	0525		/* clear-tab key */
102
#define KEY_CATAB	0526		/* clear-all-tabs key */
103
#define KEY_ENTER	0527		/* enter/send key */
104
#define KEY_PRINT	0532		/* print key */
105
#define KEY_LL		0533		/* lower-left key (home down) */
106
#define KEY_A1		0534		/* upper left of keypad */
107
#define KEY_A3		0535		/* upper right of keypad */
108
#define KEY_B2		0536		/* center of keypad */
109
#define KEY_C1		0537		/* lower left of keypad */
110
#define KEY_C3		0540		/* lower right of keypad */
111
#define KEY_BTAB	0541		/* back-tab key */
112
#define KEY_BEG		0542		/* begin key */
113
#define KEY_CANCEL	0543		/* cancel key */
114
#define KEY_CLOSE	0544		/* close key */
115
#define KEY_COMMAND	0545		/* command key */
116
#define KEY_COPY	0546		/* copy key */
117
#define KEY_CREATE	0547		/* create key */
118
#define KEY_END		0550		/* end key */
119
#define KEY_EXIT	0551		/* exit key */
120
#define KEY_FIND	0552		/* find key */
121
#define KEY_HELP	0553		/* help key */
122
#define KEY_MARK	0554		/* mark key */
123
#define KEY_MESSAGE	0555		/* message key */
124
#define KEY_MOVE	0556		/* move key */
125
#define KEY_NEXT	0557		/* next key */
126
#define KEY_OPEN	0560		/* open key */
127
#define KEY_OPTIONS	0561		/* options key */
128
#define KEY_PREVIOUS	0562		/* previous key */
129
#define KEY_REDO	0563		/* redo key */
130
#define KEY_REFERENCE	0564		/* reference key */
131
#define KEY_REFRESH	0565		/* refresh key */
132
#define KEY_REPLACE	0566		/* replace key */
133
#define KEY_RESTART	0567		/* restart key */
134
#define KEY_RESUME	0570		/* resume key */
135
#define KEY_SAVE	0571		/* save key */
136
#define KEY_SBEG	0572		/* shifted begin key */
137
#define KEY_SCANCEL	0573		/* shifted cancel key */
138
#define KEY_SCOMMAND	0574		/* shifted command key */
139
#define KEY_SCOPY	0575		/* shifted copy key */
140
#define KEY_SCREATE	0576		/* shifted create key */
141
#define KEY_SDC		0577		/* shifted delete-character key */
142
#define KEY_SDL		0600		/* shifted delete-line key */
143
#define KEY_SELECT	0601		/* select key */
144
#define KEY_SEND	0602		/* shifted end key */
145
#define KEY_SEOL	0603		/* shifted clear-to-end-of-line key */
146
#define KEY_SEXIT	0604		/* shifted exit key */
147
#define KEY_SFIND	0605		/* shifted find key */
148
#define KEY_SHELP	0606		/* shifted help key */
149
#define KEY_SHOME	0607		/* shifted home key */
150
#define KEY_SIC		0610		/* shifted insert-character key */
151
#define KEY_SLEFT	0611		/* shifted left-arrow key */
152
#define KEY_SMESSAGE	0612		/* shifted message key */
153
#define KEY_SMOVE	0613		/* shifted move key */
154
#define KEY_SNEXT	0614		/* shifted next key */
155
#define KEY_SOPTIONS	0615		/* shifted options key */
156
#define KEY_SPREVIOUS	0616		/* shifted previous key */
157
#define KEY_SPRINT	0617		/* shifted print key */
158
#define KEY_SREDO	0620		/* shifted redo key */
159
#define KEY_SREPLACE	0621		/* shifted replace key */
160
#define KEY_SRIGHT	0622		/* shifted right-arrow key */
161
#define KEY_SRSUME	0623		/* shifted resume key */
162
#define KEY_SSAVE	0624		/* shifted save key */
163
#define KEY_SSUSPEND	0625		/* shifted suspend key */
164
#define KEY_SUNDO	0626		/* shifted undo key */
165
#define KEY_SUSPEND	0627		/* suspend key */
166
#define KEY_UNDO	0630		/* undo key */
167
#define KEY_MOUSE	0631		/* Mouse event has occurred */
168
#define KEY_RESIZE	0632		/* Terminal resize event */
169
#define KEY_EVENT	0633		/* We were interrupted by an event */
170
 
171
 
172
 
173
 
174
 
175
#endif