TICKIT_TERM_BIND_EVENT(3)
β¨ TICKIT_TERM_BIND_EVENT β¨
okay bestie, gather round, because this is the page for tickit_term_bind_event and tickit_term_unbind_event_id β the two functions that let you add or remove event handlers on a terminal. it's giving "let me know when something happens" energy and honestly? iconic. this one lives in the Library Functions Manual, so you know it's the real deal π
πΈ SYNOPSIS πΈ
#include <tickit.h>
typedef int TickitTermEventFn(TickitTerm *tt, TickitEventFlags flags,
void *info, void *user);
int tickit_term_bind_event(TickitTerm *tt, TickitTermEvent ev,
TickitBindFlags flags,
TickitTermEventFn *fn, void *user);
void tickit_term_unbind_event_id(TickitTerm *tt, int id);
and don't forget, babes β you gotta link with -ltickit. no cap, it will not build without it π«Ά
π DESCRIPTION π
so tickit_term_bind_event() is the main character here. it adds a brand new event handler to the list of handlers that the terminal is keeping track of, and then it hands you back an integer that identifies that specific handler. think of it like a little name tag. π
this handler is gonna get invoked every time the event given by the ev argument happens. and when it does get invoked, func will be passed:
- the terminal instance,
- a flags bitmask,
- a pointer to an event information structure (and the type of that struct depends on the event, so stay woke π),
- and the user data pointer it was installed with.
then there's tickit_term_unbind_event_id() β the "okay bye" function. it removes an event handler that was previously added, using the identifier that got returned when it was added. and listen, this part matters: it will invoke that handler with the TICKIT_EV_UNBIND flag if it was installed with TICKIT_BIND_UNBIND. so it's not just a silent removal, bestie, it says goodbye properly β¨
π¦ RETURN VALUE π¦
tickit_term_bind_event()returns an identifier integer. that's your little handler name tag, keep it safe π₯tickit_term_unbind_event_id()returns no value. it simply does the thing and leaves. no notes. π
π SEE ALSO π
and that's the whole vibe, bestie π this was the TICKIT_TERM_BIND_EVENT(3) page from the Library Functions Manual β footer and all, exactly as it came, no details ghosted, periodt. go bind some events and slay πβ¨
π¦ 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 jammy: libtickit-dev 0.4.1-1 Β· MIT
- 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