ALLEGRO_MONITOR_INFO(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸ’– 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 be 0, 0 on 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-x1 gives you the width, and y2-y1 gives 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: x2 and y2 are 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 🌟


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