static NCURSES_INLINE int #undef wbkgrnd #endif wbkgrnd(WINDOW *win, const ARG_CH_T ch) { int code = ERR; int x, y; NCURSES_CH_T new_bkgd = CHDEREF(ch); T((T_CALLED("wbkgd(%p,%s)"), (void *) win, _tracech_t(ch))); if (win) { NCURSES_CH_T old_bkgrnd; wgetbkgrnd(win, &old_bkgrnd); (void) wbkgrndset(win, CHREF(new_bkgd)); (void) wattrset(win, AttrOf(win->_nc_bkgd)); for (y = 0; y <= win->_maxy; y++) { for (x = 0; x <= win->_maxx; x++) { if (CharEq(win->_line[y].text[x], old_bkgrnd)) { win->_line[y].text[x] = win->_nc_bkgd; } else { NCURSES_CH_T wch = win->_line[y].text[x]; RemAttr(wch, (~(A_ALTCHARSET | A_CHARTEXT))); win->_line[y].text[x] = _nc_render(win, wch); } } } touchwin(win); _nc_synchook(win); code = OK; } returnCode(code); }
int wbkgrnd(WINDOW *win, const cchar_t *wch) { #ifndef HAVE_WCHAR return ERR; #else /* int y, x, i; */ attr_t battr; /* nschar_t *np, *tnp, *pnp; */ #ifdef DEBUG __CTRACE(__CTRACE_ATTR, "wbkgrnd: (%p), '%s', %x\n", win, (const char *) wunctrl(wch), wch->attributes); #endif /* ignore multi-column characters */ if ( !wch->elements || wcwidth( wch->vals[ 0 ]) > 1 ) return ERR; /* Background attributes (check colour). */ battr = wch->attributes & WA_ATTRIBUTES; if (__using_color && !( battr & __COLOR)) battr |= __default_color; win->battr = battr; wbkgrndset(win, wch); __touchwin(win); return OK; #endif /* HAVE_WCHAR */ }
int wbkgrnd(WINDOW *win, const cchar_t *wch) { /* int y, x, i; */ attr_t battr; /* nschar_t *np, *tnp, *pnp; */ /* ignore multi-column characters */ if ( !wch->elements || wcwidth( wch->vals[ 0 ]) > 1 ) return ERR; /* Background attributes (check colour). */ battr = wch->attributes & WA_ATTRIBUTES; if (__using_color && !( battr & __COLOR)) battr |= __default_color; win->battr = battr; wbkgrndset(win, wch); __touchwin(win); return OK; }
void bkgrndset(const cchar_t *wch) { PDC_LOG(("bkgrndset() - called\n")); wbkgrndset(stdscr, wch); }
wbkgdset(WINDOW *win, chtype ch) { NCURSES_CH_T wch; SetChar2(wch, ch); wbkgrndset(win, CHREF(wch)); }
//------------------------------------------------------------------------------ void bkgrndset( const cchar_t* wch ) { __QCS_FCONTEXT( "bkgrndset" ); wbkgrndset( stdscr, wch ); }
void bkgrndset(const cchar_t *wch) { #ifdef HAVE_WCHAR wbkgrndset( stdscr, wch ); #endif /* HAVE_WCHAR */ }
void bkgrndset(const cchar_t *wch) { wbkgrndset( stdscr, wch ); }
NCURSES_EXPORT(void) (bkgrndset) (const cchar_t * z) { T((T_CALLED("bkgrndset(%p)"), (const void *)z)); wbkgrndset(stdscr,z); returnVoid; }