Change from John (I removed a couple of spaces from a couple of lines in
[freeglut] / src / freeglut_main.c
index 15020e8..6413363 100644 (file)
  * Handle a window configuration change. When no reshape
  * callback is hooked, the viewport size is updated to
  * match the new window size.
- *
- * XXX We can/should make a "unified" window handle type so that
- * XXX the function headers don't need this silly #ifdef junk.
- * XXX Make the type, say, {fgWindow}.  On UNIX_X11, this is
- * XXX {Window}.  On WIN32, it is {HWND}.  Then do the #ifdef
- * XXX junk *once* in "freeglut_internal.h".
  */
-static void fghReshapeWindowByHandle
-#if TARGET_HOST_UNIX_X11
-    ( Window handle, int width, int height )
-#elif TARGET_HOST_WIN32
-    ( HWND handle, int width, int height )
-#endif
+static void fghReshapeWindowByHandle ( SFG_WindowHandleType handle,
+                                       int width, int height )
 {
     SFG_Window *current_window = fgStructure.Window;
 
@@ -175,12 +165,7 @@ static void fghReshapeWindowByHandle
  * Calls a window's redraw method. This is used when
  * a redraw is forced by the incoming window messages.
  */
-static void fghRedrawWindowByHandle
-#if TARGET_HOST_UNIX_X11
-    ( Window handle )
-#elif TARGET_HOST_WIN32
-    ( HWND handle )
-#endif
+static void fghRedrawWindowByHandle ( SFG_WindowHandleType handle )
 {
     SFG_Window* window = fgWindowByHandle( handle );
     freeglut_return_if_fail( window != NULL );
@@ -387,7 +372,7 @@ long fgElapsedTime( void )
 #if TARGET_HOST_UNIX_X11
         gettimeofday( &fgState.Time.Value, NULL );
 #elif TARGET_HOST_WIN32
-        fgState.Time.Value = timeGetTime () ;
+        fgState.Time.Value = timeGetTime ();
 #endif
         fgState.Time.Set = GL_TRUE ;
 
@@ -413,7 +398,7 @@ void fgError( const char *fmt, ... )
     va_end( ap );
 
     if ( fgState.Initialised )
-        fgDeinitialize () ;
+        fgDeinitialize ();
 
     exit( 1 );
 }
@@ -605,7 +590,7 @@ void FGAPIENTRY glutMainLoopEvent( void )
             {
                 GETWINDOW( xclient ); 
 
-                fgCloseWindow ( window ) ;
+                fgCloseWindow ( window );
                 fgAddToWindowDestroyList ( window, GL_FALSE );
             }
             break;
@@ -730,7 +715,7 @@ void FGAPIENTRY glutMainLoopEvent( void )
                         event.xmotion.y_root - window->ActiveMenu->Y;
                 }
                 window->ActiveMenu->Window->State.Redisplay = GL_TRUE ;
-                fgSetWindow( window->ActiveMenu->ParentWindow ) ;
+                fgSetWindow( window->ActiveMenu->ParentWindow );
 
                 break;
             }
@@ -1119,7 +1104,7 @@ void FGAPIENTRY glutMainLoop( void )
         fgDeinitialize( );
 
         if( execState == GLUT_ACTION_EXIT )
-            exit( 0 ) ;
+            exit( 0 );
     }
 }
 
@@ -1158,7 +1143,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
     LONG lRet = 1;
 
     if ( ( window == NULL ) && ( uMsg != WM_CREATE ) )
-      return DefWindowProc( hWnd, uMsg, wParam, lParam ) ;
+      return DefWindowProc( hWnd, uMsg, wParam, lParam );
 
     /* printf ( "Window %3d message <%04x> %12d %12d\n", window?window->ID:0,
              uMsg, wParam, lParam ); */
@@ -1183,7 +1168,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
             if( fgStructure.MenuContext )
                 wglMakeCurrent( window->Window.Device,
                                 fgStructure.MenuContext->Context
-                ) ;
+                );
             else
             {
                 fgStructure.MenuContext =
@@ -1192,7 +1177,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
                     wglCreateContext( window->Window.Device );
             }
 
-            /* window->Window.Context = wglGetCurrentContext () ;   */
+            /* window->Window.Context = wglGetCurrentContext ();   */
             window->Window.Context = wglCreateContext( window->Window.Device );
         }
         else
@@ -1756,7 +1741,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
         /* User has finished resizing the window, force a redraw */
         INVOKE_WCB( *window, Display, ( ) );
 
-        /*lRet = DefWindowProc( hWnd, uMsg, wParam, lParam ) ; */
+        /*lRet = DefWindowProc( hWnd, uMsg, wParam, lParam ); */
         break;
 
         /*