ALLEGRO_MONITOR_INFO(3)
π ALLEGRO_MONITOR_INFO(3) π
okay so bestie, this is a page from the Allegro reference manual β it's the ALLEGRO_MONITOR_INFO page, and honestly? it's short, it's sweet, and it's about to make you understand monitors. periodt. π₯οΈβ¨
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
typedef struct ALLEGRO_MONITOR_INFO
like, that's it. that's the whole vibe check. π
π¦ DESCRIPTION π¦
okay so picture this: ALLEGRO_MONITOR_INFO is a struct that describes a monitor's size and position relative to other monitors. it's giving "where am i in the world" energy but for screens. π
here's the tea on the fields, fr fr:
x1,y1β these will be0, 0on the primary display. no cap. your main character monitor sits at the origin. π- other monitors can have negative values if they're to the left of or above the primary display. yes bestie, negative coordinates are real and they're valid, don't panic π
x2,y2β these are the coordinates one beyond the bottom right pixel. the way that matters is:x2-x1gives you the width, andy2-y1gives you the height of the display. so it's like, exclusive-end coordinates, iykyk. π
and here's the whole struct laid out, exactly as it is:
typedef struct ALLEGRO_MONITOR_INFO
{
int x1;
int y1;
int x2;
int y2;
} ALLEGRO_MONITOR_INFO;
four ints. that's the entire icon. lowkey obsessed with how simple it is. π«Ά
quick vibe check:x2andy2are one beyond the bottom-right pixel, not the bottom-right pixel itself. if you forget that you'll be off by one and we will NOT be doing that π
π SEE ALSO π
al_get_monitor_info(3)β go read it, it's literally how you get one of these bad boys π
that's the whole page, bestie β slayed, no notes π β¨
this was the Allegro reference manual, and the original page footer said Allegro reference manual with the source/version date on the last line β consider this your cute little sign-off instead of a copy-paste ππ¦
π¦ 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