diff options
Diffstat (limited to 'lib/tbi')
-rw-r--r-- | lib/tbi/win.c | 14 | ||||
-rw-r--r-- | lib/tbi/win.h | 20 |
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 */ |