diff options
Diffstat (limited to 'scripts/kconfig/libcurses/curses.h')
-rw-r--r-- | scripts/kconfig/libcurses/curses.h | 1440 |
1 files changed, 1440 insertions, 0 deletions
diff --git a/scripts/kconfig/libcurses/curses.h b/scripts/kconfig/libcurses/curses.h new file mode 100644 index 000000000..e4ba3776a --- /dev/null +++ b/scripts/kconfig/libcurses/curses.h | |||
@@ -0,0 +1,1440 @@ | |||
1 | /*----------------------------------------------------------------------* | ||
2 | * PDCurses * | ||
3 | *----------------------------------------------------------------------*/ | ||
4 | |||
5 | #ifndef __PDCURSES__ | ||
6 | #define __PDCURSES__ 1 | ||
7 | |||
8 | /*man-start************************************************************** | ||
9 | |||
10 | Define before inclusion (only those needed): | ||
11 | |||
12 | XCURSES if building / built for X11 | ||
13 | PDC_RGB if you want to use RGB color definitions | ||
14 | (Red = 1, Green = 2, Blue = 4) instead of BGR | ||
15 | PDC_WIDE if building / built with wide-character support | ||
16 | PDC_DLL_BUILD if building / built as a Windows DLL | ||
17 | PDC_NCMOUSE to use the ncurses mouse API instead | ||
18 | of PDCurses' traditional mouse API | ||
19 | |||
20 | Defined by this header: | ||
21 | |||
22 | PDCURSES PDCurses-only features are available | ||
23 | PDC_BUILD API build version | ||
24 | PDC_VER_MAJOR major version number | ||
25 | PDC_VER_MINOR minor version number | ||
26 | PDC_VERDOT version string | ||
27 | |||
28 | **man-end****************************************************************/ | ||
29 | |||
30 | #define PDCURSES 1 | ||
31 | #define PDC_BUILD 3907 | ||
32 | #define PDC_VER_MAJOR 3 | ||
33 | #define PDC_VER_MINOR 9 | ||
34 | #define PDC_VERDOT "3.9" | ||
35 | |||
36 | #define CHTYPE_LONG 1 /* chtype >= 32 bits */ | ||
37 | |||
38 | #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L | ||
39 | # define PDC_99 1 | ||
40 | #endif | ||
41 | |||
42 | #if defined(__cplusplus) && __cplusplus >= 199711L | ||
43 | # define PDC_PP98 1 | ||
44 | #endif | ||
45 | |||
46 | /*----------------------------------------------------------------------*/ | ||
47 | |||
48 | #include <stdarg.h> | ||
49 | #include <stddef.h> | ||
50 | #include <stdio.h> | ||
51 | |||
52 | #ifdef PDC_WIDE | ||
53 | # include <wchar.h> | ||
54 | #endif | ||
55 | |||
56 | #if defined(PDC_99) && !defined(__bool_true_false_are_defined) | ||
57 | # include <stdbool.h> | ||
58 | #endif | ||
59 | |||
60 | #ifdef __cplusplus | ||
61 | extern "C" | ||
62 | { | ||
63 | # ifndef PDC_PP98 | ||
64 | # define bool _bool | ||
65 | # endif | ||
66 | #endif | ||
67 | |||
68 | /*---------------------------------------------------------------------- | ||
69 | * | ||
70 | * Constants and Types | ||
71 | * | ||
72 | */ | ||
73 | |||
74 | #undef FALSE | ||
75 | #define FALSE 0 | ||
76 | |||
77 | #undef TRUE | ||
78 | #define TRUE 1 | ||
79 | |||
80 | #undef ERR | ||
81 | #define ERR (-1) | ||
82 | |||
83 | #undef OK | ||
84 | #define OK 0 | ||
85 | |||
86 | #if !defined(PDC_PP98) && !defined(__bool_true_false_are_defined) | ||
87 | typedef unsigned char bool; | ||
88 | #endif | ||
89 | |||
90 | #if _LP64 | ||
91 | typedef unsigned int chtype; | ||
92 | #else | ||
93 | typedef unsigned long chtype; /* 16-bit attr + 16-bit char */ | ||
94 | #endif | ||
95 | |||
96 | #ifdef PDC_WIDE | ||
97 | typedef chtype cchar_t; | ||
98 | #endif | ||
99 | |||
100 | typedef chtype attr_t; | ||
101 | |||
102 | /*---------------------------------------------------------------------- | ||
103 | * | ||
104 | * Version Info | ||
105 | * | ||
106 | */ | ||
107 | |||
108 | /* Use this structure with PDC_get_version() for run-time info about the | ||
109 | way the library was built, in case it doesn't match the header. */ | ||
110 | |||
111 | typedef struct | ||
112 | { | ||
113 | short flags; /* flags OR'd together (see below) */ | ||
114 | short build; /* PDC_BUILD at compile time */ | ||
115 | unsigned char major; /* PDC_VER_MAJOR */ | ||
116 | unsigned char minor; /* PDC_VER_MINOR */ | ||
117 | unsigned char csize; /* sizeof chtype */ | ||
118 | unsigned char bsize; /* sizeof bool */ | ||
119 | } PDC_VERSION; | ||
120 | |||
121 | enum | ||
122 | { | ||
123 | PDC_VFLAG_DEBUG = 1, /* set if built with -DPDCDEBUG */ | ||
124 | PDC_VFLAG_WIDE = 2, /* -DPDC_WIDE */ | ||
125 | PDC_VFLAG_UTF8 = 4, /* -DPDC_FORCE_UTF8 */ | ||
126 | PDC_VFLAG_DLL = 8, /* -DPDC_DLL_BUILD */ | ||
127 | PDC_VFLAG_RGB = 16 /* -DPDC_RGB */ | ||
128 | }; | ||
129 | |||
130 | /*---------------------------------------------------------------------- | ||
131 | * | ||
132 | * Mouse Interface | ||
133 | * | ||
134 | */ | ||
135 | |||
136 | #if _LP64 | ||
137 | typedef unsigned int mmask_t; | ||
138 | #else | ||
139 | typedef unsigned long mmask_t; | ||
140 | #endif | ||
141 | |||
142 | typedef struct | ||
143 | { | ||
144 | int x; /* absolute column, 0 based, measured in characters */ | ||
145 | int y; /* absolute row, 0 based, measured in characters */ | ||
146 | short button[3]; /* state of each button */ | ||
147 | int changes; /* flags indicating what has changed with the mouse */ | ||
148 | } MOUSE_STATUS; | ||
149 | |||
150 | #define BUTTON_RELEASED 0x0000 | ||
151 | #define BUTTON_PRESSED 0x0001 | ||
152 | #define BUTTON_CLICKED 0x0002 | ||
153 | #define BUTTON_DOUBLE_CLICKED 0x0003 | ||
154 | #define BUTTON_TRIPLE_CLICKED 0x0004 | ||
155 | #define BUTTON_MOVED 0x0005 /* PDCurses */ | ||
156 | #define WHEEL_SCROLLED 0x0006 /* PDCurses */ | ||
157 | #define BUTTON_ACTION_MASK 0x0007 /* PDCurses */ | ||
158 | |||
159 | #define PDC_BUTTON_SHIFT 0x0008 /* PDCurses */ | ||
160 | #define PDC_BUTTON_CONTROL 0x0010 /* PDCurses */ | ||
161 | #define PDC_BUTTON_ALT 0x0020 /* PDCurses */ | ||
162 | #define BUTTON_MODIFIER_MASK 0x0038 /* PDCurses */ | ||
163 | |||
164 | #define MOUSE_X_POS (Mouse_status.x) | ||
165 | #define MOUSE_Y_POS (Mouse_status.y) | ||
166 | |||
167 | /* | ||
168 | * Bits associated with the .changes field: | ||
169 | * 3 2 1 0 | ||
170 | * 210987654321098765432109876543210 | ||
171 | * 1 <- button 1 has changed | ||
172 | * 10 <- button 2 has changed | ||
173 | * 100 <- button 3 has changed | ||
174 | * 1000 <- mouse has moved | ||
175 | * 10000 <- mouse position report | ||
176 | * 100000 <- mouse wheel up | ||
177 | * 1000000 <- mouse wheel down | ||
178 | * 10000000 <- mouse wheel left | ||
179 | * 100000000 <- mouse wheel right | ||
180 | */ | ||
181 | |||
182 | #define PDC_MOUSE_MOVED 0x0008 | ||
183 | #define PDC_MOUSE_POSITION 0x0010 | ||
184 | #define PDC_MOUSE_WHEEL_UP 0x0020 | ||
185 | #define PDC_MOUSE_WHEEL_DOWN 0x0040 | ||
186 | #define PDC_MOUSE_WHEEL_LEFT 0x0080 | ||
187 | #define PDC_MOUSE_WHEEL_RIGHT 0x0100 | ||
188 | |||
189 | #define A_BUTTON_CHANGED (Mouse_status.changes & 7) | ||
190 | #define MOUSE_MOVED (Mouse_status.changes & PDC_MOUSE_MOVED) | ||
191 | #define MOUSE_POS_REPORT (Mouse_status.changes & PDC_MOUSE_POSITION) | ||
192 | #define BUTTON_CHANGED(x) (Mouse_status.changes & (1 << ((x) - 1))) | ||
193 | #define BUTTON_STATUS(x) (Mouse_status.button[(x) - 1]) | ||
194 | #define MOUSE_WHEEL_UP (Mouse_status.changes & PDC_MOUSE_WHEEL_UP) | ||
195 | #define MOUSE_WHEEL_DOWN (Mouse_status.changes & PDC_MOUSE_WHEEL_DOWN) | ||
196 | #define MOUSE_WHEEL_LEFT (Mouse_status.changes & PDC_MOUSE_WHEEL_LEFT) | ||
197 | #define MOUSE_WHEEL_RIGHT (Mouse_status.changes & PDC_MOUSE_WHEEL_RIGHT) | ||
198 | |||
199 | /* mouse bit-masks */ | ||
200 | |||
201 | #define BUTTON1_RELEASED 0x00000001L | ||
202 | #define BUTTON1_PRESSED 0x00000002L | ||
203 | #define BUTTON1_CLICKED 0x00000004L | ||
204 | #define BUTTON1_DOUBLE_CLICKED 0x00000008L | ||
205 | #define BUTTON1_TRIPLE_CLICKED 0x00000010L | ||
206 | #define BUTTON1_MOVED 0x00000010L /* PDCurses */ | ||
207 | |||
208 | #define BUTTON2_RELEASED 0x00000020L | ||
209 | #define BUTTON2_PRESSED 0x00000040L | ||
210 | #define BUTTON2_CLICKED 0x00000080L | ||
211 | #define BUTTON2_DOUBLE_CLICKED 0x00000100L | ||
212 | #define BUTTON2_TRIPLE_CLICKED 0x00000200L | ||
213 | #define BUTTON2_MOVED 0x00000200L /* PDCurses */ | ||
214 | |||
215 | #define BUTTON3_RELEASED 0x00000400L | ||
216 | #define BUTTON3_PRESSED 0x00000800L | ||
217 | #define BUTTON3_CLICKED 0x00001000L | ||
218 | #define BUTTON3_DOUBLE_CLICKED 0x00002000L | ||
219 | #define BUTTON3_TRIPLE_CLICKED 0x00004000L | ||
220 | #define BUTTON3_MOVED 0x00004000L /* PDCurses */ | ||
221 | |||
222 | /* For the ncurses-compatible functions only, BUTTON4_PRESSED and | ||
223 | BUTTON5_PRESSED are returned for mouse scroll wheel up and down; | ||
224 | otherwise PDCurses doesn't support buttons 4 and 5 */ | ||
225 | |||
226 | #define BUTTON4_RELEASED 0x00008000L | ||
227 | #define BUTTON4_PRESSED 0x00010000L | ||
228 | #define BUTTON4_CLICKED 0x00020000L | ||
229 | #define BUTTON4_DOUBLE_CLICKED 0x00040000L | ||
230 | #define BUTTON4_TRIPLE_CLICKED 0x00080000L | ||
231 | |||
232 | #define BUTTON5_RELEASED 0x00100000L | ||
233 | #define BUTTON5_PRESSED 0x00200000L | ||
234 | #define BUTTON5_CLICKED 0x00400000L | ||
235 | #define BUTTON5_DOUBLE_CLICKED 0x00800000L | ||
236 | #define BUTTON5_TRIPLE_CLICKED 0x01000000L | ||
237 | |||
238 | #define MOUSE_WHEEL_SCROLL 0x02000000L /* PDCurses */ | ||
239 | #define BUTTON_MODIFIER_SHIFT 0x04000000L /* PDCurses */ | ||
240 | #define BUTTON_MODIFIER_CONTROL 0x08000000L /* PDCurses */ | ||
241 | #define BUTTON_MODIFIER_ALT 0x10000000L /* PDCurses */ | ||
242 | |||
243 | #define ALL_MOUSE_EVENTS 0x1fffffffL | ||
244 | #define REPORT_MOUSE_POSITION 0x20000000L | ||
245 | |||
246 | /* ncurses mouse interface */ | ||
247 | |||
248 | typedef struct | ||
249 | { | ||
250 | short id; /* unused, always 0 */ | ||
251 | int x, y, z; /* x, y same as MOUSE_STATUS; z unused */ | ||
252 | mmask_t bstate; /* equivalent to changes + button[], but | ||
253 | in the same format as used for mousemask() */ | ||
254 | } MEVENT; | ||
255 | |||
256 | #if defined(PDC_NCMOUSE) && !defined(NCURSES_MOUSE_VERSION) | ||
257 | # define NCURSES_MOUSE_VERSION 2 | ||
258 | #endif | ||
259 | |||
260 | #ifdef NCURSES_MOUSE_VERSION | ||
261 | # define BUTTON_SHIFT BUTTON_MODIFIER_SHIFT | ||
262 | # define BUTTON_CONTROL BUTTON_MODIFIER_CONTROL | ||
263 | # define BUTTON_CTRL BUTTON_MODIFIER_CONTROL | ||
264 | # define BUTTON_ALT BUTTON_MODIFIER_ALT | ||
265 | #else | ||
266 | # define BUTTON_SHIFT PDC_BUTTON_SHIFT | ||
267 | # define BUTTON_CONTROL PDC_BUTTON_CONTROL | ||
268 | # define BUTTON_ALT PDC_BUTTON_ALT | ||
269 | #endif | ||
270 | |||
271 | /*---------------------------------------------------------------------- | ||
272 | * | ||
273 | * Window and Screen Structures | ||
274 | * | ||
275 | */ | ||
276 | |||
277 | typedef struct _win /* definition of a window */ | ||
278 | { | ||
279 | int _cury; /* current pseudo-cursor */ | ||
280 | int _curx; | ||
281 | int _maxy; /* max window coordinates */ | ||
282 | int _maxx; | ||
283 | int _begy; /* origin on screen */ | ||
284 | int _begx; | ||
285 | int _flags; /* window properties */ | ||
286 | chtype _attrs; /* standard attributes and colors */ | ||
287 | chtype _bkgd; /* background, normally blank */ | ||
288 | bool _clear; /* causes clear at next refresh */ | ||
289 | bool _leaveit; /* leaves cursor where it is */ | ||
290 | bool _scroll; /* allows window scrolling */ | ||
291 | bool _nodelay; /* input character wait flag */ | ||
292 | bool _immed; /* immediate update flag */ | ||
293 | bool _sync; /* synchronise window ancestors */ | ||
294 | bool _use_keypad; /* flags keypad key mode active */ | ||
295 | chtype **_y; /* pointer to line pointer array */ | ||
296 | int *_firstch; /* first changed character in line */ | ||
297 | int *_lastch; /* last changed character in line */ | ||
298 | int _tmarg; /* top of scrolling region */ | ||
299 | int _bmarg; /* bottom of scrolling region */ | ||
300 | int _delayms; /* milliseconds of delay for getch() */ | ||
301 | int _parx, _pary; /* coords relative to parent (0,0) */ | ||
302 | struct _win *_parent; /* subwin's pointer to parent win */ | ||
303 | |||
304 | /* these are used only if this is a pad */ | ||
305 | struct pdat | ||
306 | { | ||
307 | int _pad_y; | ||
308 | int _pad_x; | ||
309 | int _pad_top; | ||
310 | int _pad_left; | ||
311 | int _pad_bottom; | ||
312 | int _pad_right; | ||
313 | } _pad; /* Pad-properties structure */ | ||
314 | } WINDOW; | ||
315 | |||
316 | /* Color pair structure */ | ||
317 | |||
318 | typedef struct | ||
319 | { | ||
320 | short f; /* foreground color */ | ||
321 | short b; /* background color */ | ||
322 | int count; /* allocation order */ | ||
323 | bool set; /* pair has been set */ | ||
324 | } PDC_PAIR; | ||
325 | |||
326 | /* Avoid using the SCREEN struct directly -- use the corresponding | ||
327 | functions if possible. This struct may eventually be made private. */ | ||
328 | |||
329 | typedef struct | ||
330 | { | ||
331 | bool alive; /* if initscr() called, and not endwin() */ | ||
332 | bool autocr; /* if cr -> lf */ | ||
333 | bool cbreak; /* if terminal unbuffered */ | ||
334 | bool echo; /* if terminal echo */ | ||
335 | bool raw_inp; /* raw input mode (v. cooked input) */ | ||
336 | bool raw_out; /* raw output mode (7 v. 8 bits) */ | ||
337 | bool audible; /* FALSE if the bell is visual */ | ||
338 | bool mono; /* TRUE if current screen is mono */ | ||
339 | bool resized; /* TRUE if TERM has been resized */ | ||
340 | bool orig_attr; /* TRUE if we have the original colors */ | ||
341 | short orig_fore; /* original screen foreground color */ | ||
342 | short orig_back; /* original screen foreground color */ | ||
343 | int cursrow; /* position of physical cursor */ | ||
344 | int curscol; /* position of physical cursor */ | ||
345 | int visibility; /* visibility of cursor */ | ||
346 | int orig_cursor; /* original cursor size */ | ||
347 | int lines; /* new value for LINES */ | ||
348 | int cols; /* new value for COLS */ | ||
349 | mmask_t _trap_mbe; /* trap these mouse button events */ | ||
350 | int mouse_wait; /* time to wait (in ms) for a | ||
351 | button release after a press, in | ||
352 | order to count it as a click */ | ||
353 | int slklines; /* lines in use by slk_init() */ | ||
354 | WINDOW *slk_winptr; /* window for slk */ | ||
355 | int linesrippedoff; /* lines ripped off via ripoffline() */ | ||
356 | int linesrippedoffontop; /* lines ripped off on | ||
357 | top via ripoffline() */ | ||
358 | int delaytenths; /* 1/10ths second to wait block | ||
359 | getch() for */ | ||
360 | bool _preserve; /* TRUE if screen background | ||
361 | to be preserved */ | ||
362 | int _restore; /* specifies if screen background | ||
363 | to be restored, and how */ | ||
364 | unsigned long key_modifiers; /* key modifiers (SHIFT, CONTROL, etc.) | ||
365 | on last key press */ | ||
366 | bool return_key_modifiers; /* TRUE if modifier keys are | ||
367 | returned as "real" keys */ | ||
368 | bool key_code; /* TRUE if last key is a special key; | ||
369 | used internally by get_wch() */ | ||
370 | MOUSE_STATUS mouse_status; /* last returned mouse status */ | ||
371 | short line_color; /* color of line attributes - default -1 */ | ||
372 | attr_t termattrs; /* attribute capabilities */ | ||
373 | WINDOW *lastscr; /* the last screen image */ | ||
374 | FILE *dbfp; /* debug trace file pointer */ | ||
375 | bool color_started; /* TRUE after start_color() */ | ||
376 | bool dirty; /* redraw on napms() after init_color() */ | ||
377 | int sel_start; /* start of selection (y * COLS + x) */ | ||
378 | int sel_end; /* end of selection */ | ||
379 | int *c_buffer; /* character buffer */ | ||
380 | int c_pindex; /* putter index */ | ||
381 | int c_gindex; /* getter index */ | ||
382 | int *c_ungch; /* array of ungotten chars */ | ||
383 | int c_ungind; /* ungetch() push index */ | ||
384 | int c_ungmax; /* allocated size of ungetch() buffer */ | ||
385 | PDC_PAIR *atrtab; /* table of color pairs */ | ||
386 | } SCREEN; | ||
387 | |||
388 | /*---------------------------------------------------------------------- | ||
389 | * | ||
390 | * External Variables | ||
391 | * | ||
392 | */ | ||
393 | |||
394 | #ifdef PDC_DLL_BUILD | ||
395 | # ifdef CURSES_LIBRARY | ||
396 | # define PDCEX __declspec(dllexport) extern | ||
397 | # else | ||
398 | # define PDCEX __declspec(dllimport) | ||
399 | # endif | ||
400 | #else | ||
401 | # define PDCEX extern | ||
402 | #endif | ||
403 | |||
404 | PDCEX int LINES; /* terminal height */ | ||
405 | PDCEX int COLS; /* terminal width */ | ||
406 | PDCEX WINDOW *stdscr; /* the default screen window */ | ||
407 | PDCEX WINDOW *curscr; /* the current screen image */ | ||
408 | PDCEX SCREEN *SP; /* curses variables */ | ||
409 | PDCEX MOUSE_STATUS Mouse_status; | ||
410 | PDCEX int COLORS; | ||
411 | PDCEX int COLOR_PAIRS; | ||
412 | PDCEX int TABSIZE; | ||
413 | PDCEX chtype acs_map[]; /* alternate character set map */ | ||
414 | PDCEX char ttytype[]; /* terminal name/description */ | ||
415 | |||
416 | /*man-start************************************************************** | ||
417 | |||
418 | Text Attributes | ||
419 | =============== | ||
420 | |||
421 | PDCurses uses a 32-bit integer for its chtype: | ||
422 | |||
423 | +--------------------------------------------------------------------+ | ||
424 | |31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|..| 2| 1| 0| | ||
425 | +--------------------------------------------------------------------+ | ||
426 | color pair | modifiers | character eg 'a' | ||
427 | |||
428 | There are 256 color pairs (8 bits), 8 bits for modifiers, and 16 bits | ||
429 | for character data. The modifiers are bold, underline, right-line, | ||
430 | left-line, italic, reverse and blink, plus the alternate character set | ||
431 | indicator. | ||
432 | |||
433 | **man-end****************************************************************/ | ||
434 | |||
435 | /*** Video attribute macros ***/ | ||
436 | |||
437 | #define A_NORMAL (chtype)0 | ||
438 | |||
439 | #define A_ALTCHARSET (chtype)0x00010000 | ||
440 | #define A_RIGHT (chtype)0x00020000 | ||
441 | #define A_LEFT (chtype)0x00040000 | ||
442 | #define A_ITALIC (chtype)0x00080000 | ||
443 | #define A_UNDERLINE (chtype)0x00100000 | ||
444 | #define A_REVERSE (chtype)0x00200000 | ||
445 | #define A_BLINK (chtype)0x00400000 | ||
446 | #define A_BOLD (chtype)0x00800000 | ||
447 | |||
448 | #define A_ATTRIBUTES (chtype)0xffff0000 | ||
449 | #define A_CHARTEXT (chtype)0x0000ffff | ||
450 | #define A_COLOR (chtype)0xff000000 | ||
451 | |||
452 | #define PDC_COLOR_SHIFT 24 | ||
453 | |||
454 | #define A_LEFTLINE A_LEFT | ||
455 | #define A_RIGHTLINE A_RIGHT | ||
456 | #define A_STANDOUT (A_REVERSE | A_BOLD) /* X/Open */ | ||
457 | |||
458 | #define A_DIM A_NORMAL | ||
459 | #define A_INVIS A_NORMAL | ||
460 | #define A_PROTECT A_NORMAL | ||
461 | |||
462 | #define A_HORIZONTAL A_NORMAL | ||
463 | #define A_LOW A_NORMAL | ||
464 | #define A_TOP A_NORMAL | ||
465 | #define A_VERTICAL A_NORMAL | ||
466 | |||
467 | #define CHR_MSK A_CHARTEXT /* Obsolete */ | ||
468 | #define ATR_MSK A_ATTRIBUTES /* Obsolete */ | ||
469 | #define ATR_NRM A_NORMAL /* Obsolete */ | ||
470 | |||
471 | /* For use with attr_t -- X/Open says, "these shall be distinct", so | ||
472 | this is a non-conforming implementation. */ | ||
473 | |||
474 | #define WA_NORMAL A_NORMAL | ||
475 | |||
476 | #define WA_ALTCHARSET A_ALTCHARSET | ||
477 | #define WA_BLINK A_BLINK | ||
478 | #define WA_BOLD A_BOLD | ||
479 | #define WA_DIM A_DIM | ||
480 | #define WA_INVIS A_INVIS | ||
481 | #define WA_ITALIC A_ITALIC | ||
482 | #define WA_LEFT A_LEFT | ||
483 | #define WA_PROTECT A_PROTECT | ||
484 | #define WA_REVERSE A_REVERSE | ||
485 | #define WA_RIGHT A_RIGHT | ||
486 | #define WA_STANDOUT A_STANDOUT | ||
487 | #define WA_UNDERLINE A_UNDERLINE | ||
488 | |||
489 | #define WA_HORIZONTAL A_HORIZONTAL | ||
490 | #define WA_LOW A_LOW | ||
491 | #define WA_TOP A_TOP | ||
492 | #define WA_VERTICAL A_VERTICAL | ||
493 | |||
494 | #define WA_ATTRIBUTES A_ATTRIBUTES | ||
495 | |||
496 | /*** Alternate character set macros ***/ | ||
497 | |||
498 | #define PDC_ACS(w) ((chtype)w | A_ALTCHARSET) | ||
499 | |||
500 | /* VT100-compatible symbols -- box chars */ | ||
501 | |||
502 | #define ACS_ULCORNER PDC_ACS('l') | ||
503 | #define ACS_LLCORNER PDC_ACS('m') | ||
504 | #define ACS_URCORNER PDC_ACS('k') | ||
505 | #define ACS_LRCORNER PDC_ACS('j') | ||
506 | #define ACS_RTEE PDC_ACS('u') | ||
507 | #define ACS_LTEE PDC_ACS('t') | ||
508 | #define ACS_BTEE PDC_ACS('v') | ||
509 | #define ACS_TTEE PDC_ACS('w') | ||
510 | #define ACS_HLINE PDC_ACS('q') | ||
511 | #define ACS_VLINE PDC_ACS('x') | ||
512 | #define ACS_PLUS PDC_ACS('n') | ||
513 | |||
514 | /* VT100-compatible symbols -- other */ | ||
515 | |||
516 | #define ACS_S1 PDC_ACS('o') | ||
517 | #define ACS_S9 PDC_ACS('s') | ||
518 | #define ACS_DIAMOND PDC_ACS('`') | ||
519 | #define ACS_CKBOARD PDC_ACS('a') | ||
520 | #define ACS_DEGREE PDC_ACS('f') | ||
521 | #define ACS_PLMINUS PDC_ACS('g') | ||
522 | #define ACS_BULLET PDC_ACS('~') | ||
523 | |||
524 | /* Teletype 5410v1 symbols -- these are defined in SysV curses, but | ||
525 | are not well-supported by most terminals. Stick to VT100 characters | ||
526 | for optimum portability. */ | ||
527 | |||
528 | #define ACS_LARROW PDC_ACS(',') | ||
529 | #define ACS_RARROW PDC_ACS('+') | ||
530 | #define ACS_DARROW PDC_ACS('.') | ||
531 | #define ACS_UARROW PDC_ACS('-') | ||
532 | #define ACS_BOARD PDC_ACS('h') | ||
533 | #define ACS_LANTERN PDC_ACS('i') | ||
534 | #define ACS_BLOCK PDC_ACS('0') | ||
535 | |||
536 | /* That goes double for these -- undocumented SysV symbols. Don't use | ||
537 | them. */ | ||
538 | |||
539 | #define ACS_S3 PDC_ACS('p') | ||
540 | #define ACS_S7 PDC_ACS('r') | ||
541 | #define ACS_LEQUAL PDC_ACS('y') | ||
542 | #define ACS_GEQUAL PDC_ACS('z') | ||
543 | #define ACS_PI PDC_ACS('{') | ||
544 | #define ACS_NEQUAL PDC_ACS('|') | ||
545 | #define ACS_STERLING PDC_ACS('}') | ||
546 | |||
547 | /* Box char aliases */ | ||
548 | |||
549 | #define ACS_BSSB ACS_ULCORNER | ||
550 | #define ACS_SSBB ACS_LLCORNER | ||
551 | #define ACS_BBSS ACS_URCORNER | ||
552 | #define ACS_SBBS ACS_LRCORNER | ||
553 | #define ACS_SBSS ACS_RTEE | ||
554 | #define ACS_SSSB ACS_LTEE | ||
555 | #define ACS_SSBS ACS_BTEE | ||
556 | #define ACS_BSSS ACS_TTEE | ||
557 | #define ACS_BSBS ACS_HLINE | ||
558 | #define ACS_SBSB ACS_VLINE | ||
559 | #define ACS_SSSS ACS_PLUS | ||
560 | |||
561 | /* cchar_t aliases */ | ||
562 | |||
563 | #ifdef PDC_WIDE | ||
564 | # define WACS_ULCORNER (&(acs_map['l'])) | ||
565 | # define WACS_LLCORNER (&(acs_map['m'])) | ||
566 | # define WACS_URCORNER (&(acs_map['k'])) | ||
567 | # define WACS_LRCORNER (&(acs_map['j'])) | ||
568 | # define WACS_RTEE (&(acs_map['u'])) | ||
569 | # define WACS_LTEE (&(acs_map['t'])) | ||
570 | # define WACS_BTEE (&(acs_map['v'])) | ||
571 | # define WACS_TTEE (&(acs_map['w'])) | ||
572 | # define WACS_HLINE (&(acs_map['q'])) | ||
573 | # define WACS_VLINE (&(acs_map['x'])) | ||
574 | # define WACS_PLUS (&(acs_map['n'])) | ||
575 | |||
576 | # define WACS_S1 (&(acs_map['o'])) | ||
577 | # define WACS_S9 (&(acs_map['s'])) | ||
578 | # define WACS_DIAMOND (&(acs_map['`'])) | ||
579 | # define WACS_CKBOARD (&(acs_map['a'])) | ||
580 | # define WACS_DEGREE (&(acs_map['f'])) | ||
581 | # define WACS_PLMINUS (&(acs_map['g'])) | ||
582 | # define WACS_BULLET (&(acs_map['~'])) | ||
583 | |||
584 | # define WACS_LARROW (&(acs_map[','])) | ||
585 | # define WACS_RARROW (&(acs_map['+'])) | ||
586 | # define WACS_DARROW (&(acs_map['.'])) | ||
587 | # define WACS_UARROW (&(acs_map['-'])) | ||
588 | # define WACS_BOARD (&(acs_map['h'])) | ||
589 | # define WACS_LANTERN (&(acs_map['i'])) | ||
590 | # define WACS_BLOCK (&(acs_map['0'])) | ||
591 | |||
592 | # define WACS_S3 (&(acs_map['p'])) | ||
593 | # define WACS_S7 (&(acs_map['r'])) | ||
594 | # define WACS_LEQUAL (&(acs_map['y'])) | ||
595 | # define WACS_GEQUAL (&(acs_map['z'])) | ||
596 | # define WACS_PI (&(acs_map['{'])) | ||
597 | # define WACS_NEQUAL (&(acs_map['|'])) | ||
598 | # define WACS_STERLING (&(acs_map['}'])) | ||
599 | |||
600 | # define WACS_BSSB WACS_ULCORNER | ||
601 | # define WACS_SSBB WACS_LLCORNER | ||
602 | # define WACS_BBSS WACS_URCORNER | ||
603 | # define WACS_SBBS WACS_LRCORNER | ||
604 | # define WACS_SBSS WACS_RTEE | ||
605 | # define WACS_SSSB WACS_LTEE | ||
606 | # define WACS_SSBS WACS_BTEE | ||
607 | # define WACS_BSSS WACS_TTEE | ||
608 | # define WACS_BSBS WACS_HLINE | ||
609 | # define WACS_SBSB WACS_VLINE | ||
610 | # define WACS_SSSS WACS_PLUS | ||
611 | #endif | ||
612 | |||
613 | /*** Color macros ***/ | ||
614 | |||
615 | #define COLOR_BLACK 0 | ||
616 | |||
617 | #ifdef PDC_RGB /* RGB */ | ||
618 | # define COLOR_RED 1 | ||
619 | # define COLOR_GREEN 2 | ||
620 | # define COLOR_BLUE 4 | ||
621 | #else /* BGR */ | ||
622 | # define COLOR_BLUE 1 | ||
623 | # define COLOR_GREEN 2 | ||
624 | # define COLOR_RED 4 | ||
625 | #endif | ||
626 | |||
627 | #define COLOR_CYAN (COLOR_BLUE | COLOR_GREEN) | ||
628 | #define COLOR_MAGENTA (COLOR_RED | COLOR_BLUE) | ||
629 | #define COLOR_YELLOW (COLOR_RED | COLOR_GREEN) | ||
630 | |||
631 | #define COLOR_WHITE 7 | ||
632 | |||
633 | /*---------------------------------------------------------------------- | ||
634 | * | ||
635 | * Function and Keypad Key Definitions | ||
636 | * Many are just for compatibility | ||
637 | * | ||
638 | */ | ||
639 | |||
640 | #define KEY_CODE_YES 0x100 /* If get_wch() gives a key code */ | ||
641 | |||
642 | #define KEY_BREAK 0x101 /* Not on PC KBD */ | ||
643 | #define KEY_DOWN 0x102 /* Down arrow key */ | ||
644 | #define KEY_UP 0x103 /* Up arrow key */ | ||
645 | #define KEY_LEFT 0x104 /* Left arrow key */ | ||
646 | #define KEY_RIGHT 0x105 /* Right arrow key */ | ||
647 | #define KEY_HOME 0x106 /* home key */ | ||
648 | #define KEY_BACKSPACE 0x107 /* not on pc */ | ||
649 | #define KEY_F0 0x108 /* function keys; 64 reserved */ | ||
650 | |||
651 | #define KEY_DL 0x148 /* delete line */ | ||
652 | #define KEY_IL 0x149 /* insert line */ | ||
653 | #define KEY_DC 0x14a /* delete character */ | ||
654 | #define KEY_IC 0x14b /* insert char or enter ins mode */ | ||
655 | #define KEY_EIC 0x14c /* exit insert char mode */ | ||
656 | #define KEY_CLEAR 0x14d /* clear screen */ | ||
657 | #define KEY_EOS 0x14e /* clear to end of screen */ | ||
658 | #define KEY_EOL 0x14f /* clear to end of line */ | ||
659 | #define KEY_SF 0x150 /* scroll 1 line forward */ | ||
660 | #define KEY_SR 0x151 /* scroll 1 line back (reverse) */ | ||
661 | #define KEY_NPAGE 0x152 /* next page */ | ||
662 | #define KEY_PPAGE 0x153 /* previous page */ | ||
663 | #define KEY_STAB 0x154 /* set tab */ | ||
664 | #define KEY_CTAB 0x155 /* clear tab */ | ||
665 | #define KEY_CATAB 0x156 /* clear all tabs */ | ||
666 | #define KEY_ENTER 0x157 /* enter or send (unreliable) */ | ||
667 | #define KEY_SRESET 0x158 /* soft/reset (partial/unreliable) */ | ||
668 | #define KEY_RESET 0x159 /* reset/hard reset (unreliable) */ | ||
669 | #define KEY_PRINT 0x15a /* print/copy */ | ||
670 | #define KEY_LL 0x15b /* home down/bottom (lower left) */ | ||
671 | #define KEY_ABORT 0x15c /* abort/terminate key (any) */ | ||
672 | #define KEY_SHELP 0x15d /* short help */ | ||
673 | #define KEY_LHELP 0x15e /* long help */ | ||
674 | #define KEY_BTAB 0x15f /* Back tab key */ | ||
675 | #define KEY_BEG 0x160 /* beg(inning) key */ | ||
676 | #define KEY_CANCEL 0x161 /* cancel key */ | ||
677 | #define KEY_CLOSE 0x162 /* close key */ | ||
678 | #define KEY_COMMAND 0x163 /* cmd (command) key */ | ||
679 | #define KEY_COPY 0x164 /* copy key */ | ||
680 | #define KEY_CREATE 0x165 /* create key */ | ||
681 | #define KEY_END 0x166 /* end key */ | ||
682 | #define KEY_EXIT 0x167 /* exit key */ | ||
683 | #define KEY_FIND 0x168 /* find key */ | ||
684 | #define KEY_HELP 0x169 /* help key */ | ||
685 | #define KEY_MARK 0x16a /* mark key */ | ||
686 | #define KEY_MESSAGE 0x16b /* message key */ | ||
687 | #define KEY_MOVE 0x16c /* move key */ | ||
688 | #define KEY_NEXT 0x16d /* next object key */ | ||
689 | #define KEY_OPEN 0x16e /* open key */ | ||
690 | #define KEY_OPTIONS 0x16f /* options key */ | ||
691 | #define KEY_PREVIOUS 0x170 /* previous object key */ | ||
692 | #define KEY_REDO 0x171 /* redo key */ | ||
693 | #define KEY_REFERENCE 0x172 /* ref(erence) key */ | ||
694 | #define KEY_REFRESH 0x173 /* refresh key */ | ||
695 | #define KEY_REPLACE 0x174 /* replace key */ | ||
696 | #define KEY_RESTART 0x175 /* restart key */ | ||
697 | #define KEY_RESUME 0x176 /* resume key */ | ||
698 | #define KEY_SAVE 0x177 /* save key */ | ||
699 | #define KEY_SBEG 0x178 /* shifted beginning key */ | ||
700 | #define KEY_SCANCEL 0x179 /* shifted cancel key */ | ||
701 | #define KEY_SCOMMAND 0x17a /* shifted command key */ | ||
702 | #define KEY_SCOPY 0x17b /* shifted copy key */ | ||
703 | #define KEY_SCREATE 0x17c /* shifted create key */ | ||
704 | #define KEY_SDC 0x17d /* shifted delete char key */ | ||
705 | #define KEY_SDL 0x17e /* shifted delete line key */ | ||
706 | #define KEY_SELECT 0x17f /* select key */ | ||
707 | #define KEY_SEND 0x180 /* shifted end key */ | ||
708 | #define KEY_SEOL 0x181 /* shifted clear line key */ | ||
709 | #define KEY_SEXIT 0x182 /* shifted exit key */ | ||
710 | #define KEY_SFIND 0x183 /* shifted find key */ | ||
711 | #define KEY_SHOME 0x184 /* shifted home key */ | ||
712 | #define KEY_SIC 0x185 /* shifted input key */ | ||
713 | |||
714 | #define KEY_SLEFT 0x187 /* shifted left arrow key */ | ||
715 | #define KEY_SMESSAGE 0x188 /* shifted message key */ | ||
716 | #define KEY_SMOVE 0x189 /* shifted move key */ | ||
717 | #define KEY_SNEXT 0x18a /* shifted next key */ | ||
718 | #define KEY_SOPTIONS 0x18b /* shifted options key */ | ||
719 | #define KEY_SPREVIOUS 0x18c /* shifted prev key */ | ||
720 | #define KEY_SPRINT 0x18d /* shifted print key */ | ||
721 | #define KEY_SREDO 0x18e /* shifted redo key */ | ||
722 | #define KEY_SREPLACE 0x18f /* shifted replace key */ | ||
723 | #define KEY_SRIGHT 0x190 /* shifted right arrow */ | ||
724 | #define KEY_SRSUME 0x191 /* shifted resume key */ | ||
725 | #define KEY_SSAVE 0x192 /* shifted save key */ | ||
726 | #define KEY_SSUSPEND 0x193 /* shifted suspend key */ | ||
727 | #define KEY_SUNDO 0x194 /* shifted undo key */ | ||
728 | #define KEY_SUSPEND 0x195 /* suspend key */ | ||
729 | #define KEY_UNDO 0x196 /* undo key */ | ||
730 | |||
731 | /* PDCurses-specific key definitions -- PC only */ | ||
732 | |||
733 | #define ALT_0 0x197 | ||
734 | #define ALT_1 0x198 | ||
735 | #define ALT_2 0x199 | ||
736 | #define ALT_3 0x19a | ||
737 | #define ALT_4 0x19b | ||
738 | #define ALT_5 0x19c | ||
739 | #define ALT_6 0x19d | ||
740 | #define ALT_7 0x19e | ||
741 | #define ALT_8 0x19f | ||
742 | #define ALT_9 0x1a0 | ||
743 | #define ALT_A 0x1a1 | ||
744 | #define ALT_B 0x1a2 | ||
745 | #define ALT_C 0x1a3 | ||
746 | #define ALT_D 0x1a4 | ||
747 | #define ALT_E 0x1a5 | ||
748 | #define ALT_F 0x1a6 | ||
749 | #define ALT_G 0x1a7 | ||
750 | #define ALT_H 0x1a8 | ||
751 | #define ALT_I 0x1a9 | ||
752 | #define ALT_J 0x1aa | ||
753 | #define ALT_K 0x1ab | ||
754 | #define ALT_L 0x1ac | ||
755 | #define ALT_M 0x1ad | ||
756 | #define ALT_N 0x1ae | ||
757 | #define ALT_O 0x1af | ||
758 | #define ALT_P 0x1b0 | ||
759 | #define ALT_Q 0x1b1 | ||
760 | #define ALT_R 0x1b2 | ||
761 | #define ALT_S 0x1b3 | ||
762 | #define ALT_T 0x1b4 | ||
763 | #define ALT_U 0x1b5 | ||
764 | #define ALT_V 0x1b6 | ||
765 | #define ALT_W 0x1b7 | ||
766 | #define ALT_X 0x1b8 | ||
767 | #define ALT_Y 0x1b9 | ||
768 | #define ALT_Z 0x1ba | ||
769 | |||
770 | #define CTL_LEFT 0x1bb /* Control-Left-Arrow */ | ||
771 | #define CTL_RIGHT 0x1bc | ||
772 | #define CTL_PGUP 0x1bd | ||
773 | #define CTL_PGDN 0x1be | ||
774 | #define CTL_HOME 0x1bf | ||
775 | #define CTL_END 0x1c0 | ||
776 | |||
777 | #define KEY_A1 0x1c1 /* upper left on Virtual keypad */ | ||
778 | #define KEY_A2 0x1c2 /* upper middle on Virt. keypad */ | ||
779 | #define KEY_A3 0x1c3 /* upper right on Vir. keypad */ | ||
780 | #define KEY_B1 0x1c4 /* middle left on Virt. keypad */ | ||
781 | #define KEY_B2 0x1c5 /* center on Virt. keypad */ | ||
782 | #define KEY_B3 0x1c6 /* middle right on Vir. keypad */ | ||
783 | #define KEY_C1 0x1c7 /* lower left on Virt. keypad */ | ||
784 | #define KEY_C2 0x1c8 /* lower middle on Virt. keypad */ | ||
785 | #define KEY_C3 0x1c9 /* lower right on Vir. keypad */ | ||
786 | |||
787 | #define PADSLASH 0x1ca /* slash on keypad */ | ||
788 | #define PADENTER 0x1cb /* enter on keypad */ | ||
789 | #define CTL_PADENTER 0x1cc /* ctl-enter on keypad */ | ||
790 | #define ALT_PADENTER 0x1cd /* alt-enter on keypad */ | ||
791 | #define PADSTOP 0x1ce /* stop on keypad */ | ||
792 | #define PADSTAR 0x1cf /* star on keypad */ | ||
793 | #define PADMINUS 0x1d0 /* minus on keypad */ | ||
794 | #define PADPLUS 0x1d1 /* plus on keypad */ | ||
795 | #define CTL_PADSTOP 0x1d2 /* ctl-stop on keypad */ | ||
796 | #define CTL_PADCENTER 0x1d3 /* ctl-enter on keypad */ | ||
797 | #define CTL_PADPLUS 0x1d4 /* ctl-plus on keypad */ | ||
798 | #define CTL_PADMINUS 0x1d5 /* ctl-minus on keypad */ | ||
799 | #define CTL_PADSLASH 0x1d6 /* ctl-slash on keypad */ | ||
800 | #define CTL_PADSTAR 0x1d7 /* ctl-star on keypad */ | ||
801 | #define ALT_PADPLUS 0x1d8 /* alt-plus on keypad */ | ||
802 | #define ALT_PADMINUS 0x1d9 /* alt-minus on keypad */ | ||
803 | #define ALT_PADSLASH 0x1da /* alt-slash on keypad */ | ||
804 | #define ALT_PADSTAR 0x1db /* alt-star on keypad */ | ||
805 | #define ALT_PADSTOP 0x1dc /* alt-stop on keypad */ | ||
806 | #define CTL_INS 0x1dd /* ctl-insert */ | ||
807 | #define ALT_DEL 0x1de /* alt-delete */ | ||
808 | #define ALT_INS 0x1df /* alt-insert */ | ||
809 | #define CTL_UP 0x1e0 /* ctl-up arrow */ | ||
810 | #define CTL_DOWN 0x1e1 /* ctl-down arrow */ | ||
811 | #define CTL_TAB 0x1e2 /* ctl-tab */ | ||
812 | #define ALT_TAB 0x1e3 | ||
813 | #define ALT_MINUS 0x1e4 | ||
814 | #define ALT_EQUAL 0x1e5 | ||
815 | #define ALT_HOME 0x1e6 | ||
816 | #define ALT_PGUP 0x1e7 | ||
817 | #define ALT_PGDN 0x1e8 | ||
818 | #define ALT_END 0x1e9 | ||
819 | #define ALT_UP 0x1ea /* alt-up arrow */ | ||
820 | #define ALT_DOWN 0x1eb /* alt-down arrow */ | ||
821 | #define ALT_RIGHT 0x1ec /* alt-right arrow */ | ||
822 | #define ALT_LEFT 0x1ed /* alt-left arrow */ | ||
823 | #define ALT_ENTER 0x1ee /* alt-enter */ | ||
824 | #define ALT_ESC 0x1ef /* alt-escape */ | ||
825 | #define ALT_BQUOTE 0x1f0 /* alt-back quote */ | ||
826 | #define ALT_LBRACKET 0x1f1 /* alt-left bracket */ | ||
827 | #define ALT_RBRACKET 0x1f2 /* alt-right bracket */ | ||
828 | #define ALT_SEMICOLON 0x1f3 /* alt-semi-colon */ | ||
829 | #define ALT_FQUOTE 0x1f4 /* alt-forward quote */ | ||
830 | #define ALT_COMMA 0x1f5 /* alt-comma */ | ||
831 | #define ALT_STOP 0x1f6 /* alt-stop */ | ||
832 | #define ALT_FSLASH 0x1f7 /* alt-forward slash */ | ||
833 | #define ALT_BKSP 0x1f8 /* alt-backspace */ | ||
834 | #define CTL_BKSP 0x1f9 /* ctl-backspace */ | ||
835 | #define PAD0 0x1fa /* keypad 0 */ | ||
836 | |||
837 | #define CTL_PAD0 0x1fb /* ctl-keypad 0 */ | ||
838 | #define CTL_PAD1 0x1fc | ||
839 | #define CTL_PAD2 0x1fd | ||
840 | #define CTL_PAD3 0x1fe | ||
841 | #define CTL_PAD4 0x1ff | ||
842 | #define CTL_PAD5 0x200 | ||
843 | #define CTL_PAD6 0x201 | ||
844 | #define CTL_PAD7 0x202 | ||
845 | #define CTL_PAD8 0x203 | ||
846 | #define CTL_PAD9 0x204 | ||
847 | |||
848 | #define ALT_PAD0 0x205 /* alt-keypad 0 */ | ||
849 | #define ALT_PAD1 0x206 | ||
850 | #define ALT_PAD2 0x207 | ||
851 | #define ALT_PAD3 0x208 | ||
852 | #define ALT_PAD4 0x209 | ||
853 | #define ALT_PAD5 0x20a | ||
854 | #define ALT_PAD6 0x20b | ||
855 | #define ALT_PAD7 0x20c | ||
856 | #define ALT_PAD8 0x20d | ||
857 | #define ALT_PAD9 0x20e | ||
858 | |||
859 | #define CTL_DEL 0x20f /* clt-delete */ | ||
860 | #define ALT_BSLASH 0x210 /* alt-back slash */ | ||
861 | #define CTL_ENTER 0x211 /* ctl-enter */ | ||
862 | |||
863 | #define SHF_PADENTER 0x212 /* shift-enter on keypad */ | ||
864 | #define SHF_PADSLASH 0x213 /* shift-slash on keypad */ | ||
865 | #define SHF_PADSTAR 0x214 /* shift-star on keypad */ | ||
866 | #define SHF_PADPLUS 0x215 /* shift-plus on keypad */ | ||
867 | #define SHF_PADMINUS 0x216 /* shift-minus on keypad */ | ||
868 | #define SHF_UP 0x217 /* shift-up on keypad */ | ||
869 | #define SHF_DOWN 0x218 /* shift-down on keypad */ | ||
870 | #define SHF_IC 0x219 /* shift-insert on keypad */ | ||
871 | #define SHF_DC 0x21a /* shift-delete on keypad */ | ||
872 | |||
873 | #define KEY_MOUSE 0x21b /* "mouse" key */ | ||
874 | #define KEY_SHIFT_L 0x21c /* Left-shift */ | ||
875 | #define KEY_SHIFT_R 0x21d /* Right-shift */ | ||
876 | #define KEY_CONTROL_L 0x21e /* Left-control */ | ||
877 | #define KEY_CONTROL_R 0x21f /* Right-control */ | ||
878 | #define KEY_ALT_L 0x220 /* Left-alt */ | ||
879 | #define KEY_ALT_R 0x221 /* Right-alt */ | ||
880 | #define KEY_RESIZE 0x222 /* Window resize */ | ||
881 | #define KEY_SUP 0x223 /* Shifted up arrow */ | ||
882 | #define KEY_SDOWN 0x224 /* Shifted down arrow */ | ||
883 | |||
884 | #define KEY_MIN KEY_BREAK /* Minimum curses key value */ | ||
885 | #define KEY_MAX KEY_SDOWN /* Maximum curses key */ | ||
886 | |||
887 | #define KEY_F(n) (KEY_F0 + (n)) | ||
888 | |||
889 | /*---------------------------------------------------------------------- | ||
890 | * | ||
891 | * Functions | ||
892 | * | ||
893 | */ | ||
894 | |||
895 | /* Standard */ | ||
896 | |||
897 | PDCEX int addch(const chtype); | ||
898 | PDCEX int addchnstr(const chtype *, int); | ||
899 | PDCEX int addchstr(const chtype *); | ||
900 | PDCEX int addnstr(const char *, int); | ||
901 | PDCEX int addstr(const char *); | ||
902 | PDCEX int attroff(chtype); | ||
903 | PDCEX int attron(chtype); | ||
904 | PDCEX int attrset(chtype); | ||
905 | PDCEX int attr_get(attr_t *, short *, void *); | ||
906 | PDCEX int attr_off(attr_t, void *); | ||
907 | PDCEX int attr_on(attr_t, void *); | ||
908 | PDCEX int attr_set(attr_t, short, void *); | ||
909 | PDCEX int baudrate(void); | ||
910 | PDCEX int beep(void); | ||
911 | PDCEX int bkgd(chtype); | ||
912 | PDCEX void bkgdset(chtype); | ||
913 | PDCEX int border(chtype, chtype, chtype, chtype, | ||
914 | chtype, chtype, chtype, chtype); | ||
915 | PDCEX int box(WINDOW *, chtype, chtype); | ||
916 | PDCEX bool can_change_color(void); | ||
917 | PDCEX int cbreak(void); | ||
918 | PDCEX int chgat(int, attr_t, short, const void *); | ||
919 | PDCEX int clearok(WINDOW *, bool); | ||
920 | PDCEX int clear(void); | ||
921 | PDCEX int clrtobot(void); | ||
922 | PDCEX int clrtoeol(void); | ||
923 | PDCEX int color_content(short, short *, short *, short *); | ||
924 | PDCEX int color_set(short, void *); | ||
925 | PDCEX int copywin(const WINDOW *, WINDOW *, int, int, int, | ||
926 | int, int, int, int); | ||
927 | PDCEX int curs_set(int); | ||
928 | PDCEX int def_prog_mode(void); | ||
929 | PDCEX int def_shell_mode(void); | ||
930 | PDCEX int delay_output(int); | ||
931 | PDCEX int delch(void); | ||
932 | PDCEX int deleteln(void); | ||
933 | PDCEX void delscreen(SCREEN *); | ||
934 | PDCEX int delwin(WINDOW *); | ||
935 | PDCEX WINDOW *derwin(WINDOW *, int, int, int, int); | ||
936 | PDCEX int doupdate(void); | ||
937 | PDCEX WINDOW *dupwin(WINDOW *); | ||
938 | PDCEX int echochar(const chtype); | ||
939 | PDCEX int echo(void); | ||
940 | PDCEX int endwin(void); | ||
941 | PDCEX char erasechar(void); | ||
942 | PDCEX int erase(void); | ||
943 | PDCEX void filter(void); | ||
944 | PDCEX int flash(void); | ||
945 | PDCEX int flushinp(void); | ||
946 | PDCEX chtype getbkgd(WINDOW *); | ||
947 | PDCEX int getnstr(char *, int); | ||
948 | PDCEX int getstr(char *); | ||
949 | PDCEX WINDOW *getwin(FILE *); | ||
950 | PDCEX int halfdelay(int); | ||
951 | PDCEX bool has_colors(void); | ||
952 | PDCEX bool has_ic(void); | ||
953 | PDCEX bool has_il(void); | ||
954 | PDCEX int hline(chtype, int); | ||
955 | PDCEX void idcok(WINDOW *, bool); | ||
956 | PDCEX int idlok(WINDOW *, bool); | ||
957 | PDCEX void immedok(WINDOW *, bool); | ||
958 | PDCEX int inchnstr(chtype *, int); | ||
959 | PDCEX int inchstr(chtype *); | ||
960 | PDCEX chtype inch(void); | ||
961 | PDCEX int init_color(short, short, short, short); | ||
962 | PDCEX int init_pair(short, short, short); | ||
963 | PDCEX WINDOW *initscr(void); | ||
964 | PDCEX int innstr(char *, int); | ||
965 | PDCEX int insch(chtype); | ||
966 | PDCEX int insdelln(int); | ||
967 | PDCEX int insertln(void); | ||
968 | PDCEX int insnstr(const char *, int); | ||
969 | PDCEX int insstr(const char *); | ||
970 | PDCEX int instr(char *); | ||
971 | PDCEX int intrflush(WINDOW *, bool); | ||
972 | PDCEX bool isendwin(void); | ||
973 | PDCEX bool is_linetouched(WINDOW *, int); | ||
974 | PDCEX bool is_wintouched(WINDOW *); | ||
975 | PDCEX char *keyname(int); | ||
976 | PDCEX int keypad(WINDOW *, bool); | ||
977 | PDCEX char killchar(void); | ||
978 | PDCEX int leaveok(WINDOW *, bool); | ||
979 | PDCEX char *longname(void); | ||
980 | PDCEX int meta(WINDOW *, bool); | ||
981 | PDCEX int move(int, int); | ||
982 | PDCEX int mvaddch(int, int, const chtype); | ||
983 | PDCEX int mvaddchnstr(int, int, const chtype *, int); | ||
984 | PDCEX int mvaddchstr(int, int, const chtype *); | ||
985 | PDCEX int mvaddnstr(int, int, const char *, int); | ||
986 | PDCEX int mvaddstr(int, int, const char *); | ||
987 | PDCEX int mvchgat(int, int, int, attr_t, short, const void *); | ||
988 | PDCEX int mvcur(int, int, int, int); | ||
989 | PDCEX int mvdelch(int, int); | ||
990 | PDCEX int mvderwin(WINDOW *, int, int); | ||
991 | PDCEX int mvgetch(int, int); | ||
992 | PDCEX int mvgetnstr(int, int, char *, int); | ||
993 | PDCEX int mvgetstr(int, int, char *); | ||
994 | PDCEX int mvhline(int, int, chtype, int); | ||
995 | PDCEX chtype mvinch(int, int); | ||
996 | PDCEX int mvinchnstr(int, int, chtype *, int); | ||
997 | PDCEX int mvinchstr(int, int, chtype *); | ||
998 | PDCEX int mvinnstr(int, int, char *, int); | ||
999 | PDCEX int mvinsch(int, int, chtype); | ||
1000 | PDCEX int mvinsnstr(int, int, const char *, int); | ||
1001 | PDCEX int mvinsstr(int, int, const char *); | ||
1002 | PDCEX int mvinstr(int, int, char *); | ||
1003 | PDCEX int mvprintw(int, int, const char *, ...); | ||
1004 | PDCEX int mvscanw(int, int, const char *, ...); | ||
1005 | PDCEX int mvvline(int, int, chtype, int); | ||
1006 | PDCEX int mvwaddchnstr(WINDOW *, int, int, const chtype *, int); | ||
1007 | PDCEX int mvwaddchstr(WINDOW *, int, int, const chtype *); | ||
1008 | PDCEX int mvwaddch(WINDOW *, int, int, const chtype); | ||
1009 | PDCEX int mvwaddnstr(WINDOW *, int, int, const char *, int); | ||
1010 | PDCEX int mvwaddstr(WINDOW *, int, int, const char *); | ||
1011 | PDCEX int mvwchgat(WINDOW *, int, int, int, attr_t, short, const void *); | ||
1012 | PDCEX int mvwdelch(WINDOW *, int, int); | ||
1013 | PDCEX int mvwgetch(WINDOW *, int, int); | ||
1014 | PDCEX int mvwgetnstr(WINDOW *, int, int, char *, int); | ||
1015 | PDCEX int mvwgetstr(WINDOW *, int, int, char *); | ||
1016 | PDCEX int mvwhline(WINDOW *, int, int, chtype, int); | ||
1017 | PDCEX int mvwinchnstr(WINDOW *, int, int, chtype *, int); | ||
1018 | PDCEX int mvwinchstr(WINDOW *, int, int, chtype *); | ||
1019 | PDCEX chtype mvwinch(WINDOW *, int, int); | ||
1020 | PDCEX int mvwinnstr(WINDOW *, int, int, char *, int); | ||
1021 | PDCEX int mvwinsch(WINDOW *, int, int, chtype); | ||
1022 | PDCEX int mvwinsnstr(WINDOW *, int, int, const char *, int); | ||
1023 | PDCEX int mvwinsstr(WINDOW *, int, int, const char *); | ||
1024 | PDCEX int mvwinstr(WINDOW *, int, int, char *); | ||
1025 | PDCEX int mvwin(WINDOW *, int, int); | ||
1026 | PDCEX int mvwprintw(WINDOW *, int, int, const char *, ...); | ||
1027 | PDCEX int mvwscanw(WINDOW *, int, int, const char *, ...); | ||
1028 | PDCEX int mvwvline(WINDOW *, int, int, chtype, int); | ||
1029 | PDCEX int napms(int); | ||
1030 | PDCEX WINDOW *newpad(int, int); | ||
1031 | PDCEX SCREEN *newterm(const char *, FILE *, FILE *); | ||
1032 | PDCEX WINDOW *newwin(int, int, int, int); | ||
1033 | PDCEX int nl(void); | ||
1034 | PDCEX int nocbreak(void); | ||
1035 | PDCEX int nodelay(WINDOW *, bool); | ||
1036 | PDCEX int noecho(void); | ||
1037 | PDCEX int nonl(void); | ||
1038 | PDCEX void noqiflush(void); | ||
1039 | PDCEX int noraw(void); | ||
1040 | PDCEX int notimeout(WINDOW *, bool); | ||
1041 | PDCEX int overlay(const WINDOW *, WINDOW *); | ||
1042 | PDCEX int overwrite(const WINDOW *, WINDOW *); | ||
1043 | PDCEX int pair_content(short, short *, short *); | ||
1044 | PDCEX int pechochar(WINDOW *, chtype); | ||
1045 | PDCEX int pnoutrefresh(WINDOW *, int, int, int, int, int, int); | ||
1046 | PDCEX int prefresh(WINDOW *, int, int, int, int, int, int); | ||
1047 | PDCEX int printw(const char *, ...); | ||
1048 | PDCEX int putwin(WINDOW *, FILE *); | ||
1049 | PDCEX void qiflush(void); | ||
1050 | PDCEX int raw(void); | ||
1051 | PDCEX int redrawwin(WINDOW *); | ||
1052 | PDCEX int refresh(void); | ||
1053 | PDCEX int reset_prog_mode(void); | ||
1054 | PDCEX int reset_shell_mode(void); | ||
1055 | PDCEX int resetty(void); | ||
1056 | PDCEX int ripoffline(int, int (*)(WINDOW *, int)); | ||
1057 | PDCEX int savetty(void); | ||
1058 | PDCEX int scanw(const char *, ...); | ||
1059 | PDCEX int scr_dump(const char *); | ||
1060 | PDCEX int scr_init(const char *); | ||
1061 | PDCEX int scr_restore(const char *); | ||
1062 | PDCEX int scr_set(const char *); | ||
1063 | PDCEX int scrl(int); | ||
1064 | PDCEX int scroll(WINDOW *); | ||
1065 | PDCEX int scrollok(WINDOW *, bool); | ||
1066 | PDCEX SCREEN *set_term(SCREEN *); | ||
1067 | PDCEX int setscrreg(int, int); | ||
1068 | PDCEX int slk_attroff(const chtype); | ||
1069 | PDCEX int slk_attr_off(const attr_t, void *); | ||
1070 | PDCEX int slk_attron(const chtype); | ||
1071 | PDCEX int slk_attr_on(const attr_t, void *); | ||
1072 | PDCEX int slk_attrset(const chtype); | ||
1073 | PDCEX int slk_attr_set(const attr_t, short, void *); | ||
1074 | PDCEX int slk_clear(void); | ||
1075 | PDCEX int slk_color(short); | ||
1076 | PDCEX int slk_init(int); | ||
1077 | PDCEX char *slk_label(int); | ||
1078 | PDCEX int slk_noutrefresh(void); | ||
1079 | PDCEX int slk_refresh(void); | ||
1080 | PDCEX int slk_restore(void); | ||
1081 | PDCEX int slk_set(int, const char *, int); | ||
1082 | PDCEX int slk_touch(void); | ||
1083 | PDCEX int standend(void); | ||
1084 | PDCEX int standout(void); | ||
1085 | PDCEX int start_color(void); | ||
1086 | PDCEX WINDOW *subpad(WINDOW *, int, int, int, int); | ||
1087 | PDCEX WINDOW *subwin(WINDOW *, int, int, int, int); | ||
1088 | PDCEX int syncok(WINDOW *, bool); | ||
1089 | PDCEX chtype termattrs(void); | ||
1090 | PDCEX attr_t term_attrs(void); | ||
1091 | PDCEX char *termname(void); | ||
1092 | PDCEX void timeout(int); | ||
1093 | PDCEX int touchline(WINDOW *, int, int); | ||
1094 | PDCEX int touchwin(WINDOW *); | ||
1095 | PDCEX int typeahead(int); | ||
1096 | PDCEX int untouchwin(WINDOW *); | ||
1097 | PDCEX void use_env(bool); | ||
1098 | PDCEX int vidattr(chtype); | ||
1099 | PDCEX int vid_attr(attr_t, short, void *); | ||
1100 | PDCEX int vidputs(chtype, int (*)(int)); | ||
1101 | PDCEX int vid_puts(attr_t, short, void *, int (*)(int)); | ||
1102 | PDCEX int vline(chtype, int); | ||
1103 | PDCEX int vw_printw(WINDOW *, const char *, va_list); | ||
1104 | PDCEX int vwprintw(WINDOW *, const char *, va_list); | ||
1105 | PDCEX int vw_scanw(WINDOW *, const char *, va_list); | ||
1106 | PDCEX int vwscanw(WINDOW *, const char *, va_list); | ||
1107 | PDCEX int waddchnstr(WINDOW *, const chtype *, int); | ||
1108 | PDCEX int waddchstr(WINDOW *, const chtype *); | ||
1109 | PDCEX int waddch(WINDOW *, const chtype); | ||
1110 | PDCEX int waddnstr(WINDOW *, const char *, int); | ||
1111 | PDCEX int waddstr(WINDOW *, const char *); | ||
1112 | PDCEX int wattroff(WINDOW *, chtype); | ||
1113 | PDCEX int wattron(WINDOW *, chtype); | ||
1114 | PDCEX int wattrset(WINDOW *, chtype); | ||
1115 | PDCEX int wattr_get(WINDOW *, attr_t *, short *, void *); | ||
1116 | PDCEX int wattr_off(WINDOW *, attr_t, void *); | ||
1117 | PDCEX int wattr_on(WINDOW *, attr_t, void *); | ||
1118 | PDCEX int wattr_set(WINDOW *, attr_t, short, void *); | ||
1119 | PDCEX void wbkgdset(WINDOW *, chtype); | ||
1120 | PDCEX int wbkgd(WINDOW *, chtype); | ||
1121 | PDCEX int wborder(WINDOW *, chtype, chtype, chtype, chtype, | ||
1122 | chtype, chtype, chtype, chtype); | ||
1123 | PDCEX int wchgat(WINDOW *, int, attr_t, short, const void *); | ||
1124 | PDCEX int wclear(WINDOW *); | ||
1125 | PDCEX int wclrtobot(WINDOW *); | ||
1126 | PDCEX int wclrtoeol(WINDOW *); | ||
1127 | PDCEX int wcolor_set(WINDOW *, short, void *); | ||
1128 | PDCEX void wcursyncup(WINDOW *); | ||
1129 | PDCEX int wdelch(WINDOW *); | ||
1130 | PDCEX int wdeleteln(WINDOW *); | ||
1131 | PDCEX int wechochar(WINDOW *, const chtype); | ||
1132 | PDCEX int werase(WINDOW *); | ||
1133 | PDCEX int wgetch(WINDOW *); | ||
1134 | PDCEX int wgetnstr(WINDOW *, char *, int); | ||
1135 | PDCEX int wgetstr(WINDOW *, char *); | ||
1136 | PDCEX int whline(WINDOW *, chtype, int); | ||
1137 | PDCEX int winchnstr(WINDOW *, chtype *, int); | ||
1138 | PDCEX int winchstr(WINDOW *, chtype *); | ||
1139 | PDCEX chtype winch(WINDOW *); | ||
1140 | PDCEX int winnstr(WINDOW *, char *, int); | ||
1141 | PDCEX int winsch(WINDOW *, chtype); | ||
1142 | PDCEX int winsdelln(WINDOW *, int); | ||
1143 | PDCEX int winsertln(WINDOW *); | ||
1144 | PDCEX int winsnstr(WINDOW *, const char *, int); | ||
1145 | PDCEX int winsstr(WINDOW *, const char *); | ||
1146 | PDCEX int winstr(WINDOW *, char *); | ||
1147 | PDCEX int wmove(WINDOW *, int, int); | ||
1148 | PDCEX int wnoutrefresh(WINDOW *); | ||
1149 | PDCEX int wprintw(WINDOW *, const char *, ...); | ||
1150 | PDCEX int wredrawln(WINDOW *, int, int); | ||
1151 | PDCEX int wrefresh(WINDOW *); | ||
1152 | PDCEX int wscanw(WINDOW *, const char *, ...); | ||
1153 | PDCEX int wscrl(WINDOW *, int); | ||
1154 | PDCEX int wsetscrreg(WINDOW *, int, int); | ||
1155 | PDCEX int wstandend(WINDOW *); | ||
1156 | PDCEX int wstandout(WINDOW *); | ||
1157 | PDCEX void wsyncdown(WINDOW *); | ||
1158 | PDCEX void wsyncup(WINDOW *); | ||
1159 | PDCEX void wtimeout(WINDOW *, int); | ||
1160 | PDCEX int wtouchln(WINDOW *, int, int, int); | ||
1161 | PDCEX int wvline(WINDOW *, chtype, int); | ||
1162 | |||
1163 | /* Wide-character functions */ | ||
1164 | |||
1165 | #ifdef PDC_WIDE | ||
1166 | PDCEX int addnwstr(const wchar_t *, int); | ||
1167 | PDCEX int addwstr(const wchar_t *); | ||
1168 | PDCEX int add_wch(const cchar_t *); | ||
1169 | PDCEX int add_wchnstr(const cchar_t *, int); | ||
1170 | PDCEX int add_wchstr(const cchar_t *); | ||
1171 | PDCEX int bkgrnd(const cchar_t *); | ||
1172 | PDCEX void bkgrndset(const cchar_t *); | ||
1173 | PDCEX int border_set(const cchar_t *, const cchar_t *, const cchar_t *, | ||
1174 | const cchar_t *, const cchar_t *, const cchar_t *, | ||
1175 | const cchar_t *, const cchar_t *); | ||
1176 | PDCEX int box_set(WINDOW *, const cchar_t *, const cchar_t *); | ||
1177 | PDCEX int echo_wchar(const cchar_t *); | ||
1178 | PDCEX int erasewchar(wchar_t *); | ||
1179 | PDCEX int getbkgrnd(cchar_t *); | ||
1180 | PDCEX int getcchar(const cchar_t *, wchar_t *, attr_t *, short *, void *); | ||
1181 | PDCEX int getn_wstr(wint_t *, int); | ||
1182 | PDCEX int get_wch(wint_t *); | ||
1183 | PDCEX int get_wstr(wint_t *); | ||
1184 | PDCEX int hline_set(const cchar_t *, int); | ||
1185 | PDCEX int innwstr(wchar_t *, int); | ||
1186 | PDCEX int ins_nwstr(const wchar_t *, int); | ||
1187 | PDCEX int ins_wch(const cchar_t *); | ||
1188 | PDCEX int ins_wstr(const wchar_t *); | ||
1189 | PDCEX int inwstr(wchar_t *); | ||
1190 | PDCEX int in_wch(cchar_t *); | ||
1191 | PDCEX int in_wchnstr(cchar_t *, int); | ||
1192 | PDCEX int in_wchstr(cchar_t *); | ||
1193 | PDCEX char *key_name(wchar_t); | ||
1194 | PDCEX int killwchar(wchar_t *); | ||
1195 | PDCEX int mvaddnwstr(int, int, const wchar_t *, int); | ||
1196 | PDCEX int mvaddwstr(int, int, const wchar_t *); | ||
1197 | PDCEX int mvadd_wch(int, int, const cchar_t *); | ||
1198 | PDCEX int mvadd_wchnstr(int, int, const cchar_t *, int); | ||
1199 | PDCEX int mvadd_wchstr(int, int, const cchar_t *); | ||
1200 | PDCEX int mvgetn_wstr(int, int, wint_t *, int); | ||
1201 | PDCEX int mvget_wch(int, int, wint_t *); | ||
1202 | PDCEX int mvget_wstr(int, int, wint_t *); | ||
1203 | PDCEX int mvhline_set(int, int, const cchar_t *, int); | ||
1204 | PDCEX int mvinnwstr(int, int, wchar_t *, int); | ||
1205 | PDCEX int mvins_nwstr(int, int, const wchar_t *, int); | ||
1206 | PDCEX int mvins_wch(int, int, const cchar_t *); | ||
1207 | PDCEX int mvins_wstr(int, int, const wchar_t *); | ||
1208 | PDCEX int mvinwstr(int, int, wchar_t *); | ||
1209 | PDCEX int mvin_wch(int, int, cchar_t *); | ||
1210 | PDCEX int mvin_wchnstr(int, int, cchar_t *, int); | ||
1211 | PDCEX int mvin_wchstr(int, int, cchar_t *); | ||
1212 | PDCEX int mvvline_set(int, int, const cchar_t *, int); | ||
1213 | PDCEX int mvwaddnwstr(WINDOW *, int, int, const wchar_t *, int); | ||
1214 | PDCEX int mvwaddwstr(WINDOW *, int, int, const wchar_t *); | ||
1215 | PDCEX int mvwadd_wch(WINDOW *, int, int, const cchar_t *); | ||
1216 | PDCEX int mvwadd_wchnstr(WINDOW *, int, int, const cchar_t *, int); | ||
1217 | PDCEX int mvwadd_wchstr(WINDOW *, int, int, const cchar_t *); | ||
1218 | PDCEX int mvwgetn_wstr(WINDOW *, int, int, wint_t *, int); | ||
1219 | PDCEX int mvwget_wch(WINDOW *, int, int, wint_t *); | ||
1220 | PDCEX int mvwget_wstr(WINDOW *, int, int, wint_t *); | ||
1221 | PDCEX int mvwhline_set(WINDOW *, int, int, const cchar_t *, int); | ||
1222 | PDCEX int mvwinnwstr(WINDOW *, int, int, wchar_t *, int); | ||
1223 | PDCEX int mvwins_nwstr(WINDOW *, int, int, const wchar_t *, int); | ||
1224 | PDCEX int mvwins_wch(WINDOW *, int, int, const cchar_t *); | ||
1225 | PDCEX int mvwins_wstr(WINDOW *, int, int, const wchar_t *); | ||
1226 | PDCEX int mvwin_wch(WINDOW *, int, int, cchar_t *); | ||
1227 | PDCEX int mvwin_wchnstr(WINDOW *, int, int, cchar_t *, int); | ||
1228 | PDCEX int mvwin_wchstr(WINDOW *, int, int, cchar_t *); | ||
1229 | PDCEX int mvwinwstr(WINDOW *, int, int, wchar_t *); | ||
1230 | PDCEX int mvwvline_set(WINDOW *, int, int, const cchar_t *, int); | ||
1231 | PDCEX int pecho_wchar(WINDOW *, const cchar_t*); | ||
1232 | PDCEX int setcchar(cchar_t*, const wchar_t*, const attr_t, | ||
1233 | short, const void*); | ||
1234 | PDCEX int slk_wset(int, const wchar_t *, int); | ||
1235 | PDCEX int unget_wch(const wchar_t); | ||
1236 | PDCEX int vline_set(const cchar_t *, int); | ||
1237 | PDCEX int waddnwstr(WINDOW *, const wchar_t *, int); | ||
1238 | PDCEX int waddwstr(WINDOW *, const wchar_t *); | ||
1239 | PDCEX int wadd_wch(WINDOW *, const cchar_t *); | ||
1240 | PDCEX int wadd_wchnstr(WINDOW *, const cchar_t *, int); | ||
1241 | PDCEX int wadd_wchstr(WINDOW *, const cchar_t *); | ||
1242 | PDCEX int wbkgrnd(WINDOW *, const cchar_t *); | ||
1243 | PDCEX void wbkgrndset(WINDOW *, const cchar_t *); | ||
1244 | PDCEX int wborder_set(WINDOW *, const cchar_t *, const cchar_t *, | ||
1245 | const cchar_t *, const cchar_t *, const cchar_t *, | ||
1246 | const cchar_t *, const cchar_t *, const cchar_t *); | ||
1247 | PDCEX int wecho_wchar(WINDOW *, const cchar_t *); | ||
1248 | PDCEX int wgetbkgrnd(WINDOW *, cchar_t *); | ||
1249 | PDCEX int wgetn_wstr(WINDOW *, wint_t *, int); | ||
1250 | PDCEX int wget_wch(WINDOW *, wint_t *); | ||
1251 | PDCEX int wget_wstr(WINDOW *, wint_t *); | ||
1252 | PDCEX int whline_set(WINDOW *, const cchar_t *, int); | ||
1253 | PDCEX int winnwstr(WINDOW *, wchar_t *, int); | ||
1254 | PDCEX int wins_nwstr(WINDOW *, const wchar_t *, int); | ||
1255 | PDCEX int wins_wch(WINDOW *, const cchar_t *); | ||
1256 | PDCEX int wins_wstr(WINDOW *, const wchar_t *); | ||
1257 | PDCEX int winwstr(WINDOW *, wchar_t *); | ||
1258 | PDCEX int win_wch(WINDOW *, cchar_t *); | ||
1259 | PDCEX int win_wchnstr(WINDOW *, cchar_t *, int); | ||
1260 | PDCEX int win_wchstr(WINDOW *, cchar_t *); | ||
1261 | PDCEX wchar_t *wunctrl(cchar_t *); | ||
1262 | PDCEX int wvline_set(WINDOW *, const cchar_t *, int); | ||
1263 | #endif | ||
1264 | |||
1265 | /* Quasi-standard */ | ||
1266 | |||
1267 | PDCEX chtype getattrs(WINDOW *); | ||
1268 | PDCEX int getbegx(WINDOW *); | ||
1269 | PDCEX int getbegy(WINDOW *); | ||
1270 | PDCEX int getmaxx(WINDOW *); | ||
1271 | PDCEX int getmaxy(WINDOW *); | ||
1272 | PDCEX int getparx(WINDOW *); | ||
1273 | PDCEX int getpary(WINDOW *); | ||
1274 | PDCEX int getcurx(WINDOW *); | ||
1275 | PDCEX int getcury(WINDOW *); | ||
1276 | PDCEX void traceoff(void); | ||
1277 | PDCEX void traceon(void); | ||
1278 | PDCEX char *unctrl(chtype); | ||
1279 | |||
1280 | PDCEX int crmode(void); | ||
1281 | PDCEX int nocrmode(void); | ||
1282 | PDCEX int draino(int); | ||
1283 | PDCEX int resetterm(void); | ||
1284 | PDCEX int fixterm(void); | ||
1285 | PDCEX int saveterm(void); | ||
1286 | PDCEX void setsyx(int, int); | ||
1287 | |||
1288 | PDCEX int mouse_set(mmask_t); | ||
1289 | PDCEX int mouse_on(mmask_t); | ||
1290 | PDCEX int mouse_off(mmask_t); | ||
1291 | PDCEX int request_mouse_pos(void); | ||
1292 | PDCEX void wmouse_position(WINDOW *, int *, int *); | ||
1293 | PDCEX mmask_t getmouse(void); | ||
1294 | |||
1295 | /* ncurses */ | ||
1296 | |||
1297 | PDCEX int alloc_pair(int, int); | ||
1298 | PDCEX int assume_default_colors(int, int); | ||
1299 | PDCEX const char *curses_version(void); | ||
1300 | PDCEX int find_pair(int, int); | ||
1301 | PDCEX int free_pair(int); | ||
1302 | PDCEX bool has_key(int); | ||
1303 | PDCEX bool is_cleared(const WINDOW *); | ||
1304 | PDCEX bool is_idcok(const WINDOW *); | ||
1305 | PDCEX bool is_idlok(const WINDOW *); | ||
1306 | PDCEX bool is_immedok(const WINDOW *); | ||
1307 | PDCEX bool is_keypad(const WINDOW *); | ||
1308 | PDCEX bool is_leaveok(const WINDOW *); | ||
1309 | PDCEX bool is_nodelay(const WINDOW *); | ||
1310 | PDCEX bool is_notimeout(const WINDOW *); | ||
1311 | PDCEX bool is_pad(const WINDOW *); | ||
1312 | PDCEX bool is_scrollok(const WINDOW *); | ||
1313 | PDCEX bool is_subwin(const WINDOW *); | ||
1314 | PDCEX bool is_syncok(const WINDOW *); | ||
1315 | PDCEX int set_tabsize(int); | ||
1316 | PDCEX int use_default_colors(void); | ||
1317 | PDCEX int wgetdelay(const WINDOW *); | ||
1318 | PDCEX WINDOW *wgetparent(const WINDOW *); | ||
1319 | PDCEX int wgetscrreg(const WINDOW *, int *, int *); | ||
1320 | PDCEX int wresize(WINDOW *, int, int); | ||
1321 | |||
1322 | PDCEX bool has_mouse(void); | ||
1323 | PDCEX int mouseinterval(int); | ||
1324 | PDCEX mmask_t mousemask(mmask_t, mmask_t *); | ||
1325 | PDCEX bool mouse_trafo(int *, int *, bool); | ||
1326 | PDCEX int nc_getmouse(MEVENT *); | ||
1327 | PDCEX int ungetmouse(MEVENT *); | ||
1328 | PDCEX bool wenclose(const WINDOW *, int, int); | ||
1329 | PDCEX bool wmouse_trafo(const WINDOW *, int *, int *, bool); | ||
1330 | |||
1331 | /* PDCurses */ | ||
1332 | |||
1333 | PDCEX int addrawch(chtype); | ||
1334 | PDCEX int insrawch(chtype); | ||
1335 | PDCEX bool is_termresized(void); | ||
1336 | PDCEX int mvaddrawch(int, int, chtype); | ||
1337 | PDCEX int mvdeleteln(int, int); | ||
1338 | PDCEX int mvinsertln(int, int); | ||
1339 | PDCEX int mvinsrawch(int, int, chtype); | ||
1340 | PDCEX int mvwaddrawch(WINDOW *, int, int, chtype); | ||
1341 | PDCEX int mvwdeleteln(WINDOW *, int, int); | ||
1342 | PDCEX int mvwinsertln(WINDOW *, int, int); | ||
1343 | PDCEX int mvwinsrawch(WINDOW *, int, int, chtype); | ||
1344 | PDCEX int raw_output(bool); | ||
1345 | PDCEX int resize_term(int, int); | ||
1346 | PDCEX WINDOW *resize_window(WINDOW *, int, int); | ||
1347 | PDCEX int waddrawch(WINDOW *, chtype); | ||
1348 | PDCEX int winsrawch(WINDOW *, chtype); | ||
1349 | PDCEX char wordchar(void); | ||
1350 | |||
1351 | #ifdef PDC_WIDE | ||
1352 | PDCEX wchar_t *slk_wlabel(int); | ||
1353 | #endif | ||
1354 | |||
1355 | PDCEX void PDC_debug(const char *, ...); | ||
1356 | PDCEX void PDC_get_version(PDC_VERSION *); | ||
1357 | PDCEX int PDC_ungetch(int); | ||
1358 | PDCEX int PDC_set_blink(bool); | ||
1359 | PDCEX int PDC_set_bold(bool); | ||
1360 | PDCEX int PDC_set_line_color(short); | ||
1361 | PDCEX void PDC_set_title(const char *); | ||
1362 | |||
1363 | PDCEX int PDC_clearclipboard(void); | ||
1364 | PDCEX int PDC_freeclipboard(char *); | ||
1365 | PDCEX int PDC_getclipboard(char **, long *); | ||
1366 | PDCEX int PDC_setclipboard(const char *, long); | ||
1367 | |||
1368 | PDCEX unsigned long PDC_get_key_modifiers(void); | ||
1369 | PDCEX int PDC_return_key_modifiers(bool); | ||
1370 | |||
1371 | #ifdef XCURSES | ||
1372 | PDCEX WINDOW *Xinitscr(int, char **); | ||
1373 | PDCEX void XCursesExit(void); | ||
1374 | PDCEX int sb_init(void); | ||
1375 | PDCEX int sb_set_horz(int, int, int); | ||
1376 | PDCEX int sb_set_vert(int, int, int); | ||
1377 | PDCEX int sb_get_horz(int *, int *, int *); | ||
1378 | PDCEX int sb_get_vert(int *, int *, int *); | ||
1379 | PDCEX int sb_refresh(void); | ||
1380 | #endif | ||
1381 | |||
1382 | /* NetBSD */ | ||
1383 | |||
1384 | PDCEX int touchoverlap(const WINDOW *, WINDOW *); | ||
1385 | PDCEX int underend(void); | ||
1386 | PDCEX int underscore(void); | ||
1387 | PDCEX int wunderend(WINDOW *); | ||
1388 | PDCEX int wunderscore(WINDOW *); | ||
1389 | |||
1390 | /*** Functions defined as macros ***/ | ||
1391 | |||
1392 | /* getch() and ungetch() conflict with some DOS libraries */ | ||
1393 | |||
1394 | #define getch() wgetch(stdscr) | ||
1395 | #define ungetch(ch) PDC_ungetch(ch) | ||
1396 | |||
1397 | #define COLOR_PAIR(n) (((chtype)(n) << PDC_COLOR_SHIFT) & A_COLOR) | ||
1398 | #define PAIR_NUMBER(n) (((n) & A_COLOR) >> PDC_COLOR_SHIFT) | ||
1399 | |||
1400 | /* These will _only_ work as macros */ | ||
1401 | |||
1402 | #define getbegyx(w, y, x) (y = getbegy(w), x = getbegx(w)) | ||
1403 | #define getmaxyx(w, y, x) (y = getmaxy(w), x = getmaxx(w)) | ||
1404 | #define getparyx(w, y, x) (y = getpary(w), x = getparx(w)) | ||
1405 | #define getyx(w, y, x) (y = getcury(w), x = getcurx(w)) | ||
1406 | |||
1407 | #define getsyx(y, x) { if (curscr->_leaveit) (y)=(x)=-1; \ | ||
1408 | else getyx(curscr,(y),(x)); } | ||
1409 | |||
1410 | #ifdef NCURSES_MOUSE_VERSION | ||
1411 | # define getmouse(x) nc_getmouse(x) | ||
1412 | #endif | ||
1413 | |||
1414 | /* Deprecated */ | ||
1415 | |||
1416 | #define PDC_save_key_modifiers(x) (OK) | ||
1417 | #define PDC_get_input_fd() 0 | ||
1418 | |||
1419 | /* return codes from PDC_getclipboard() and PDC_setclipboard() calls */ | ||
1420 | |||
1421 | #define PDC_CLIP_SUCCESS 0 | ||
1422 | #define PDC_CLIP_ACCESS_ERROR 1 | ||
1423 | #define PDC_CLIP_EMPTY 2 | ||
1424 | #define PDC_CLIP_MEMORY_ERROR 3 | ||
1425 | |||
1426 | /* PDCurses key modifier masks */ | ||
1427 | |||
1428 | #define PDC_KEY_MODIFIER_SHIFT 1 | ||
1429 | #define PDC_KEY_MODIFIER_CONTROL 2 | ||
1430 | #define PDC_KEY_MODIFIER_ALT 4 | ||
1431 | #define PDC_KEY_MODIFIER_NUMLOCK 8 | ||
1432 | |||
1433 | #ifdef __cplusplus | ||
1434 | # ifndef PDC_PP98 | ||
1435 | # undef bool | ||
1436 | # endif | ||
1437 | } | ||
1438 | #endif | ||
1439 | |||
1440 | #endif /* __PDCURSES__ */ | ||