From a60172ef9a56815a5698f4a045dfda3ab824f93b Mon Sep 17 00:00:00 2001 From: Timerix Date: Fri, 9 Jan 2026 05:44:50 +0500 Subject: [PATCH] added link to original repository --- readme.md | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/readme.md b/readme.md index 359729b..80cdee7 100644 --- a/readme.md +++ b/readme.md @@ -1,14 +1,14 @@ -## about +# tim +Fork of https://codeberg.org/chuvok/tim.h -tim->h is a portable library to create simple terminal applications +## about +tim is a portable library to create simple terminal applications Demo video: https://asciinema.org/a/zn3p0dsVCOQOzwY1S9gDfyaxQ ## quick start - See [example/hello.c](./example/hello.c) ## layout - The terminal's columns (x) and rows (y) are addressed by their coordinates, the origin is in the top left corner. @@ -44,7 +44,6 @@ take the full available space from parent. The layout automatically adopts to terminal window resize events. ## colors - Most elements have a uint64 color argument which holds up to eight colors. Typically byte 0 is the text color and byte 1 is the background color. @@ -59,7 +58,6 @@ xterm-256 color chart https://upload.wikimedia.org/wikipedia/commons/1/15/Xterm_256color_chart.svg ## events - tim_run blocks until it observes an event. Mouse and key events are always immediately followed by a draw event in order to make changes visible. @@ -76,7 +74,6 @@ The current event is stored in tim->event. VOID_EVENT | consumed event ## elements - frame (x, y, w, h, color) Draw an empty frame and fill area. @@ -137,7 +134,6 @@ radio (str, state, v, x, y, w, color) -> bool color radio, background, text ## functions - tim_run (fps) -> bool Process events and render frame. Blocks until input is received or the @@ -166,12 +162,10 @@ tim_time_usec () -> int64 time or leap seconds. ## useful links - https://invisible-island.net/xterm/ctlseqs/ctlseqs.html https://learn.microsoft.com/en-us/windows/console/ ## bugs - - Double buffering is still new, set ENABLE_DBUF to 0 if you see glitches - Double width characters like 彁 are not fully supported. Terminals do not handle these consistently and there is no portable way to reliably @@ -182,7 +176,6 @@ https://learn.microsoft.com/en-us/windows/console/ - Windows cmd.exe resize events may be delayed ## compatibility - emulator | support | remarks ------------------|---------|---------------------------------- Alacritty | ? | @@ -211,7 +204,6 @@ https://learn.microsoft.com/en-us/windows/console/ Zutty | full | ## license - MIT License Copyright (c) MMXXIV Chu'vok