TICKIT_WINDOW_SCROLL(3)
β¨ TICKIT_WINDOW_SCROLL β bestie, let's scroll β¨
okay so real quick: this is the manual for tickit_window_scroll and tickit_window_scrollrect, aka the two functions that make the area of a window go scroll scroll scroll π
and there's a bonus third one hiding in there too, tickit_window_scroll_with_children, which we'll get to. stay with me, it's giving very much "ask the terminal nicely and hope it says yes" energy.
πΈ NAME πΈ
tickit_window_scroll, tickit_window_scrollrect β scroll the area of a window π
π SYNOPSIS π
#include <tickit.h>
bool tickit_window_scroll(TickitWindow *win, int downward, int rightward);
bool tickit_window_scrollrect(TickitWindow *win, const TickitRect *rect,
int downward, int rightward, TickitPen *pen);
bool tickit_window_scroll_with_children(TickitWindow *win,
int downward, int rightward);
Link with -ltickit. π«Ά don't forget, bestie, or the linker will simply not know you.
π DESCRIPTION π
π¦ tickit_window_scroll()
tickit_window_scroll() is basically you going "hey terminal, scroll the contents of the area that matches this window's visible region (or regions, plural, yes, there can be more than one π) by this much." And it's smart about it β it takes into account all the visibility drama of the window, like:
- being obscured by siblings π€
- being obscured by siblings of ancestors (yeah, the family tree is messy)
- child windows
- whether the window itself or any parent is hidden π
It returns true if it actually managed to do the scrolling, or false if not. no cap.
π§ tickit_window_scrollrect()
tickit_window_scrollrect() does the same kinda thing but for the area corresponding to the rect you hand it, inside the window. Otherwise it works analogously to tickit_window_scroll(). β¨
And here's the cute extra: if the pen argument is non-NULL, it gets applied to the terminal before any erase operations inside the window happen β which means you can set a different background colour. iconic. π
π tickit_window_scroll_with_children()
tickit_window_scroll_with_children() is similar again, except β plot twist β it does not consider obscuring regions caused by child windows. Only siblings, and siblings of ancestors. periodt.
It's intended for scrolling a container of windows, which will move all the sub-windows too. π
β οΈ important caveat bestie, do not skip this: this function does not actually move the child windows. it just requests a scrolling operation on the underlying terminal. that's it. that's the whole thing. π
β RETURN VALUE β
These functions all return a boolean. true/false, yes/no, slay/not slay. π«Ά
π SEE ALSO π
tickit_window_new(3)tickit_window_set_geometry(3)tickit_window_expose(3)tickit_window(7)tickit(7)
and that's the whole page, bestie π this was the TICKIT_WINDOW_SCROLL(3) manual page, coming to you from the Library Functions Manual β the page header and footer literally just say TICKIT_WINDOW_SCROLL(3) on both ends, so now you know, iykyk. go forth and scroll responsibly. πβ¨
π¦ 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