Changing "GameMode" to "GameModeWindow ... and testing whether I can get to SVN directly
authorJohn F. Fay <johnffay@nettally.com>
Thu, 21 Sep 2006 17:13:37 +0000 (17:13 +0000)
committerJohn F. Fay <johnffay@nettally.com>
Thu, 21 Sep 2006 17:13:37 +0000 (17:13 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@696 7f0cb862-5218-0410-a997-914c9d46530a

ChangeLog
src/freeglut_gamemode.c
src/freeglut_internal.h
src/freeglut_menu.c
src/freeglut_state.c
src/freeglut_structure.c

index bde2fcc..1f8c5d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1176,3 +1176,11 @@ original GLUT.
 (304) Updated build requirements for SuSE 10.1.
 
 (305) Check fgets for return value to avoid warnings.
+
+**************************************************************************
+* Changes on September 20, 2006
+**************************************************************************
+
+(306)  Changed "fgStructure.GameMode" to "fgStructure.GameModeWindow" to
+reflect better what it is
+
index bdd180f..5f8faad 100644 (file)
@@ -417,8 +417,8 @@ int FGAPIENTRY glutEnterGameMode( void )
 {
     FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutEnterGameMode" );
 
-    if( fgStructure.GameMode )
-        fgAddToWindowDestroyList( fgStructure.GameMode );
+    if( fgStructure.GameModeWindow )
+        fgAddToWindowDestroyList( fgStructure.GameModeWindow );
     else
         fghRememberState( );
 
@@ -428,16 +428,16 @@ int FGAPIENTRY glutEnterGameMode( void )
         return 0;
     }
 
-    fgStructure.GameMode = fgCreateWindow(
+    fgStructure.GameModeWindow = fgCreateWindow(
         NULL, "FREEGLUT", 0, 0,
         fgState.GameModeSize.X, fgState.GameModeSize.Y, GL_TRUE, GL_FALSE
     );
 
-    fgStructure.GameMode->State.Width  = fgState.GameModeSize.X;
-    fgStructure.GameMode->State.Height = fgState.GameModeSize.Y;
-    fgStructure.GameMode->State.NeedToResize = GL_TRUE;
+    fgStructure.GameModeWindow->State.Width  = fgState.GameModeSize.X;
+    fgStructure.GameModeWindow->State.Height = fgState.GameModeSize.Y;
+    fgStructure.GameModeWindow->State.NeedToResize = GL_TRUE;
 
-    fgStructure.GameMode->State.IsGameMode = GL_TRUE;
+    fgStructure.GameModeWindow->State.IsGameMode = GL_TRUE;
 
 #if TARGET_HOST_UNIX_X11
 
@@ -457,12 +457,12 @@ int FGAPIENTRY glutEnterGameMode( void )
      * the application which we have to aviod, so wait until it's viewable:
      */
     while( GrabSuccess != XGrabPointer(
-               fgDisplay.Display, fgStructure.GameMode->Window.Handle,
+               fgDisplay.Display, fgStructure.GameModeWindow->Window.Handle,
                TRUE,
                ButtonPressMask | ButtonReleaseMask | ButtonMotionMask
                | PointerMotionMask,
                GrabModeAsync, GrabModeAsync,
-               fgStructure.GameMode->Window.Handle, None, CurrentTime) )
+               fgStructure.GameModeWindow->Window.Handle, None, CurrentTime) )
         usleep( 100 );
 
     /*
@@ -471,7 +471,7 @@ int FGAPIENTRY glutEnterGameMode( void )
      */
     XSetInputFocus(
         fgDisplay.Display,
-        fgStructure.GameMode->Window.Handle,
+        fgStructure.GameModeWindow->Window.Handle,
         RevertToNone,
         CurrentTime
     );
