tdraw is a C11 terminal drawing playground with a small static library (tdlib.a) and a demo app (tests/demo).
It uses an in-memory screen buffer, ANSI escape sequences, and a threaded runtime that continuously moves and redraws models.
- macOS or Linux terminal with ANSI support
make- C compiler with C11 support (
cc,clang, orgcc)
Build default artifacts:
makeRun demo:
./tests/demoOr build and run via Make target:
make runinclude/: public headerssrc/codes.c: terminal/ANSI and tty helperssrc/draw.c: screen buffer and pixel queue renderingsrc/ipc.c: Uses IPC to send a valid terminal for loggingsrc/logger.c: logging used by tdrawsrc/pose.c: vector definitionssrc/queue.c: queue helperssrc/tdlib.c: thin library facadesrc/tdraw.c: threaded runtimetests/: demo clients for testing tdraw
If your terminal state is left in a bad mode after interruption:
stty sane
printf '\033[?1049l\033[?25h'