TICKIT_RUN(3)
π TICKIT_RUN π
okay bestie, welcome to the tickit_run page from the Library Functions Manual, aka the one where we learn how to drive the event loop of the toplevel instance. yes, that one. the whole trio: tickit_run, tickit_stop, and tickit_tick. they run the show. literally. π
β¨ NAME β¨
tickit_run, tickit_stop, tickit_tick β control the event loop of the toplevel instance π¦
πΈ SYNOPSIS πΈ
#include <tickit.h>
void tickit_run(Tickit *t);
void tickit_stop(Tickit *t);
void tickit_tick(Tickit *t, TickitRunFlags flags);
and don't forget to Link with -ltickit, babe π
π« DESCRIPTION π«
tickit_run() β the main character π
so tickit_run() starts the IO event loop of the main toplevel instance, which is giving exactly what it sounds like: it lets the instance receive and react to terminal input, and send output content right back to the terminal. it's a whole conversation, fr fr. π¬
and here's the thing β once you invoke this function, it will block processing IO and not return until tickit_stop() gets called, or until a SIGINT shows up (which is usually you, the user, pressing Ctrl-C, iconic behaviour honestly π). so yeah, it commits. no half measures.
tickit_stop() β the exit strategy πͺ
tickit_stop() causes a currently-running call to tickit_run() to return. that's it. that's the whole job. it's the "okay we're done here" text. slay.
tickit_tick() β one little sip of the loop π
tickit_tick() runs one iteration of the IO loop and returns. just one. a lil bite. its behaviour is controlled by the flags argument, which should be a bitmask of the following flags:
TICKIT_RUN_NOHANGβ Perform only a single round of IO without blocking.tickit_tick()will check for IO, or timers that are ready, handle those, and return, but will not block further waiting if nothing is yet ready. no waiting around, no pining, it's giving unbothered β¨TICKIT_RUN_NOSETUPβ Do not perform any terminal setup before waiting on IO events. Usually this is only necessary early in startup, if the program is using the Tickit event loop for its own purposes before starting a terminal interface. π§
okay and here's the lore: without this flag, terminal setup will be run once the first timetickit_runortickit_tickis called, and will remain valid until the toplevel instance is destroyed. so like, it happens once and then it stays. periodt. π
π«Ά RETURN VALUE π«Ά
Neither tickit_run(), tickit_stop() nor tickit_tick() return a value. they're all void, they give you nothing back, and honestly? they're thriving. π
π SEE ALSO π
and that's the page, bestie!! π it's from the Library Functions Manual, it's the TICKIT_RUN(3) page, and yes it's still TICKIT_RUN(3) at the bottom too, no cap. go forth and loop responsibly β¨ππ
π¦ where this page comes from
- alpine 3.24: libtickit-doc 0.4.6-r0 Β· MIT
- debian bookworm: libtickit-dev 0.4.3-1 Β· MIT
- debian trixie: libtickit-dev 0.4.3-2 Β· MIT
- fedora 43: libtickit-devel 0.4.5-2.fc43 Β· MIT
- fedora 43: libtickit-devel 0.4.5-2.fc43 Β· MIT
- fedora 44: libtickit-devel 0.4.5-3.fc44 Β· MIT
- fedora 44: libtickit-devel 0.4.5-3.fc44 Β· MIT
- nixos 26.05: libtickit 0.4.5
- nixpkgs unstable: libtickit 0.4.6
- ubuntu noble: libtickit-dev 0.4.3-1.1build1 Β· MIT
- ubuntu questing: libtickit-dev 0.4.3-2
- ubuntu resolute: libtickit-dev 0.4.3-2build1 Β· MIT
- ubuntu stonking: libtickit-dev 0.4.3-2build1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms