1al_apply_window_constraints(3) al_apply_window_constraints(3)
2
3
4
6 al_apply_window_constraints - Allegro 5 API
7
9 #include <allegro5/allegro.h>
10
11 void al_apply_window_constraints(ALLEGRO_DISPLAY *display, bool onoff)
12
14 Enable or disable previously set constraints by al_set_window_con‐
15 straints(3) function.
16
17 If enabled, the specified display will be automatically resized to new
18 sizes to conform constraints in next cases:
19
20 • The specified display is resizable, not maximized and is not in
21 fullscreen mode.
22
23 • If the appropriate current display size (width or height) is less
24 than the value of constraint. Applied to minimum constraints.
25
26 • If the appropriate current display size (width or height) is greater
27 than the value of constraint. Applied to maximum constraints.
28
29 Constrains are not applied when a display is toggle from windowed to
30 maximized or fullscreen modes. When a display is toggle from maxi‐
31 mized/fullscreen to windowed mode, then the display may be resized as
32 described above. The later case is also possible when a user drags the
33 maximized display via mouse.
34
35 If disabled, the specified display will stop using constraints.
36
38 al_get_window_constraints(3), al_set_window_constraints(3)
39
40
41
42Allegro reference manual al_apply_window_constraints(3)