| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
#ifndef __PDCURSES__ |
| 10 |
#define __PDCURSES__ 1 |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
#define PDC_BUILD 3401 |
| 35 |
#define PDCURSES 1 |
| 36 |
#define XOPEN 1 |
| 37 |
#define SYSVcurses 1 |
| 38 |
#define BSDcurses 1 |
| 39 |
#define CHTYPE_LONG 1 |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
#include <stdarg.h> |
| 44 |
#include <stdbool.h> |
| 45 |
#include <stddef.h> |
| 46 |
#include <stdio.h> |
| 47 |
|
| 48 |
#ifdef PDC_WIDE |
| 49 |
# include <wchar.h> |
| 50 |
#endif |
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
#ifndef FALSE |
| 59 |
# define FALSE 0 |
| 60 |
#endif |
| 61 |
#ifndef TRUE |
| 62 |
# define TRUE 1 |
| 63 |
#endif |
| 64 |
#ifndef NULL |
| 65 |
# define NULL (void *)0 |
| 66 |
#endif |
| 67 |
#ifndef ERR |
| 68 |
# define ERR (-1) |
| 69 |
#endif |
| 70 |
#ifndef OK |
| 71 |
# define OK 0 |
| 72 |
#endif |
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
#ifdef CHTYPE_LONG |
| 81 |
# if _LP64 |
| 82 |
typedef unsigned int chtype; |
| 83 |
# else |
| 84 |
typedef unsigned long chtype; |
| 85 |
# endif |
| 86 |
#else |
| 87 |
typedef unsigned short chtype; |
| 88 |
#endif |
| 89 |
|
| 90 |
#ifdef PDC_WIDE |
| 91 |
typedef chtype cchar_t; |
| 92 |
#endif |
| 93 |
|
| 94 |
typedef chtype attr_t; |
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
typedef struct |
| 103 |
{ |
| 104 |
int x; |
| 105 |
int y; |
| 106 |
short button[3]; |
| 107 |
int changes; |
| 108 |
} MOUSE_STATUS; |
| 109 |
|
| 110 |
#define BUTTON_RELEASED 0x0000 |
| 111 |
#define BUTTON_PRESSED 0x0001 |
| 112 |
#define BUTTON_CLICKED 0x0002 |
| 113 |
#define BUTTON_DOUBLE_CLICKED 0x0003 |
| 114 |
#define BUTTON_TRIPLE_CLICKED 0x0004 |
| 115 |
#define BUTTON_MOVED 0x0005 |
| 116 |
#define WHEEL_SCROLLED 0x0006 |
| 117 |
#define BUTTON_ACTION_MASK 0x0007 |
| 118 |
|
| 119 |
#define PDC_BUTTON_SHIFT 0x0008 |
| 120 |
#define PDC_BUTTON_CONTROL 0x0010 |
| 121 |
#define PDC_BUTTON_ALT 0x0020 |
| 122 |
#define BUTTON_MODIFIER_MASK 0x0038 |
| 123 |
|
| 124 |
#define MOUSE_X_POS (Mouse_status.x) |
| 125 |
#define MOUSE_Y_POS (Mouse_status.y) |
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
#define PDC_MOUSE_MOVED 0x0008 |
| 141 |
#define PDC_MOUSE_POSITION 0x0010 |
| 142 |
#define PDC_MOUSE_WHEEL_UP 0x0020 |
| 143 |
#define PDC_MOUSE_WHEEL_DOWN 0x0040 |
| 144 |
|
| 145 |
#define A_BUTTON_CHANGED (Mouse_status.changes & 7) |
| 146 |
#define MOUSE_MOVED (Mouse_status.changes & PDC_MOUSE_MOVED) |
| 147 |
#define MOUSE_POS_REPORT (Mouse_status.changes & PDC_MOUSE_POSITION) |
| 148 |
#define BUTTON_CHANGED(x) (Mouse_status.changes & (1 << ((x) - 1))) |
| 149 |
#define BUTTON_STATUS(x) (Mouse_status.button[(x) - 1]) |
| 150 |
#define MOUSE_WHEEL_UP (Mouse_status.changes & PDC_MOUSE_WHEEL_UP) |
| 151 |
#define MOUSE_WHEEL_DOWN (Mouse_status.changes & PDC_MOUSE_WHEEL_DOWN) |
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
#define BUTTON1_RELEASED 0x00000001L |
| 156 |
#define BUTTON1_PRESSED 0x00000002L |
| 157 |
#define BUTTON1_CLICKED 0x00000004L |
| 158 |
#define BUTTON1_DOUBLE_CLICKED 0x00000008L |
| 159 |
#define BUTTON1_TRIPLE_CLICKED 0x00000010L |
| 160 |
#define BUTTON1_MOVED 0x00000010L |
| 161 |
|
| 162 |
#define BUTTON2_RELEASED 0x00000020L |
| 163 |
#define BUTTON2_PRESSED 0x00000040L |
| 164 |
#define BUTTON2_CLICKED 0x00000080L |
| 165 |
#define BUTTON2_DOUBLE_CLICKED 0x00000100L |
| 166 |
#define BUTTON2_TRIPLE_CLICKED 0x00000200L |
| 167 |
#define BUTTON2_MOVED 0x00000200L |
| 168 |
|
| 169 |
#define BUTTON3_RELEASED 0x00000400L |
| 170 |
#define BUTTON3_PRESSED 0x00000800L |
| 171 |
#define BUTTON3_CLICKED 0x00001000L |
| 172 |
#define BUTTON3_DOUBLE_CLICKED 0x00002000L |
| 173 |
#define BUTTON3_TRIPLE_CLICKED 0x00004000L |
| 174 |
#define BUTTON3_MOVED 0x00004000L |
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
#define BUTTON4_RELEASED 0x00008000L |
| 181 |
#define BUTTON4_PRESSED 0x00010000L |
| 182 |
#define BUTTON4_CLICKED 0x00020000L |
| 183 |
#define BUTTON4_DOUBLE_CLICKED 0x00040000L |
| 184 |
#define BUTTON4_TRIPLE_CLICKED 0x00080000L |
| 185 |
|
| 186 |
#define BUTTON5_RELEASED 0x00100000L |
| 187 |
#define BUTTON5_PRESSED 0x00200000L |
| 188 |
#define BUTTON5_CLICKED 0x00400000L |
| 189 |
#define BUTTON5_DOUBLE_CLICKED 0x00800000L |
| 190 |
#define BUTTON5_TRIPLE_CLICKED 0x01000000L |
| 191 |
|
| 192 |
#define MOUSE_WHEEL_SCROLL 0x02000000L |
| 193 |
#define BUTTON_MODIFIER_SHIFT 0x04000000L |
| 194 |
#define BUTTON_MODIFIER_CONTROL 0x08000000L |
| 195 |
#define BUTTON_MODIFIER_ALT 0x10000000L |
| 196 |
|
| 197 |
#define ALL_MOUSE_EVENTS 0x1fffffffL |
| 198 |
#define REPORT_MOUSE_POSITION 0x20000000L |
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
typedef unsigned long mmask_t; |
| 203 |
|
| 204 |
typedef struct |
| 205 |
{ |
| 206 |
short id; |
| 207 |
int x, y, z; |
| 208 |
mmask_t bstate; |
| 209 |
|
| 210 |
} MEVENT; |
| 211 |
|
| 212 |
#ifdef NCURSES_MOUSE_VERSION |
| 213 |
# define BUTTON_SHIFT BUTTON_MODIFIER_SHIFT |
| 214 |
# define BUTTON_CONTROL BUTTON_MODIFIER_CONTROL |
| 215 |
# define BUTTON_CTRL BUTTON_MODIFIER_CONTROL |
| 216 |
# define BUTTON_ALT BUTTON_MODIFIER_ALT |
| 217 |
#else |
| 218 |
# define BUTTON_SHIFT PDC_BUTTON_SHIFT |
| 219 |
# define BUTTON_CONTROL PDC_BUTTON_CONTROL |
| 220 |
# define BUTTON_ALT PDC_BUTTON_ALT |
| 221 |
#endif |
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
typedef struct _win |
| 230 |
{ |
| 231 |
int _cury; |
| 232 |
int _curx; |
| 233 |
int _maxy; |
| 234 |
int _maxx; |
| 235 |
int _begy; |
| 236 |
int _begx; |
| 237 |
int _flags; |
| 238 |
chtype _attrs; |
| 239 |
chtype _bkgd; |
| 240 |
bool _clear; |
| 241 |
bool _leaveit; |
| 242 |
bool _scroll; |
| 243 |
bool _nodelay; |
| 244 |
bool _immed; |
| 245 |
bool _sync; |
| 246 |
bool _use_keypad; |
| 247 |
chtype **_y; |
| 248 |
int *_firstch; |
| 249 |
int *_lastch; |
| 250 |
int _tmarg; |
| 251 |
int _bmarg; |
| 252 |
int _delayms; |
| 253 |
int _parx, _pary; |
| 254 |
struct _win *_parent; |
| 255 |
} WINDOW; |
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
typedef struct |
| 261 |
{ |
| 262 |
bool alive; |
| 263 |
bool autocr; |
| 264 |
bool cbreak; |
| 265 |
bool echo; |
| 266 |
bool raw_inp; |
| 267 |
bool raw_out; |
| 268 |
bool audible; |
| 269 |
bool mono; |
| 270 |
bool resized; |
| 271 |
bool orig_attr; |
| 272 |
short orig_fore; |
| 273 |
short orig_back; |
| 274 |
int cursrow; |
| 275 |
int curscol; |
| 276 |
int visibility; |
| 277 |
int orig_cursor; |
| 278 |
int lines; |
| 279 |
int cols; |
| 280 |
unsigned long _trap_mbe; |
| 281 |
unsigned long _map_mbe_to_key; |
| 282 |
int mouse_wait; |
| 283 |
|
| 284 |
|
| 285 |
int slklines; |
| 286 |
WINDOW *slk_winptr; |
| 287 |
int linesrippedoff; |
| 288 |
int linesrippedoffontop; |
| 289 |
|
| 290 |
int delaytenths; |
| 291 |
|
| 292 |
bool _preserve; |
| 293 |
|
| 294 |
int _restore; |
| 295 |
|
| 296 |
bool save_key_modifiers; |
| 297 |
|
| 298 |
bool return_key_modifiers; |
| 299 |
|
| 300 |
bool key_code; |
| 301 |
|
| 302 |
#ifdef XCURSES |
| 303 |
int XcurscrSize; |
| 304 |
bool sb_on; |
| 305 |
int sb_viewport_y; |
| 306 |
int sb_viewport_x; |
| 307 |
int sb_total_y; |
| 308 |
int sb_total_x; |
| 309 |
int sb_cur_y; |
| 310 |
int sb_cur_x; |
| 311 |
#endif |
| 312 |
short line_color; |
| 313 |
} SCREEN; |
| 314 |
|
| 315 |
|
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
#ifdef PDC_DLL_BUILD |
| 322 |
# ifdef CURSES_LIBRARY |
| 323 |
# define PDCEX __declspec(dllexport) extern |
| 324 |
# else |
| 325 |
# define PDCEX __declspec(dllimport) |
| 326 |
# endif |
| 327 |
#else |
| 328 |
# define PDCEX extern |
| 329 |
#endif |
| 330 |
|
| 331 |
PDCEX int LINES; |
| 332 |
PDCEX int COLS; |
| 333 |
PDCEX WINDOW *stdscr; |
| 334 |
PDCEX WINDOW *curscr; |
| 335 |
PDCEX SCREEN *SP; |
| 336 |
PDCEX MOUSE_STATUS Mouse_status; |
| 337 |
PDCEX int COLORS; |
| 338 |
PDCEX int COLOR_PAIRS; |
| 339 |
PDCEX int TABSIZE; |
| 340 |
PDCEX chtype acs_map[]; |
| 341 |
PDCEX char ttytype[]; |
| 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 |
#define A_NORMAL (chtype)0 |
| 387 |
|
| 388 |
#ifdef CHTYPE_LONG |
| 389 |
# define A_ALTCHARSET (chtype)0x00010000 |
| 390 |
# define A_RIGHTLINE (chtype)0x00020000 |
| 391 |
# define A_LEFTLINE (chtype)0x00040000 |
| 392 |
# define A_INVIS (chtype)0x00080000 |
| 393 |
# define A_UNDERLINE (chtype)0x00100000 |
| 394 |
# define A_REVERSE (chtype)0x00200000 |
| 395 |
# define A_BLINK (chtype)0x00400000 |
| 396 |
# define A_BOLD (chtype)0x00800000 |
| 397 |
|
| 398 |
# define A_ATTRIBUTES (chtype)0xffff0000 |
| 399 |
# define A_CHARTEXT (chtype)0x0000ffff |
| 400 |
# define A_COLOR (chtype)0xff000000 |
| 401 |
|
| 402 |
# define A_ITALIC A_INVIS |
| 403 |
# define A_PROTECT (A_UNDERLINE | A_LEFTLINE | A_RIGHTLINE) |
| 404 |
|
| 405 |
# define PDC_ATTR_SHIFT 19 |
| 406 |
# define PDC_COLOR_SHIFT 24 |
| 407 |
#else |
| 408 |
# define A_BOLD (chtype)0x0100 |
| 409 |
# define A_REVERSE (chtype)0x0200 |
| 410 |
# define A_BLINK (chtype)0x0400 |
| 411 |
|
| 412 |
# define A_ATTRIBUTES (chtype)0xff00 |
| 413 |
# define A_CHARTEXT (chtype)0x00ff |
| 414 |
# define A_COLOR (chtype)0xf800 |
| 415 |
|
| 416 |
# define A_ALTCHARSET A_NORMAL |
| 417 |
# define A_PROTECT A_NORMAL |
| 418 |
# define A_UNDERLINE A_NORMAL |
| 419 |
|
| 420 |
# define A_LEFTLINE A_NORMAL |
| 421 |
# define A_RIGHTLINE A_NORMAL |
| 422 |
# define A_ITALIC A_NORMAL |
| 423 |
# define A_INVIS A_NORMAL |
| 424 |
|
| 425 |
# define PDC_ATTR_SHIFT 8 |
| 426 |
# define PDC_COLOR_SHIFT 11 |
| 427 |
#endif |
| 428 |
|
| 429 |
#define A_STANDOUT (A_REVERSE | A_BOLD) |
| 430 |
#define A_DIM A_NORMAL |
| 431 |
|
| 432 |
#define CHR_MSK A_CHARTEXT |
| 433 |
#define ATR_MSK A_ATTRIBUTES |
| 434 |
#define ATR_NRM A_NORMAL |
| 435 |
|
| 436 |
|
| 437 |
|
| 438 |
|
| 439 |
#define WA_ALTCHARSET A_ALTCHARSET |
| 440 |
#define WA_BLINK A_BLINK |
| 441 |
#define WA_BOLD A_BOLD |
| 442 |
#define WA_DIM A_DIM |
| 443 |
#define WA_INVIS A_INVIS |
| 444 |
#define WA_LEFT A_LEFTLINE |
| 445 |
#define WA_PROTECT A_PROTECT |
| 446 |
#define WA_REVERSE A_REVERSE |
| 447 |
#define WA_RIGHT A_RIGHTLINE |
| 448 |
#define WA_STANDOUT A_STANDOUT |
| 449 |
#define WA_UNDERLINE A_UNDERLINE |
| 450 |
|
| 451 |
#define WA_HORIZONTAL A_NORMAL |
| 452 |
#define WA_LOW A_NORMAL |
| 453 |
#define WA_TOP A_NORMAL |
| 454 |
#define WA_VERTICAL A_NORMAL |
| 455 |
|
| 456 |
|
| 457 |
|
| 458 |
|
| 459 |
|
| 460 |
|
| 461 |
|
| 462 |
#ifdef CHTYPE_LONG |
| 463 |
# define ACS_PICK(w, n) ((chtype)w | A_ALTCHARSET) |
| 464 |
#else |
| 465 |
# define ACS_PICK(w, n) ((chtype)n) |
| 466 |
#endif |
| 467 |
|
| 468 |
|
| 469 |
|
| 470 |
#define ACS_ULCORNER ACS_PICK('l', '+') |
| 471 |
#define ACS_LLCORNER ACS_PICK('m', '+') |
| 472 |
#define ACS_URCORNER ACS_PICK('k', '+') |
| 473 |
#define ACS_LRCORNER ACS_PICK('j', '+') |
| 474 |
#define ACS_RTEE ACS_PICK('u', '+') |
| 475 |
#define ACS_LTEE ACS_PICK('t', '+') |
| 476 |
#define ACS_BTEE ACS_PICK('v', '+') |
| 477 |
#define ACS_TTEE ACS_PICK('w', '+') |
| 478 |
#define ACS_HLINE ACS_PICK('q', '-') |
| 479 |
#define ACS_VLINE ACS_PICK('x', '|') |
| 480 |
#define ACS_PLUS ACS_PICK('n', '+') |
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
#define ACS_S1 ACS_PICK('o', '-') |
| 485 |
#define ACS_S9 ACS_PICK('s', '_') |
| 486 |
#define ACS_DIAMOND ACS_PICK('`', '+') |
| 487 |
#define ACS_CKBOARD ACS_PICK('a', ':') |
| 488 |
#define ACS_DEGREE ACS_PICK('f', '\'') |
| 489 |
#define ACS_PLMINUS ACS_PICK('g', '#') |
| 490 |
#define ACS_BULLET ACS_PICK('~', 'o') |
| 491 |
|
| 492 |
|
| 493 |
|
| 494 |
|
| 495 |
|
| 496 |
#define ACS_LARROW ACS_PICK(',', '<') |
| 497 |
#define ACS_RARROW ACS_PICK('+', '>') |
| 498 |
#define ACS_DARROW ACS_PICK('.', 'v') |
| 499 |
#define ACS_UARROW ACS_PICK('-', '^') |
| 500 |
#define ACS_BOARD ACS_PICK('h', '#') |
| 501 |
#define ACS_LANTERN ACS_PICK('i', '*') |
| 502 |
#define ACS_BLOCK ACS_PICK('0', '#') |
| 503 |
|
| 504 |
|
| 505 |
|
| 506 |
|
| 507 |
#define ACS_S3 ACS_PICK('p', '-') |
| 508 |
#define ACS_S7 ACS_PICK('r', '-') |
| 509 |
#define ACS_LEQUAL ACS_PICK('y', '<') |
| 510 |
#define ACS_GEQUAL ACS_PICK('z', '>') |
| 511 |
#define ACS_PI ACS_PICK('{', 'n') |
| 512 |
#define ACS_NEQUAL ACS_PICK('|', '+') |
| 513 |
#define ACS_STERLING ACS_PICK('}', 'L') |
| 514 |
|
| 515 |
|
| 516 |
|
| 517 |
#define ACS_BSSB ACS_ULCORNER |
| 518 |
#define ACS_SSBB ACS_LLCORNER |
| 519 |
#define ACS_BBSS ACS_URCORNER |
| 520 |
#define ACS_SBBS ACS_LRCORNER |
| 521 |
#define ACS_SBSS ACS_RTEE |
| 522 |
#define ACS_SSSB ACS_LTEE |
| 523 |
#define ACS_SSBS ACS_BTEE |
| 524 |
#define ACS_BSSS ACS_TTEE |
| 525 |
#define ACS_BSBS ACS_HLINE |
| 526 |
#define ACS_SBSB ACS_VLINE |
| 527 |
#define ACS_SSSS ACS_PLUS |
| 528 |
|
| 529 |
|
| 530 |
|
| 531 |
#ifdef PDC_WIDE |
| 532 |
# define WACS_ULCORNER (&(acs_map['l'])) |
| 533 |
# define WACS_LLCORNER (&(acs_map['m'])) |
| 534 |
# define WACS_URCORNER (&(acs_map['k'])) |
| 535 |
# define WACS_LRCORNER (&(acs_map['j'])) |
| 536 |
# define WACS_RTEE (&(acs_map['u'])) |
| 537 |
# define WACS_LTEE (&(acs_map['t'])) |
| 538 |
# define WACS_BTEE (&(acs_map['v'])) |
| 539 |
# define WACS_TTEE (&(acs_map['w'])) |
| 540 |
# define WACS_HLINE (&(acs_map['q'])) |
| 541 |
# define WACS_VLINE (&(acs_map['x'])) |
| 542 |
# define WACS_PLUS (&(acs_map['n'])) |
| 543 |
|
| 544 |
# define WACS_S1 (&(acs_map['o'])) |
| 545 |
# define WACS_S9 (&(acs_map['s'])) |
| 546 |
# define WACS_DIAMOND (&(acs_map['`'])) |
| 547 |
# define WACS_CKBOARD (&(acs_map['a'])) |
| 548 |
# define WACS_DEGREE (&(acs_map['f'])) |
| 549 |
# define WACS_PLMINUS (&(acs_map['g'])) |
| 550 |
# define WACS_BULLET (&(acs_map['~'])) |
| 551 |
|
| 552 |
# define WACS_LARROW (&(acs_map[','])) |
| 553 |
# define WACS_RARROW (&(acs_map['+'])) |
| 554 |
# define WACS_DARROW (&(acs_map['.'])) |
| 555 |
# define WACS_UARROW (&(acs_map['-'])) |
| 556 |
# define WACS_BOARD (&(acs_map['h'])) |
| 557 |
# define WACS_LANTERN (&(acs_map['i'])) |
| 558 |
# define WACS_BLOCK (&(acs_map['0'])) |
| 559 |
|
| 560 |
# define WACS_S3 (&(acs_map['p'])) |
| 561 |
# define WACS_S7 (&(acs_map['r'])) |
| 562 |
# define WACS_LEQUAL (&(acs_map['y'])) |
| 563 |
# define WACS_GEQUAL (&(acs_map['z'])) |
| 564 |
# define WACS_PI (&(acs_map['{'])) |
| 565 |
# define WACS_NEQUAL (&(acs_map['|'])) |
| 566 |
# define WACS_STERLING (&(acs_map['}'])) |
| 567 |
|
| 568 |
# define WACS_BSSB WACS_ULCORNER |
| 569 |
# define WACS_SSBB WACS_LLCORNER |
| 570 |
# define WACS_BBSS WACS_URCORNER |
| 571 |
# define WACS_SBBS WACS_LRCORNER |
| 572 |
# define WACS_SBSS WACS_RTEE |
| 573 |
# define WACS_SSSB WACS_LTEE |
| 574 |
# define WACS_SSBS WACS_BTEE |
| 575 |
# define WACS_BSSS WACS_TTEE |
| 576 |
# define WACS_BSBS WACS_HLINE |
| 577 |
# define WACS_SBSB WACS_VLINE |
| 578 |
# define WACS_SSSS WACS_PLUS |
| 579 |
#endif |
| 580 |
|
| 581 |
|
| 582 |
|
| 583 |
#define COLOR_BLACK 0 |
| 584 |
|
| 585 |
#ifdef PDC_RGB |
| 586 |
# define COLOR_RED 1 |
| 587 |
# define COLOR_GREEN 2 |
| 588 |
# define COLOR_BLUE 4 |
| 589 |
#else |
| 590 |
# define COLOR_BLUE 1 |
| 591 |
# define COLOR_GREEN 2 |
| 592 |
# define COLOR_RED 4 |
| 593 |
#endif |
| 594 |
|
| 595 |
#define COLOR_CYAN (COLOR_BLUE | COLOR_GREEN) |
| 596 |
#define COLOR_MAGENTA (COLOR_RED | COLOR_BLUE) |
| 597 |
#define COLOR_YELLOW (COLOR_RED | COLOR_GREEN) |
| 598 |
|
| 599 |
#define COLOR_WHITE 7 |
| 600 |
|
| 601 |
|
| 602 |
|
| 603 |
|
| 604 |
|
| 605 |
|
| 606 |
|
| 607 |
|
| 608 |
#define KEY_CODE_YES 0x100 |
| 609 |
|
| 610 |
#define KEY_BREAK 0x101 |
| 611 |
#define KEY_DOWN 0x102 |
| 612 |
#define KEY_UP 0x103 |
| 613 |
#define KEY_LEFT 0x104 |
| 614 |
#define KEY_RIGHT 0x105 |
| 615 |
#define KEY_HOME 0x106 |
| 616 |
#define KEY_BACKSPACE 0x107 |
| 617 |
#define KEY_F0 0x108 |
| 618 |
|
| 619 |
#define KEY_DL 0x148 |
| 620 |
#define KEY_IL 0x149 |
| 621 |
#define KEY_DC 0x14a |
| 622 |
#define KEY_IC 0x14b |
| 623 |
#define KEY_EIC 0x14c |
| 624 |
#define KEY_CLEAR 0x14d |
| 625 |
#define KEY_EOS 0x14e |
| 626 |
#define KEY_EOL 0x14f |
| 627 |
#define KEY_SF 0x150 |
| 628 |
#define KEY_SR 0x151 |
| 629 |
#define KEY_NPAGE 0x152 |
| 630 |
#define KEY_PPAGE 0x153 |
| 631 |
#define KEY_STAB 0x154 |
| 632 |
#define KEY_CTAB 0x155 |
| 633 |
#define KEY_CATAB 0x156 |
| 634 |
#define KEY_ENTER 0x157 |
| 635 |
#define KEY_SRESET 0x158 |
| 636 |
#define KEY_RESET 0x159 |
| 637 |
#define KEY_PRINT 0x15a |
| 638 |
#define KEY_LL 0x15b |
| 639 |
#define KEY_ABORT 0x15c |
| 640 |
#define KEY_SHELP 0x15d |
| 641 |
#define KEY_LHELP 0x15e |
| 642 |
#define KEY_BTAB 0x15f |
| 643 |
#define KEY_BEG 0x160 |
| 644 |
#define KEY_CANCEL 0x161 |
| 645 |
#define KEY_CLOSE 0x162 |
| 646 |
#define KEY_COMMAND 0x163 |
| 647 |
#define KEY_COPY 0x164 |
| 648 |
#define KEY_CREATE 0x165 |
| 649 |
#define KEY_END 0x166 |
| 650 |
#define KEY_EXIT 0x167 |
| 651 |
#define KEY_FIND 0x168 |
| 652 |
#define KEY_HELP 0x169 |
| 653 |
#define KEY_MARK 0x16a |
| 654 |
#define KEY_MESSAGE 0x16b |
| 655 |
#define KEY_MOVE 0x16c |
| 656 |
#define KEY_NEXT 0x16d |
| 657 |
#define KEY_OPEN 0x16e |
| 658 |
#define KEY_OPTIONS 0x16f |
| 659 |
#define KEY_PREVIOUS 0x170 |
| 660 |
#define KEY_REDO 0x171 |
| 661 |
#define KEY_REFERENCE 0x172 |
| 662 |
#define KEY_REFRESH 0x173 |
| 663 |
#define KEY_REPLACE 0x174 |
| 664 |
#define KEY_RESTART 0x175 |
| 665 |
#define KEY_RESUME 0x176 |
| 666 |
#define KEY_SAVE 0x177 |
| 667 |
#define KEY_SBEG 0x178 |
| 668 |
#define KEY_SCANCEL 0x179 |
| 669 |
#define KEY_SCOMMAND 0x17a |
| 670 |
#define KEY_SCOPY 0x17b |
| 671 |
#define KEY_SCREATE 0x17c |
| 672 |
#define KEY_SDC 0x17d |
| 673 |
#define KEY_SDL 0x17e |
| 674 |
#define KEY_SELECT 0x17f |
| 675 |
#define KEY_SEND 0x180 |
| 676 |
#define KEY_SEOL 0x181 |
| 677 |
#define KEY_SEXIT 0x182 |
| 678 |
#define KEY_SFIND 0x183 |
| 679 |
#define KEY_SHOME 0x184 |
| 680 |
#define KEY_SIC 0x185 |
| 681 |
|
| 682 |
#define KEY_SLEFT 0x187 |
| 683 |
#define KEY_SMESSAGE 0x188 |
| 684 |
#define KEY_SMOVE 0x189 |
| 685 |
#define KEY_SNEXT 0x18a |
| 686 |
#define KEY_SOPTIONS 0x18b |
| 687 |
#define KEY_SPREVIOUS 0x18c |
| 688 |
#define KEY_SPRINT 0x18d |
| 689 |
#define KEY_SREDO 0x18e |
| 690 |
#define KEY_SREPLACE 0x18f |
| 691 |
#define KEY_SRIGHT 0x190 |
| 692 |
#define KEY_SRSUME 0x191 |
| 693 |
#define KEY_SSAVE 0x192 |
| 694 |
#define KEY_SSUSPEND 0x193 |
| 695 |
#define KEY_SUNDO 0x194 |
| 696 |
#define KEY_SUSPEND 0x195 |
| 697 |
#define KEY_UNDO 0x196 |
| 698 |
|
| 699 |
|
| 700 |
|
| 701 |
#define ALT_0 0x197 |
| 702 |
#define ALT_1 0x198 |
| 703 |
#define ALT_2 0x199 |
| 704 |
#define ALT_3 0x19a |
| 705 |
#define ALT_4 0x19b |
| 706 |
#define ALT_5 0x19c |
| 707 |
#define ALT_6 0x19d |
| 708 |
#define ALT_7 0x19e |
| 709 |
#define ALT_8 0x19f |
| 710 |
#define ALT_9 0x1a0 |
| 711 |
#define ALT_A 0x1a1 |
| 712 |
#define ALT_B 0x1a2 |
| 713 |
#define ALT_C 0x1a3 |
| 714 |
#define ALT_D 0x1a4 |
| 715 |
#define ALT_E 0x1a5 |
| 716 |
#define ALT_F 0x1a6 |
| 717 |
#define ALT_G 0x1a7 |
| 718 |
#define ALT_H 0x1a8 |
| 719 |
#define ALT_I 0x1a9 |
| 720 |
#define ALT_J 0x1aa |
| 721 |
#define ALT_K 0x1ab |
| 722 |
#define ALT_L 0x1ac |
| 723 |
#define ALT_M 0x1ad |
| 724 |
#define ALT_N 0x1ae |
| 725 |
#define ALT_O 0x1af |
| 726 |
#define ALT_P 0x1b0 |
| 727 |
#define ALT_Q 0x1b1 |
| 728 |
#define ALT_R 0x1b2 |
| 729 |
#define ALT_S 0x1b3 |
| 730 |
#define ALT_T 0x1b4 |
| 731 |
#define ALT_U 0x1b5 |
| 732 |
#define ALT_V 0x1b6 |
| 733 |
#define ALT_W 0x1b7 |
| 734 |
#define ALT_X 0x1b8 |
| 735 |
#define ALT_Y 0x1b9 |
| 736 |
#define ALT_Z 0x1ba |
| 737 |
|
| 738 |
#define CTL_LEFT 0x1bb |
| 739 |
#define CTL_RIGHT 0x1bc |
| 740 |
#define CTL_PGUP 0x1bd |
| 741 |
#define CTL_PGDN 0x1be |
| 742 |
#define CTL_HOME 0x1bf |
| 743 |
#define CTL_END 0x1c0 |
| 744 |
|
| 745 |
#define KEY_A1 0x1c1 |
| 746 |
#define KEY_A2 0x1c2 |
| 747 |
#define KEY_A3 0x1c3 |
| 748 |
#define KEY_B1 0x1c4 |
| 749 |
#define KEY_B2 0x1c5 |
| 750 |
#define KEY_B3 0x1c6 |
| 751 |
#define KEY_C1 0x1c7 |
| 752 |
#define KEY_C2 0x1c8 |
| 753 |
#define KEY_C3 0x1c9 |
| 754 |
|
| 755 |
#define PADSLASH 0x1ca |
| 756 |
#define PADENTER 0x1cb |
| 757 |
#define CTL_PADENTER 0x1cc |
| 758 |
#define ALT_PADENTER 0x1cd |
| 759 |
#define PADSTOP 0x1ce |
| 760 |
#define PADSTAR 0x1cf |
| 761 |
#define PADMINUS 0x1d0 |
| 762 |
#define PADPLUS 0x1d1 |
| 763 |
#define CTL_PADSTOP 0x1d2 |
| 764 |
#define CTL_PADCENTER 0x1d3 |
| 765 |
#define CTL_PADPLUS 0x1d4 |
| 766 |
#define CTL_PADMINUS 0x1d5 |
| 767 |
#define CTL_PADSLASH 0x1d6 |
| 768 |
#define CTL_PADSTAR 0x1d7 |
| 769 |
#define ALT_PADPLUS 0x1d8 |
| 770 |
#define ALT_PADMINUS 0x1d9 |
| 771 |
#define ALT_PADSLASH 0x1da |
| 772 |
#define ALT_PADSTAR 0x1db |
| 773 |
#define ALT_PADSTOP 0x1dc |
| 774 |
#define CTL_INS 0x1dd |
| 775 |
#define ALT_DEL 0x1de |
| 776 |
#define ALT_INS 0x1df |
| 777 |
#define CTL_UP 0x1e0 |
| 778 |
#define CTL_DOWN 0x1e1 |
| 779 |
#define CTL_TAB 0x1e2 |
| 780 |
#define ALT_TAB 0x1e3 |
| 781 |
#define ALT_MINUS 0x1e4 |
| 782 |
#define ALT_EQUAL 0x1e5 |
| 783 |
#define ALT_HOME 0x1e6 |
| 784 |
#define ALT_PGUP 0x1e7 |
| 785 |
#define ALT_PGDN 0x1e8 |
| 786 |
#define ALT_END 0x1e9 |
| 787 |
#define ALT_UP 0x1ea |
| 788 |
#define ALT_DOWN 0x1eb |
| 789 |
#define ALT_RIGHT 0x1ec |
| 790 |
#define ALT_LEFT 0x1ed |
| 791 |
#define ALT_ENTER 0x1ee |
| 792 |
#define ALT_ESC 0x1ef |
| 793 |
#define ALT_BQUOTE 0x1f0 |
| 794 |
#define ALT_LBRACKET 0x1f1 |
| 795 |
#define ALT_RBRACKET 0x1f2 |
| 796 |
#define ALT_SEMICOLON 0x1f3 |
| 797 |
#define ALT_FQUOTE 0x1f4 |
| 798 |
#define ALT_COMMA 0x1f5 |
| 799 |
#define ALT_STOP 0x1f6 |
| 800 |
#define ALT_FSLASH 0x1f7 |
| 801 |
#define ALT_BKSP 0x1f8 |
| 802 |
#define CTL_BKSP 0x1f9 |
| 803 |
#define PAD0 0x1fa |
| 804 |
|
| 805 |
#define CTL_PAD0 0x1fb |
| 806 |
#define CTL_PAD1 0x1fc |
| 807 |
#define CTL_PAD2 0x1fd |
| 808 |
#define CTL_PAD3 0x1fe |
| 809 |
#define CTL_PAD4 0x1ff |
| 810 |
#define CTL_PAD5 0x200 |
| 811 |
#define CTL_PAD6 0x201 |
| 812 |
#define CTL_PAD7 0x202 |
| 813 |
#define CTL_PAD8 0x203 |
| 814 |
#define CTL_PAD9 0x204 |
| 815 |
|
| 816 |
#define ALT_PAD0 0x205 |
| 817 |
#define ALT_PAD1 0x206 |
| 818 |
#define ALT_PAD2 0x207 |
| 819 |
#define ALT_PAD3 0x208 |
| 820 |
#define ALT_PAD4 0x209 |
| 821 |
#define ALT_PAD5 0x20a |
| 822 |
#define ALT_PAD6 0x20b |
| 823 |
#define ALT_PAD7 0x20c |
| 824 |
#define ALT_PAD8 0x20d |
| 825 |
#define ALT_PAD9 0x20e |
| 826 |
|
| 827 |
#define CTL_DEL 0x20f |
| 828 |
#define ALT_BSLASH 0x210 |
| 829 |
#define CTL_ENTER 0x211 |
| 830 |
|
| 831 |
#define SHF_PADENTER 0x212 |
| 832 |
#define SHF_PADSLASH 0x213 |
| 833 |
#define SHF_PADSTAR 0x214 |
| 834 |
#define SHF_PADPLUS 0x215 |
| 835 |
#define SHF_PADMINUS 0x216 |
| 836 |
#define SHF_UP 0x217 |
| 837 |
#define SHF_DOWN 0x218 |
| 838 |
#define SHF_IC 0x219 |
| 839 |
#define SHF_DC 0x21a |
| 840 |
|
| 841 |
#define KEY_MOUSE 0x21b |
| 842 |
#define KEY_SHIFT_L 0x21c |
| 843 |
#define KEY_SHIFT_R 0x21d |
| 844 |
#define KEY_CONTROL_L 0x21e |
| 845 |
#define KEY_CONTROL_R 0x21f |
| 846 |
#define KEY_ALT_L 0x220 |
| 847 |
#define KEY_ALT_R 0x221 |
| 848 |
#define KEY_RESIZE 0x222 |
| 849 |
#define KEY_SUP 0x223 |
| 850 |
#define KEY_SDOWN 0x224 |
| 851 |
|
| 852 |
#define KEY_MIN KEY_BREAK |
| 853 |
#define KEY_MAX KEY_SDOWN |
| 854 |
|
| 855 |
#define KEY_F(n) (KEY_F0 + (n)) |
| 856 |
|
| 857 |
|
| 858 |
|
| 859 |
|
| 860 |
|
| 861 |
|
| 862 |
|
| 863 |
|
| 864 |
|
| 865 |
int addch(const chtype); |
| 866 |
int addchnstr(const chtype *, int); |
| 867 |
int addchstr(const chtype *); |
| 868 |
int addnstr(const char *, int); |
| 869 |
int addstr(const char *); |
| 870 |
int attroff(chtype); |
| 871 |
int attron(chtype); |
| 872 |
int attrset(chtype); |
| 873 |
int attr_get(attr_t *, short *, void *); |
| 874 |
int attr_off(attr_t, void *); |
| 875 |
int attr_on(attr_t, void *); |
| 876 |
int attr_set(attr_t, short, void *); |
| 877 |
int baudrate(void); |
| 878 |
int beep(void); |
| 879 |
int bkgd(chtype); |
| 880 |
void bkgdset(chtype); |
| 881 |
int border(chtype, chtype, chtype, chtype, chtype, chtype, chtype, chtype); |
| 882 |
int box(WINDOW *, chtype, chtype); |
| 883 |
bool can_change_color(void); |
| 884 |
int cbreak(void); |
| 885 |
int chgat(int, attr_t, short, const void *); |
| 886 |
int clearok(WINDOW *, bool); |
| 887 |
int clear(void); |
| 888 |
int clrtobot(void); |
| 889 |
int clrtoeol(void); |
| 890 |
int color_content(short, short *, short *, short *); |
| 891 |
int color_set(short, void *); |
| 892 |
int copywin(const WINDOW *, WINDOW *, int, int, int, int, int, int, int); |
| 893 |
int curs_set(int); |
| 894 |
int def_prog_mode(void); |
| 895 |
int def_shell_mode(void); |
| 896 |
int delay_output(int); |
| 897 |
int delch(void); |
| 898 |
int deleteln(void); |
| 899 |
void delscreen(SCREEN *); |
| 900 |
int delwin(WINDOW *); |
| 901 |
WINDOW *derwin(WINDOW *, int, int, int, int); |
| 902 |
int doupdate(void); |
| 903 |
WINDOW *dupwin(WINDOW *); |
| 904 |
int echochar(const chtype); |
| 905 |
int echo(void); |
| 906 |
int endwin(void); |
| 907 |
char erasechar(void); |
| 908 |
int erase(void); |
| 909 |
void filter(void); |
| 910 |
int flash(void); |
| 911 |
int flushinp(void); |
| 912 |
chtype getbkgd(WINDOW *); |
| 913 |
int getnstr(char *, int); |
| 914 |
int getstr(char *); |
| 915 |
WINDOW *getwin(FILE *); |
| 916 |
int halfdelay(int); |
| 917 |
bool has_colors(void); |
| 918 |
bool has_ic(void); |
| 919 |
bool has_il(void); |
| 920 |
int hline(chtype, int); |
| 921 |
void idcok(WINDOW *, bool); |
| 922 |
int idlok(WINDOW *, bool); |
| 923 |
void immedok(WINDOW *, bool); |
| 924 |
int inchnstr(chtype *, int); |
| 925 |
int inchstr(chtype *); |
| 926 |
chtype inch(void); |
| 927 |
int init_color(short, short, short, short); |
| 928 |
int init_pair(short, short, short); |
| 929 |
WINDOW *initscr(void); |
| 930 |
int innstr(char *, int); |
| 931 |
int insch(chtype); |
| 932 |
int insdelln(int); |
| 933 |
int insertln(void); |
| 934 |
int insnstr(const char *, int); |
| 935 |
int insstr(const char *); |
| 936 |
int instr(char *); |
| 937 |
int intrflush(WINDOW *, bool); |
| 938 |
bool isendwin(void); |
| 939 |
bool is_linetouched(WINDOW *, int); |
| 940 |
bool is_wintouched(WINDOW *); |
| 941 |
const char *keyname(int); |
| 942 |
int keypad(WINDOW *, bool); |
| 943 |
char killchar(void); |
| 944 |
int leaveok(WINDOW *, bool); |
| 945 |
char *longname(void); |
| 946 |
int meta(WINDOW *, bool); |
| 947 |
int move(int, int); |
| 948 |
int mvaddch(int, int, const chtype); |
| 949 |
int mvaddchnstr(int, int, const chtype *, int); |
| 950 |
int mvaddchstr(int, int, const chtype *); |
| 951 |
int mvaddnstr(int, int, const char *, int); |
| 952 |
int mvaddstr(int, int, const char *); |
| 953 |
int mvchgat(int, int, int, attr_t, short, const void *); |
| 954 |
int mvcur(int, int, int, int); |
| 955 |
int mvdelch(int, int); |
| 956 |
int mvderwin(WINDOW *, int, int); |
| 957 |
int mvgetch(int, int); |
| 958 |
int mvgetnstr(int, int, char *, int); |
| 959 |
int mvgetstr(int, int, char *); |
| 960 |
int mvhline(int, int, chtype, int); |
| 961 |
chtype mvinch(int, int); |
| 962 |
int mvinchnstr(int, int, chtype *, int); |
| 963 |
int mvinchstr(int, int, chtype *); |
| 964 |
int mvinnstr(int, int, char *, int); |
| 965 |
int mvinsch(int, int, chtype); |
| 966 |
int mvinsnstr(int, int, const char *, int); |
| 967 |
int mvinsstr(int, int, const char *); |
| 968 |
int mvinstr(int, int, char *); |
| 969 |
int mvprintw(int, int, const char *, ...); |
| 970 |
int mvscanw(int, int, const char *, ...); |
| 971 |
int mvvline(int, int, chtype, int); |
| 972 |
int mvwaddchnstr(WINDOW *, int, int, const chtype *, int); |
| 973 |
int mvwaddchstr(WINDOW *, int, int, const chtype *); |
| 974 |
int mvwaddch(WINDOW *, int, int, const chtype); |
| 975 |
int mvwaddnstr(WINDOW *, int, int, const char *, int); |
| 976 |
int mvwaddstr(WINDOW *, int, int, const char *); |
| 977 |
int mvwchgat(WINDOW *, int, int, int, attr_t, short, const void *); |
| 978 |
int mvwdelch(WINDOW *, int, int); |
| 979 |
int mvwgetch(WINDOW *, int, int); |
| 980 |
int mvwgetnstr(WINDOW *, int, int, char *, int); |
| 981 |
int mvwgetstr(WINDOW *, int, int, char *); |
| 982 |
int mvwhline(WINDOW *, int, int, chtype, int); |
| 983 |
int mvwinchnstr(WINDOW *, int, int, chtype *, int); |
| 984 |
int mvwinchstr(WINDOW *, int, int, chtype *); |
| 985 |
chtype mvwinch(WINDOW *, int, int); |
| 986 |
int mvwinnstr(WINDOW *, int, int, char *, int); |
| 987 |
int mvwinsch(WINDOW *, int, int, chtype); |
| 988 |
int mvwinsnstr(WINDOW *, int, int, const char *, int); |
| 989 |
int mvwinsstr(WINDOW *, int, int, const char *); |
| 990 |
int mvwinstr(WINDOW *, int, int, char *); |
| 991 |
int mvwin(WINDOW *, int, int); |
| 992 |
int mvwprintw(WINDOW *, int, int, const char *, ...); |
| 993 |
int mvwscanw(WINDOW *, int, int, const char *, ...); |
| 994 |
int mvwvline(WINDOW *, int, int, chtype, int); |
| 995 |
int napms(int); |
| 996 |
WINDOW *newpad(int, int); |
| 997 |
SCREEN *newterm(const char *, FILE *, FILE *); |
| 998 |
WINDOW *newwin(int, int, int, int); |
| 999 |
int nl(void); |
| 1000 |
int nocbreak(void); |
| 1001 |
int nodelay(WINDOW *, bool); |
| 1002 |
int noecho(void); |
| 1003 |
int nonl(void); |
| 1004 |
void noqiflush(void); |
| 1005 |
int noraw(void); |
| 1006 |
int notimeout(WINDOW *, bool); |
| 1007 |
int overlay(const WINDOW *, WINDOW *); |
| 1008 |
int overwrite(const WINDOW *, WINDOW *); |
| 1009 |
int pair_content(short, short *, short *); |
| 1010 |
int pechochar(WINDOW *, chtype); |
| 1011 |
int pnoutrefresh(WINDOW *, int, int, int, int, int, int); |
| 1012 |
int prefresh(WINDOW *, int, int, int, int, int, int); |
| 1013 |
int printw(const char *, ...); |
| 1014 |
int putwin(WINDOW *, FILE *); |
| 1015 |
void qiflush(void); |
| 1016 |
int raw(void); |
| 1017 |
int redrawwin(WINDOW *); |
| 1018 |
int refresh(void); |
| 1019 |
int reset_prog_mode(void); |
| 1020 |
int reset_shell_mode(void); |
| 1021 |
int resetty(void); |
| 1022 |
int ripoffline(int, int (*)(WINDOW *, int)); |
| 1023 |
int savetty(void); |
| 1024 |
int scanw(const char *, ...); |
| 1025 |
int scr_dump(const char *); |
| 1026 |
int scr_init(const char *); |
| 1027 |
int scr_restore(const char *); |
| 1028 |
int scr_set(const char *); |
| 1029 |
int scrl(int); |
| 1030 |
int scroll(WINDOW *); |
| 1031 |
int scrollok(WINDOW *, bool); |
| 1032 |
SCREEN *set_term(SCREEN *); |
| 1033 |
int setscrreg(int, int); |
| 1034 |
int slk_attroff(const chtype); |
| 1035 |
int slk_attr_off(const attr_t, void *); |
| 1036 |
int slk_attron(const chtype); |
| 1037 |
int slk_attr_on(const attr_t, void *); |
| 1038 |
int slk_attrset(const chtype); |
| 1039 |
int slk_attr_set(const attr_t, short, void *); |
| 1040 |
int slk_clear(void); |
| 1041 |
int slk_color(short); |
| 1042 |
int slk_init(int); |
| 1043 |
char *slk_label(int); |
| 1044 |
int slk_noutrefresh(void); |
| 1045 |
int slk_refresh(void); |
| 1046 |
int slk_restore(void); |
| 1047 |
int slk_set(int, const char *, int); |
| 1048 |
int slk_touch(void); |
| 1049 |
int standend(void); |
| 1050 |
int standout(void); |
| 1051 |
int start_color(void); |
| 1052 |
WINDOW *subpad(WINDOW *, int, int, int, int); |
| 1053 |
WINDOW *subwin(WINDOW *, int, int, int, int); |
| 1054 |
int syncok(WINDOW *, bool); |
| 1055 |
chtype termattrs(void); |
| 1056 |
attr_t term_attrs(void); |
| 1057 |
const char *termname(void); |
| 1058 |
void timeout(int); |
| 1059 |
int touchline(WINDOW *, int, int); |
| 1060 |
int touchwin(WINDOW *); |
| 1061 |
int typeahead(int); |
| 1062 |
int untouchwin(WINDOW *); |
| 1063 |
void use_env(bool); |
| 1064 |
int vidattr(chtype); |
| 1065 |
int vid_attr(attr_t, short, void *); |
| 1066 |
int vidputs(chtype, int (*)(int)); |
| 1067 |
int vid_puts(attr_t, short, void *, int (*)(int)); |
| 1068 |
int vline(chtype, int); |
| 1069 |
int vw_printw(WINDOW *, const char *, va_list); |
| 1070 |
int vwprintw(WINDOW *, const char *, va_list); |
| 1071 |
int vw_scanw(WINDOW *, const char *, va_list); |
| 1072 |
int vwscanw(WINDOW *, const char *, va_list); |
| 1073 |
int waddchnstr(WINDOW *, const chtype *, int); |
| 1074 |
int waddchstr(WINDOW *, const chtype *); |
| 1075 |
int waddch(WINDOW *, const chtype); |
| 1076 |
int waddnstr(WINDOW *, const char *, int); |
| 1077 |
int waddstr(WINDOW *, const char *); |
| 1078 |
int wattroff(WINDOW *, chtype); |
| 1079 |
int wattron(WINDOW *, chtype); |
| 1080 |
int wattrset(WINDOW *, chtype); |
| 1081 |
int wattr_get(WINDOW *, attr_t *, short *, void *); |
| 1082 |
int wattr_off(WINDOW *, attr_t, void *); |
| 1083 |
int wattr_on(WINDOW *, attr_t, void *); |
| 1084 |
int wattr_set(WINDOW *, attr_t, short, void *); |
| 1085 |
void wbkgdset(WINDOW *, chtype); |
| 1086 |
int wbkgd(WINDOW *, chtype); |
| 1087 |
int wborder(WINDOW *, chtype, chtype, chtype, chtype, |
| 1088 |
chtype, chtype, chtype, chtype); |
| 1089 |
int wchgat(WINDOW *, int, attr_t, short, const void *); |
| 1090 |
int wclear(WINDOW *); |
| 1091 |
int wclrtobot(WINDOW *); |
| 1092 |
int wclrtoeol(WINDOW *); |
| 1093 |
int wcolor_set(WINDOW *, short, void *); |
| 1094 |
void wcursyncup(WINDOW *); |
| 1095 |
int wdelch(WINDOW *); |
| 1096 |
int wdeleteln(WINDOW *); |
| 1097 |
int wechochar(WINDOW *, const chtype); |
| 1098 |
int werase(WINDOW *); |
| 1099 |
int wgetch(WINDOW *); |
| 1100 |
int wgetnstr(WINDOW *, char *, int); |
| 1101 |
int wgetstr(WINDOW *, char *); |
| 1102 |
int whline(WINDOW *, chtype, int); |
| 1103 |
int winchnstr(WINDOW *, chtype *, int); |
| 1104 |
int winchstr(WINDOW *, chtype *); |
| 1105 |
chtype winch(WINDOW *); |
| 1106 |
int winnstr(WINDOW *, char *, int); |
| 1107 |
int winsch(WINDOW *, chtype); |
| 1108 |
int winsdelln(WINDOW *, int); |
| 1109 |
int winsertln(WINDOW *); |
| 1110 |
int winsnstr(WINDOW *, const char *, int); |
| 1111 |
int winsstr(WINDOW *, const char *); |
| 1112 |
int winstr(WINDOW *, char *); |
| 1113 |
int wmove(WINDOW *, int, int); |
| 1114 |
int wnoutrefresh(WINDOW *); |
| 1115 |
int wprintw(WINDOW *, const char *, ...); |
| 1116 |
int wredrawln(WINDOW *, int, int); |
| 1117 |
int wrefresh(WINDOW *); |
| 1118 |
int wscanw(WINDOW *, const char *, ...); |
| 1119 |
int wscrl(WINDOW *, int); |
| 1120 |
int wsetscrreg(WINDOW *, int, int); |
| 1121 |
int wstandend(WINDOW *); |
| 1122 |
int wstandout(WINDOW *); |
| 1123 |
void wsyncdown(WINDOW *); |
| 1124 |
void wsyncup(WINDOW *); |
| 1125 |
void wtimeout(WINDOW *, int); |
| 1126 |
int wtouchln(WINDOW *, int, int, int); |
| 1127 |
int wvline(WINDOW *, chtype, int); |
| 1128 |
|
| 1129 |
|
| 1130 |
|
| 1131 |
#ifdef PDC_WIDE |
| 1132 |
int addnwstr(const wchar_t *, int); |
| 1133 |
int addwstr(const wchar_t *); |
| 1134 |
int add_wch(const cchar_t *); |
| 1135 |
int add_wchnstr(const cchar_t *, int); |
| 1136 |
int add_wchstr(const cchar_t *); |
| 1137 |
int border_set(const cchar_t *, const cchar_t *, const cchar_t *, |
| 1138 |
const cchar_t *, const cchar_t *, const cchar_t *, |
| 1139 |
const cchar_t *, const cchar_t *); |
| 1140 |
int box_set(WINDOW *, const cchar_t *, const cchar_t *); |
| 1141 |
int echo_wchar(const cchar_t *); |
| 1142 |
int erasewchar(wchar_t *); |
| 1143 |
int getbkgrnd(cchar_t *); |
| 1144 |
int getcchar(const cchar_t *, wchar_t *, attr_t *, short *, void *); |
| 1145 |
int getn_wstr(wint_t *, int); |
| 1146 |
int get_wch(wint_t *); |
| 1147 |
int get_wstr(wint_t *); |
| 1148 |
int hline_set(const cchar_t *, int); |
| 1149 |
int innwstr(wchar_t *, int); |
| 1150 |
int ins_nwstr(const wchar_t *, int); |
| 1151 |
int ins_wch(const cchar_t *); |
| 1152 |
int ins_wstr(const wchar_t *); |
| 1153 |
int inwstr(wchar_t *); |
| 1154 |
int in_wch(cchar_t *); |
| 1155 |
int in_wchnstr(cchar_t *, int); |
| 1156 |
int in_wchstr(cchar_t *); |
| 1157 |
char *key_name(wchar_t); |
| 1158 |
int killwchar(wchar_t *); |
| 1159 |
int mvaddnwstr(int, int, const wchar_t *, int); |
| 1160 |
int mvaddwstr(int, int, const wchar_t *); |
| 1161 |
int mvadd_wch(int, int, const cchar_t *); |
| 1162 |
int mvadd_wchnstr(int, int, const cchar_t *, int); |
| 1163 |
int mvadd_wchstr(int, int, const cchar_t *); |
| 1164 |
int mvgetn_wstr(int, int, wint_t *, int); |
| 1165 |
int mvget_wch(int, int, wint_t *); |
| 1166 |
int mvget_wstr(int, int, wint_t *); |
| 1167 |
int mvhline_set(int, int, const cchar_t *, int); |
| 1168 |
int mvinnwstr(int, int, wchar_t *, int); |
| 1169 |
int mvins_nwstr(int, int, const wchar_t *, int); |
| 1170 |
int mvins_wch(int, int, const cchar_t *); |
| 1171 |
int mvins_wstr(int, int, const wchar_t *); |
| 1172 |
int mvinwstr(int, int, wchar_t *); |
| 1173 |
int mvin_wch(int, int, cchar_t *); |
| 1174 |
int mvin_wchnstr(int, int, cchar_t *, int); |
| 1175 |
int mvin_wchstr(int, int, cchar_t *); |
| 1176 |
int mvvline_set(int, int, const cchar_t *, int); |
| 1177 |
int mvwaddnwstr(WINDOW *, int, int, const wchar_t *, int); |
| 1178 |
int mvwaddwstr(WINDOW *, int, int, const wchar_t *); |
| 1179 |
int mvwadd_wch(WINDOW *, int, int, const cchar_t *); |
| 1180 |
int mvwadd_wchnstr(WINDOW *, int, int, const cchar_t *, int); |
| 1181 |
int mvwadd_wchstr(WINDOW *, int, int, const cchar_t *); |
| 1182 |
int mvwgetn_wstr(WINDOW *, int, int, wint_t *, int); |
| 1183 |
int mvwget_wch(WINDOW *, int, int, wint_t *); |
| 1184 |
int mvwget_wstr(WINDOW *, int, int, wint_t *); |
| 1185 |
int mvwhline_set(WINDOW *, int, int, const cchar_t *, int); |
| 1186 |
int mvwinnwstr(WINDOW *, int, int, wchar_t *, int); |
| 1187 |
int mvwins_nwstr(WINDOW *, int, int, const wchar_t *, int); |
| 1188 |
int mvwins_wch(WINDOW *, int, int, const cchar_t *); |
| 1189 |
int mvwins_wstr(WINDOW *, int, int, const wchar_t *); |
| 1190 |
int mvwin_wch(WINDOW *, int, int, cchar_t *); |
| 1191 |
int mvwin_wchnstr(WINDOW *, int, int, cchar_t *, int); |
| 1192 |
int mvwin_wchstr(WINDOW *, int, int, cchar_t *); |
| 1193 |
int mvwinwstr(WINDOW *, int, int, wchar_t *); |
| 1194 |
int mvwvline_set(WINDOW *, int, int, const cchar_t *, int); |
| 1195 |
int pecho_wchar(WINDOW *, const cchar_t*); |
| 1196 |
int setcchar(cchar_t*, const wchar_t*, const attr_t, short, const void*); |
| 1197 |
int slk_wset(int, const wchar_t *, int); |
| 1198 |
int unget_wch(const wchar_t); |
| 1199 |
int vline_set(const cchar_t *, int); |
| 1200 |
int waddnwstr(WINDOW *, const wchar_t *, int); |
| 1201 |
int waddwstr(WINDOW *, const wchar_t *); |
| 1202 |
int wadd_wch(WINDOW *, const cchar_t *); |
| 1203 |
int wadd_wchnstr(WINDOW *, const cchar_t *, int); |
| 1204 |
int wadd_wchstr(WINDOW *, const cchar_t *); |
| 1205 |
int wbkgrnd(WINDOW *, const cchar_t *); |
| 1206 |
void wbkgrndset(WINDOW *, const cchar_t *); |
| 1207 |
int wborder_set(WINDOW *, const cchar_t *, const cchar_t *, |
| 1208 |
const cchar_t *, const cchar_t *, const cchar_t *, |
| 1209 |
const cchar_t *, const cchar_t *, const cchar_t *); |
| 1210 |
int wecho_wchar(WINDOW *, const cchar_t *); |
| 1211 |
int wgetbkgrnd(WINDOW *, cchar_t *); |
| 1212 |
int wgetn_wstr(WINDOW *, wint_t *, int); |
| 1213 |
int wget_wch(WINDOW *, wint_t *); |
| 1214 |
int wget_wstr(WINDOW *, wint_t *); |
| 1215 |
int whline_set(WINDOW *, const cchar_t *, int); |
| 1216 |
int winnwstr(WINDOW *, wchar_t *, int); |
| 1217 |
int wins_nwstr(WINDOW *, const wchar_t *, int); |
| 1218 |
int wins_wch(WINDOW *, const cchar_t *); |
| 1219 |
int wins_wstr(WINDOW *, const wchar_t *); |
| 1220 |
int winwstr(WINDOW *, wchar_t *); |
| 1221 |
int win_wch(WINDOW *, cchar_t *); |
| 1222 |
int win_wchnstr(WINDOW *, cchar_t *, int); |
| 1223 |
int win_wchstr(WINDOW *, cchar_t *); |
| 1224 |
wchar_t *wunctrl(cchar_t *); |
| 1225 |
int wvline_set(WINDOW *, const cchar_t *, int); |
| 1226 |
#endif |
| 1227 |
|
| 1228 |
|
| 1229 |
|
| 1230 |
chtype getattrs(WINDOW *); |
| 1231 |
int getbegx(WINDOW *); |
| 1232 |
int getbegy(WINDOW *); |
| 1233 |
int getmaxx(WINDOW *); |
| 1234 |
int getmaxy(WINDOW *); |
| 1235 |
int getparx(WINDOW *); |
| 1236 |
int getpary(WINDOW *); |
| 1237 |
int getcurx(WINDOW *); |
| 1238 |
int getcury(WINDOW *); |
| 1239 |
void traceoff(void); |
| 1240 |
void traceon(void); |
| 1241 |
char *unctrl(chtype); |
| 1242 |
|
| 1243 |
int crmode(void); |
| 1244 |
int nocrmode(void); |
| 1245 |
int draino(int); |
| 1246 |
int resetterm(void); |
| 1247 |
int fixterm(void); |
| 1248 |
int saveterm(void); |
| 1249 |
int setsyx(int, int); |
| 1250 |
|
| 1251 |
int mouse_set(unsigned long); |
| 1252 |
int mouse_on(unsigned long); |
| 1253 |
int mouse_off(unsigned long); |
| 1254 |
int request_mouse_pos(void); |
| 1255 |
int map_button(unsigned long); |
| 1256 |
void wmouse_position(WINDOW *, int *, int *); |
| 1257 |
unsigned long getmouse(void); |
| 1258 |
unsigned long getbmap(void); |
| 1259 |
|
| 1260 |
|
| 1261 |
|
| 1262 |
int assume_default_colors(int, int); |
| 1263 |
const char *curses_version(void); |
| 1264 |
bool has_key(int); |
| 1265 |
int use_default_colors(void); |
| 1266 |
int wresize(WINDOW *, int, int); |
| 1267 |
|
| 1268 |
int mouseinterval(int); |
| 1269 |
mmask_t mousemask(mmask_t, mmask_t *); |
| 1270 |
bool mouse_trafo(int *, int *, bool); |
| 1271 |
int nc_getmouse(MEVENT *); |
| 1272 |
int ungetmouse(MEVENT *); |
| 1273 |
bool wenclose(const WINDOW *, int, int); |
| 1274 |
bool wmouse_trafo(const WINDOW *, int *, int *, bool); |
| 1275 |
|
| 1276 |
|
| 1277 |
|
| 1278 |
int addrawch(chtype); |
| 1279 |
int insrawch(chtype); |
| 1280 |
bool is_termresized(void); |
| 1281 |
int mvaddrawch(int, int, chtype); |
| 1282 |
int mvdeleteln(int, int); |
| 1283 |
int mvinsertln(int, int); |
| 1284 |
int mvinsrawch(int, int, chtype); |
| 1285 |
int mvwaddrawch(WINDOW *, int, int, chtype); |
| 1286 |
int mvwdeleteln(WINDOW *, int, int); |
| 1287 |
int mvwinsertln(WINDOW *, int, int); |
| 1288 |
int mvwinsrawch(WINDOW *, int, int, chtype); |
| 1289 |
int raw_output(bool); |
| 1290 |
int resize_term(int, int); |
| 1291 |
WINDOW *resize_window(WINDOW *, int, int); |
| 1292 |
int waddrawch(WINDOW *, chtype); |
| 1293 |
int winsrawch(WINDOW *, chtype); |
| 1294 |
char wordchar(void); |
| 1295 |
|
| 1296 |
#ifdef PDC_WIDE |
| 1297 |
wchar_t *slk_wlabel(int); |
| 1298 |
#endif |
| 1299 |
|
| 1300 |
void PDC_debug(const char *, ...); |
| 1301 |
int PDC_ungetch(int); |
| 1302 |
int PDC_set_blink(bool); |
| 1303 |
int PDC_set_line_color(short); |
| 1304 |
void PDC_set_title(const char *); |
| 1305 |
|
| 1306 |
int PDC_clearclipboard(void); |
| 1307 |
int PDC_freeclipboard(char *); |
| 1308 |
int PDC_getclipboard(char **, long *); |
| 1309 |
int PDC_setclipboard(const char *, long); |
| 1310 |
|
| 1311 |
unsigned long PDC_get_input_fd(void); |
| 1312 |
unsigned long PDC_get_key_modifiers(void); |
| 1313 |
int PDC_return_key_modifiers(bool); |
| 1314 |
int PDC_save_key_modifiers(bool); |
| 1315 |
|
| 1316 |
#ifdef XCURSES |
| 1317 |
WINDOW *Xinitscr(int, char **); |
| 1318 |
void XCursesExit(void); |
| 1319 |
int sb_init(void); |
| 1320 |
int sb_set_horz(int, int, int); |
| 1321 |
int sb_set_vert(int, int, int); |
| 1322 |
int sb_get_horz(int *, int *, int *); |
| 1323 |
int sb_get_vert(int *, int *, int *); |
| 1324 |
int sb_refresh(void); |
| 1325 |
#endif |
| 1326 |
|
| 1327 |
|
| 1328 |
|
| 1329 |
|
| 1330 |
|
| 1331 |
#define getch() wgetch(stdscr) |
| 1332 |
#define ungetch(ch) PDC_ungetch(ch) |
| 1333 |
|
| 1334 |
#define COLOR_PAIR(n) (((chtype)(n) << PDC_COLOR_SHIFT) & A_COLOR) |
| 1335 |
#define PAIR_NUMBER(n) (((n) & A_COLOR) >> PDC_COLOR_SHIFT) |
| 1336 |
|
| 1337 |
|
| 1338 |
|
| 1339 |
#define getbegyx(w, y, x) (y = getbegy(w), x = getbegx(w)) |
| 1340 |
#define getmaxyx(w, y, x) (y = getmaxy(w), x = getmaxx(w)) |
| 1341 |
#define getparyx(w, y, x) (y = getpary(w), x = getparx(w)) |
| 1342 |
#define getyx(w, y, x) (y = getcury(w), x = getcurx(w)) |
| 1343 |
|
| 1344 |
#define getsyx(y, x) { if (curscr->_leaveit) (y)=(x)=-1; \ |
| 1345 |
else getyx(curscr,(y),(x)); } |
| 1346 |
|
| 1347 |
#ifdef NCURSES_MOUSE_VERSION |
| 1348 |
# define getmouse(x) nc_getmouse(x) |
| 1349 |
#endif |
| 1350 |
|
| 1351 |
|
| 1352 |
|
| 1353 |
#define PDC_CLIP_SUCCESS 0 |
| 1354 |
#define PDC_CLIP_ACCESS_ERROR 1 |
| 1355 |
#define PDC_CLIP_EMPTY 2 |
| 1356 |
#define PDC_CLIP_MEMORY_ERROR 3 |
| 1357 |
|
| 1358 |
|
| 1359 |
|
| 1360 |
#define PDC_KEY_MODIFIER_SHIFT 1 |
| 1361 |
#define PDC_KEY_MODIFIER_CONTROL 2 |
| 1362 |
#define PDC_KEY_MODIFIER_ALT 4 |
| 1363 |
#define PDC_KEY_MODIFIER_NUMLOCK 8 |
| 1364 |
|
| 1365 |
#if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS) |
| 1366 |
# undef bool |
| 1367 |
} |
| 1368 |
#endif |
| 1369 |
|
| 1370 |
|
| 1371 |
|
| 1372 |
void curses_enable_vga(int); |
| 1373 |
void curses_enable_serial(int); |
| 1374 |
|
| 1375 |
int curses_vga_enabled(void); |
| 1376 |
int curses_serial_enabled(void); |
| 1377 |
|
| 1378 |
#endif |