+static void
+WindowStatus(int state)
+{
+ int window = getWindowAndIdx(NULL);
+ printf ( "%6d Window %d WindowStatus Callback: %d\n",
+ ++sequence_number, window, state ) ;
+ 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 () ;
+}
+
+
+static void
+MenuState( int status )
+{
+ /* Menu and window for which this event is triggered are current when the callback is called */
+ int menu = glutGetMenu();
+ int window = getWindowAndIdx(NULL);
+ menustate_called = 1 ;
+ printf ( "%6d Menu %d MenuState Callback in Window %d: %d\n",
+ ++sequence_number, menu, window, status) ;
+ glutPostRedisplay () ;
+}
+
+static void Idle ( void )
+{
+ ++sequence_number ;
+}