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 πŸ”₯


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 πŸ’–βœ¨πŸŽ€