@@ -521,7 +521,7 @@ int FGAPIENTRY glutEnterGameMode( void )
     /* Grab the keyboard, too */
     XGrabKeyboard(
         fgDisplay.Display,
-        fgStructure.GameMode->Window.Handle,
+        fgStructure.GameModeWindow->Window.Handle,
         FALSE,
         GrabModeAsync, GrabModeAsync,
         CurrentTime
@@ -529,7 +529,7 @@ int FGAPIENTRY glutEnterGameMode( void )
 
 #endif
 
-    return fgStructure.GameMode->ID;
+    return fgStructure.GameModeWindow->ID;
 }
 
 /*
@@ -539,12 +539,12 @@ void FGAPIENTRY glutLeaveGameMode( void )
 {
     FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutLeaveGameMode" );
 
-    freeglut_return_if_fail( fgStructure.GameMode );
+    freeglut_return_if_fail( fgStructure.GameModeWindow );
 
-    fgStructure.GameMode->State.IsGameMode = GL_FALSE;
+    fgStructure.GameModeWindow->State.IsGameMode = GL_FALSE;
 
-    fgAddToWindowDestroyList( fgStructure.GameMode );
-    fgStructure.GameMode = NULL;
+    fgAddToWindowDestroyList( fgStructure.GameModeWindow );
+    fgStructure.GameModeWindow = NULL;
 
 #if TARGET_HOST_UNIX_X11
 
@@ -566,7 +566,7 @@ int FGAPIENTRY glutGameModeGet( GLenum eWhat )
     switch( eWhat )
     {
     case GLUT_GAME_MODE_ACTIVE:
-        return !!fgStructure.GameMode;
+        return !!fgStructure.GameModeWindow;
 
     case GLUT_GAME_MODE_POSSIBLE:
         return fghChangeDisplayMode( GL_TRUE );
@@ -587,7 +587,7 @@ int FGAPIENTRY glutGameModeGet( GLenum eWhat )
         /*
          * This is true if the game mode has been activated successfully..
          */
-        return !!fgStructure.GameMode;
+        return !!fgStructure.GameModeWindow;
     }
 
     fgWarning( "Unknown gamemode get: %d", eWhat );
index c2fa064..ca751f3 100644 (file)
@@ -592,19 +592,19 @@ struct tagSFG_WindowList
 typedef struct tagSFG_Structure SFG_Structure;
 struct tagSFG_Structure
 {
-    SFG_List        Windows;      /* The global windows list            */
-    SFG_List        Menus;        /* The global menus list              */
+    SFG_List        Windows;         /* The global windows list            */
+    SFG_List        Menus;           /* The global menus list              */
     SFG_List        WindowsToDestroy;
 
-    SFG_Window*     CurrentWindow; /* The currently set window          */
-    SFG_Menu*       CurrentMenu;   /* Same, but menu...                 */
+    SFG_Window*     CurrentWindow;   /* The currently set window          */
+    SFG_Menu*       CurrentMenu;     /* Same, but menu...                 */
 
-    SFG_MenuContext* MenuContext; /* OpenGL rendering context for menus */
+    SFG_MenuContext* MenuContext;    /* OpenGL rendering context for menus */
 
-    SFG_Window*      GameMode;    /* The game mode window               */
+    SFG_Window*      GameModeWindow; /* The game mode window               */
 
-    int              WindowID;    /* The new current window ID          */
-    int              MenuID;      /* The new current menu ID            */
+    int              WindowID;       /* The new current window ID          */
+    int              MenuID;         /* The new current menu ID            */
 };
 
 /*
index 05fd2bd..e684591 100644 (file)
@@ -140,7 +140,7 @@ static void fghDeactivateSubMenu( SFG_MenuEntry *menuEntry )
  */
 static GLvoid fghGetVMaxExtent( SFG_Window* window, int* x, int* y )
 {
-    if( fgStructure.GameMode )
+    if( fgStructure.GameModeWindow )
     {
 #if TARGET_HOST_UNIX_X11
         int wx, wy;
index 93a3f1b..efc94b1 100644 (file)
@@ -370,7 +370,7 @@ int FGAPIENTRY glutGet( GLenum eWhat )
         /* ...then we've got to correct the results we've just received... */
 
 #if !TARGET_HOST_WINCE
-        if ( ( fgStructure.GameMode != fgStructure.CurrentWindow ) && ( fgStructure.CurrentWindow->Parent == NULL ) &&
+        if ( ( fgStructure.GameModeWindow != fgStructure.CurrentWindow ) && ( fgStructure.CurrentWindow->Parent == NULL ) &&
              ( ! fgStructure.CurrentWindow->IsMenu ) )
         {
           winRect.left   += GetSystemMetrics( SM_CXSIZEFRAME );
index ecb4f10..2c2ebf6 100644 (file)
@@ -346,7 +346,7 @@ void fgCreateStructure( void )
     fgStructure.CurrentWindow = NULL;
     fgStructure.CurrentMenu = NULL;
     fgStructure.MenuContext = NULL;
-    fgStructure.GameMode = NULL;
+    fgStructure.GameModeWindow = NULL;
     fgStructure.WindowID = 0;
     fgStructure.MenuID = 0;
 }