TICKIT_WIN...T_GEOMETRY(3)
β¨ TICKIT_WINDOW_GEOMETRY π
okay bestie, so this is the tickit manual page for asking a window where it lives and how big it is. like a little vibe check for rectangles. it's in the Library Functions Manual section (section 3, the "we do library calls here" section), iykyk.
πΈ NAME πΈ
tickit_window_get_geometry β query the size and position of a window π¦
β¨ SYNOPSIS β¨
#include <tickit.h>
TickitRect tickit_window_get_geometry(const TickitWindow *win);
int tickit_window_top(const TickitWindow *win);
int tickit_window_left(const TickitWindow *win);
int tickit_window_lines(const TickitWindow *win);
int tickit_window_cols(const TickitWindow *win);
int tickit_window_bottom(const TickitWindow *win);
int tickit_window_right(const TickitWindow *win);
Link with -ltickit. π
π DESCRIPTION π
so tickit_window_get_geometry() hands you back the size and position of the given window β but here's the tea β that position is measured within its immediate parent, not the whole world. no cap.
and when you call it on a root window? iconic behaviour honestly. its top left corner is at zero, and its size is just the size of the underlying terminal. it's giving "I am the whole screen, obviously". π
the four convenience accessors, tickit_window_top(), tickit_window_left(), tickit_window_lines() and tickit_window_cols(), just grab the four fields of the rectangle structure for you immediately. no notes. lowkey they may be implemented as macros, so don't do anything cursed with them.
then there's tickit_window_bottom(), which gives you the line number in the parent where the window stops β like, the first line after its content. and tickit_window_right() gives you the column number in the parent where the window stops. it's the "exclusive end" energy. the fencepost queen. π§
π«Ά RETURN VALUE π«Ά
tickit_window_get_geometry() returns a TickitRect structure. the other functions return plain old integers. fr fr, that's the whole thing. π
π₯ SEE ALSO π₯
tickit_window_new(3)tickit_window_get_abs_geometry(3)tickit_window_set_geometry(3)tickit_window(7)tickit_rect(7)tickit(7)
okay that's the page!! π it came straight out of the tickit Library Functions Manual, page TICKIT_WIN...T_GEOMETRY(3), and yeah the name is literally abbreviated like that, the title got squished, we don't make the rules. mwah, go read the other pages, ily bestie πβ¨π
π¦ 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