AL_APPLY_WINDOW_CONSTRAINTS(3)

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

πŸ’– NAME πŸ’–

al_apply_window_constraints β€” Allegro 5 API ✨

Okay so this page is from the Allegro reference manual, and it's all about al_apply_window_constraints. πŸ’…

✨ SYNOPSIS ✨

#include <allegro5/allegro.h>

void al_apply_window_constraints(ALLEGRO_DISPLAY *display, bool onoff)

πŸŽ€ DESCRIPTION πŸŽ€

Bestie, this function enables or disables constraints that were previously set by the al_set_window_constraints(3) function. That's it β€” it's the on/off switch for your window-size rules. 🫢

When it's enabled, the specified display will automatically resize itself to new sizes so it conforms to those constraints in these cases:

  • The specified display is resizable, not maximized, and not in fullscreen mode. βœ…
  • If the appropriate current display size (width or height) is less than the value of the constraint. This one applies to minimum constraints. πŸ“
  • If the appropriate current display size (width or height) is greater than the value of the constraint. This one applies to maximum constraints. πŸ“
Heads up, bestie: constraints are not applied when a display is toggled from windowed to maximized or fullscreen modes. 😭

When a display is toggled from maximized/fullscreen back to windowed mode, then the display may be resized as described above. The later case is also possible when a user drags the maximized display via mouse. πŸ–±οΈβœ¨

If it's disabled, the specified display will stop using constraints. Periodt. πŸ’€

🌈 SEE ALSO 🌈


Source/version: Allegro reference manual. Date: this footer doesn't print one, just the tag al_apply_w...constraints(3) β€” so that's the cute little sign-off, 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