+static void
+OverlayDisplay(void)
+{
+ int window = getWindowAndIdx(NULL);
+ printf ( "%6d Window %d OverlayDisplay Callback\n",
+ ++sequence_number, window ) ;
+ glutPostRedisplay () ;
+}
+
+static void
+Visibility(int vis)
+{
+ int winIdx;
+ int window = getWindowAndIdx(&winIdx);
+ printf ( "%6d Window %d Visibility Callback: %d\n",
+ ++sequence_number, window, vis ) ;
+ visibility_called[winIdx] = 1 ;
+ visibility_vis[winIdx] = vis ;
+ visibility_seq[winIdx] = sequence_number ;
+ glutPostRedisplay () ;
+}
+
+static void
+WindowStatus(int state)
+{
+ int winIdx;
+ int window = getWindowAndIdx(&winIdx);
+ printf ( "%6d Window %d WindowStatus Callback: %d\n",
+ ++sequence_number, window, state ) ;
+ windowStatus_called[winIdx] = 1 ;
+ windowStatus_state[winIdx] = state ;
+ windowStatus_seq[winIdx] = sequence_number ;
+ glutPostRedisplay () ;
+}
+
+static void
+SpaceMotion(int x, int y, int z)
+{
+ int window = getWindowAndIdx(NULL);
+ printf ( "%6d Window %d SpaceMotion Callback: %d %d %d\n",
+ ++sequence_number, window, x, y, z ) ;
+ glutPostRedisplay () ;
+}
+
+static void
+SpaceRotation(int x, int y, int z)
+{
+ int window = getWindowAndIdx(NULL);
+ printf ( "%6d Window %d SpaceRotation Callback: %d %d %d\n",
+ ++sequence_number, window, x, y, z ) ;
+ glutPostRedisplay () ;
+}
+
+static void
+SpaceButton(int button, int updown)
+{
+ int window = getWindowAndIdx(NULL);
+ printf ( "%6d Window %d SpaceButton Callback: %d %d\n",
+ ++sequence_number, window, button, updown ) ;
+ glutPostRedisplay () ;
+}
+
+static void
+Dials(int x, int y)
+{
+ int window = getWindowAndIdx(NULL);
+ printf ( "%6d Window %d Dials Callback: %d %d\n",
+ ++sequence_number, window, x, y ) ;
+ glutPostRedisplay () ;
+}
+
+static void
+ButtonBox(int button, int updown)
+{
+ int window = getWindowAndIdx(NULL);
+ printf ( "%6d Window %d ButtonBox Callback: %d %d\n",
+ ++sequence_number, window, button, updown ) ;
+ glutPostRedisplay () ;
+}
+
+static void
+TabletMotion(int x, int y)
+{
+ int window = getWindowAndIdx(NULL);
+ printf ( "%6d Window %d TabletMotion Callback: %d %d\n",
+ ++sequence_number, window, x, y ) ;
+ glutPostRedisplay () ;
+}
+
+static void
+TabletButton(int button, int updown, int x, int y)
+{
+ int window = getWindowAndIdx(NULL);
+ printf ( "%6d Window %d TabletButton Callback: %d %d %d %d\n",
+ ++sequence_number, window, button, updown, x, y ) ;
+ glutPostRedisplay () ;
+}
+
+static void
+MenuCallback ( int value )
+{
+ int menu = glutGetMenu();
+ int window = getWindowAndIdx(NULL);
+ printf( "%6d Menu %d MenuCallback for menu opened in Window %d - value is %d\n",
+ ++sequence_number, menu, window, value );
+}
+
+static void
+MenuDestroy( void )
+{
+ int menu = glutGetMenu();
+ menudestroy_called = 1 ;
+ printf ( "%6d Menu %d MenuDestroy Callback\n",
+ ++sequence_number, menu ) ;
+}
+
+static void
+MenuStatus( int status, int x, int y )
+{
+ /* Menu and window for which this event is triggered are current when the callback is called */
+ int menu = glutGetMenu();
+ int window = getWindowAndIdx(NULL);
+ menustatus_called = 1 ;
+ printf ( "%6d Menu %d MenuStatus Callback in Window %d: %d %d %d\n",
+ ++sequence_number, menu, window, status, x, y ) ;
+ glutPostRedisplay () ;
+}
+