TICKIT_TERM_GET_SIZE(3)

πŸ’– TICKIT_TERM_GET_SIZE πŸ’–

okay bestie, welcome to the tickit terminal-size management page πŸ’… this one is part of the Library Functions Manual, and it's literally all about three lil functions: tickit_term_get_size, tickit_term_set_size, and tickit_term_refresh_size πŸŽ€


✨ NAME ✨

tickit_term_get_size, tickit_term_set_size, tickit_term_refresh_size β€” manage terminal size πŸ¦‹


🌸 SYNOPSIS 🌸

#include <tickit.h>

void tickit_term_get_size(TickitTerm *tt, int *lines, int *cols);
void tickit_term_set_size(TickitTerm *tt, int lines, int cols);
void tickit_term_refresh_size(TickitTerm *tt);

Link with -ltickit.


πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea β˜• these three functions are the whole size-management squad, and each one does its own lil thing:

  • tickit_term_get_size() β€” fetches the currently-known size of the terminal and drops it into the two integers you hand it via pointers. that's it, that's the function 🫢
  • tickit_term_set_size() β€” stores a new size for the terminal into the instance, and invokes any TICKIT_EV_RESIZE event handlers. not me setting the size and triggering a whole event 😭 iconic behaviour fr fr.
  • tickit_term_refresh_size() β€” queries the size of the terminal by using the TIOCGWINSZ ioctl(2) call on the currently-associated output filehandle, and invokes any TICKIT_EV_RESIZE event handlers if the size has changed. lowkey the main character of the trio, going out and actually asking the terminal what's up πŸ‘‘

πŸ’« RETURN VALUE πŸ’«

tickit_term_get_size, tickit_term_set_size and tickit_term_refresh_size return no value. nothing. void. silence. they just do the thing and dip πŸ’€


🌈 SEE ALSO 🌈


and that's the whole page, bestie!! this was TICKIT_TERM_GET_SIZE(3) from the Library Functions Manual β€” that's the version/source vibe and the date-energy right there, folded into this cute lil sign-off instead of a boring footer line πŸŽ€βœ¨ slay, go resize something responsibly, mwah πŸ’–