aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-10-25 17:27:24 +0000
committerJoursoir <chat@joursoir.net>2021-10-25 17:27:24 +0000
commit84d0343d88eb96419adc6a68183bbfe6ee9f96f0 (patch)
treefc3187501171324ea9a292ba56ec21b317feb94f /lib
parentc862a3b4d59fd7f0c54240d13c034ac64a5185b7 (diff)
downloadufm-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')
-rw-r--r--lib/tbi/win.c7
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)
{