Back to index

tetex-bin  3.0
Functions
lib_chgat.c File Reference
#include <curses.priv.h>

Go to the source code of this file.

Functions

 wchgat (WINDOW *win, int n, attr_t attr, short color, const void *opts GCC_UNUSED)

Function Documentation

wchgat ( WINDOW win,
int  n,
attr_t  attr,
short  color,
const void *opts  GCC_UNUSED 
)

Definition at line 47 of file lib_chgat.c.

{
    int i;

    T((T_CALLED("wchgat(%p,%d,%s,%d)"), win, n, _traceattr(attr), color));

    if (win) {
       toggle_attr_on(attr, COLOR_PAIR(color));

       for (i = win->_curx; i <= win->_maxx && (n == -1 || (n-- > 0)); i++)
           SetAttr(win->_line[win->_cury].text[i], attr);

       returnCode(OK);
    } else
       returnCode(ERR);
}