TICKIT_WINDOW_TAKE_FOCUS(3)

✨ TICKIT_WINDOW_IS_FOCUSED(3) ✨

okay bestie, welcome to the Library Functions Manual πŸ’– this is the one about who gets to be the main character of the keyboard, aka input focus. two functions, one whole vibe. let's go πŸ¦‹


🌸 NAME 🌸

tickit_window_take_focus, tickit_window_is_focused β€” control the input focus


πŸŽ€ SYNOPSIS πŸŽ€

#include <tickit.h>

void tickit_window_take_focus(TickitWindow *win);
bool tickit_window_is_focused(const TickitWindow *win);

Link with -ltickit.


πŸ’… DESCRIPTION πŸ’…

tickit_window_take_focus()

okay so this one requests that the given window take the input focus. and when I say requests I mean it climbs β€” it causes respectively the parent to take focus, recursively all the way up to the root. the way that works?? iconic. πŸ‘‘

then, once all that drama is done, the terminal cursor takes on the properties defined by the given window. and a TICKIT_EV_FOCUS event gets delivered to the previous owner of the focus and to the given window β€” yes, both, they both get the notification, no one gets left on read. πŸ“¬

tickit_window_is_focused()

returns true if the given window currently has the input focus. that's it, that's the whole function. simple. elegant. slay. ✨


πŸ”₯ RETURN VALUE πŸ”₯

  • tickit_window_take_focus() returns no value β€” it's giving void, it's giving no thoughts head empty, it just does the thing πŸ’€
  • tickit_window_is_focused() returns a boolean 🫢

🌈 SEE ALSO 🌈


fr fr that's the whole page, no notes, read the SEE ALSOs if you want the full lore iykyk πŸ“š

mwah πŸ’‹ this came to you straight out of the Library Functions Manual, and the footer says TICKIT_WINDOW_TAKE_FOCUS(3) β€” yeah the footer and the header are doing a little bit of a mismatched-couple thing, we don't talk about it πŸ™ˆ β€” anyway go forth and focus, bestie. you got this. πŸ§šβ€β™€οΈβ­