Fumofumotris/source/term/term.h

29 lines
532 B
C
Raw Normal View History

2024-03-25 05:34:59 +00:00
#pragma once
#include <iso646.h>
#include <pthread.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "fumotris.h"
struct CharBlk4 {
char ch;
u8 bg : 4;
u8 fg : 4;
};
struct TermBuf {
size_t wid;
size_t hgt;
size_t area;
struct CharBlk4 *blks;
};
2024-04-02 20:06:14 +00:00
struct TermBuf NewTermBuf(struct CharBlk4 *blks, size_t wid, size_t hgt);
2024-03-25 05:34:59 +00:00
size_t TermMaxChars(struct TermBuf *term);
size_t TermBufToChars(struct TermBuf *term, char *buf, size_t max_chars);