TICKIT_WIN...T_GEOMETRY(3)

✨ TICKIT_WIN...T_GEOMETRY ✨

okay bestie, so this is a page from the Library Functions Manual and it's literally all about moving your windows around and resizing them πŸ’– come sit with me


🌸 NAME 🌸

tickit_window_set_geometry β€” set the size and position of a window πŸͺŸβœ¨


πŸŽ€ SYNOPSIS πŸŽ€

#include <tickit.h>

void tickit_window_set_geometry(TickitWindow *win, TickitRect geom);

void tickit_window_resize(TickitWindow *win, int lines, int cols);
void tickit_window_reposition(TickitWindow * win, int top, int left);

Link with -ltickit.

fr fr do not forget that -ltickit, she's the whole personality πŸ™ˆ

πŸ’… DESCRIPTION πŸ’…

so tickit_window_set_geometry() sets the size and the position of the window you hand it, using all the deets in that rectangle struct. and the way that the position works? it's relative to the window's immediate parent. that's the vibe. no cap.

and here's the thing β€” your window does NOT have to be fully inside the parent. it's allowed to overlap any of the four edges, or literally just sit entirely outside of the parent. main character energy, it goes wherever it wants πŸ¦‹.

but! content rendering and input events get clipped to the bounds of its parent anyway (and therefore to any ancestors all the way up to the root). so like, sure, go off, but you're still getting trimmed to the family's edges πŸ’€.

calling this function makes a TICKIT_EV_GEOMCHANGE event happen at the next tick β€” but only if the geometry actually changed. if none of the four fields are modified, no event, nada, silence 🀫. which is why it's totally safe to call it optimistically, just to update the required size in case it changed. lowkey iconic behaviour tbh.

tickit_window_resize() and tickit_window_reposition() are the shortcut girlies β€” they just take two integer arguments directly, for changing only the size, or only the origin position of the window. ✨


🫢 RETURN VALUE 🫢

these functions return no value. nothing. empty. they simply did the thing and moved on πŸ’…


πŸ”₯ SEE ALSO πŸ”₯


and that's the whole page bestie!! πŸŽ€ it came from the Library Functions Manual, it's the TICKIT_WIN...T_GEOMETRY(3) page, and uhh the footer is literally just that same name again β€” TICKIT_WIN...T_GEOMETRY(3) β€” so yeah, no date, no version, just the title staring back at us like πŸ‘οΈπŸ‘„πŸ‘οΈ. go forth and reposition, you've got this πŸ¦‹πŸ’œβœ¨