al_get_window_position(3alleg5)
β¨ al_get_window_position β Allegro 5 API β¨
okay bestie, welcome to the Allegro 5 API corner of the manual π this one's a lil function that tells you where your window is chillin on the screen, and honestly? we love a low-effort icon.
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
void al_get_window_position(ALLEGRO_DISPLAY *display, int *x, int *y)
no cap, that's the whole thing. two lil pointers and a display. she's simple, she's cute, she slays π«Ά
π¦ DESCRIPTION π¦
so like. this function gets the position of a display β but only if it's a non-fullscreen display, bestie. fullscreen windows said "i don't have coordinates, i am the coordinates" and honestly? main character energy π
you hand her an ALLEGRO_DISPLAY *display plus two int * pointers (*x and *y), and she fills those babies in with the window's position. it's giving "here's where your window lives" π
π SEE ALSO π
al_set_window_position(3alleg5)β the girl who sets the position instead of just reading it. the iconic duo fr fr β¨al_get_window_borders(3alleg5)β for when you also wanna know about the borders, because details matter π
ngl, if you're trying to read a fullscreen display's position, that's not this function's vibe. non-fullscreen only, periodt.
and that's the tea π this page came to you straight from the Allegro reference manual, living in the 3alleg5 era of Allegro docs. go forth and position your windows, bestie β you got this ππβ
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms