| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
#ifndef _CURSES_H |
| 38 |
#define _CURSES_H |
| 39 |
|
| 40 |
#define CURSES 1 |
| 41 |
#define CURSES_H 1 |
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
#define NCURSES_VERSION_MAJOR 5 |
| 51 |
#define NCURSES_VERSION_MINOR 6 |
| 52 |
#define NCURSES_VERSION_PATCH 20061217 |
| 53 |
|
| 54 |
|
| 55 |
#undef NCURSES_VERSION |
| 56 |
#define NCURSES_VERSION "5.6" |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
#if !defined(NCURSES_IMPEXP) |
| 73 |
# define NCURSES_IMPEXP |
| 74 |
#endif |
| 75 |
#if !defined(NCURSES_API) |
| 76 |
# define NCURSES_API |
| 77 |
#endif |
| 78 |
#if !defined(NCURSES_EXPORT) |
| 79 |
# define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API |
| 80 |
#endif |
| 81 |
#if !defined(NCURSES_EXPORT_VAR) |
| 82 |
# define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type |
| 83 |
#endif |
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
#ifndef NCURSES_ENABLE_STDBOOL_H |
| 90 |
#define NCURSES_ENABLE_STDBOOL_H 1 |
| 91 |
#endif |
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
#ifdef NCURSES_NOMACROS |
| 98 |
#ifndef NCURSES_ATTR_T |
| 99 |
#define NCURSES_ATTR_T attr_t |
| 100 |
#endif |
| 101 |
#endif |
| 102 |
|
| 103 |
#ifndef NCURSES_ATTR_T |
| 104 |
#define NCURSES_ATTR_T int |
| 105 |
#endif |
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
#undef NCURSES_CONST |
| 112 |
#define NCURSES_CONST const |
| 113 |
|
| 114 |
#undef NCURSES_INLINE |
| 115 |
#define NCURSES_INLINE inline |
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
#undef NCURSES_COLOR_T |
| 121 |
#define NCURSES_COLOR_T short |
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
#undef NCURSES_SIZE_T |
| 127 |
#define NCURSES_SIZE_T short |
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
#undef NCURSES_TPARM_VARARGS |
| 133 |
#define NCURSES_TPARM_VARARGS 1 |
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
#undef NCURSES_CH_T |
| 141 |
#define NCURSES_CH_T cchar_t |
| 142 |
|
| 143 |
#if 0 && defined(_LP64) |
| 144 |
typedef unsigned chtype; |
| 145 |
typedef unsigned mmask_t; |
| 146 |
#else |
| 147 |
typedef unsigned long chtype; |
| 148 |
typedef unsigned long mmask_t; |
| 149 |
#endif |
| 150 |
|
| 151 |
#include <stdio.h> |
| 152 |
|
| 153 |
#include <stdarg.h> |
| 154 |
|
| 155 |
|
| 156 |
#define _XOPEN_SOURCE_EXTENDED 1 // XXX |
| 157 |
#ifdef _XOPEN_SOURCE_EXTENDED |
| 158 |
#include <stddef.h> |
| 159 |
#endif |
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
#undef TRUE |
| 174 |
#define TRUE 1 |
| 175 |
|
| 176 |
#undef FALSE |
| 177 |
#define FALSE 0 |
| 178 |
|
| 179 |
typedef unsigned char NCURSES_BOOL; |
| 180 |
|
| 181 |
#if defined(__cplusplus) |
| 182 |
|
| 183 |
|
| 184 |
#define NCURSES_BOOL bool |
| 185 |
|
| 186 |
#else |
| 187 |
|
| 188 |
#if NCURSES_ENABLE_STDBOOL_H |
| 189 |
#include <stdbool.h> |
| 190 |
|
| 191 |
#define NCURSES_BOOL bool |
| 192 |
#else |
| 193 |
|
| 194 |
#undef bool |
| 195 |
#define bool NCURSES_BOOL |
| 196 |
#endif |
| 197 |
|
| 198 |
#endif |
| 199 |
|
| 200 |
#ifdef __cplusplus |
| 201 |
extern "C" { |
| 202 |
#define NCURSES_CAST(type,value) static_cast<type>(value) |
| 203 |
#else |
| 204 |
#define NCURSES_CAST(type,value) (type)(value) |
| 205 |
#endif |
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
#define WA_ATTRIBUTES A_ATTRIBUTES |
| 212 |
#define WA_NORMAL A_NORMAL |
| 213 |
#define WA_STANDOUT A_STANDOUT |
| 214 |
#define WA_UNDERLINE A_UNDERLINE |
| 215 |
#define WA_REVERSE A_REVERSE |
| 216 |
#define WA_BLINK A_BLINK |
| 217 |
#define WA_DIM A_DIM |
| 218 |
#define WA_BOLD A_BOLD |
| 219 |
#define WA_ALTCHARSET A_ALTCHARSET |
| 220 |
#define WA_INVIS A_INVIS |
| 221 |
#define WA_PROTECT A_PROTECT |
| 222 |
#define WA_HORIZONTAL A_HORIZONTAL |
| 223 |
#define WA_LEFT A_LEFT |
| 224 |
#define WA_LOW A_LOW |
| 225 |
#define WA_RIGHT A_RIGHT |
| 226 |
#define WA_TOP A_TOP |
| 227 |
#define WA_VERTICAL A_VERTICAL |
| 228 |
|
| 229 |
|
| 230 |
extern NCURSES_EXPORT_VAR(int) COLORS; |
| 231 |
extern NCURSES_EXPORT_VAR(int) COLOR_PAIRS; |
| 232 |
|
| 233 |
#define COLOR_BLACK 0 |
| 234 |
#define COLOR_RED 1 |
| 235 |
#define COLOR_GREEN 2 |
| 236 |
#define COLOR_YELLOW 3 |
| 237 |
#define COLOR_BLUE 4 |
| 238 |
#define COLOR_MAGENTA 5 |
| 239 |
#define COLOR_CYAN 6 |
| 240 |
#define COLOR_WHITE 7 |
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
#if 0 |
| 245 |
extern NCURSES_EXPORT_VAR(chtype*) _nc_acs_map(void); |
| 246 |
#define acs_map (_nc_acs_map()) |
| 247 |
#else |
| 248 |
extern NCURSES_EXPORT_VAR(chtype) acs_map[]; |
| 249 |
#endif |
| 250 |
|
| 251 |
#define NCURSES_ACS(c) (acs_map[NCURSES_CAST(unsigned char,c)]) |
| 252 |
|
| 253 |
|
| 254 |
#define ACS_ULCORNER NCURSES_ACS('l') |
| 255 |
#define ACS_LLCORNER NCURSES_ACS('m') |
| 256 |
#define ACS_URCORNER NCURSES_ACS('k') |
| 257 |
#define ACS_LRCORNER NCURSES_ACS('j') |
| 258 |
#define ACS_LTEE NCURSES_ACS('t') |
| 259 |
#define ACS_RTEE NCURSES_ACS('u') |
| 260 |
#define ACS_BTEE NCURSES_ACS('v') |
| 261 |
#define ACS_TTEE NCURSES_ACS('w') |
| 262 |
#define ACS_HLINE NCURSES_ACS('q') |
| 263 |
#define ACS_VLINE NCURSES_ACS('x') |
| 264 |
#define ACS_PLUS NCURSES_ACS('n') |
| 265 |
#define ACS_S1 NCURSES_ACS('o') |
| 266 |
#define ACS_S9 NCURSES_ACS('s') |
| 267 |
#define ACS_DIAMOND NCURSES_ACS('`') |
| 268 |
#define ACS_CKBOARD NCURSES_ACS('a') |
| 269 |
#define ACS_DEGREE NCURSES_ACS('f') |
| 270 |
#define ACS_PLMINUS NCURSES_ACS('g') |
| 271 |
#define ACS_BULLET NCURSES_ACS('~') |
| 272 |
|
| 273 |
#define ACS_LARROW NCURSES_ACS(',') |
| 274 |
#define ACS_RARROW NCURSES_ACS('+') |
| 275 |
#define ACS_DARROW NCURSES_ACS('.') |
| 276 |
#define ACS_UARROW NCURSES_ACS('-') |
| 277 |
#define ACS_BOARD NCURSES_ACS('h') |
| 278 |
#define ACS_LANTERN NCURSES_ACS('i') |
| 279 |
#define ACS_BLOCK NCURSES_ACS('0') |
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
#define ACS_S3 NCURSES_ACS('p') |
| 286 |
#define ACS_S7 NCURSES_ACS('r') |
| 287 |
#define ACS_LEQUAL NCURSES_ACS('y') |
| 288 |
#define ACS_GEQUAL NCURSES_ACS('z') |
| 289 |
#define ACS_PI NCURSES_ACS('{') |
| 290 |
#define ACS_NEQUAL NCURSES_ACS('|') |
| 291 |
#define ACS_STERLING NCURSES_ACS('}') |
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
#define ACS_BSSB ACS_ULCORNER |
| 300 |
#define ACS_SSBB ACS_LLCORNER |
| 301 |
#define ACS_BBSS ACS_URCORNER |
| 302 |
#define ACS_SBBS ACS_LRCORNER |
| 303 |
#define ACS_SBSS ACS_RTEE |
| 304 |
#define ACS_SSSB ACS_LTEE |
| 305 |
#define ACS_SSBS ACS_BTEE |
| 306 |
#define ACS_BSSS ACS_TTEE |
| 307 |
#define ACS_BSBS ACS_HLINE |
| 308 |
#define ACS_SBSB ACS_VLINE |
| 309 |
#define ACS_SSSS ACS_PLUS |
| 310 |
|
| 311 |
#undef ERR |
| 312 |
#define ERR (-1) |
| 313 |
|
| 314 |
#undef OK |
| 315 |
#define OK (0) |
| 316 |
|
| 317 |
|
| 318 |
#define _SUBWIN 0x01 |
| 319 |
#define _ENDLINE 0x02 |
| 320 |
#define _FULLWIN 0x04 |
| 321 |
#define _SCROLLWIN 0x08 |
| 322 |
#define _ISPAD 0x10 |
| 323 |
#define _HASMOVED 0x20 |
| 324 |
#define _WRAPPED 0x40 |
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
|
| 330 |
#define _NOCHANGE -1 |
| 331 |
|
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
|
| 336 |
#define _NEWINDEX -1 |
| 337 |
|
| 338 |
typedef struct screen SCREEN; |
| 339 |
typedef struct _win_st WINDOW; |
| 340 |
|
| 341 |
typedef chtype attr_t; |
| 342 |
|
| 343 |
#ifdef _XOPEN_SOURCE_EXTENDED |
| 344 |
|
| 345 |
#if 0 |
| 346 |
#ifdef mblen |
| 347 |
#undef mblen |
| 348 |
#endif |
| 349 |
#include <libutf8.h> |
| 350 |
#endif |
| 351 |
|
| 352 |
#if 1 |
| 353 |
#include <wchar.h> |
| 354 |
#endif |
| 355 |
|
| 356 |
#if 0 |
| 357 |
typedef unsigned short wchar_t1; |
| 358 |
#endif |
| 359 |
|
| 360 |
#if 0 |
| 361 |
typedef unsigned int wint_t1; |
| 362 |
#endif |
| 363 |
|
| 364 |
#define CCHARW_MAX 5 |
| 365 |
typedef struct |
| 366 |
{ |
| 367 |
attr_t attr; |
| 368 |
wchar_t chars[CCHARW_MAX]; |
| 369 |
#if 0 |
| 370 |
int ext_color; |
| 371 |
#endif |
| 372 |
} |
| 373 |
cchar_t; |
| 374 |
|
| 375 |
#endif |
| 376 |
|
| 377 |
struct ldat; |
| 378 |
|
| 379 |
struct _win_st |
| 380 |
{ |
| 381 |
NCURSES_SIZE_T _cury, _curx; |
| 382 |
|
| 383 |
|
| 384 |
NCURSES_SIZE_T _maxy, _maxx; |
| 385 |
NCURSES_SIZE_T _begy, _begx; |
| 386 |
|
| 387 |
short _flags; |
| 388 |
|
| 389 |
|
| 390 |
attr_t _attrs; |
| 391 |
chtype _bkgd; |
| 392 |
|
| 393 |
|
| 394 |
bool _notimeout; |
| 395 |
bool _clear; |
| 396 |
bool _leaveok; |
| 397 |
bool _scroll; |
| 398 |
bool _idlok; |
| 399 |
bool _idcok; |
| 400 |
bool _immed; |
| 401 |
bool _sync; |
| 402 |
bool _use_keypad; |
| 403 |
int _delay; |
| 404 |
|
| 405 |
struct ldat *_line; |
| 406 |
|
| 407 |
|
| 408 |
NCURSES_SIZE_T _regtop; |
| 409 |
NCURSES_SIZE_T _regbottom; |
| 410 |
|
| 411 |
|
| 412 |
int _parx; |
| 413 |
int _pary; |
| 414 |
WINDOW *_parent; |
| 415 |
|
| 416 |
|
| 417 |
struct pdat |
| 418 |
{ |
| 419 |
NCURSES_SIZE_T _pad_y, _pad_x; |
| 420 |
NCURSES_SIZE_T _pad_top, _pad_left; |
| 421 |
NCURSES_SIZE_T _pad_bottom, _pad_right; |
| 422 |
} _pad; |
| 423 |
|
| 424 |
NCURSES_SIZE_T _yoffset; |
| 425 |
|
| 426 |
#ifdef _XOPEN_SOURCE_EXTENDED |
| 427 |
cchar_t _bkgrnd; |
| 428 |
|
| 429 |
#if 1 |
| 430 |
int _color; |
| 431 |
#endif |
| 432 |
#endif |
| 433 |
}; |
| 434 |
|
| 435 |
extern NCURSES_EXPORT_VAR(WINDOW *) stdscr; |
| 436 |
extern NCURSES_EXPORT_VAR(WINDOW *) curscr; |
| 437 |
extern NCURSES_EXPORT_VAR(WINDOW *) newscr; |
| 438 |
|
| 439 |
extern NCURSES_EXPORT_VAR(int) LINES; |
| 440 |
extern NCURSES_EXPORT_VAR(int) COLS; |
| 441 |
extern NCURSES_EXPORT_VAR(int) TABSIZE; |
| 442 |
|
| 443 |
|
| 444 |
|
| 445 |
|
| 446 |
extern NCURSES_EXPORT_VAR(int) ESCDELAY; |
| 447 |
|
| 448 |
|
| 449 |
|
| 450 |
|
| 451 |
#if 1 |
| 452 |
extern NCURSES_EXPORT(bool) is_term_resized (int, int); |
| 453 |
extern NCURSES_EXPORT(char *) keybound (int, int); |
| 454 |
extern NCURSES_EXPORT(const char *) curses_version (void); |
| 455 |
extern NCURSES_EXPORT(int) assume_default_colors (int, int); |
| 456 |
extern NCURSES_EXPORT(int) define_key (const char *, int); |
| 457 |
extern NCURSES_EXPORT(int) key_defined (const char *); |
| 458 |
extern NCURSES_EXPORT(int) keyok (int, bool); |
| 459 |
extern NCURSES_EXPORT(int) resize_term (int, int); |
| 460 |
extern NCURSES_EXPORT(int) resizeterm (int, int); |
| 461 |
extern NCURSES_EXPORT(int) use_default_colors (void); |
| 462 |
extern NCURSES_EXPORT(int) use_extended_names (bool); |
| 463 |
extern NCURSES_EXPORT(int) use_legacy_coding (int); |
| 464 |
extern NCURSES_EXPORT(int) wresize (WINDOW *, int, int); |
| 465 |
extern NCURSES_EXPORT(void) nofilter(void); |
| 466 |
#else |
| 467 |
#define curses_version() NCURSES_VERSION |
| 468 |
#endif |
| 469 |
|
| 470 |
|
| 471 |
|
| 472 |
|
| 473 |
#if 1 |
| 474 |
#ifdef NCURSES_WGETCH_EVENTS |
| 475 |
#if !defined(__BEOS__) |
| 476 |
# define NCURSES_EVENT_VERSION 1 |
| 477 |
#endif |
| 478 |
|
| 479 |
|
| 480 |
|
| 481 |
|
| 482 |
# define _NC_EVENT_TIMEOUT_MSEC 1 |
| 483 |
# define _NC_EVENT_FILE 2 |
| 484 |
# define _NC_EVENT_FILE_READABLE 2 |
| 485 |
# if 0 |
| 486 |
# define _NC_EVENT_FILE_WRITABLE 4 |
| 487 |
# define _NC_EVENT_FILE_EXCEPTION 8 |
| 488 |
# endif |
| 489 |
|
| 490 |
typedef struct |
| 491 |
{ |
| 492 |
int type; |
| 493 |
union |
| 494 |
{ |
| 495 |
long timeout_msec; |
| 496 |
struct |
| 497 |
{ |
| 498 |
unsigned int flags; |
| 499 |
int fd; |
| 500 |
unsigned int result; |
| 501 |
} fev; |
| 502 |
} data; |
| 503 |
} _nc_event; |
| 504 |
|
| 505 |
typedef struct |
| 506 |
{ |
| 507 |
int count; |
| 508 |
int result_flags; |
| 509 |
_nc_event *events[1]; |
| 510 |
} _nc_eventlist; |
| 511 |
|
| 512 |
extern NCURSES_EXPORT(int) wgetch_events(WINDOW *, _nc_eventlist *); |
| 513 |
extern NCURSES_EXPORT(int) wgetnstr_events(WINDOW *,char *,int,_nc_eventlist *); |
| 514 |
|
| 515 |
#endif |
| 516 |
#endif |
| 517 |
|
| 518 |
|
| 519 |
|
| 520 |
|
| 521 |
|
| 522 |
|
| 523 |
|
| 524 |
|
| 525 |
#if !(defined(__GNUC__) || defined(__GNUG__) || defined(__attribute__)) |
| 526 |
#define __attribute__(p) |
| 527 |
#endif |
| 528 |
|
| 529 |
|
| 530 |
|
| 531 |
|
| 532 |
|
| 533 |
|
| 534 |
|
| 535 |
|
| 536 |
|
| 537 |
#ifndef GCC_PRINTFLIKE |
| 538 |
#if defined(GCC_PRINTF) && !defined(printf) |
| 539 |
#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) |
| 540 |
#else |
| 541 |
#define GCC_PRINTFLIKE(fmt,var) |
| 542 |
#endif |
| 543 |
#endif |
| 544 |
|
| 545 |
#ifndef GCC_SCANFLIKE |
| 546 |
#if defined(GCC_SCANF) && !defined(scanf) |
| 547 |
#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var))) |
| 548 |
#else |
| 549 |
#define GCC_SCANFLIKE(fmt,var) |
| 550 |
#endif |
| 551 |
#endif |
| 552 |
|
| 553 |
#ifndef GCC_NORETURN |
| 554 |
#define GCC_NORETURN |
| 555 |
#endif |
| 556 |
|
| 557 |
#ifndef GCC_UNUSED |
| 558 |
#define GCC_UNUSED |
| 559 |
#endif |
| 560 |
|
| 561 |
|
| 562 |
|
| 563 |
|
| 564 |
|
| 565 |
|
| 566 |
|
| 567 |
|
| 568 |
extern NCURSES_EXPORT(int) addch (const chtype); |
| 569 |
extern NCURSES_EXPORT(int) addchnstr (const chtype *, int); |
| 570 |
extern NCURSES_EXPORT(int) addchstr (const chtype *); |
| 571 |
extern NCURSES_EXPORT(int) addnstr (const char *, int); |
| 572 |
extern NCURSES_EXPORT(int) addstr (const char *); |
| 573 |
extern NCURSES_EXPORT(int) attroff (NCURSES_ATTR_T); |
| 574 |
extern NCURSES_EXPORT(int) attron (NCURSES_ATTR_T); |
| 575 |
extern NCURSES_EXPORT(int) attrset (NCURSES_ATTR_T); |
| 576 |
extern NCURSES_EXPORT(int) attr_get (attr_t *, short *, void *); |
| 577 |
extern NCURSES_EXPORT(int) attr_off (attr_t, void *); |
| 578 |
extern NCURSES_EXPORT(int) attr_on (attr_t, void *); |
| 579 |
extern NCURSES_EXPORT(int) attr_set (attr_t, short, void *); |
| 580 |
extern NCURSES_EXPORT(int) baudrate (void); |
| 581 |
extern NCURSES_EXPORT(int) beep (void); |
| 582 |
extern NCURSES_EXPORT(int) bkgd (chtype); |
| 583 |
extern NCURSES_EXPORT(void) bkgdset (chtype); |
| 584 |
extern NCURSES_EXPORT(int) border (chtype,chtype,chtype,chtype,chtype,chtype,chtype,chtype); |
| 585 |
extern NCURSES_EXPORT(int) box (WINDOW *, chtype, chtype); |
| 586 |
extern NCURSES_EXPORT(bool) can_change_color (void); |
| 587 |
extern NCURSES_EXPORT(int) cbreak (void); |
| 588 |
extern NCURSES_EXPORT(int) chgat (int, attr_t, short, const void *); |
| 589 |
extern NCURSES_EXPORT(int) clear (void); |
| 590 |
extern NCURSES_EXPORT(int) clearok (WINDOW *,bool); |
| 591 |
extern NCURSES_EXPORT(int) clrtobot (void); |
| 592 |
extern NCURSES_EXPORT(int) clrtoeol (void); |
| 593 |
extern NCURSES_EXPORT(int) color_content (short,short*,short*,short*); |
| 594 |
extern NCURSES_EXPORT(int) color_set (short,void*); |
| 595 |
extern NCURSES_EXPORT(int) COLOR_PAIR (int); |
| 596 |
extern NCURSES_EXPORT(int) copywin (const WINDOW*,WINDOW*,int,int,int,int,int,int,int); |
| 597 |
extern NCURSES_EXPORT(int) curs_set (int); |
| 598 |
extern NCURSES_EXPORT(int) def_prog_mode (void); |
| 599 |
extern NCURSES_EXPORT(int) def_shell_mode (void); |
| 600 |
extern NCURSES_EXPORT(int) delay_output (int); |
| 601 |
extern NCURSES_EXPORT(int) delch (void); |
| 602 |
extern NCURSES_EXPORT(void) delscreen (SCREEN *); |
| 603 |
extern NCURSES_EXPORT(int) delwin (WINDOW *); |
| 604 |
extern NCURSES_EXPORT(int) deleteln (void); |
| 605 |
extern NCURSES_EXPORT(WINDOW *) derwin (WINDOW *,int,int,int,int); |
| 606 |
extern NCURSES_EXPORT(int) doupdate (void); |
| 607 |
extern NCURSES_EXPORT(WINDOW *) dupwin (WINDOW *); |
| 608 |
extern NCURSES_EXPORT(int) echo (void); |
| 609 |
extern NCURSES_EXPORT(int) echochar (const chtype); |
| 610 |
extern NCURSES_EXPORT(int) erase (void); |
| 611 |
extern NCURSES_EXPORT(int) endwin (void); |
| 612 |
extern NCURSES_EXPORT(char) erasechar (void); |
| 613 |
extern NCURSES_EXPORT(void) filter (void); |
| 614 |
extern NCURSES_EXPORT(int) flash (void); |
| 615 |
extern NCURSES_EXPORT(int) flushinp (void); |
| 616 |
extern NCURSES_EXPORT(chtype) getbkgd (WINDOW *); |
| 617 |
extern NCURSES_EXPORT(int) getch (void); |
| 618 |
extern NCURSES_EXPORT(int) getnstr (char *, int); |
| 619 |
extern NCURSES_EXPORT(int) getstr (char *); |
| 620 |
extern NCURSES_EXPORT(WINDOW *) getwin (FILE *); |
| 621 |
extern NCURSES_EXPORT(int) halfdelay (int); |
| 622 |
extern NCURSES_EXPORT(bool) has_colors (void); |
| 623 |
extern NCURSES_EXPORT(bool) has_ic (void); |
| 624 |
extern NCURSES_EXPORT(bool) has_il (void); |
| 625 |
extern NCURSES_EXPORT(int) hline (chtype, int); |
| 626 |
extern NCURSES_EXPORT(void) idcok (WINDOW *, bool); |
| 627 |
extern NCURSES_EXPORT(int) idlok (WINDOW *, bool); |
| 628 |
extern NCURSES_EXPORT(void) immedok (WINDOW *, bool); |
| 629 |
extern NCURSES_EXPORT(chtype) inch (void); |
| 630 |
extern NCURSES_EXPORT(int) inchnstr (chtype *, int); |
| 631 |
extern NCURSES_EXPORT(int) inchstr (chtype *); |
| 632 |
extern NCURSES_EXPORT(WINDOW *) initscr (void); |
| 633 |
extern NCURSES_EXPORT(int) init_color (short,short,short,short); |
| 634 |
extern NCURSES_EXPORT(int) init_pair (short,short,short); |
| 635 |
extern NCURSES_EXPORT(int) innstr (char *, int); |
| 636 |
extern NCURSES_EXPORT(int) insch (chtype); |
| 637 |
extern NCURSES_EXPORT(int) insdelln (int); |
| 638 |
extern NCURSES_EXPORT(int) insertln (void); |
| 639 |
extern NCURSES_EXPORT(int) insnstr (const char *, int); |
| 640 |
extern NCURSES_EXPORT(int) insstr (const char *); |
| 641 |
extern NCURSES_EXPORT(int) instr (char *); |
| 642 |
extern NCURSES_EXPORT(int) intrflush (WINDOW *,bool); |
| 643 |
extern NCURSES_EXPORT(bool) isendwin (void); |
| 644 |
extern NCURSES_EXPORT(bool) is_linetouched (WINDOW *,int); |
| 645 |
extern NCURSES_EXPORT(bool) is_wintouched (WINDOW *); |
| 646 |
extern NCURSES_EXPORT(NCURSES_CONST char *) keyname (int); |
| 647 |
extern NCURSES_EXPORT(int) keypad (WINDOW *,bool); |
| 648 |
extern NCURSES_EXPORT(char) killchar (void); |
| 649 |
extern NCURSES_EXPORT(int) leaveok (WINDOW *,bool); |
| 650 |
extern NCURSES_EXPORT(char *) longname (void); |
| 651 |
extern NCURSES_EXPORT(int) meta (WINDOW *,bool); |
| 652 |
extern NCURSES_EXPORT(int) move (int, int); |
| 653 |
extern NCURSES_EXPORT(int) mvaddch (int, int, const chtype); |
| 654 |
extern NCURSES_EXPORT(int) mvaddchnstr (int, int, const chtype *, int); |
| 655 |
extern NCURSES_EXPORT(int) mvaddchstr (int, int, const chtype *); |
| 656 |
extern NCURSES_EXPORT(int) mvaddnstr (int, int, const char *, int); |
| 657 |
extern NCURSES_EXPORT(int) mvaddstr (int, int, const char *); |
| 658 |
extern NCURSES_EXPORT(int) mvchgat (int, int, int, attr_t, short, const void *); |
| 659 |
extern NCURSES_EXPORT(int) mvcur (int,int,int,int); |
| 660 |
extern NCURSES_EXPORT(int) mvdelch (int, int); |
| 661 |
extern NCURSES_EXPORT(int) mvderwin (WINDOW *, int, int); |
| 662 |
extern NCURSES_EXPORT(int) mvgetch (int, int); |
| 663 |
extern NCURSES_EXPORT(int) mvgetnstr (int, int, char *, int); |
| 664 |
extern NCURSES_EXPORT(int) mvgetstr (int, int, char *); |
| 665 |
extern NCURSES_EXPORT(int) mvhline (int, int, chtype, int); |
| 666 |
extern NCURSES_EXPORT(chtype) mvinch (int, int); |
| 667 |
extern NCURSES_EXPORT(int) mvinchnstr (int, int, chtype *, int); |
| 668 |
extern NCURSES_EXPORT(int) mvinchstr (int, int, chtype *); |
| 669 |
extern NCURSES_EXPORT(int) mvinnstr (int, int, char *, int); |
| 670 |
extern NCURSES_EXPORT(int) mvinsch (int, int, chtype); |
| 671 |
extern NCURSES_EXPORT(int) mvinsnstr (int, int, const char *, int); |
| 672 |
extern NCURSES_EXPORT(int) mvinsstr (int, int, const char *); |
| 673 |
extern NCURSES_EXPORT(int) mvinstr (int, int, char *); |
| 674 |
extern NCURSES_EXPORT(int) mvprintw (int,int, const char *,...) |
| 675 |
GCC_PRINTFLIKE(3,4); |
| 676 |
extern NCURSES_EXPORT(int) mvscanw (int,int, NCURSES_CONST char *,...) |
| 677 |
GCC_SCANFLIKE(3,4); |
| 678 |
extern NCURSES_EXPORT(int) mvvline (int, int, chtype, int); |
| 679 |
extern NCURSES_EXPORT(int) mvwaddch (WINDOW *, int, int, const chtype); |
| 680 |
extern NCURSES_EXPORT(int) mvwaddchnstr (WINDOW *, int, int, const chtype *, int); |
| 681 |
extern NCURSES_EXPORT(int) mvwaddchstr (WINDOW *, int, int, const chtype *); |
| 682 |
extern NCURSES_EXPORT(int) mvwaddnstr (WINDOW *, int, int, const char *, int); |
| 683 |
extern NCURSES_EXPORT(int) mvwaddstr (WINDOW *, int, int, const char *); |
| 684 |
extern NCURSES_EXPORT(int) mvwchgat (WINDOW *, int, int, int, attr_t, short, const void *); |
| 685 |
extern NCURSES_EXPORT(int) mvwdelch (WINDOW *, int, int); |
| 686 |
extern NCURSES_EXPORT(int) mvwgetch (WINDOW *, int, int); |
| 687 |
extern NCURSES_EXPORT(int) mvwgetnstr (WINDOW *, int, int, char *, int); |
| 688 |
extern NCURSES_EXPORT(int) mvwgetstr (WINDOW *, int, int, char *); |
| 689 |
extern NCURSES_EXPORT(int) mvwhline (WINDOW *, int, int, chtype, int); |
| 690 |
extern NCURSES_EXPORT(int) mvwin (WINDOW *,int,int); |
| 691 |
extern NCURSES_EXPORT(chtype) mvwinch (WINDOW *, int, int); |
| 692 |
extern NCURSES_EXPORT(int) mvwinchnstr (WINDOW *, int, int, chtype *, int); |
| 693 |
extern NCURSES_EXPORT(int) mvwinchstr (WINDOW *, int, int, chtype *); |
| 694 |
extern NCURSES_EXPORT(int) mvwinnstr (WINDOW *, int, int, char *, int); |
| 695 |
extern NCURSES_EXPORT(int) mvwinsch (WINDOW *, int, int, chtype); |
| 696 |
extern NCURSES_EXPORT(int) mvwinsnstr (WINDOW *, int, int, const char *, int); |
| 697 |
extern NCURSES_EXPORT(int) mvwinsstr (WINDOW *, int, int, const char *); |
| 698 |
extern NCURSES_EXPORT(int) mvwinstr (WINDOW *, int, int, char *); |
| 699 |
extern NCURSES_EXPORT(int) mvwprintw (WINDOW*,int,int, const char *,...) |
| 700 |
GCC_PRINTFLIKE(4,5); |
| 701 |
extern NCURSES_EXPORT(int) mvwscanw (WINDOW *,int,int, NCURSES_CONST char *,...) |
| 702 |
GCC_SCANFLIKE(4,5); |
| 703 |
extern NCURSES_EXPORT(int) mvwvline (WINDOW *,int, int, chtype, int); |
| 704 |
extern NCURSES_EXPORT(int) napms (int); |
| 705 |
extern NCURSES_EXPORT(WINDOW *) newpad (int,int); |
| 706 |
extern NCURSES_EXPORT(SCREEN *) newterm (NCURSES_CONST char *,FILE *,FILE *); |
| 707 |
extern NCURSES_EXPORT(WINDOW *) newwin (int,int,int,int); |
| 708 |
extern NCURSES_EXPORT(int) nl (void); |
| 709 |
extern NCURSES_EXPORT(int) nocbreak (void); |
| 710 |
extern NCURSES_EXPORT(int) nodelay (WINDOW *,bool); |
| 711 |
extern NCURSES_EXPORT(int) noecho (void); |
| 712 |
extern NCURSES_EXPORT(int) nonl (void); |
| 713 |
extern NCURSES_EXPORT(void) noqiflush (void); |
| 714 |
extern NCURSES_EXPORT(int) noraw (void); |
| 715 |
extern NCURSES_EXPORT(int) notimeout (WINDOW *,bool); |
| 716 |
extern NCURSES_EXPORT(int) overlay (const WINDOW*,WINDOW *); |
| 717 |
extern NCURSES_EXPORT(int) overwrite (const WINDOW*,WINDOW *); |
| 718 |
extern NCURSES_EXPORT(int) pair_content (short,short*,short*); |
| 719 |
extern NCURSES_EXPORT(int) PAIR_NUMBER (int); |
| 720 |
extern NCURSES_EXPORT(int) pechochar (WINDOW *, const chtype); |
| 721 |
extern NCURSES_EXPORT(int) pnoutrefresh (WINDOW*,int,int,int,int,int,int); |
| 722 |
extern NCURSES_EXPORT(int) prefresh (WINDOW *,int,int,int,int,int,int); |
| 723 |
extern NCURSES_EXPORT(int) printw (const char *,...) |
| 724 |
GCC_PRINTFLIKE(1,2); |
| 725 |
extern NCURSES_EXPORT(int) putwin (WINDOW *, FILE *); |
| 726 |
extern NCURSES_EXPORT(void) qiflush (void); |
| 727 |
extern NCURSES_EXPORT(int) raw (void); |
| 728 |
extern NCURSES_EXPORT(int) redrawwin (WINDOW *); |
| 729 |
extern NCURSES_EXPORT(int) refresh (void); |
| 730 |
extern NCURSES_EXPORT(int) resetty (void); |
| 731 |
extern NCURSES_EXPORT(int) reset_prog_mode (void); |
| 732 |
extern NCURSES_EXPORT(int) reset_shell_mode (void); |
| 733 |
extern NCURSES_EXPORT(int) ripoffline (int, int (*)(WINDOW *, int)); |
| 734 |
extern NCURSES_EXPORT(int) savetty (void); |
| 735 |
extern NCURSES_EXPORT(int) scanw (NCURSES_CONST char *,...) |
| 736 |
GCC_SCANFLIKE(1,2); |
| 737 |
extern NCURSES_EXPORT(int) scr_dump (const char *); |
| 738 |
extern NCURSES_EXPORT(int) scr_init (const char *); |
| 739 |
extern NCURSES_EXPORT(int) scrl (int); |
| 740 |
extern NCURSES_EXPORT(int) scroll (WINDOW *); |
| 741 |
extern NCURSES_EXPORT(int) scrollok (WINDOW *,bool); |
| 742 |
extern NCURSES_EXPORT(int) scr_restore (const char *); |
| 743 |
extern NCURSES_EXPORT(int) scr_set (const char *); |
| 744 |
extern NCURSES_EXPORT(int) setscrreg (int,int); |
| 745 |
extern NCURSES_EXPORT(SCREEN *) set_term (SCREEN *); |
| 746 |
extern NCURSES_EXPORT(int) slk_attroff (const chtype); |
| 747 |
extern NCURSES_EXPORT(int) slk_attr_off (const attr_t, void *); |
| 748 |
extern NCURSES_EXPORT(int) slk_attron (const chtype); |
| 749 |
extern NCURSES_EXPORT(int) slk_attr_on (attr_t,void*); |
| 750 |
extern NCURSES_EXPORT(int) slk_attrset (const chtype); |
| 751 |
extern NCURSES_EXPORT(attr_t) slk_attr (void); |
| 752 |
extern NCURSES_EXPORT(int) slk_attr_set (const attr_t,short,void*); |
| 753 |
extern NCURSES_EXPORT(int) slk_clear (void); |
| 754 |
extern NCURSES_EXPORT(int) slk_color (short); |
| 755 |
extern NCURSES_EXPORT(int) slk_init (int); |
| 756 |
extern NCURSES_EXPORT(char *) slk_label (int); |
| 757 |
extern NCURSES_EXPORT(int) slk_noutrefresh (void); |
| 758 |
extern NCURSES_EXPORT(int) slk_refresh (void); |
| 759 |
extern NCURSES_EXPORT(int) slk_restore (void); |
| 760 |
extern NCURSES_EXPORT(int) slk_set (int,const char *,int); |
| 761 |
extern NCURSES_EXPORT(int) slk_touch (void); |
| 762 |
extern NCURSES_EXPORT(int) standout (void); |
| 763 |
extern NCURSES_EXPORT(int) standend (void); |
| 764 |
extern NCURSES_EXPORT(int) start_color (void); |
| 765 |
extern NCURSES_EXPORT(WINDOW *) subpad (WINDOW *, int, int, int, int); |
| 766 |
extern NCURSES_EXPORT(WINDOW *) subwin (WINDOW *,int,int,int,int); |
| 767 |
extern NCURSES_EXPORT(int) syncok (WINDOW *, bool); |
| 768 |
extern NCURSES_EXPORT(chtype) termattrs (void); |
| 769 |
extern NCURSES_EXPORT(char *) termname (void); |
| 770 |
extern NCURSES_EXPORT(void) timeout (int); |
| 771 |
extern NCURSES_EXPORT(int) touchline (WINDOW *, int, int); |
| 772 |
extern NCURSES_EXPORT(int) touchwin (WINDOW *); |
| 773 |
extern NCURSES_EXPORT(int) typeahead (int); |
| 774 |
extern NCURSES_EXPORT(int) ungetch (int); |
| 775 |
extern NCURSES_EXPORT(int) untouchwin (WINDOW *); |
| 776 |
extern NCURSES_EXPORT(void) use_env (bool); |
| 777 |
extern NCURSES_EXPORT(int) vidattr (chtype); |
| 778 |
extern NCURSES_EXPORT(int) vidputs (chtype, int (*)(int)); |
| 779 |
extern NCURSES_EXPORT(int) vline (chtype, int); |
| 780 |
extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *,va_list); |
| 781 |
extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *,va_list); |
| 782 |
extern NCURSES_EXPORT(int) vwscanw (WINDOW *, NCURSES_CONST char *,va_list); |
| 783 |
extern NCURSES_EXPORT(int) vw_scanw (WINDOW *, NCURSES_CONST char *,va_list); |
| 784 |
extern NCURSES_EXPORT(int) waddch (WINDOW *, const chtype); |
| 785 |
extern NCURSES_EXPORT(int) waddchnstr (WINDOW *,const chtype *,int); |
| 786 |
extern NCURSES_EXPORT(int) waddchstr (WINDOW *,const chtype *); |
| 787 |
extern NCURSES_EXPORT(int) waddnstr (WINDOW *,const char *,int); |
| 788 |
extern NCURSES_EXPORT(int) waddstr (WINDOW *,const char *); |
| 789 |
extern NCURSES_EXPORT(int) wattron (WINDOW *, int); |
| 790 |
extern NCURSES_EXPORT(int) wattroff (WINDOW *, int); |
| 791 |
extern NCURSES_EXPORT(int) wattrset (WINDOW *, int); |
| 792 |
extern NCURSES_EXPORT(int) wattr_get (WINDOW *, attr_t *, short *, void *); |
| 793 |
extern NCURSES_EXPORT(int) wattr_on (WINDOW *, attr_t, void *); |
| 794 |
extern NCURSES_EXPORT(int) wattr_off (WINDOW *, attr_t, void *); |
| 795 |
extern NCURSES_EXPORT(int) wattr_set (WINDOW *, attr_t, short, void *); |
| 796 |
extern NCURSES_EXPORT(int) wbkgd (WINDOW *, chtype); |
| 797 |
extern NCURSES_EXPORT(void) wbkgdset (WINDOW *,chtype); |
| 798 |
extern NCURSES_EXPORT(int) wborder (WINDOW *,chtype,chtype,chtype,chtype,chtype,chtype,chtype,chtype); |
| 799 |
extern NCURSES_EXPORT(int) wchgat (WINDOW *, int, attr_t, short, const void *); |
| 800 |
extern NCURSES_EXPORT(int) wclear (WINDOW *); |
| 801 |
extern NCURSES_EXPORT(int) wclrtobot (WINDOW *); |
| 802 |
extern NCURSES_EXPORT(int) wclrtoeol (WINDOW *); |
| 803 |
extern NCURSES_EXPORT(int) wcolor_set (WINDOW*,short,void*); |
| 804 |
extern NCURSES_EXPORT(void) wcursyncup (WINDOW *); |
| 805 |
extern NCURSES_EXPORT(int) wdelch (WINDOW *); |
| 806 |
extern NCURSES_EXPORT(int) wdeleteln (WINDOW *); |
| 807 |
extern NCURSES_EXPORT(int) wechochar (WINDOW *, const chtype); |
| 808 |
extern NCURSES_EXPORT(int) werase (WINDOW *); |
| 809 |
extern NCURSES_EXPORT(int) wgetch (WINDOW *); |
| 810 |
extern NCURSES_EXPORT(int) wgetnstr (WINDOW *,char *,int); |
| 811 |
extern NCURSES_EXPORT(int) wgetstr (WINDOW *, char *); |
| 812 |
extern NCURSES_EXPORT(int) whline (WINDOW *, chtype, int); |
| 813 |
extern NCURSES_EXPORT(chtype) winch (WINDOW *); |
| 814 |
extern NCURSES_EXPORT(int) winchnstr (WINDOW *, chtype *, int); |
| 815 |
extern NCURSES_EXPORT(int) winchstr (WINDOW *, chtype *); |
| 816 |
extern NCURSES_EXPORT(int) winnstr (WINDOW *, char *, int); |
| 817 |
extern NCURSES_EXPORT(int) winsch (WINDOW *, chtype); |
| 818 |
extern NCURSES_EXPORT(int) winsdelln (WINDOW *,int); |
| 819 |
extern NCURSES_EXPORT(int) winsertln (WINDOW *); |
| 820 |
extern NCURSES_EXPORT(int) winsnstr (WINDOW *, const char *,int); |
| 821 |
extern NCURSES_EXPORT(int) winsstr (WINDOW *, const char *); |
| 822 |
extern NCURSES_EXPORT(int) winstr (WINDOW *, char *); |
| 823 |
extern NCURSES_EXPORT(int) wmove (WINDOW *,int,int); |
| 824 |
extern NCURSES_EXPORT(int) wnoutrefresh (WINDOW *); |
| 825 |
extern NCURSES_EXPORT(int) wprintw (WINDOW *, const char *,...) |
| 826 |
GCC_PRINTFLIKE(2,3); |
| 827 |
extern NCURSES_EXPORT(int) wredrawln (WINDOW *,int,int); |
| 828 |
extern NCURSES_EXPORT(int) wrefresh (WINDOW *); |
| 829 |
extern NCURSES_EXPORT(int) wscanw (WINDOW *, NCURSES_CONST char *,...) |
| 830 |
GCC_SCANFLIKE(2,3); |
| 831 |
extern NCURSES_EXPORT(int) wscrl (WINDOW *,int); |
| 832 |
extern NCURSES_EXPORT(int) wsetscrreg (WINDOW *,int,int); |
| 833 |
extern NCURSES_EXPORT(int) wstandout (WINDOW *); |
| 834 |
extern NCURSES_EXPORT(int) wstandend (WINDOW *); |
| 835 |
extern NCURSES_EXPORT(void) wsyncdown (WINDOW *); |
| 836 |
extern NCURSES_EXPORT(void) wsyncup (WINDOW *); |
| 837 |
extern NCURSES_EXPORT(void) wtimeout (WINDOW *,int); |
| 838 |
extern NCURSES_EXPORT(int) wtouchln (WINDOW *,int,int,int); |
| 839 |
extern NCURSES_EXPORT(int) wvline (WINDOW *,chtype,int); |
| 840 |
|
| 841 |
|
| 842 |
|
| 843 |
|
| 844 |
extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *); |
| 845 |
extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *); |
| 846 |
extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *); |
| 847 |
extern NCURSES_EXPORT(int) putp (const char *); |
| 848 |
|
| 849 |
#if NCURSES_TPARM_VARARGS |
| 850 |
extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...); |
| 851 |
#else |
| 852 |
extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, long,long,long,long,long,long,long,long,long); |
| 853 |
extern NCURSES_EXPORT(char *) tparm_varargs (NCURSES_CONST char *, ...); |
| 854 |
#endif |
| 855 |
|
| 856 |
extern NCURSES_EXPORT_VAR(char) ttytype[]; |
| 857 |
|
| 858 |
|
| 859 |
|
| 860 |
|
| 861 |
extern NCURSES_EXPORT(int) getcurx (const WINDOW *); |
| 862 |
extern NCURSES_EXPORT(int) getcury (const WINDOW *); |
| 863 |
extern NCURSES_EXPORT(int) getbegx (const WINDOW *); |
| 864 |
extern NCURSES_EXPORT(int) getbegy (const WINDOW *); |
| 865 |
extern NCURSES_EXPORT(int) getmaxx (const WINDOW *); |
| 866 |
extern NCURSES_EXPORT(int) getmaxy (const WINDOW *); |
| 867 |
extern NCURSES_EXPORT(int) getparx (const WINDOW *); |
| 868 |
extern NCURSES_EXPORT(int) getpary (const WINDOW *); |
| 869 |
|
| 870 |
|
| 871 |
|
| 872 |
|
| 873 |
#ifndef _XOPEN_SOURCE_EXTENDED |
| 874 |
#define vid_attr(a,pair,opts) vidattr(a) |
| 875 |
#endif |
| 876 |
|
| 877 |
|
| 878 |
|
| 879 |
#define NCURSES_ATTR_SHIFT 8 |
| 880 |
#define NCURSES_BITS(mask,shift) ((mask) << ((shift) + NCURSES_ATTR_SHIFT)) |
| 881 |
|
| 882 |
#define A_NORMAL (1UL - 1UL) |
| 883 |
#define A_ATTRIBUTES NCURSES_BITS(~(1UL - 1UL),0) |
| 884 |
#define A_CHARTEXT (NCURSES_BITS(1UL,0) - 1UL) |
| 885 |
#define A_COLOR NCURSES_BITS(((1UL) << 8) - 1UL,0) |
| 886 |
#define A_STANDOUT NCURSES_BITS(1UL,8) |
| 887 |
#define A_UNDERLINE NCURSES_BITS(1UL,9) |
| 888 |
#define A_REVERSE NCURSES_BITS(1UL,10) |
| 889 |
#define A_BLINK NCURSES_BITS(1UL,11) |
| 890 |
#define A_DIM NCURSES_BITS(1UL,12) |
| 891 |
#define A_BOLD NCURSES_BITS(1UL,13) |
| 892 |
#define A_ALTCHARSET NCURSES_BITS(1UL,14) |
| 893 |
#define A_INVIS NCURSES_BITS(1UL,15) |
| 894 |
#define A_PROTECT NCURSES_BITS(1UL,16) |
| 895 |
#define A_HORIZONTAL NCURSES_BITS(1UL,17) |
| 896 |
#define A_LEFT NCURSES_BITS(1UL,18) |
| 897 |
#define A_LOW NCURSES_BITS(1UL,19) |
| 898 |
#define A_RIGHT NCURSES_BITS(1UL,20) |
| 899 |
#define A_TOP NCURSES_BITS(1UL,21) |
| 900 |
#define A_VERTICAL NCURSES_BITS(1UL,22) |
| 901 |
|
| 902 |
|
| 903 |
|
| 904 |
|
| 905 |
|
| 906 |
|
| 907 |
|
| 908 |
|
| 909 |
|
| 910 |
|
| 911 |
|
| 912 |
#define getyx(win,y,x) (y = getcury(win), x = getcurx(win)) |
| 913 |
#define getbegyx(win,y,x) (y = getbegy(win), x = getbegx(win)) |
| 914 |
#define getmaxyx(win,y,x) (y = getmaxy(win), x = getmaxx(win)) |
| 915 |
#define getparyx(win,y,x) (y = getpary(win), x = getparx(win)) |
| 916 |
|
| 917 |
#define getsyx(y,x) do { if(newscr->_leaveok) (y)=(x)=-1; \ |
| 918 |
else getyx(newscr,(y),(x)); \ |
| 919 |
} while(0) |
| 920 |
#define setsyx(y,x) do { if((y)==-1 && (x)==-1) newscr->_leaveok=TRUE; \ |
| 921 |
else {newscr->_leaveok=FALSE;wmove(newscr,(y),(x));} \ |
| 922 |
} while(0) |
| 923 |
|
| 924 |
#ifndef NCURSES_NOMACROS |
| 925 |
|
| 926 |
|
| 927 |
|
| 928 |
|
| 929 |
|
| 930 |
#define wgetstr(w, s) wgetnstr(w, s, -1) |
| 931 |
#define getnstr(s, n) wgetnstr(stdscr, s, n) |
| 932 |
|
| 933 |
#define setterm(term) setupterm(term, 1, (int *)0) |
| 934 |
|
| 935 |
#define fixterm() reset_prog_mode() |
| 936 |
#define resetterm() reset_shell_mode() |
| 937 |
#define saveterm() def_prog_mode() |
| 938 |
#define crmode() cbreak() |
| 939 |
#define nocrmode() nocbreak() |
| 940 |
#define gettmode() |
| 941 |
|
| 942 |
|
| 943 |
#define getattrs(win) ((win)?(win)->_attrs:A_NORMAL) |
| 944 |
#define getcurx(win) ((win)?(win)->_curx:ERR) |
| 945 |
#define getcury(win) ((win)?(win)->_cury:ERR) |
| 946 |
#define getbegx(win) ((win)?(win)->_begx:ERR) |
| 947 |
#define getbegy(win) ((win)?(win)->_begy:ERR) |
| 948 |
#define getmaxx(win) ((win)?((win)->_maxx + 1):ERR) |
| 949 |
#define getmaxy(win) ((win)?((win)->_maxy + 1):ERR) |
| 950 |
#define getparx(win) ((win)?(win)->_parx:ERR) |
| 951 |
#define getpary(win) ((win)?(win)->_pary:ERR) |
| 952 |
|
| 953 |
#define wstandout(win) (wattrset(win,A_STANDOUT)) |
| 954 |
#define wstandend(win) (wattrset(win,A_NORMAL)) |
| 955 |
|
| 956 |
#define wattron(win,at) wattr_on(win, NCURSES_CAST(attr_t, at), NULL) |
| 957 |
#define wattroff(win,at) wattr_off(win, NCURSES_CAST(attr_t, at), NULL) |
| 958 |
|
| 959 |
#if defined(_XOPEN_SOURCE_EXTENDED) && 0 |
| 960 |
#define wattrset(win,at) ((win)->_color = PAIR_NUMBER(at), \ |
| 961 |
(win)->_attrs = (at)) |
| 962 |
#else |
| 963 |
#define wattrset(win,at) ((win)->_attrs = (at)) |
| 964 |
#endif |
| 965 |
|
| 966 |
#define scroll(win) wscrl(win,1) |
| 967 |
|
| 968 |
#define touchwin(win) wtouchln((win), 0, getmaxy(win), 1) |
| 969 |
#define touchline(win, s, c) wtouchln((win), s, c, 1) |
| 970 |
#define untouchwin(win) wtouchln((win), 0, getmaxy(win), 0) |
| 971 |
|
| 972 |
#define box(win, v, h) wborder(win, v, v, h, h, 0, 0, 0, 0) |
| 973 |
#define border(ls, rs, ts, bs, tl, tr, bl, br) wborder(stdscr, ls, rs, ts, bs, tl, tr, bl, br) |
| 974 |
#define hline(ch, n) whline(stdscr, ch, n) |
| 975 |
#define vline(ch, n) wvline(stdscr, ch, n) |
| 976 |
|
| 977 |
#define winstr(w, s) winnstr(w, s, -1) |
| 978 |
#define winchstr(w, s) winchnstr(w, s, -1) |
| 979 |
#define winsstr(w, s) winsnstr(w, s, -1) |
| 980 |
|
| 981 |
#define redrawwin(win) wredrawln(win, 0, (win)->_maxy+1) |
| 982 |
#define waddstr(win,str) waddnstr(win,str,-1) |
| 983 |
#define waddchstr(win,str) waddchnstr(win,str,-1) |
| 984 |
|
| 985 |
|
| 986 |
|
| 987 |
|
| 988 |
#define COLOR_PAIR(n) NCURSES_BITS(n, 0) |
| 989 |
#define PAIR_NUMBER(a) (NCURSES_CAST(int,(((a) & A_COLOR) >> NCURSES_ATTR_SHIFT))) |
| 990 |
|
| 991 |
|
| 992 |
|
| 993 |
|
| 994 |
|
| 995 |
#define addch(ch) waddch(stdscr,ch) |
| 996 |
#define addchnstr(str,n) waddchnstr(stdscr,str,n) |
| 997 |
#define addchstr(str) waddchstr(stdscr,str) |
| 998 |
#define addnstr(str,n) waddnstr(stdscr,str,n) |
| 999 |
#define addstr(str) waddnstr(stdscr,str,-1) |
| 1000 |
#define attroff(at) wattroff(stdscr,at) |
| 1001 |
#define attron(at) wattron(stdscr,at) |
| 1002 |
#define attrset(at) wattrset(stdscr,at) |
| 1003 |
#define attr_get(ap,cp,o) wattr_get(stdscr,ap,cp,o) |
| 1004 |
#define attr_off(a,o) wattr_off(stdscr,a,o) |
| 1005 |
#define attr_on(a,o) wattr_on(stdscr,a,o) |
| 1006 |
#define attr_set(a,c,o) wattr_set(stdscr,a,c,o) |
| 1007 |
#define bkgd(ch) wbkgd(stdscr,ch) |
| 1008 |
#define bkgdset(ch) wbkgdset(stdscr,ch) |
| 1009 |
#define chgat(n,a,c,o) wchgat(stdscr,n,a,c,o) |
| 1010 |
#define clear() wclear(stdscr) |
| 1011 |
#define clrtobot() wclrtobot(stdscr) |
| 1012 |
#define clrtoeol() wclrtoeol(stdscr) |
| 1013 |
#define color_set(c,o) wcolor_set(stdscr,c,o) |
| 1014 |
#define delch() wdelch(stdscr) |
| 1015 |
#define deleteln() winsdelln(stdscr,-1) |
| 1016 |
#define echochar(c) wechochar(stdscr,c) |
| 1017 |
#define erase() werase(stdscr) |
| 1018 |
#define getch() wgetch(stdscr) |
| 1019 |
#define getstr(str) wgetstr(stdscr,str) |
| 1020 |
#define inch() winch(stdscr) |
| 1021 |
#define inchnstr(s,n) winchnstr(stdscr,s,n) |
| 1022 |
#define inchstr(s) winchstr(stdscr,s) |
| 1023 |
#define innstr(s,n) winnstr(stdscr,s,n) |
| 1024 |
#define insch(c) winsch(stdscr,c) |
| 1025 |
#define insdelln(n) winsdelln(stdscr,n) |
| 1026 |
#define insertln() winsdelln(stdscr,1) |
| 1027 |
#define insnstr(s,n) winsnstr(stdscr,s,n) |
| 1028 |
#define insstr(s) winsstr(stdscr,s) |
| 1029 |
#define instr(s) winstr(stdscr,s) |
| 1030 |
#define move(y,x) wmove(stdscr,y,x) |
| 1031 |
#define refresh() wrefresh(stdscr) |
| 1032 |
#define scrl(n) wscrl(stdscr,n) |
| 1033 |
#define setscrreg(t,b) wsetscrreg(stdscr,t,b) |
| 1034 |
#define standend() wstandend(stdscr) |
| 1035 |
#define standout() wstandout(stdscr) |
| 1036 |
#define timeout(delay) wtimeout(stdscr,delay) |
| 1037 |
#define wdeleteln(win) winsdelln(win,-1) |
| 1038 |
#define winsertln(win) winsdelln(win,1) |
| 1039 |
|
| 1040 |
|
| 1041 |
|
| 1042 |
|
| 1043 |
|
| 1044 |
#define mvwaddch(win,y,x,ch) (wmove(win,y,x) == ERR ? ERR : waddch(win,ch)) |
| 1045 |
#define mvwaddchnstr(win,y,x,str,n) (wmove(win,y,x) == ERR ? ERR : waddchnstr(win,str,n)) |
| 1046 |
#define mvwaddchstr(win,y,x,str) (wmove(win,y,x) == ERR ? ERR : waddchnstr(win,str,-1)) |
| 1047 |
#define mvwaddnstr(win,y,x,str,n) (wmove(win,y,x) == ERR ? ERR : waddnstr(win,str,n)) |
| 1048 |
#define mvwaddstr(win,y,x,str) (wmove(win,y,x) == ERR ? ERR : waddnstr(win,str,-1)) |
| 1049 |
#define mvwdelch(win,y,x) (wmove(win,y,x) == ERR ? ERR : wdelch(win)) |
| 1050 |
#define mvwchgat(win,y,x,n,a,c,o) (wmove(win,y,x) == ERR ? ERR : wchgat(win,n,a,c,o)) |
| 1051 |
#define mvwgetch(win,y,x) (wmove(win,y,x) == ERR ? ERR : wgetch(win)) |
| 1052 |
#define mvwgetnstr(win,y,x,str,n) (wmove(win,y,x) == ERR ? ERR : wgetnstr(win,str,n)) |
| 1053 |
#define mvwgetstr(win,y,x,str) (wmove(win,y,x) == ERR ? ERR : wgetstr(win,str)) |
| 1054 |
#define mvwhline(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : whline(win,c,n)) |
| 1055 |
#define mvwinch(win,y,x) (wmove(win,y,x) == ERR ? NCURSES_CAST(chtype, ERR) : winch(win)) |
| 1056 |
#define mvwinchnstr(win,y,x,s,n) (wmove(win,y,x) == ERR ? ERR : winchnstr(win,s,n)) |
| 1057 |
#define mvwinchstr(win,y,x,s) (wmove(win,y,x) == ERR ? ERR : winchstr(win,s)) |
| 1058 |
#define mvwinnstr(win,y,x,s,n) (wmove(win,y,x) == ERR ? ERR : winnstr(win,s,n)) |
| 1059 |
#define mvwinsch(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : winsch(win,c)) |
| 1060 |
#define mvwinsnstr(win,y,x,s,n) (wmove(win,y,x) == ERR ? ERR : winsnstr(win,s,n)) |
| 1061 |
#define mvwinsstr(win,y,x,s) (wmove(win,y,x) == ERR ? ERR : winsstr(win,s)) |
| 1062 |
#define mvwinstr(win,y,x,s) (wmove(win,y,x) == ERR ? ERR : winstr(win,s)) |
| 1063 |
#define mvwvline(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : wvline(win,c,n)) |
| 1064 |
|
| 1065 |
#define mvaddch(y,x,ch) mvwaddch(stdscr,y,x,ch) |
| 1066 |
#define mvaddchnstr(y,x,str,n) mvwaddchnstr(stdscr,y,x,str,n) |
| 1067 |
#define mvaddchstr(y,x,str) mvwaddchstr(stdscr,y,x,str) |
| 1068 |
#define mvaddnstr(y,x,str,n) mvwaddnstr(stdscr,y,x,str,n) |
| 1069 |
#define mvaddstr(y,x,str) mvwaddstr(stdscr,y,x,str) |
| 1070 |
#define mvchgat(y,x,n,a,c,o) mvwchgat(stdscr,y,x,n,a,c,o) |
| 1071 |
#define mvdelch(y,x) mvwdelch(stdscr,y,x) |
| 1072 |
#define mvgetch(y,x) mvwgetch(stdscr,y,x) |
| 1073 |
#define mvgetnstr(y,x,str,n) mvwgetnstr(stdscr,y,x,str,n) |
| 1074 |
#define mvgetstr(y,x,str) mvwgetstr(stdscr,y,x,str) |
| 1075 |
#define mvhline(y,x,c,n) mvwhline(stdscr,y,x,c,n) |
| 1076 |
#define mvinch(y,x) mvwinch(stdscr,y,x) |
| 1077 |
#define mvinchnstr(y,x,s,n) mvwinchnstr(stdscr,y,x,s,n) |
| 1078 |
#define mvinchstr(y,x,s) mvwinchstr(stdscr,y,x,s) |
| 1079 |
#define mvinnstr(y,x,s,n) mvwinnstr(stdscr,y,x,s,n) |
| 1080 |
#define mvinsch(y,x,c) mvwinsch(stdscr,y,x,c) |
| 1081 |
#define mvinsnstr(y,x,s,n) mvwinsnstr(stdscr,y,x,s,n) |
| 1082 |
#define mvinsstr(y,x,s) mvwinsstr(stdscr,y,x,s) |
| 1083 |
#define mvinstr(y,x,s) mvwinstr(stdscr,y,x,s) |
| 1084 |
#define mvvline(y,x,c,n) mvwvline(stdscr,y,x,c,n) |
| 1085 |
|
| 1086 |
|
| 1087 |
|
| 1088 |
|
| 1089 |
#define getbkgd(win) ((win)->_bkgd) |
| 1090 |
|
| 1091 |
#define slk_attr_off(a,v) ((v) ? ERR : slk_attroff(a)) |
| 1092 |
#define slk_attr_on(a,v) ((v) ? ERR : slk_attron(a)) |
| 1093 |
|
| 1094 |
#if defined(_XOPEN_SOURCE_EXTENDED) && 0 |
| 1095 |
#define wattr_set(win,a,p,opts) ((win)->_attrs = ((a) & ~A_COLOR), \ |
| 1096 |
(win)->_color = (p), \ |
| 1097 |
OK) |
| 1098 |
#define wattr_get(win,a,p,opts) ((void)((a) != 0 && (*(a) = (win)->_attrs)), \ |
| 1099 |
(void)((p) != 0 && (*(p) = (win)->_color)), \ |
| 1100 |
OK) |
| 1101 |
#else |
| 1102 |
#define wattr_set(win,a,p,opts) ((win)->_attrs = (((a) & ~A_COLOR) | COLOR_PAIR(p)), OK) |
| 1103 |
#define wattr_get(win,a,p,opts) ((void)((a) != 0 && (*(a) = (win)->_attrs)), \ |
| 1104 |
(void)((p) != 0 && (*(p) = PAIR_NUMBER((win)->_attrs))), \ |
| 1105 |
OK) |
| 1106 |
#endif |
| 1107 |
|
| 1108 |
|
| 1109 |
|
| 1110 |
|
| 1111 |
|
| 1112 |
|
| 1113 |
|
| 1114 |
#define vw_printw vwprintw |
| 1115 |
#define vw_scanw vwscanw |
| 1116 |
|
| 1117 |
|
| 1118 |
|
| 1119 |
|
| 1120 |
#if !1 |
| 1121 |
#define vsscanf(a,b,c) _nc_vsscanf(a,b,c) |
| 1122 |
NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list); |
| 1123 |
#endif |
| 1124 |
|
| 1125 |
#endif |
| 1126 |
|
| 1127 |
|
| 1128 |
|
| 1129 |
|
| 1130 |
|
| 1131 |
|
| 1132 |
|
| 1133 |
|
| 1134 |
|
| 1135 |
|
| 1136 |
|
| 1137 |
|
| 1138 |
|
| 1139 |
#define KEY_CODE_YES 0400 |
| 1140 |
#define KEY_MIN 0401 |
| 1141 |
#define KEY_BREAK 0401 |
| 1142 |
#define KEY_SRESET 0530 |
| 1143 |
#define KEY_RESET 0531 |
| 1144 |
|
| 1145 |
|
| 1146 |
|
| 1147 |
#define KEY_DOWN 0402 |
| 1148 |
#define KEY_UP 0403 |
| 1149 |
#define KEY_LEFT 0404 |
| 1150 |
#define KEY_RIGHT 0405 |
| 1151 |
#define KEY_HOME 0406 |
| 1152 |
#define KEY_BACKSPACE 0407 |
| 1153 |
#define KEY_F0 0410 |
| 1154 |
#define KEY_F(n) (KEY_F0+(n)) |
| 1155 |
#define KEY_DL 0510 |
| 1156 |
#define KEY_IL 0511 |
| 1157 |
#define KEY_DC 0512 |
| 1158 |
#define KEY_IC 0513 |
| 1159 |
#define KEY_EIC 0514 |
| 1160 |
#define KEY_CLEAR 0515 |
| 1161 |
#define KEY_EOS 0516 |
| 1162 |
#define KEY_EOL 0517 |
| 1163 |
#define KEY_SF 0520 |
| 1164 |
#define KEY_SR 0521 |
| 1165 |
#define KEY_NPAGE 0522 |
| 1166 |
#define KEY_PPAGE 0523 |
| 1167 |
#define KEY_STAB 0524 |
| 1168 |
#define KEY_CTAB 0525 |
| 1169 |
#define KEY_CATAB 0526 |
| 1170 |
#define KEY_ENTER 0527 |
| 1171 |
#define KEY_PRINT 0532 |
| 1172 |
#define KEY_LL 0533 |
| 1173 |
#define KEY_A1 0534 |
| 1174 |
#define KEY_A3 0535 |
| 1175 |
#define KEY_B2 0536 |
| 1176 |
#define KEY_C1 0537 |
| 1177 |
#define KEY_C3 0540 |
| 1178 |
#define KEY_BTAB 0541 |
| 1179 |
#define KEY_BEG 0542 |
| 1180 |
#define KEY_CANCEL 0543 |
| 1181 |
#define KEY_CLOSE 0544 |
| 1182 |
#define KEY_COMMAND 0545 |
| 1183 |
#define KEY_COPY 0546 |
| 1184 |
#define KEY_CREATE 0547 |
| 1185 |
#define KEY_END 0550 |
| 1186 |
#define KEY_EXIT 0551 |
| 1187 |
#define KEY_FIND 0552 |
| 1188 |
#define KEY_HELP 0553 |
| 1189 |
#define KEY_MARK 0554 |
| 1190 |
#define KEY_MESSAGE 0555 |
| 1191 |
#define KEY_MOVE 0556 |
| 1192 |
#define KEY_NEXT 0557 |
| 1193 |
#define KEY_OPEN 0560 |
| 1194 |
#define KEY_OPTIONS 0561 |
| 1195 |
#define KEY_PREVIOUS 0562 |
| 1196 |
#define KEY_REDO 0563 |
| 1197 |
#define KEY_REFERENCE 0564 |
| 1198 |
#define KEY_REFRESH 0565 |
| 1199 |
#define KEY_REPLACE 0566 |
| 1200 |
#define KEY_RESTART 0567 |
| 1201 |
#define KEY_RESUME 0570 |
| 1202 |
#define KEY_SAVE 0571 |
| 1203 |
#define KEY_SBEG 0572 |
| 1204 |
#define KEY_SCANCEL 0573 |
| 1205 |
#define KEY_SCOMMAND 0574 |
| 1206 |
#define KEY_SCOPY 0575 |
| 1207 |
#define KEY_SCREATE 0576 |
| 1208 |
#define KEY_SDC 0577 |
| 1209 |
#define KEY_SDL 0600 |
| 1210 |
#define KEY_SELECT 0601 |
| 1211 |
#define KEY_SEND 0602 |
| 1212 |
#define KEY_SEOL 0603 |
| 1213 |
#define KEY_SEXIT 0604 |
| 1214 |
#define KEY_SFIND 0605 |
| 1215 |
#define KEY_SHELP 0606 |
| 1216 |
#define KEY_SHOME 0607 |
| 1217 |
#define KEY_SIC 0610 |
| 1218 |
#define KEY_SLEFT 0611 |
| 1219 |
#define KEY_SMESSAGE 0612 |
| 1220 |
#define KEY_SMOVE 0613 |
| 1221 |
#define KEY_SNEXT 0614 |
| 1222 |
#define KEY_SOPTIONS 0615 |
| 1223 |
#define KEY_SPREVIOUS 0616 |
| 1224 |
#define KEY_SPRINT 0617 |
| 1225 |
#define KEY_SREDO 0620 |
| 1226 |
#define KEY_SREPLACE 0621 |
| 1227 |
#define KEY_SRIGHT 0622 |
| 1228 |
#define KEY_SRSUME 0623 |
| 1229 |
#define KEY_SSAVE 0624 |
| 1230 |
#define KEY_SSUSPEND 0625 |
| 1231 |
#define KEY_SUNDO 0626 |
| 1232 |
#define KEY_SUSPEND 0627 |
| 1233 |
#define KEY_UNDO 0630 |
| 1234 |
#define KEY_MOUSE 0631 |
| 1235 |
#define KEY_RESIZE 0632 |
| 1236 |
#define KEY_EVENT 0633 |
| 1237 |
|
| 1238 |
#define KEY_MAX 0777 |
| 1239 |
|
| 1240 |
|
| 1241 |
|
| 1242 |
#ifdef _XOPEN_SOURCE_EXTENDED |
| 1243 |
|
| 1244 |
|
| 1245 |
|
| 1246 |
extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs; |
| 1247 |
|
| 1248 |
#define NCURSES_WACS(c) (&_nc_wacs[(unsigned char)c]) |
| 1249 |
|
| 1250 |
#define WACS_BSSB NCURSES_WACS('l') |
| 1251 |
#define WACS_SSBB NCURSES_WACS('m') |
| 1252 |
#define WACS_BBSS NCURSES_WACS('k') |
| 1253 |
#define WACS_SBBS NCURSES_WACS('j') |
| 1254 |
#define WACS_SBSS NCURSES_WACS('u') |
| 1255 |
#define WACS_SSSB NCURSES_WACS('t') |
| 1256 |
#define WACS_SSBS NCURSES_WACS('v') |
| 1257 |
#define WACS_BSSS NCURSES_WACS('w') |
| 1258 |
#define WACS_BSBS NCURSES_WACS('q') |
| 1259 |
#define WACS_SBSB NCURSES_WACS('x') |
| 1260 |
#define WACS_SSSS NCURSES_WACS('n') |
| 1261 |
|
| 1262 |
#define WACS_ULCORNER WACS_BSSB |
| 1263 |
#define WACS_LLCORNER WACS_SSBB |
| 1264 |
#define WACS_URCORNER WACS_BBSS |
| 1265 |
#define WACS_LRCORNER WACS_SBBS |
| 1266 |
#define WACS_RTEE WACS_SBSS |
| 1267 |
#define WACS_LTEE WACS_SSSB |
| 1268 |
#define WACS_BTEE WACS_SSBS |
| 1269 |
#define WACS_TTEE WACS_BSSS |
| 1270 |
#define WACS_HLINE WACS_BSBS |
| 1271 |
#define WACS_VLINE WACS_SBSB |
| 1272 |
#define WACS_PLUS WACS_SSSS |
| 1273 |
|
| 1274 |
#define WACS_S1 NCURSES_WACS('o') |
| 1275 |
#define WACS_S9 NCURSES_WACS('s') |
| 1276 |
#define WACS_DIAMOND NCURSES_WACS('`') |
| 1277 |
#define WACS_CKBOARD NCURSES_WACS('a') |
| 1278 |
#define WACS_DEGREE NCURSES_WACS('f') |
| 1279 |
#define WACS_PLMINUS NCURSES_WACS('g') |
| 1280 |
#define WACS_BULLET NCURSES_WACS('~') |
| 1281 |
|
| 1282 |
|
| 1283 |
#define WACS_LARROW NCURSES_WACS(',') |
| 1284 |
#define WACS_RARROW NCURSES_WACS('+') |
| 1285 |
#define WACS_DARROW NCURSES_WACS('.') |
| 1286 |
#define WACS_UARROW NCURSES_WACS('-') |
| 1287 |
#define WACS_BOARD NCURSES_WACS('h') |
| 1288 |
#define WACS_LANTERN NCURSES_WACS('i') |
| 1289 |
#define WACS_BLOCK NCURSES_WACS('0') |
| 1290 |
|
| 1291 |
|
| 1292 |
#define WACS_S3 NCURSES_WACS('p') |
| 1293 |
#define WACS_S7 NCURSES_WACS('r') |
| 1294 |
#define WACS_LEQUAL NCURSES_WACS('y') |
| 1295 |
#define WACS_GEQUAL NCURSES_WACS('z') |
| 1296 |
#define WACS_PI NCURSES_WACS('{') |
| 1297 |
#define WACS_NEQUAL NCURSES_WACS('|') |
| 1298 |
#define WACS_STERLING NCURSES_WACS('}') |
| 1299 |
|
| 1300 |
|
| 1301 |
|
| 1302 |
|
| 1303 |
|
| 1304 |
|
| 1305 |
|
| 1306 |
|
| 1307 |
|
| 1308 |
|
| 1309 |
extern NCURSES_EXPORT(int) add_wch (const cchar_t *); |
| 1310 |
extern NCURSES_EXPORT(int) add_wchnstr (const cchar_t *, int); |
| 1311 |
extern NCURSES_EXPORT(int) add_wchstr (const cchar_t *); |
| 1312 |
extern NCURSES_EXPORT(int) addnwstr (const wchar_t *, int); |
| 1313 |
extern NCURSES_EXPORT(int) addwstr (const wchar_t *); |
| 1314 |
extern NCURSES_EXPORT(int) bkgrnd (const cchar_t *); |
| 1315 |
extern NCURSES_EXPORT(void) bkgrndset (const cchar_t *); |
| 1316 |
extern NCURSES_EXPORT(int) border_set (const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*); |
| 1317 |
extern NCURSES_EXPORT(int) box_set (WINDOW *, const cchar_t *, const cchar_t *); |
| 1318 |
extern NCURSES_EXPORT(int) echo_wchar (const cchar_t *); |
| 1319 |
extern NCURSES_EXPORT(int) erasewchar (wchar_t*); |
| 1320 |
extern NCURSES_EXPORT(int) get_wch (wint_t *); |
| 1321 |
extern NCURSES_EXPORT(int) get_wstr (wint_t *); |
| 1322 |
extern NCURSES_EXPORT(int) getbkgrnd (cchar_t *); |
| 1323 |
extern NCURSES_EXPORT(int) getcchar (const cchar_t *, wchar_t*, attr_t*, short*, void*); |
| 1324 |
extern NCURSES_EXPORT(int) getn_wstr (wint_t *, int); |
| 1325 |
extern NCURSES_EXPORT(int) hline_set (const cchar_t *, int); |
| 1326 |
extern NCURSES_EXPORT(int) in_wch (cchar_t *); |
| 1327 |
extern NCURSES_EXPORT(int) in_wchnstr (cchar_t *, int); |
| 1328 |
extern NCURSES_EXPORT(int) in_wchstr (cchar_t *); |
| 1329 |
extern NCURSES_EXPORT(int) innwstr (wchar_t *, int); |
| 1330 |
extern NCURSES_EXPORT(int) ins_nwstr (const wchar_t *, int); |
| 1331 |
extern NCURSES_EXPORT(int) ins_wch (const cchar_t *); |
| 1332 |
extern NCURSES_EXPORT(int) ins_wstr (const wchar_t *); |
| 1333 |
extern NCURSES_EXPORT(int) inwstr (wchar_t *); |
| 1334 |
extern NCURSES_EXPORT(NCURSES_CONST char*) key_name (wchar_t); |
| 1335 |
extern NCURSES_EXPORT(int) killwchar (wchar_t *); |
| 1336 |
extern NCURSES_EXPORT(int) mvadd_wch (int, int, const cchar_t *); |
| 1337 |
extern NCURSES_EXPORT(int) mvadd_wchnstr (int, int, const cchar_t *, int); |
| 1338 |
extern NCURSES_EXPORT(int) mvadd_wchstr (int, int, const cchar_t *); |
| 1339 |
extern NCURSES_EXPORT(int) mvaddnwstr (int, int, const wchar_t *, int); |
| 1340 |
extern NCURSES_EXPORT(int) mvaddwstr (int, int, const wchar_t *); |
| 1341 |
extern NCURSES_EXPORT(int) mvget_wch (int, int, wint_t *); |
| 1342 |
extern NCURSES_EXPORT(int) mvget_wstr (int, int, wint_t *); |
| 1343 |
extern NCURSES_EXPORT(int) mvgetn_wstr (int, int, wint_t *, int); |
| 1344 |
extern NCURSES_EXPORT(int) mvhline_set (int, int, const cchar_t *, int); |
| 1345 |
extern NCURSES_EXPORT(int) mvin_wch (int, int, cchar_t *); |
| 1346 |
extern NCURSES_EXPORT(int) mvin_wchnstr (int, int, cchar_t *, int); |
| 1347 |
extern NCURSES_EXPORT(int) mvin_wchstr (int, int, cchar_t *); |
| 1348 |
extern NCURSES_EXPORT(int) mvinnwstr (int, int, wchar_t *, int); |
| 1349 |
extern NCURSES_EXPORT(int) mvins_nwstr (int, int, const wchar_t *, int); |
| 1350 |
extern NCURSES_EXPORT(int) mvins_wch (int, int, const cchar_t *); |
| 1351 |
extern NCURSES_EXPORT(int) mvins_wstr (int, int, const wchar_t *); |
| 1352 |
extern NCURSES_EXPORT(int) mvinwstr (int, int, wchar_t *); |
| 1353 |
extern NCURSES_EXPORT(int) mvvline_set (int, int, const cchar_t *, int); |
| 1354 |
extern NCURSES_EXPORT(int) mvwadd_wch (WINDOW *, int, int, const cchar_t *); |
| 1355 |
extern NCURSES_EXPORT(int) mvwadd_wchnstr (WINDOW *, int, int, const cchar_t *, int); |
| 1356 |
extern NCURSES_EXPORT(int) mvwadd_wchstr (WINDOW *, int, int, const cchar_t *); |
| 1357 |
extern NCURSES_EXPORT(int) mvwaddnwstr (WINDOW *, int, int, const wchar_t *, int); |
| 1358 |
extern NCURSES_EXPORT(int) mvwaddwstr (WINDOW *, int, int, const wchar_t *); |
| 1359 |
extern NCURSES_EXPORT(int) mvwget_wch (WINDOW *, int, int, wint_t *); |
| 1360 |
extern NCURSES_EXPORT(int) mvwget_wstr (WINDOW *, int, int, wint_t *); |
| 1361 |
extern NCURSES_EXPORT(int) mvwgetn_wstr (WINDOW *, int, int, wint_t *, int); |
| 1362 |
extern NCURSES_EXPORT(int) mvwhline_set (WINDOW *, int, int, const cchar_t *, int); |
| 1363 |
extern NCURSES_EXPORT(int) mvwin_wch (WINDOW *, int, int, cchar_t *); |
| 1364 |
extern NCURSES_EXPORT(int) mvwin_wchnstr (WINDOW *, int,int, cchar_t *,int); |
| 1365 |
extern NCURSES_EXPORT(int) mvwin_wchstr (WINDOW *, int, int, cchar_t *); |
| 1366 |
extern NCURSES_EXPORT(int) mvwinnwstr (WINDOW *, int, int, wchar_t *, int); |
| 1367 |
extern NCURSES_EXPORT(int) mvwins_nwstr (WINDOW *, int,int, const wchar_t *,int); |
| 1368 |
extern NCURSES_EXPORT(int) mvwins_wch (WINDOW *, int, int, const cchar_t *); |
| 1369 |
extern NCURSES_EXPORT(int) mvwins_wstr (WINDOW *, int, int, const wchar_t *); |
| 1370 |
extern NCURSES_EXPORT(int) mvwinwstr (WINDOW *, int, int, wchar_t *); |
| 1371 |
extern NCURSES_EXPORT(int) mvwvline_set (WINDOW *, int,int, const cchar_t *,int); |
| 1372 |
extern NCURSES_EXPORT(int) pecho_wchar (WINDOW *, const cchar_t *); |
| 1373 |
extern NCURSES_EXPORT(int) setcchar (cchar_t *, const wchar_t *, const attr_t, short, const void *); |
| 1374 |
extern NCURSES_EXPORT(int) slk_wset (int, const wchar_t *, int); |
| 1375 |
extern NCURSES_EXPORT(attr_t) term_attrs (void); |
| 1376 |
extern NCURSES_EXPORT(int) unget_wch (const wchar_t); |
| 1377 |
extern NCURSES_EXPORT(int) vid_attr (attr_t, short, void *); |
| 1378 |
extern NCURSES_EXPORT(int) vid_puts (attr_t, short, void *, int (*)(int)); |
| 1379 |
extern NCURSES_EXPORT(int) vline_set (const cchar_t *, int); |
| 1380 |
extern NCURSES_EXPORT(int) wadd_wch (WINDOW *,const cchar_t *); |
| 1381 |
extern NCURSES_EXPORT(int) wadd_wchnstr (WINDOW *,const cchar_t *,int); |
| 1382 |
extern NCURSES_EXPORT(int) wadd_wchstr (WINDOW *,const cchar_t *); |
| 1383 |
extern NCURSES_EXPORT(int) waddnwstr (WINDOW *,const wchar_t *,int); |
| 1384 |
extern NCURSES_EXPORT(int) waddwstr (WINDOW *,const wchar_t *); |
| 1385 |
extern NCURSES_EXPORT(int) wbkgrnd (WINDOW *,const cchar_t *); |
| 1386 |
extern NCURSES_EXPORT(void) wbkgrndset (WINDOW *,const cchar_t *); |
| 1387 |
extern NCURSES_EXPORT(int) wborder_set (WINDOW *,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*); |
| 1388 |
extern NCURSES_EXPORT(int) wecho_wchar (WINDOW *, const cchar_t *); |
| 1389 |
extern NCURSES_EXPORT(int) wget_wch (WINDOW *, wint_t *); |
| 1390 |
extern NCURSES_EXPORT(int) wget_wstr (WINDOW *, wint_t *); |
| 1391 |
extern NCURSES_EXPORT(int) wgetbkgrnd (WINDOW *, cchar_t *); |
| 1392 |
extern NCURSES_EXPORT(int) wgetn_wstr (WINDOW *,wint_t *, int); |
| 1393 |
extern NCURSES_EXPORT(int) whline_set (WINDOW *, const cchar_t *, int); |
| 1394 |
extern NCURSES_EXPORT(int) win_wch (WINDOW *, cchar_t *); |
| 1395 |
extern NCURSES_EXPORT(int) win_wchnstr (WINDOW *, cchar_t *, int); |
| 1396 |
extern NCURSES_EXPORT(int) win_wchstr (WINDOW *, cchar_t *); |
| 1397 |
extern NCURSES_EXPORT(int) winnwstr (WINDOW *, wchar_t *, int); |
| 1398 |
extern NCURSES_EXPORT(int) wins_nwstr (WINDOW *, const wchar_t *, int); |
| 1399 |
extern NCURSES_EXPORT(int) wins_wch (WINDOW *, const cchar_t *); |
| 1400 |
extern NCURSES_EXPORT(int) wins_wstr (WINDOW *, const wchar_t *); |
| 1401 |
extern NCURSES_EXPORT(int) winwstr (WINDOW *, wchar_t *); |
| 1402 |
extern NCURSES_EXPORT(wchar_t*) wunctrl (cchar_t *); |
| 1403 |
extern NCURSES_EXPORT(int) wvline_set (WINDOW *, const cchar_t *, int); |
| 1404 |
|
| 1405 |
#ifndef NCURSES_NOMACROS |
| 1406 |
|
| 1407 |
|
| 1408 |
|
| 1409 |
|
| 1410 |
#define add_wch(c) wadd_wch(stdscr,c) |
| 1411 |
#define add_wchnstr(str,n) wadd_wchnstr(stdscr,str,n) |
| 1412 |
#define add_wchstr(str) wadd_wchstr(stdscr,str) |
| 1413 |
#define addnwstr(wstr,n) waddnwstr(stdscr,wstr,n) |
| 1414 |
#define addwstr(wstr) waddwstr(stdscr,wstr) |
| 1415 |
#define bkgrnd(c) wbkgrnd(stdscr,c) |
| 1416 |
#define bkgrndset(c) wbkgrndset(stdscr,c) |
| 1417 |
#define border_set(l,r,t,b,tl,tr,bl,br) wborder_set(stdscr,l,r,t,b,tl,tr,bl,br) |
| 1418 |
#define box_set(w,v,h) wborder_set(w,v,v,h,h,0,0,0,0) |
| 1419 |
#define echo_wchar(c) wecho_wchar(stdscr,c) |
| 1420 |
#define get_wch(c) wget_wch(stdscr,c) |
| 1421 |
#define get_wstr(t) wget_wstr(stdscr,t) |
| 1422 |
#define getbkgrnd(wch) wgetbkgrnd(stdscr,wch) |
| 1423 |
#define getn_wstr(t,n) wgetn_wstr(stdscr,t,n) |
| 1424 |
#define hline_set(c,n) whline_set(stdscr,c,n) |
| 1425 |
#define in_wch(c) win_wch(stdscr,c) |
| 1426 |
#define in_wchnstr(c,n) win_wchnstr(stdscr,c,n) |
| 1427 |
#define in_wchstr(c) win_wchstr(stdscr,c) |
| 1428 |
#define innwstr(c,n) winnwstr(stdscr,c,n) |
| 1429 |
#define ins_nwstr(t,n) wins_nwstr(stdscr,t,n) |
| 1430 |
#define ins_wch(c) wins_wch(stdscr,c) |
| 1431 |
#define ins_wstr(t) wins_wstr(stdscr,t) |
| 1432 |
#define inwstr(c) winwstr(stdscr,c) |
| 1433 |
#define vline_set(c,n) wvline_set(stdscr,c,n) |
| 1434 |
#define wadd_wchstr(win,str) wadd_wchnstr(win,str,-1) |
| 1435 |
#define waddwstr(win,wstr) waddnwstr(win,wstr,-1) |
| 1436 |
#define wget_wstr(w,t) wgetn_wstr(w,t,-1) |
| 1437 |
|
| 1438 |
#define win_wchstr(w,c) win_wchnstr(w,c,-1) |
| 1439 |
#define wins_wstr(w,t) wins_nwstr(w,t,-1) |
| 1440 |
|
| 1441 |
#define mvadd_wch(y,x,c) mvwadd_wch(stdscr,y,x,c) |
| 1442 |
#define mvadd_wchnstr(y,x,s,n) mvwadd_wchnstr(stdscr,y,x,s,n) |
| 1443 |
#define mvadd_wchstr(y,x,s) mvwadd_wchstr(stdscr,y,x,s) |
| 1444 |
#define mvaddnwstr(y,x,wstr,n) mvwaddnwstr(stdscr,y,x,wstr,n) |
| 1445 |
#define mvaddwstr(y,x,wstr) mvwaddwstr(stdscr,y,x,wstr) |
| 1446 |
#define mvget_wch(y,x,c) mvwget_wch(stdscr,y,x,c) |
| 1447 |
#define mvget_wstr(y,x,t) mvwget_wstr(stdscr,y,x,t) |
| 1448 |
#define mvgetn_wstr(y,x,t,n) mvwgetn_wstr(stdscr,y,x,t,n) |
| 1449 |
#define mvhline_set(y,x,c,n) mvwhline_set(stdscr,y,x,c,n) |
| 1450 |
#define mvin_wch(y,x,c) mvwin_wch(stdscr,y,x,c) |
| 1451 |
#define mvin_wchnstr(y,x,c,n) mvwin_wchnstr(stdscr,y,x,c,n) |
| 1452 |
#define mvin_wchstr(y,x,c) mvwin_wchstr(stdscr,y,x,c) |
| 1453 |
#define mvinnwstr(y,x,c,n) mvwinnwstr(stdscr,y,x,c,n) |
| 1454 |
#define mvins_nwstr(y,x,t,n) mvwins_nwstr(stdscr,y,x,t,n) |
| 1455 |
#define mvins_wch(y,x,c) mvwins_wch(stdscr,y,x,c) |
| 1456 |
#define mvins_wstr(y,x,t) mvwins_wstr(stdscr,y,x,t) |
| 1457 |
#define mvinwstr(y,x,c) mvwinwstr(stdscr,y,x,c) |
| 1458 |
#define mvvline_set(y,x,c,n) mvwvline_set(stdscr,y,x,c,n) |
| 1459 |
|
| 1460 |
#define mvwadd_wch(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : wadd_wch(win,c)) |
| 1461 |
#define mvwadd_wchnstr(win,y,x,s,n) (wmove(win,y,x) == ERR ? ERR : wadd_wchnstr(win,s,n)) |
| 1462 |
#define mvwadd_wchstr(win,y,x,s) (wmove(win,y,x) == ERR ? ERR : wadd_wchstr(win,s)) |
| 1463 |
#define mvwaddnwstr(win,y,x,wstr,n) (wmove(win,y,x) == ERR ? ERR : waddnwstr(win,wstr,n)) |
| 1464 |
#define mvwaddwstr(win,y,x,wstr) (wmove(win,y,x) == ERR ? ERR : waddwstr(win,wstr)) |
| 1465 |
#define mvwget_wch(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : wget_wch(win,c)) |
| 1466 |
#define mvwget_wstr(win,y,x,t) (wmove(win,y,x) == ERR ? ERR : wget_wstr(win,t)) |
| 1467 |
#define mvwgetn_wstr(win,y,x,t,n) (wmove(win,y,x) == ERR ? ERR : wgetn_wstr(win,t,n)) |
| 1468 |
#define mvwhline_set(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : whline_set(win,c,n)) |
| 1469 |
#define mvwin_wch(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : win_wch(win,c)) |
| 1470 |
#define mvwin_wchnstr(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : win_wchnstr(win,c,n)) |
| 1471 |
#define mvwin_wchstr(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : win_wchstr(win,c)) |
| 1472 |
#define mvwinnwstr(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : winnwstr(win,c,n)) |
| 1473 |
#define mvwins_nwstr(win,y,x,t,n) (wmove(win,y,x) == ERR ? ERR : wins_nwstr(win,t,n)) |
| 1474 |
#define mvwins_wch(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : wins_wch(win,c)) |
| 1475 |
#define mvwins_wstr(win,y,x,t) (wmove(win,y,x) == ERR ? ERR : wins_wstr(win,t)) |
| 1476 |
#define mvwinwstr(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : winwstr(win,c)) |
| 1477 |
#define mvwvline_set(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : wvline_set(win,c,n)) |
| 1478 |
|
| 1479 |
#endif |
| 1480 |
|
| 1481 |
#if defined(TRACE) || defined(NCURSES_TEST) |
| 1482 |
extern NCURSES_EXPORT(const char *) _nc_viswbuf(const wchar_t *); |
| 1483 |
extern NCURSES_EXPORT(const char *) _nc_viswibuf(const wint_t *); |
| 1484 |
#endif |
| 1485 |
|
| 1486 |
#endif |
| 1487 |
|
| 1488 |
|
| 1489 |
|
| 1490 |
|
| 1491 |
|
| 1492 |
|
| 1493 |
|
| 1494 |
#ifdef NCURSES_MOUSE_VERSION |
| 1495 |
#if NCURSES_MOUSE_VERSION > 1 |
| 1496 |
#define NCURSES_MOUSE_MASK(b,m) ((m) << (((b) - 1) * 5)) |
| 1497 |
#else |
| 1498 |
#define NCURSES_MOUSE_MASK(b,m) ((m) << (((b) - 1) * 6)) |
| 1499 |
#endif |
| 1500 |
|
| 1501 |
#define NCURSES_BUTTON_RELEASED 001L |
| 1502 |
#define NCURSES_BUTTON_PRESSED 002L |
| 1503 |
#define NCURSES_BUTTON_CLICKED 004L |
| 1504 |
#define NCURSES_DOUBLE_CLICKED 010L |
| 1505 |
#define NCURSES_TRIPLE_CLICKED 020L |
| 1506 |
#define NCURSES_RESERVED_EVENT 040L |
| 1507 |
|
| 1508 |
|
| 1509 |
#define BUTTON1_RELEASED NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_RELEASED) |
| 1510 |
#define BUTTON1_PRESSED NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_PRESSED) |
| 1511 |
#define BUTTON1_CLICKED NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_CLICKED) |
| 1512 |
#define BUTTON1_DOUBLE_CLICKED NCURSES_MOUSE_MASK(1, NCURSES_DOUBLE_CLICKED) |
| 1513 |
#define BUTTON1_TRIPLE_CLICKED NCURSES_MOUSE_MASK(1, NCURSES_TRIPLE_CLICKED) |
| 1514 |
|
| 1515 |
#define BUTTON2_RELEASED NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_RELEASED) |
| 1516 |
#define BUTTON2_PRESSED NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_PRESSED) |
| 1517 |
#define BUTTON2_CLICKED NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_CLICKED) |
| 1518 |
#define BUTTON2_DOUBLE_CLICKED NCURSES_MOUSE_MASK(2, NCURSES_DOUBLE_CLICKED) |
| 1519 |
#define BUTTON2_TRIPLE_CLICKED NCURSES_MOUSE_MASK(2, NCURSES_TRIPLE_CLICKED) |
| 1520 |
|
| 1521 |
#define BUTTON3_RELEASED NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_RELEASED) |
| 1522 |
#define BUTTON3_PRESSED NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_PRESSED) |
| 1523 |
#define BUTTON3_CLICKED NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_CLICKED) |
| 1524 |
#define BUTTON3_DOUBLE_CLICKED NCURSES_MOUSE_MASK(3, NCURSES_DOUBLE_CLICKED) |
| 1525 |
#define BUTTON3_TRIPLE_CLICKED NCURSES_MOUSE_MASK(3, NCURSES_TRIPLE_CLICKED) |
| 1526 |
|
| 1527 |
#define BUTTON4_RELEASED NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_RELEASED) |
| 1528 |
#define BUTTON4_PRESSED NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_PRESSED) |
| 1529 |
#define BUTTON4_CLICKED NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_CLICKED) |
| 1530 |
#define BUTTON4_DOUBLE_CLICKED NCURSES_MOUSE_MASK(4, NCURSES_DOUBLE_CLICKED) |
| 1531 |
#define BUTTON4_TRIPLE_CLICKED NCURSES_MOUSE_MASK(4, NCURSES_TRIPLE_CLICKED) |
| 1532 |
|
| 1533 |
|
| 1534 |
|
| 1535 |
|
| 1536 |
|
| 1537 |
#if NCURSES_MOUSE_VERSION > 1 |
| 1538 |
|
| 1539 |
#define BUTTON5_RELEASED NCURSES_MOUSE_MASK(5, NCURSES_BUTTON_RELEASED) |
| 1540 |
#define BUTTON5_PRESSED NCURSES_MOUSE_MASK(5, NCURSES_BUTTON_PRESSED) |
| 1541 |
#define BUTTON5_CLICKED NCURSES_MOUSE_MASK(5, NCURSES_BUTTON_CLICKED) |
| 1542 |
#define BUTTON5_DOUBLE_CLICKED NCURSES_MOUSE_MASK(5, NCURSES_DOUBLE_CLICKED) |
| 1543 |
#define BUTTON5_TRIPLE_CLICKED NCURSES_MOUSE_MASK(5, NCURSES_TRIPLE_CLICKED) |
| 1544 |
|
| 1545 |
#define BUTTON_CTRL NCURSES_MOUSE_MASK(6, 0001L) |
| 1546 |
#define BUTTON_SHIFT NCURSES_MOUSE_MASK(6, 0002L) |
| 1547 |
#define BUTTON_ALT NCURSES_MOUSE_MASK(6, 0004L) |
| 1548 |
#define REPORT_MOUSE_POSITION NCURSES_MOUSE_MASK(6, 0010L) |
| 1549 |
|
| 1550 |
#else |
| 1551 |
|
| 1552 |
#define BUTTON1_RESERVED_EVENT NCURSES_MOUSE_MASK(1, NCURSES_RESERVED_EVENT) |
| 1553 |
#define BUTTON2_RESERVED_EVENT NCURSES_MOUSE_MASK(2, NCURSES_RESERVED_EVENT) |
| 1554 |
#define BUTTON3_RESERVED_EVENT NCURSES_MOUSE_MASK(3, NCURSES_RESERVED_EVENT) |
| 1555 |
#define BUTTON4_RESERVED_EVENT NCURSES_MOUSE_MASK(4, NCURSES_RESERVED_EVENT) |
| 1556 |
|
| 1557 |
#define BUTTON_CTRL NCURSES_MOUSE_MASK(5, 0001L) |
| 1558 |
#define BUTTON_SHIFT NCURSES_MOUSE_MASK(5, 0002L) |
| 1559 |
#define BUTTON_ALT NCURSES_MOUSE_MASK(5, 0004L) |
| 1560 |
#define REPORT_MOUSE_POSITION NCURSES_MOUSE_MASK(5, 0010L) |
| 1561 |
|
| 1562 |
#endif |
| 1563 |
|
| 1564 |
#define ALL_MOUSE_EVENTS (REPORT_MOUSE_POSITION - 1) |
| 1565 |
|
| 1566 |
|
| 1567 |
#define BUTTON_RELEASE(e, x) ((e) & (001 << (6 * ((x) - 1)))) |
| 1568 |
#define BUTTON_PRESS(e, x) ((e) & (002 << (6 * ((x) - 1)))) |
| 1569 |
#define BUTTON_CLICK(e, x) ((e) & (004 << (6 * ((x) - 1)))) |
| 1570 |
#define BUTTON_DOUBLE_CLICK(e, x) ((e) & (010 << (6 * ((x) - 1)))) |
| 1571 |
#define BUTTON_TRIPLE_CLICK(e, x) ((e) & (020 << (6 * ((x) - 1)))) |
| 1572 |
#define BUTTON_RESERVED_EVENT(e, x) ((e) & (040 << (6 * ((x) - 1)))) |
| 1573 |
|
| 1574 |
typedef struct |
| 1575 |
{ |
| 1576 |
short id; |
| 1577 |
int x, y, z; |
| 1578 |
mmask_t bstate; |
| 1579 |
} |
| 1580 |
MEVENT; |
| 1581 |
|
| 1582 |
extern NCURSES_EXPORT(int) getmouse (MEVENT *); |
| 1583 |
extern NCURSES_EXPORT(int) ungetmouse (MEVENT *); |
| 1584 |
extern NCURSES_EXPORT(mmask_t) mousemask (mmask_t, mmask_t *); |
| 1585 |
extern NCURSES_EXPORT(bool) wenclose (const WINDOW *, int, int); |
| 1586 |
extern NCURSES_EXPORT(int) mouseinterval (int); |
| 1587 |
extern NCURSES_EXPORT(bool) wmouse_trafo (const WINDOW*, int*, int*, bool); |
| 1588 |
extern NCURSES_EXPORT(bool) mouse_trafo (int*, int*, bool); |
| 1589 |
|
| 1590 |
#define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen) |
| 1591 |
#endif |
| 1592 |
|
| 1593 |
|
| 1594 |
|
| 1595 |
extern NCURSES_EXPORT(int) mcprint (char *, int); |
| 1596 |
extern NCURSES_EXPORT(int) has_key (int); |
| 1597 |
|
| 1598 |
|
| 1599 |
|
| 1600 |
extern NCURSES_EXPORT(void) _tracef (const char *, ...) GCC_PRINTFLIKE(1,2); |
| 1601 |
extern NCURSES_EXPORT(void) _tracedump (const char *, WINDOW *); |
| 1602 |
extern NCURSES_EXPORT(char *) _traceattr (attr_t); |
| 1603 |
extern NCURSES_EXPORT(char *) _traceattr2 (int, chtype); |
| 1604 |
extern NCURSES_EXPORT(char *) _nc_tracebits (void); |
| 1605 |
extern NCURSES_EXPORT(char *) _tracechar (int); |
| 1606 |
extern NCURSES_EXPORT(char *) _tracechtype (chtype); |
| 1607 |
extern NCURSES_EXPORT(char *) _tracechtype2 (int, chtype); |
| 1608 |
#ifdef _XOPEN_SOURCE_EXTENDED |
| 1609 |
#define _tracech_t _tracecchar_t |
| 1610 |
extern NCURSES_EXPORT(char *) _tracecchar_t (const cchar_t *); |
| 1611 |
#define _tracech_t2 _tracecchar_t2 |
| 1612 |
extern NCURSES_EXPORT(char *) _tracecchar_t2 (int, const cchar_t *); |
| 1613 |
#else |
| 1614 |
#define _tracech_t _tracechtype |
| 1615 |
#define _tracech_t2 _tracechtype2 |
| 1616 |
#endif |
| 1617 |
#ifdef NCURSES_MOUSE_VERSION |
| 1618 |
extern NCURSES_EXPORT(char *) _tracemouse (const MEVENT *); |
| 1619 |
#endif |
| 1620 |
extern NCURSES_EXPORT(void) trace (const unsigned int); |
| 1621 |
|
| 1622 |
|
| 1623 |
#define TRACE_DISABLE 0x0000 |
| 1624 |
#define TRACE_TIMES 0x0001 |
| 1625 |
#define TRACE_TPUTS 0x0002 |
| 1626 |
#define TRACE_UPDATE 0x0004 |
| 1627 |
#define TRACE_MOVE 0x0008 |
| 1628 |
#define TRACE_CHARPUT 0x0010 |
| 1629 |
#define TRACE_ORDINARY 0x001F |
| 1630 |
#define TRACE_CALLS 0x0020 |
| 1631 |
#define TRACE_VIRTPUT 0x0040 |
| 1632 |
#define TRACE_IEVENT 0x0080 |
| 1633 |
#define TRACE_BITS 0x0100 |
| 1634 |
#define TRACE_ICALLS 0x0200 |
| 1635 |
#define TRACE_CCALLS 0x0400 |
| 1636 |
#define TRACE_DATABASE 0x0800 |
| 1637 |
#define TRACE_ATTRS 0x1000 |
| 1638 |
|
| 1639 |
#define TRACE_SHIFT 13 |
| 1640 |
#define TRACE_MAXIMUM ((1 << TRACE_SHIFT) - 1) |
| 1641 |
|
| 1642 |
#if defined(TRACE) || defined(NCURSES_TEST) |
| 1643 |
extern NCURSES_EXPORT_VAR(int) _nc_optimize_enable; |
| 1644 |
extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *); |
| 1645 |
#define OPTIMIZE_MVCUR 0x01 |
| 1646 |
#define OPTIMIZE_HASHMAP 0x02 |
| 1647 |
#define OPTIMIZE_SCROLL 0x04 |
| 1648 |
#define OPTIMIZE_ALL 0xff |
| 1649 |
#endif |
| 1650 |
|
| 1651 |
#ifdef __cplusplus |
| 1652 |
|
| 1653 |
#ifndef NCURSES_NOMACROS |
| 1654 |
|
| 1655 |
|
| 1656 |
#undef box |
| 1657 |
#undef clear |
| 1658 |
#undef erase |
| 1659 |
#undef move |
| 1660 |
#undef refresh |
| 1661 |
|
| 1662 |
#endif |
| 1663 |
|
| 1664 |
} |
| 1665 |
#endif |
| 1666 |
|
| 1667 |
|
| 1668 |
|
| 1669 |
void curses_enable_vga(int); |
| 1670 |
void curses_enable_serial(int); |
| 1671 |
|
| 1672 |
int curses_vga_enabled(void); |
| 1673 |
int curses_serial_enabled(void); |
| 1674 |
|
| 1675 |
#endif |