al_get_window_position(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ 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 πŸ‘‘


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