Fumofumotris/source/term/term.h
Julia ef7362c5d9 windows
window
2024-04-02 15:06:14 -05:00

29 lines
532 B
C

#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;
};
struct TermBuf NewTermBuf(struct CharBlk4 *blks, size_t wid, size_t hgt);
size_t TermMaxChars(struct TermBuf *term);
size_t TermBufToChars(struct TermBuf *term, char *buf, size_t max_chars);