00001 #ifndef CURSES_H
00002 #define CURSES_H
00003
00004 #include <stdint.h>
00005 #include <stdarg.h>
00006
00007
00008
00009
00010
00011
00012
00013 FILE_LICENCE ( GPL2_OR_LATER );
00014
00015 #undef ERR
00016 #define ERR (-1)
00017
00018 #undef FALSE
00019 #define FALSE (0)
00020
00021 #undef OK
00022 #define OK (0)
00023
00024 #undef TRUE
00025 #define TRUE (1)
00026
00027 typedef int bool;
00028 typedef uint32_t chtype;
00029 typedef uint32_t attr_t;
00030
00031
00032 typedef struct _curses_screen {
00033
00034 unsigned int curs_x, curs_y;
00035
00036 attr_t attrs;
00037
00038 void ( *init ) ( struct _curses_screen *scr );
00039 void ( *exit ) ( struct _curses_screen *scr );
00040
00041
00042
00043
00044
00045
00046
00047 void ( * movetoyx ) ( struct _curses_screen *scr,
00048 unsigned int y, unsigned int x );
00049
00050
00051
00052
00053
00054
00055 void ( * putc ) ( struct _curses_screen *scr, chtype c );
00056
00057
00058
00059
00060
00061
00062 int ( * getc ) ( struct _curses_screen *scr );
00063
00064
00065
00066
00067
00068
00069
00070 bool ( *peek ) ( struct _curses_screen *scr );
00071 } SCREEN;
00072
00073
00074 typedef struct _curses_window {
00075
00076 SCREEN *scr;
00077
00078 attr_t attrs;
00079
00080 unsigned int ori_x, ori_y;
00081
00082 unsigned int curs_x, curs_y;
00083
00084 unsigned int width, height;
00085
00086 struct _curses_window *parent;
00087
00088
00089
00090
00091 } WINDOW;
00092
00093 extern WINDOW _stdscr;
00094 extern unsigned short _COLS;
00095 extern unsigned short _LINES;
00096
00097 #define stdscr ( &_stdscr )
00098 #define COLS _COLS
00099 #define LINES _LINES
00100
00101 #define MUCURSES_BITS( mask, shift ) (( mask ) << (shift))
00102 #define CPAIR_SHIFT 8
00103 #define ATTRS_SHIFT 16
00104
00105 #define WA_DEFAULT ( 0x0000 << ATTRS_SHIFT )
00106 #define WA_ALTCHARSET ( 0x0001 << ATTRS_SHIFT )
00107 #define WA_BLINK ( 0x0002 << ATTRS_SHIFT )
00108 #define WA_BOLD ( 0x0004 << ATTRS_SHIFT )
00109 #define WA_DIM ( 0x0008 << ATTRS_SHIFT )
00110 #define WA_INVIS ( 0x0010 << ATTRS_SHIFT )
00111 #define WA_PROTECT ( 0x0020 << ATTRS_SHIFT )
00112 #define WA_REVERSE ( 0x0040 << ATTRS_SHIFT )
00113 #define WA_STANDOUT ( 0x0080 << ATTRS_SHIFT )
00114 #define WA_UNDERLINE ( 0x0100 << ATTRS_SHIFT )
00115 #define WA_HORIZONTAL ( 0x0200 << ATTRS_SHIFT )
00116 #define WA_VERTICAL ( 0x0400 << ATTRS_SHIFT )
00117 #define WA_LEFT ( 0x0800 << ATTRS_SHIFT )
00118 #define WA_RIGHT ( 0x1000 << ATTRS_SHIFT )
00119 #define WA_LOW ( 0x2000 << ATTRS_SHIFT )
00120 #define WA_TOP ( 0x4000 << ATTRS_SHIFT )
00121
00122 #define A_DEFAULT WA_DEFAULT
00123 #define A_ALTCHARSET WA_ALTCHARSET
00124 #define A_BLINK WA_BLINK
00125 #define A_BOLD WA_BOLD
00126 #define A_DIM WA_DIM
00127 #define A_INVIS WA_INVIS
00128 #define A_PROTECT WA_PROTECT
00129 #define A_REVERSE WA_REVERSE
00130 #define A_STANDOUT WA_STANDOUT
00131 #define A_UNDERLINE WA_UNDERLINE
00132
00133 #define A_ATTRIBUTES ( 0xffff << ATTRS_SHIFT )
00134 #define A_CHARTEXT ( 0xff )
00135 #define A_COLOUR ( 0xff << CPAIR_SHIFT )
00136 #define A_COLOR A_COLOUR
00137
00138 #define COLOUR_PAIR(n) ( (n) << CPAIR_SHIFT )
00139 #define COLOR_PAIR(n) COLOUR_PAIR(n)
00140 #define PAIR_NUMBER(attrs) ( ( (attrs) & A_COLOUR ) >> CPAIR_SHIFT )
00141
00142 #define COLOUR_PAIRS 8
00143 #define COLOR_PAIRS COLOUR_PAIRS
00144
00145 #define ACS_ULCORNER '+'
00146 #define ACS_LLCORNER '+'
00147 #define ACS_URCORNER '+'
00148 #define ACS_LRCORNER '+'
00149 #define ACS_RTEE '+'
00150 #define ACS_LTEE '+'
00151 #define ACS_BTEE '+'
00152 #define ACS_TTEE '+'
00153 #define ACS_HLINE '-'
00154 #define ACS_VLINE '|'
00155 #define ACS_PLUS '+'
00156 #define ACS_S1 '-'
00157 #define ACS_S9 '_'
00158 #define ACS_DIAMOND '+'
00159 #define ACS_CKBOARD ':'
00160 #define ACS_DEGREE '\''
00161 #define ACS_PLMINUS '#'
00162 #define ACS_BULLET 'o'
00163 #define ACS_LARROW '<'
00164 #define ACS_RARROW '>'
00165 #define ACS_DARROW 'v'
00166 #define ACS_UARROW '^'
00167 #define ACS_BOARD '#'
00168 #define ACS_LANTERN '#'
00169 #define ACS_BLOCK '#'
00170
00171 #define COLOUR_BLACK 0
00172 #define COLOUR_RED 1
00173 #define COLOUR_GREEN 2
00174 #define COLOUR_YELLOW 3
00175 #define COLOUR_BLUE 4
00176 #define COLOUR_MAGENTA 5
00177 #define COLOUR_CYAN 6
00178 #define COLOUR_WHITE 7
00179 #define COLOURS 7
00180
00181 #define COLOUR_FG 30
00182 #define COLOUR_BG 40
00183 #define COLOR_FG COLOUR_FG
00184 #define COLOR_BG COLOUR_BG
00185
00186 #define COLOR_BLACK COLOUR_BLACK
00187 #define COLOR_BLUE COLOUR_BLUE
00188 #define COLOR_GREEN COLOUR_GREEN
00189 #define COLOR_CYAN COLOUR_CYAN
00190 #define COLOR_RED COLOUR_RED
00191 #define COLOR_MAGENTA COLOUR_MAGENTA
00192 #define COLOR_YELLOW COLOUR_YELLOW
00193 #define COLOR_WHITE COLOUR_WHITE
00194 #define COLORS COLOURS
00195
00196
00197
00198
00199 #include <gpxe/keys.h>
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213 extern int baudrate ( void );
00214 extern int beep ( void );
00215
00216
00217
00218 extern int box ( WINDOW *, chtype, chtype ) __nonnull;
00219
00220 #define can_change_color() can_change_colour()
00221 extern int cbreak ( void );
00222
00223
00224 extern int colour_content ( short, short *, short *, short * ) __nonnull;
00225 #define color_content( c, r, g, b ) colour_content( (c), (r), (g), (b) )
00226
00227 #define color_set( cpno, opts ) colour_set( (cpno), (opts) )
00228 extern int copywin ( const WINDOW *, WINDOW *, int, int, int,
00229 int, int, int, int );
00230 extern int curs_set ( int );
00231 extern int def_prog_mode ( void );
00232 extern int def_shell_mode ( void );
00233 extern int delay_output ( int );
00234
00235
00236 extern void delscreen ( SCREEN * );
00237 extern int delwin ( WINDOW * ) __nonnull;
00238 extern WINDOW *derwin ( WINDOW *, int, int, int, int ) __nonnull;
00239
00240 extern WINDOW *dupwin ( WINDOW * ) __nonnull;
00241 extern int echo ( void );
00242 extern int echochar ( const chtype );
00243 extern int endwin ( void );
00244 extern char erasechar ( void );
00245
00246 extern void filter ( void );
00247 extern int flash ( void );
00248 extern int flushinp ( void );
00249 extern __pure chtype getbkgd ( WINDOW * ) __nonnull;
00250
00251
00252
00253 extern int halfdelay ( int );
00254
00255 extern bool has_ic ( void );
00256 extern bool has_il ( void );
00257
00258 extern void idcok ( WINDOW *, bool );
00259 extern int idlok ( WINDOW *, bool );
00260
00261
00262
00263
00264 extern WINDOW *initscr ( void );
00265 extern int init_colour ( short, short, short, short );
00266 #define init_color ( c, r, g, b ) init_colour ( (c), (r), (g), (b) )
00267 extern int init_pair ( short, short, short );
00268
00269
00270
00271
00272
00273 extern int intrflush ( WINDOW *, bool );
00274 extern bool isendwin ( void );
00275
00276
00277 extern char *keyname ( int );
00278 extern int keypad ( WINDOW *, bool );
00279 extern char killchar ( void );
00280 extern int leaveok ( WINDOW *, bool );
00281 extern char *longname ( void );
00282 extern int meta ( WINDOW *, bool );
00283
00284
00285
00286
00287
00288
00289 extern int mvcur ( int, int, int, int );
00290
00291 extern int mvderwin ( WINDOW *, int, int );
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317 extern int mvwin ( WINDOW *, int, int ) __nonnull;
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329 extern int napms ( int );
00330
00331 extern WINDOW *newwin ( int, int, int, int );
00332 extern int nl ( void );
00333 extern int nocbreak ( void );
00334 extern int nodelay ( WINDOW *, bool );
00335 extern int noecho ( void );
00336 extern int nonl ( void );
00337 extern void noqiflush ( void );
00338 extern int noraw ( void );
00339 extern int notimeout ( WINDOW *, bool );
00340 extern int overlay ( const WINDOW *, WINDOW * );
00341 extern int overwrite ( const WINDOW *, WINDOW * );
00342 extern int pair_content ( short, short *, short * ) __nonnull;
00343
00344
00345
00346 extern int printw ( char *, ... );
00347 extern int putp ( const char * );
00348 extern void qiflush ( void );
00349 extern int raw ( void );
00350
00351
00352 extern int reset_prog_mode ( void );
00353 extern int reset_shell_mode ( void );
00354 extern int resetty ( void );
00355 extern int ripoffline ( int, int (*) ( WINDOW *, int) );
00356 extern int savetty ( void );
00357
00358
00359
00360
00361
00362 extern SCREEN *set_term ( SCREEN * );
00363 extern int setupterm ( char *, int, int * );
00364 extern int slk_attr_off ( const attr_t, void * );
00365 extern int slk_attroff ( const chtype );
00366 extern int slk_attr_on ( const attr_t, void * );
00367 extern int slk_attron ( const chtype );
00368 extern int slk_attr_set ( const attr_t, short, void * );
00369 extern int slk_attrset ( const chtype );
00370 extern int slk_clear ( void );
00371 extern int slk_colour ( short );
00372 #define slk_color( c ) slk_colour( (c) )
00373 extern int slk_init ( int );
00374 extern char *slk_label ( int );
00375 extern int slk_noutrefresh ( void );
00376
00377 extern int slk_restore ( void );
00378 extern int slk_set ( int, const char *, int ) __nonnull;
00379 extern int slk_touch ( void );
00380 extern int standend ( void );
00381 extern int standout ( void );
00382
00383 #define start_color() start_colour()
00384
00385 extern WINDOW *subwin ( WINDOW *, int, int, int, int ) __nonnull;
00386 extern int syncok ( WINDOW *, bool );
00387 extern chtype termattrs ( void );
00388 extern attr_t term_attrs ( void );
00389 extern char *termname ( void );
00390 extern int tigetflag ( char * );
00391 extern int tigetnum ( char * );
00392 extern char *tigetstr ( char * );
00393 extern void timeout ( int );
00394
00395
00396 extern char *tparm ( char *, long, long, long, long, long, long, long, long,
00397 long );
00398 extern int typeahead ( int );
00399
00400
00401 extern void use_env ( bool );
00402 extern int vid_attr ( attr_t, short, void * );
00403 extern int vidattr ( chtype );
00404 extern int vid_puts ( attr_t, short, void *, int ( *) ( int) );
00405 extern int vidputs ( chtype, int ( *) ( int) );
00406
00407
00408 extern int vw_printw ( WINDOW *, const char *, va_list ) __nonnull;
00409
00410
00411 extern int waddch ( WINDOW *, const chtype ) __nonnull;
00412 extern int waddchnstr ( WINDOW *, const chtype *, int ) __nonnull;
00413
00414 extern int waddnstr ( WINDOW *, const char *, int ) __nonnull;
00415
00416 extern int wattroff ( WINDOW *, int ) __nonnull;
00417 extern int wattron ( WINDOW *, int ) __nonnull;
00418 extern int wattrset ( WINDOW *, int ) __nonnull;
00419 extern int wattr_get ( WINDOW *, attr_t *, short *, void * )
00420 __attribute__ (( nonnull (1, 2, 3)));
00421 extern int wattr_off ( WINDOW *, attr_t, void * )
00422 __attribute__ (( nonnull (1)));
00423 extern int wattr_on ( WINDOW *, attr_t, void * )
00424 __attribute__ (( nonnull (1)));
00425 extern int wattr_set ( WINDOW *, attr_t, short, void * )
00426 __attribute__ (( nonnull (1)));
00427
00428 extern int wborder ( WINDOW *, chtype, chtype, chtype, chtype, chtype, chtype,
00429 chtype, chtype ) __nonnull;
00430 extern int wclrtobot ( WINDOW * ) __nonnull;
00431 extern int wclrtoeol ( WINDOW * ) __nonnull;
00432 extern void wcursyncup ( WINDOW * );
00433 extern int wcolour_set ( WINDOW *, short, void * ) __nonnull;
00434 #define wcolor_set(w,s,v) wcolour_set((w),(s),(v))
00435 extern int wdelch ( WINDOW * ) __nonnull;
00436 extern int wdeleteln ( WINDOW * ) __nonnull;
00437 extern int wechochar ( WINDOW *, const chtype );
00438 extern int werase ( WINDOW * ) __nonnull;
00439 extern int wgetch ( WINDOW * );
00440 extern int wgetnstr ( WINDOW *, char *, int );
00441
00442 extern int whline ( WINDOW *, chtype, int ) __nonnull;
00443
00444
00445
00446
00447
00448
00449
00450
00451 extern int wmove ( WINDOW *, int, int );
00452
00453 extern int wprintw ( WINDOW *, const char *, ... ) __nonnull;
00454
00455
00456
00457
00458
00459
00460
00461 extern void wsyncup ( WINDOW * );
00462 extern void wsyncdown ( WINDOW * );
00463 extern void wtimeout ( WINDOW *, int );
00464
00465 extern int wvline ( WINDOW *, chtype, int ) __nonnull;
00466
00467
00468
00469
00470
00471
00472
00473
00474 static inline int addch ( const chtype ch ) {
00475 return waddch( stdscr, ch );
00476 }
00477
00478 static inline int addchnstr ( const chtype *chstr, int n ) {
00479 return waddchnstr ( stdscr, chstr, n );
00480 }
00481
00482 static inline int addchstr ( const chtype *chstr ) {
00483 return waddchnstr ( stdscr, chstr, -1 );
00484 }
00485
00486 static inline int addnstr ( const char *str, int n ) {
00487 return waddnstr ( stdscr, str, n );
00488 }
00489
00490 static inline int addstr ( const char *str ) {
00491 return waddnstr ( stdscr, str, -1 );
00492 }
00493
00494 static inline int attroff ( int attrs ) {
00495 return wattroff ( stdscr, attrs );
00496 }
00497
00498 static inline int attron ( int attrs ) {
00499 return wattron ( stdscr, attrs );
00500 }
00501
00502 static inline int attrset ( int attrs ) {
00503 return wattrset ( stdscr, attrs );
00504 }
00505
00506 static inline int attr_get ( attr_t *attrs, short *pair, void *opts ) {
00507 return wattr_get ( stdscr, attrs, pair, opts );
00508 }
00509
00510 static inline int attr_off ( attr_t attrs, void *opts ) {
00511 return wattr_off ( stdscr, attrs, opts );
00512 }
00513
00514 static inline int attr_on ( attr_t attrs, void *opts ) {
00515 return wattr_on ( stdscr, attrs, opts );
00516 }
00517
00518 static inline int attr_set ( attr_t attrs, short cpair, void *opts ) {
00519 return wattr_set ( stdscr, attrs, cpair, opts );
00520 }
00521
00522 static inline void bkgdset ( chtype ch ) {
00523 wattrset ( stdscr, ch );
00524 }
00525
00526 static inline int border ( chtype ls, chtype rs, chtype ts, chtype bs,
00527 chtype tl, chtype tr, chtype bl, chtype br ) {
00528 return wborder ( stdscr, ls, rs, ts, bs, tl, tr, bl, br );
00529 }
00530
00531 static inline bool can_change_colour ( void ) {
00532 return FALSE;
00533 }
00534
00535 static inline int clrtobot ( void ) {
00536 return wclrtobot( stdscr );
00537 }
00538
00539 static inline int clrtoeol ( void ) {
00540 return wclrtoeol( stdscr );
00541 }
00542
00543 static inline int colour_set ( short colour_pair_number, void *opts ) {
00544 return wcolour_set ( stdscr, colour_pair_number, opts );
00545 }
00546
00547 static inline int delch ( void ) {
00548 return wdelch ( stdscr );
00549 }
00550
00551 static inline int deleteln ( void ) {
00552 return wdeleteln( stdscr );
00553 }
00554
00555 static inline int erase ( void ) {
00556 return werase ( stdscr );
00557 }
00558
00559 static inline int getch ( void ) {
00560 return wgetch ( stdscr );
00561 }
00562
00563 static inline int getnstr ( char *str, int n ) {
00564 return wgetnstr ( stdscr, str, n );
00565 }
00566
00567 static inline int getstr ( char *str ) {
00568 return wgetnstr ( stdscr, str, -1 );
00569 }
00570
00571 static inline bool has_colors ( void ) {
00572 return TRUE;
00573 }
00574
00575 static inline int has_key ( int kc __unused ) {
00576 return TRUE;
00577 }
00578
00579 static inline int hline ( chtype ch, int n ) {
00580 return whline ( stdscr, ch, n );
00581 }
00582
00583 static inline int move ( int y, int x ) {
00584 return wmove ( stdscr, y, x );
00585 }
00586
00587 static inline int mvaddch ( int y, int x, const chtype ch ) {
00588 return ( wmove ( stdscr, y, x ) == OK
00589 ? waddch( stdscr, ch ) : ERR );
00590 }
00591
00592 static inline int mvaddchnstr ( int y, int x, const chtype *chstr, int n ) {
00593 return ( wmove ( stdscr, y, x ) == OK
00594 ? waddchnstr ( stdscr, chstr, n ) : ERR );
00595 }
00596
00597 static inline int mvaddchstr ( int y, int x, const chtype *chstr ) {
00598 return ( wmove ( stdscr, y, x ) == OK
00599 ? waddchnstr ( stdscr, chstr, -1 ) : ERR );
00600 }
00601
00602 static inline int mvaddnstr ( int y, int x, const char *str, int n ) {
00603 return ( wmove ( stdscr, y, x ) == OK
00604 ? waddnstr ( stdscr, str, n ) : ERR );
00605 }
00606
00607 static inline int mvaddstr ( int y, int x, const char *str ) {
00608 return ( wmove ( stdscr, y, x ) == OK
00609 ? waddnstr ( stdscr, str, -1 ) : ERR );
00610 }
00611
00612 static inline int mvdelch ( int y, int x ) {
00613 return ( wmove ( stdscr, y, x ) == OK
00614 ? wdelch ( stdscr ) : ERR );
00615 }
00616
00617 static inline int mvgetch ( int y, int x ) {
00618 return ( wmove ( stdscr, y, x ) == OK
00619 ? wgetch ( stdscr ) : ERR );
00620 }
00621
00622 static inline int mvgetnstr ( int y, int x, char *str, int n ) {
00623 return ( wmove ( stdscr, y, x ) == OK
00624 ? wgetnstr ( stdscr, str, n ) : ERR );
00625 }
00626
00627 static inline int mvgetstr ( int y, int x, char *str ) {
00628 return ( wmove ( stdscr, y, x ) == OK
00629 ? wgetnstr ( stdscr, str, -1 ) : ERR );
00630 }
00631
00632 static inline int mvhline ( int y, int x, chtype ch, int n ) {
00633 return ( wmove ( stdscr, y, x ) == OK
00634 ? whline ( stdscr, ch, n ) : ERR );
00635 }
00636
00637
00638 #define mvprintw( y, x, fmt, ... ) \
00639 ( wmove(stdscr,(y),(x)) == OK \
00640 ? wprintw( stdscr,(fmt), ## __VA_ARGS__ ) : ERR )
00641
00642 static inline int mvvline ( int y, int x, chtype ch, int n ) {
00643 return ( wmove ( stdscr, y, x ) == OK
00644 ? wvline ( stdscr, ch, n ) : ERR );
00645 }
00646
00647 static inline int mvwaddch ( WINDOW *win, int y, int x, const chtype ch ) {
00648 return ( wmove( win, y, x ) == OK
00649 ? waddch ( win, ch ) : ERR );
00650 }
00651
00652 static inline int mvwaddchnstr ( WINDOW *win, int y, int x, const chtype *chstr, int n ) {
00653 return ( wmove ( win, y, x ) == OK
00654 ? waddchnstr ( win, chstr, n ) : ERR );
00655 }
00656
00657 static inline int mvwaddchstr ( WINDOW *win, int y, int x, const chtype *chstr ) {
00658 return ( wmove ( win, y, x ) == OK
00659 ? waddchnstr ( win, chstr, -1 ) : ERR );
00660 }
00661
00662 static inline int mvwaddnstr ( WINDOW *win, int y, int x, const char *str, int n ) {
00663 return ( wmove ( win, y, x ) == OK
00664 ? waddnstr ( win, str, n ) : ERR );
00665 }
00666
00667 static inline int mvwaddstr ( WINDOW *win, int y, int x, const char *str ) {
00668 return ( wmove ( win, y, x ) == OK
00669 ? waddnstr ( win, str, -1 ) : ERR );
00670 }
00671
00672 static inline int mvwdelch ( WINDOW *win, int y, int x ) {
00673 return ( wmove ( win, y, x ) == OK
00674 ? wdelch ( win ) : ERR );
00675 }
00676
00677 static inline int mvwgetch ( WINDOW *win, int y, int x ) {
00678 return ( wmove ( win, y, x ) == OK
00679 ? wgetch ( win ) : ERR );
00680 }
00681
00682 static inline int mvwgetnstr ( WINDOW *win, int y, int x, char *str, int n ) {
00683 return ( wmove ( win, y, x ) == OK
00684 ? wgetnstr ( win, str, n ) : ERR );
00685 }
00686
00687 static inline int mvwgetstr ( WINDOW *win, int y, int x, char *str ) {
00688 return ( wmove ( win, y, x ) == OK
00689 ? wgetnstr ( win, str, -1 ) : ERR );
00690 }
00691
00692 static inline int mvwhline ( WINDOW *win, int y, int x, chtype ch, int n ) {
00693 return ( wmove ( win, y, x ) == OK
00694 ? whline ( win, ch, n ) : ERR );
00695 }
00696
00697 #define mvwprintw( win, y, x, fmt, ... ) \
00698 ( wmove((win),(y),(x)) == OK \
00699 ? wprintw((win),(fmt), ## __VA_ARGS__) : ERR )
00700
00701 static inline int mvwvline ( WINDOW *win, int y, int x, chtype ch, int n ) {
00702 return ( wmove ( win, y, x ) == OK
00703 ? wvline ( win, ch, n ) : ERR );
00704 }
00705
00706 #define printw( fmt, ... ) wprintw(stdscr,(fmt), ## __VA_ARGS__ )
00707
00708 static inline int slk_refresh ( void ) {
00709 if ( slk_clear() == OK )
00710 return slk_restore();
00711 else
00712 return ERR;
00713 }
00714
00715 #define standend() wstandend( stdscr )
00716 #define standout() wstandout( stdscr )
00717
00718 static inline int start_colour ( void ) {
00719 return OK;
00720 }
00721
00722 static inline int vline ( chtype ch, int n ) {
00723 return wvline ( stdscr, ch, n );
00724 }
00725
00726
00727 static inline int vwprintw ( WINDOW *win, const char *fmt, va_list varglist ) {
00728 return vw_printw ( win, fmt, varglist );
00729 }
00730
00731 static inline int waddchstr ( WINDOW *win, const chtype *chstr ) {
00732 return waddchnstr ( win, chstr, -1 );
00733 }
00734
00735 static inline int waddstr ( WINDOW *win, const char *str ) {
00736 return waddnstr ( win, str, -1 );
00737 }
00738
00739 static inline int wbkgdset ( WINDOW *win, chtype ch ) {
00740 return wattrset( win, ch );
00741 }
00742
00743 static inline int wgetstr ( WINDOW *win, char *str ) {
00744 return wgetnstr ( win, str, -1 );
00745 }
00746
00747 static inline int wstandend ( WINDOW *win ) {
00748 return wattrset ( win, A_DEFAULT );
00749 }
00750
00751 static inline int wstandout ( WINDOW *win ) {
00752 return wattrset ( win, A_STANDOUT );
00753 }
00754
00755 #endif