TICKIT_TER...E_SIGWINCH(3)

✨ NAME ✨

tickit_term_observe_sigwinch β€” bestie, it's how you react to the SIGWINCH signal πŸ’…


🌸 SYNOPSIS 🌸

#include <tickit.h>

void tickit_term_observe_sigwinch(TickitTerm *tt, bool observe);

Link with -ltickit.


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so tickit_term_observe_sigwinch() flips a little setting on your TickitTerm instance, and that setting is literally what lets it find out when the process catches a SIGWINCH signal β€” which is the universe's way of saying "hey bestie, your controlling terminal might have changed size" πŸ‘€

When this flag is enabled on at least one terminal instance, libtickit itself goes ahead and auto-installs a handler for the SIGWINCH signal. no cap, it just does it for you 🫢 When the signal shows up, the handler marks a flag on any TickitTerm instance that's observing it, to say "the window may have changed size". Then, the next time those instances invoke any of several input-related functions (the whole list is down below, don't worry), that flag makes the function first perform the actions of tickit_term_refresh_size(3). ✨

and why is it deferred like that? because it means the TICKIT_EV_RESIZE event only fires at a moment when your application is actually expecting input events β€” not asynchronously, mid-signal-handler, which would be so chaotic 😭 iconic design honestly.

🚨 warning bestie: using this ability means you're handing control of the process-wide SIGWINCH signal over to the libtickit library. if that's not the vibe for you, your process needs to arrange to invoke tickit_term_refresh_size() at an appropriate time through some other mechanism instead. periodt.

πŸŽ€ EVENT-DEFERRAL FUNCTIONS πŸŽ€

these are the ones that'll trigger the deferred handling when that flag is set πŸ’–


πŸ’œ SEE ALSO πŸ’œ

tickit_term_build(3), tickit_term_refresh_size(3), tickit_term_bind_event(3), tickit_term(7), tickit(7)


and that's the whole page, bestie!! it came straight out of the Library Functions Manual, filed under TICKIT_TER...E_SIGWINCH(3) β€” go forth and resize responsibly πŸ§šπŸ’–