aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tbi/screen.h
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-10-12 20:33:29 +0000
committerJoursoir <chat@joursoir.net>2021-10-12 21:11:25 +0000
commit79e990add09938e91be560869157ef77edf4df58 (patch)
treeb613b72ed1353908a3f6e83544198505f3d2ac57 /lib/tbi/screen.h
parentdefa660cbcfdb4e8db516ed425e6221aa18e0011 (diff)
downloadufm-79e990add09938e91be560869157ef77edf4df58.tar.gz
ufm-79e990add09938e91be560869157ef77edf4df58.tar.bz2
ufm-79e990add09938e91be560869157ef77edf4df58.zip
tbi: add sub-module 'screen'
Diffstat (limited to 'lib/tbi/screen.h')
-rw-r--r--lib/tbi/screen.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/tbi/screen.h b/lib/tbi/screen.h
new file mode 100644
index 0000000..ae25640
--- /dev/null
+++ b/lib/tbi/screen.h
@@ -0,0 +1,30 @@
+#ifndef UFM_TBI_SCREEN_H
+#define UFM_TBI_SCREEN_H
+
+#include <Uefi.h>
+
+struct screen
+{
+ EFI_SIMPLE_TEXT_INPUT_PROTOCOL *stdin;
+ EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *stdout;
+ EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *stderr;
+ UINTN columns, lines; // current screen size
+};
+
+/*
+ * Prepares a structure with information about screen
+ *
+ * return: A pointer to the allocated structure or NULL if allocation fails
+*/
+struct screen *prepare_screen(VOID);
+
+/*
+ * Frees the structure of the screen
+ *
+ * scr: the screen on which to operate
+ *
+ * return: VOID
+*/
+VOID forget_screen(struct screen *scr);
+
+#endif /* UFM_TBI_SCREEN_H */