AL_APPLY_WINDOW_CONSTRAINTS(3)
π 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