al_get_window_borders(3)
π al_get_window_borders(3) π
okay bestie, this one is from the Allegro 5 API and lives in the Library Functions Manual β and it is literally here to hand you the size of a windowβs borders when it can. π«Ά
πΈ NAME πΈ
al_get_window_borders β Allegro 5 API. Yes, thatβs the whole name, and yes, itβs giving βtiny but usefulβ energy. β¨
π¦ SYNOPSIS π¦
#include <allegro5/allegro.h>
bool al_get_window_borders(ALLEGRO_DISPLAY *display, int *left, int *top, int *right, int *bottom)
π DESCRIPTION π
So hereβs the tea β: if that information is available, al_get_window_borders returns TRUE and fills in the size of the window borders. No cap.
You can pass NULL for borders you do not want to retrieve β lowkey iconic, honestly, because sometimes you only need some of the numbers. π
If the border information is not available, it returns FALSE. Thatβs it. Thatβs the vibe check. π«
[Unstable API]: This is an experimental feature and currently only partially works on X11 and Windows. The meaning of the upper border may change when menus are present. β οΈ
π SEE ALSO π
al_set_window_position(3)β go peek at this one too πal_get_window_position(3)β and this one, fr fr π
β SINCE β
5.2.9 β periodt, thatβs when this landed. π
mwah π β source/version is the Allegro reference manual, the footer page tag is al_get_window_borders(3), and thereβs no date listed on this page, so Iβm not gonna invent one bestie πβ¨
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms