al_set_window_constraints(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ 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