TICKIT_WINDOW_BIND_EVENT(3)
β¨ TICKIT_WINDOW_BIND_EVENT(3) β¨
okay so bestie, welcome to the Library Functions Manual section for tickit_window_bind_event and tickit_window_unbind_event_id β the two functions that let you add and remove event handlers on a window. it's giving event-listener glow-up π
πΈ NAME πΈ
tickit_window_bind_event, tickit_window_unbind_event_id β add or remove event handlers, no cap π
π¦ SYNOPSIS π¦
#include <tickit.h>
typedef int TickitWindowEventFn(TickitWindow *win, TickitEventFlags flags,
void *info, void *user);
int tickit_window_bind_event(TickitWindow *win, TickitWindowEvent ev,
TickitBindFlags flags,
TickitWindowEventFn *fn, void *user);
void tickit_window_unbind_event_id(TickitWindow *win, int id);
Link with -ltickit. π«Ά
π DESCRIPTION π
so tickit_window_bind_event() is the main character here: it adds a brand-new event handler to the list of handlers that the window is holding onto, and it hands you back an integer that identifies that handler. like a little name tag but make it a number β¨
this handler is gonna get invoked every time the event named by the ev argument happens. and when it does get invoked, func receives:
- the window instance itself πͺ
- a flags bitmask π©
- a pointer to an event information structure β and bestie, the type of that struct depends on the event, so check which event you're binding for, iykyk
- the
userdata pointer it was installed with π
then tickit_window_unbind_event_id() is the breakup function: it removes an event handler that was previously added, using the identifier that got returned when it was added. and if that handler was installed with TICKIT_BIND_UNBIND, it gets invoked with the TICKIT_EV_UNBIND flag on the way out. it's giving closure, literally π
β RETURN VALUE β
tickit_window_bind_event()returns an identifier integer πtickit_window_unbind_event_id()returns no value. nothing. silence. periodt. π
π SEE ALSO π
and that's the whole page bestie, sourced from the TICKIT_WINDOW_BIND_EVENT(3) manual, page TICKIT_WINDOW_BIND_EVENT(3) β 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