int slk_restore() { int i, code = ERR; #ifdef M_CURSES_TRACE __m_trace("slk_clear(void)"); #endif if (__m_screen->_slk._w != (WINDOW *) 0) { for (i = 0; i < 8; ++i) { if (__m_screen->_slk._labels[i] != (char *) 0) { (void) slk_set( i, __m_screen->_slk._labels[i], __m_screen->_slk._justify[i] ); } } code = slk_refresh(); } else if (label_on != (char *) 0) { (void) tputs(label_on, 1, __m_outc); (void) fflush(__m_screen->_of); code = OK; } return __m_return_code("slk_clear", code); }
char * slk_label(int index) { #ifdef M_CURSES_TRACE __m_trace("slk_label(%d)", index); #endif return __m_return_pointer("slk_label", __m_screen->_slk._labels[index]); }
/* * Assume terminal has only one screen line by restricting those * capabilities that assume more than one line. This function must * be called before initscr() or newterm(). * * This flag will reset after initscr() or newterm() so that subsequent * calls to newterm(), without a preceding call to filter(), will load * an unmodified terminal. THIS IS NOT HISTORICAL PRACTICE, BUT DEEMED * USEFUL. */ void filter(void) { #ifdef M_CURSES_TRACE __m_trace("filter(void)"); #endif assume_one_line = TRUE; __m_return_void("filter"); }
int noecho() { #ifdef M_CURSES_TRACE __m_trace("noecho(void)"); #endif (void) __m_set_echo(0); return __m_return_code("noecho", OK); }
void (noqiflush)() { #ifdef M_CURSES_TRACE __m_trace("noqiflush(void)"); #endif cur_term->_prog.c_lflag |= NOFLSH; (void) __m_tty_set(&cur_term->_prog); __m_return_void("noqiflush"); }
int (chgat)(int n, attr_t at, short co, const void *opts) { int code; #ifdef M_CURSES_TRACE __m_trace("chgat(%d, %x, %d, %p)", n, at, co, opts); #endif code = wchgat(stdscr, n, at, co, opts); return __m_return_code("chgat", code); }
int vid_attr(attr_t attr, short pair, void *opts) { int code; #ifdef M_CURSES_TRACE __m_trace("vid_attr(%x, %d, %p)", attr, pair, opts); #endif code = vid_puts(attr, pair, opts, __m_putchar); return __m_return_code("vid_attr", code); }
/* * When set, pressing an interrupt, suspend, or quiit key, the terminal's * output queue will be flushed. Default inherited from the terminal * driver. The window parameter is ignored. */ int (intrflush)(WINDOW *w, bool bf) { #ifdef M_CURSES_TRACE __m_trace("intrflush(%p, %d)", w, bf); #endif cur_term->_prog.c_lflag &= ~NOFLSH; if (!bf) cur_term->_prog.c_lflag |= NOFLSH; return __m_return_code("intrflush", __m_tty_set(&cur_term->_prog)); }
int hline(chtype h, int n) { int code; #ifdef M_CURSES_TRACE __m_trace("hline(%ld, %d)", h, n); #endif code = whline(stdscr, h, n); return __m_return_code("hline", code); }
int vline(chtype v, int n) { int code; #ifdef M_CURSES_TRACE __m_trace("vline(%ld, %d)", v, n); #endif code = wvline(stdscr, v, n); return __m_return_code("vline", code); }
int (addch)(chtype ch) { int code; #ifdef M_CURSES_TRACE __m_trace("addch(%lx)", ch); #endif code = waddch(stdscr, ch); return __m_return_code("addch", code); }
int box(WINDOW *w, chtype v, chtype h) { int code; #ifdef M_CURSES_TRACE __m_trace("box(%p, %ld, %ld)", w, v, h); #endif code = wborder(w, v, v, h, h, 0, 0, 0, 0); return __m_return_code("box", code); }
int syncok(WINDOW *w, bool bf) { #ifdef M_CURSES_TRACE __m_trace("syncok(%p, %d)", w, bf); #endif w->_flags &= ~W_SYNC_UP; if (bf) w->_flags |= W_SYNC_UP; return __m_return_code("syncok", OK); }
/*f * Draw a border around the edges of the window. The parms correspond to * a character and attribute for the left, right, top, and bottom sides, * top left, top right, bottom left, and bottom right corners. A zero in * any character parm means to take the default. */ int wborder(WINDOW *w, chtype ls, chtype rs, chtype ts, chtype bs, chtype tl, chtype tr, chtype bl, chtype br) { int code; cchar_t wls, wrs, wts, wbs, wtl, wtr, wbl, wbr; #ifdef M_CURSES_TRACE __m_trace( "wborder(%p, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld)", w, ls, rs, ts, bs, tl, tr, bl, br ); #endif if (ls == 0) ls = ACS_VLINE; (void) __m_acs_cc(ls, &wls); if (rs == 0) rs = ACS_VLINE; (void) __m_acs_cc(rs, &wrs); if (ts == 0) ts = ACS_HLINE; (void) __m_acs_cc(ts, &wts); if (bs == 0) bs = ACS_HLINE; (void) __m_acs_cc(bs, &wbs); if (tl == 0) tl = ACS_ULCORNER; (void) __m_acs_cc(tl, &wtl); if (tr == 0) tr = ACS_URCORNER; (void) __m_acs_cc(tr, &wtr); if (bl == 0) bl = ACS_LLCORNER; (void) __m_acs_cc(bl, &wbl); if (br == 0) br = ACS_LRCORNER; (void) __m_acs_cc(br, &wbr); code = wborder_set(w, &wls, &wrs, &wts, &wbs, &wtl, &wtr, &wbl, &wbr); return __m_return_code("wborder", code); }
int (wechochar)(WINDOW *w, chtype ch) { int code; #ifdef M_CURSES_TRACE __m_trace("wechochar(%p, %lx)", w, ch); #endif if ((code = waddch(w, ch)) == OK) code = wrefresh(w); return __m_return_code("wechochar", code); }
int mvwhline(WINDOW *w, int y, int x, chtype h, int n) { int code; #ifdef M_CURSES_TRACE __m_trace("mvwhline(%p, %d, %d, %ld, %d)", w, y, x, h, n); #endif if ((code = wmove(w, y, x)) == OK) code = whline(w, h, n); return __m_return_code("mvwhline", code); }
int mvhline(int y, int x, chtype h, int n) { int code; #ifdef M_CURSES_TRACE __m_trace("mvhline(%d, %d, %ld, %d)", y, x, h, n); #endif if ((code = wmove(stdscr, y, x)) == OK) code = whline(stdscr, h, n); return __m_return_code("mvhline", code); }
int slk_attr_set(const attr_t at, short co, void *opts) { int code = ERR; #ifdef M_CURSES_TRACE __m_trace("slk_attr_set(%x, %d, %p)", at, co, opts); #endif if (__m_screen->_slk._w != (WINDOW *) 0) code = wattr_set(__m_screen->_slk._w, at, co, opts); return __m_return_code("slk_attr_set", code); }
int slk_noutrefresh() { int code = ERR; #ifdef M_CURSES_TRACE __m_trace("slk_noutrefresh(void)"); #endif if (__m_screen->_slk._w != (WINDOW *) 0) code = wnoutrefresh(__m_screen->_slk._w); return __m_return_code("slk_noutrefresh", code); }
int (mvwaddch)(WINDOW *w, int y, int x, chtype ch) { int code; #ifdef M_CURSES_TRACE __m_trace("mvwaddch(%p, %d, %d, %lx)", w, y, x, ch); #endif if ((code = wmove(w, y, x)) == OK) code = waddch(w, ch); return __m_return_code("mvwaddch", code); }
int (mvchgat)(int y, int x, int n, attr_t at, short co, const void *opts) { int code; #ifdef M_CURSES_TRACE __m_trace("mvchgat(%d, %d, %d, %x, %d, %p)", y, x, n, at, co, opts); #endif if ((code = wmove(stdscr, y, x)) == OK) code = wchgat(stdscr, n, at, co, opts); return __m_return_code("mvchgat", code); }
int slk_attrset(const chtype at) { int code = ERR; #ifdef M_CURSES_TRACE __m_trace("slk_attrset(%lx)", at); #endif if (__m_screen->_slk._w != (WINDOW *) 0) code = wattrset(__m_screen->_slk._w, at); return __m_return_code("slk_attrset", code); }
int slk_color(short co) { int code = ERR; #ifdef M_CURSES_TRACE __m_trace("slk_color(%d)", co); #endif if (__m_screen->_slk._w != (WINDOW *) 0) code = wcolor_set(__m_screen->_slk._w, co, (void *) 0); return __m_return_code("slk_color", code); }
int slk_refresh() { int code = ERR; #ifdef M_CURSES_TRACE __m_trace("slk_refresh(void)"); #endif if ((code = slk_noutrefresh()) == OK) code = doupdate(); return __m_return_code("slk_refresh", code); }
int (mvaddch)(int y, int x, chtype ch) { int code; #ifdef M_CURSES_TRACE __m_trace("mvaddch(%d, %d, %lx)", y, x, ch); #endif if ((code = wmove(stdscr, y, x)) == OK) code = waddch(stdscr, ch); return __m_return_code("mvaddch", code); }
int slk_touch() { int code = ERR; #ifdef M_CURSES_TRACE __m_trace("slk_touch(void)"); #endif if (__m_screen->_slk._w != (WINDOW *) 0) code = wtouchln(__m_screen->_slk._w, 0, 1, 1); return __m_return_code("slk_touch", code); }
int (echochar)(chtype ch) { int code; #ifdef M_CURSES_TRACE __m_trace("echochar(%lx)", ch); #endif if ((code = waddch(stdscr, ch)) == OK) code = wrefresh(stdscr); return __m_return_code("echochar", code); }
int slk_set(int index, const char *label, int justify) { int code = ERR; wchar_t wcs[M_CCHAR_MAX * 8 + 1]; #ifdef M_CURSES_TRACE __m_trace("slk_set(%d, %p, %d)", index, label, justify); #endif if (0 < mbstowcs(wcs, label, sizeof wcs)) code = slk_wset(index, wcs, justify); return __m_return_code("slk_set", code); }
int printw(const char *fmt, ...) { int code; va_list ap; #ifdef M_CURSES_TRACE __m_trace("printw(%p = \"%s\", ...)", fmt, fmt); #endif va_start(ap, fmt); code = vw_printw(stdscr, fmt, ap); va_end(ap); return __m_return_code("printw", code); }
int wprintw(WINDOW *w, const char *fmt, ...) { int code; va_list ap; #ifdef M_CURSES_TRACE __m_trace("wprintw(%p, %p = \"%s\", ...)", w, fmt, fmt); #endif va_start(ap, fmt); code = vw_printw(w, fmt, ap); va_end(ap); return __m_return_code("wprintw", code); }