al_set_window_constraints(3alleg5)
β¨ al_set_window_constraints β¨
okay bestie, welcome to the Allegro 5 API page for al_set_window_constraints π this one's short and sweet, so let's get into it π«Ά
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
bool al_set_window_constraints(ALLEGRO_DISPLAY *display,
int min_w, int min_h, int max_w, int max_h)
π DESCRIPTION π
so basically this function puts constraints on a display that's non-fullscreen and resizable. like, you're telling the window "hey, don't let anyone squish you smaller than this or stretch you bigger than that" π
but bestie, listen β the constraints are a hint only π. the window environment is not necessarily gonna respect them. so don't come crying if your window manager decides to do its own thing, that's just how it is fr fr π
if you pass a value of 0 for any of the parameters, that means no constraint for that parameter. iconic. zero = "no thoughts, head empty, no limits" β¨
π¨ IMPORTANT: the constraints will only actually be applied to a display after you call the al_apply_window_constraints(3alleg5) function. setting them alone does nothing, you gotta apply them too. no skipping steps π
β SINCE β
5.1.0 β she's been around, she's a queen π
π¦ SEE ALSO π¦
and that's the whole page, bestie!! ππ this was brought to you by the Allegro reference manual, page al_set_window_constraints(3alleg5) β go set those constraints and slay π
β¨πΈ
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms