1set_display_switch_callback(3) Allegro manual set_display_switch_callback(3)
2
3
4
6 set_display_switch_callback - Installs a switching notification call‐
7 back. Allegro game programming library.
8
10 #include <allegro.h>
11
12
13 int set_display_switch_callback(int dir, void (*cb)());
14
16 Installs a notification callback for the switching mode that was previ‐
17 ously selected by calling set_display_switch_mode(). The direction
18 parameter can either be SWITCH_IN or SWITCH_OUT, depending whether you
19 want to be notified about switches away from your program or back to
20 your program. You can sometimes install callbacks for both directions
21 at the same time, but not every platform supports this. You can install
22 several switch callbacks, but no more than eight on any platform.
23
25 Returns zero on success, decreasing the number of empty callback slots
26 by one. Returns -1 if the request is impossible for the current plat‐
27 form or you have reached the maximum number of allowed callbacks.
28
29
31 remove_display_switch_callback(3), set_display_switch_mode(3),
32 exswitch(3)
33
34
35
36Allegro version 4.2.2 set_display_switch_callback(3)