TICKIT_TERM_SCROLLRECT(3)

πŸ’– TICKIT_TERM_SCROLLRECT πŸ’–

okay bestie so we're in the Library Functions Manual today, and the star of the show is tickit_term_scrollrect β€” she scrolls a region of the terminal. yes literally just that. and she's iconic for it. 🫢


✨ NAME ✨

tickit_term_scrollrect β€” scroll a region of the terminal 🌈


πŸŽ€ SYNOPSIS πŸŽ€

#include <tickit.h>

bool tickit_term_scrollrect(TickitTerm *tt, TickitRect rect,
    int downward, int rightward);

Link with -ltickit.


🌸 DESCRIPTION 🌸

so tickit_term_scrollrect() tries to scroll a rectangular region of the terminal by a given offset β€” the whole point is it moves content within the display efficiently, like a glow-up for your screen content, no full redraw needed. ✨

but here's the tea 🍡 β€” whether or not that's actually possible depends on the type of terminal and on what region and offset you specified. it's giving "results may vary".

  • if it works β†’ the function returns a true value πŸŽ‰
  • if it can't be done β†’ it returns false and, important, it does not modify the terminal at all. no half-scrolled mess, no chaos.
in that fail case, your application has to fall back to re-drawing the affected region with new content. no shortcuts, bestie. you're on your own for that one 😭

⭐ RETURN VALUE ⭐

tickit_term_scrollrect() returns a boolean indicating if the scrolling operation was successful. true = slay, it scrolled. false = it didn't, and nothing changed. πŸ’…


πŸ¦‹ SEE ALSO πŸ¦‹


ok that's the whole page, no cap 🧚 we came in under the Library Functions Manual banner and we're leaving the same way β€” this was TICKIT_TERM_SCROLLRECT(3), source and version and all, signed off with love. go scroll something pretty πŸ’œπŸŒΈ