diff options
author | Joursoir <chat@joursoir.net> | 2021-10-25 17:27:24 +0000 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2021-10-25 17:27:24 +0000 |
commit | 84d0343d88eb96419adc6a68183bbfe6ee9f96f0 (patch) | |
tree | fc3187501171324ea9a292ba56ec21b317feb94f /lib/tbi | |
parent | c862a3b4d59fd7f0c54240d13c034ac64a5185b7 (diff) | |
download | ufm-84d0343d88eb96419adc6a68183bbfe6ee9f96f0.tar.gz ufm-84d0343d88eb96419adc6a68183bbfe6ee9f96f0.tar.bz2 ufm-84d0343d88eb96419adc6a68183bbfe6ee9f96f0.zip |
tbi/win: add macro to set a character and its attributes
Diffstat (limited to 'lib/tbi')
-rw-r--r-- | lib/tbi/win.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/tbi/win.c b/lib/tbi/win.c index 9129403..49ca9d7 100644 --- a/lib/tbi/win.c +++ b/lib/tbi/win.c @@ -11,6 +11,13 @@ if(x < 0 || y < 0 || x >= w->width || y >= w->height) \ return FALSE +#define SET_WINDOW_CHAR(win, col, row, character, attrib) \ + w->text[row][col] = character; \ + w->attr[row][col] = attrib + +#define SET_WINDOW_CHAR2(win, col, row, character) \ + SET_WINDOW_CHAR(win, col, row, character, win->cur_attr) + struct window *newwin(struct screen *s, INT32 ncols, INT32 nlines, INT32 begin_x, INT32 begin_y) { |