summary refs log tree commit diff
path: root/stream.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stream.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/stream.h b/stream.h
index 56889c2..0bb7507 100644
--- a/stream.h
+++ b/stream.h
@@ -14,10 +14,30 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdbool.h>
 #include <wchar.h>
 
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+
 typedef unsigned uint;
 
+struct Style {
+	bool bold, italic, underline, reverse;
+	int bg, fg;
+};
+
+struct Cell {
+	struct Style style;
+	wchar_t ch;
+};
+
+struct Display {
+	uint rows, cols;
+	uint y, x;
+	const struct Cell *cells;
+};
+
 void termInit(uint rows, uint cols);
 void termUpdate(wchar_t ch);
 int termSnapshot(int fd);
+struct Display termDisplay(void);