summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2023-07-07 19:39:33 -0400
committerMalfurious <m@lfurio.us>2023-07-07 19:39:33 -0400
commit415c553d96c4851350512cc943e10ec477427e02 (patch)
treea3adfa0da1aed3a31bfbcb3a55293bf596b37f4a
parentd1fc03d6758dcb7ccca3e4255114d85acfad08d4 (diff)
downloadmisplays-415c553d96c4851350512cc943e10ec477427e02.tar.gz
misplays-415c553d96c4851350512cc943e10ec477427e02.zip
Add panel clear helper
Signed-off-by: Malfurious <m@lfurio.us>
-rw-r--r--helpers.c4
-rw-r--r--helpers.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/helpers.c b/helpers.c
index 2cd119d..f7cc9c2 100644
--- a/helpers.c
+++ b/helpers.c
@@ -53,3 +53,7 @@ int pprintw(PANEL *pan, const char *fmt, ...) {
va_end(args);
return res;
}
+
+int pclear(PANEL *pan) {
+ return wclear(panel_window(pan));
+}
diff --git a/helpers.h b/helpers.h
index e0cd8c5..f01e024 100644
--- a/helpers.h
+++ b/helpers.h
@@ -12,3 +12,4 @@ extern PANEL *newpan(int h, int w, int y, int x);
extern void delpan(PANEL *pan);
extern void reset_panel(PANEL *pan, int h, int w, int y, int x);
extern int pprintw(PANEL *pan, const char *fmt, ...);
+extern int pclear(PANEL *pan);