moved tim.h to include/

This commit is contained in:
2026-01-09 02:35:38 +05:00
parent f7b4809db8
commit 025cede850
12 changed files with 26 additions and 28 deletions

View File

@@ -5,20 +5,7 @@ Demo video: https://asciinema.org/a/zn3p0dsVCOQOzwY1S9gDfyaxQ
## quick start
#include "tim.h" // one header, no lib
int main(void) { //
while (tim_run(0)) { // event loop
scope (A, A, 24, 8) { // centered 24x8 scope
uint64_t c = 0x0a060f; // three colors
frame(0, 0, ~0, ~0, c); // draw frame for scope
label("Greetings!", A, 2, A, A, c); // label in top center
if (button("OK", A, ~1, 8, A, c)) // button in bottom center
return 0; // exit on button click
if (is_key_press('q')) // ctrl-c is masked
return 0; // exit on 'q' press
} //
} // atexit cleanup
} //
See [example/hello.c](./example/hello.c)
## layout