aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tbi
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-10-24 21:08:31 +0000
committerJoursoir <chat@joursoir.net>2021-10-24 21:08:31 +0000
commit51635072ddd0fe714a7d9983288abbb32315824f (patch)
treecf571b6e3b4c90dac49a2d170b818883f4f10624 /lib/tbi
parentd3d7d9902072f4f683102ec130801cb609bfa7bc (diff)
downloadufm-51635072ddd0fe714a7d9983288abbb32315824f.tar.gz
ufm-51635072ddd0fe714a7d9983288abbb32315824f.tar.bz2
ufm-51635072ddd0fe714a7d9983288abbb32315824f.zip
tbi/win: make wattrset(), wattroff()
Diffstat (limited to 'lib/tbi')
-rw-r--r--lib/tbi/win.c14
-rw-r--r--lib/tbi/win.h20
2 files changed, 34 insertions, 0 deletions
diff --git a/lib/tbi/win.c b/lib/tbi/win.c
index 69ba895..e3ba31e 100644
--- a/lib/tbi/win.c
+++ b/lib/tbi/win.c
@@ -88,3 +88,17 @@ VOID delwin(struct window *w)
FreePool(w);
}
+
+VOID wattrset(struct window *w, INT32 attr)
+{
+ ASSERT(w != NULL);
+
+ w->cur_attr = attr;
+}
+
+VOID wattroff(struct window *w)
+{
+ ASSERT(w != NULL);
+
+ w->cur_attr = w->scr->attr;
+}
diff --git a/lib/tbi/win.h b/lib/tbi/win.h
index 2de5310..1539877 100644
--- a/lib/tbi/win.h
+++ b/lib/tbi/win.h
@@ -54,4 +54,24 @@ struct window *newwin(struct screen *s,
*/
VOID delwin(struct window *w);
+/*
+ * Sets the current attributes of the given window
+ *
+ * w: the window on which to operate
+ * attr: the attributes
+ *
+ * return: VOID
+*/
+VOID wattrset(struct window *w, INT32 attr);
+
+/*
+ * Resets the current attributes of the given window to standard screen
+ * attributes
+ *
+ * w: the window on which to operate
+ *
+ * return: VOID
+*/
+VOID wattroff(struct window *w);
+
#endif /* UFM_TBI_WINDOW_H */