State package:GLUT
GLUT maintains a considerable amount of programmer visible state. Some
(but not all) of this state may be directly retrieved.
The current state of a key or button
The window state of the current window
Controls the window state callback for the
current window. The
window state callback for a window is called when the window state of
a window changes.
If the window state callback for a window is disabled and later
re-enabled, the window state state of the window is undefined; any
change in the window state will be reported, that is if you disable a
window state callback and re-enable the callback, you are guaranteed
the next window state change will be reported.
Note that you can either use
visibilityCallback or
windowStateCallback, but not both, because the former is
implemented via the latter.