Mercurial
annotate third_party/libuv/docs/code/uvstop/main.c @ 278:8d560f50ed4c
Improve infinite canvas interactions and browser chrome
Render Lucide icons directly with Raylib, add searchable icon browsing, robust text editing, entity lifecycle animations, z-order-safe input, semantic themes, and animated editable browser controls. Document rendering, pinning, context, and component extension for future agents.
Co-authored-by: Copilot <[email protected]>
Copilot-Session: f68442b1-fa8f-46a0-9689-81710613bbd4
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 17 Aug 2026 22:16:14 -0700 |
| parents | 948de3f54cea |
| children |
| rev | line source |
|---|---|
| 160 | 1 #include <stdio.h> |
| 2 #include <uv.h> | |
| 3 | |
| 4 int64_t counter = 0; | |
| 5 | |
| 6 void idle_cb(uv_idle_t *handle) { | |
| 7 printf("Idle callback\n"); | |
| 8 counter++; | |
| 9 | |
| 10 if (counter >= 5) { | |
| 11 uv_stop(uv_default_loop()); | |
| 12 printf("uv_stop() called\n"); | |
| 13 } | |
| 14 } | |
| 15 | |
| 16 void prep_cb(uv_prepare_t *handle) { | |
| 17 printf("Prep callback\n"); | |
| 18 } | |
| 19 | |
| 20 int main() { | |
| 21 uv_idle_t idler; | |
| 22 uv_prepare_t prep; | |
| 23 | |
| 24 uv_idle_init(uv_default_loop(), &idler); | |
| 25 uv_idle_start(&idler, idle_cb); | |
| 26 | |
| 27 uv_prepare_init(uv_default_loop(), &prep); | |
| 28 uv_prepare_start(&prep, prep_cb); | |
| 29 | |
| 30 uv_run(uv_default_loop(), UV_RUN_DEFAULT); | |
| 31 | |
| 32 return 0; | |
| 33 } |