Rationalizing the names of the platform-specific functions so that they begin with...
authorJohn F. Fay <johnffay@nettally.com>
Mon, 23 Jan 2012 05:01:37 +0000 (05:01 +0000)
committerJohn F. Fay <johnffay@nettally.com>
Mon, 23 Jan 2012 05:01:37 +0000 (05:01 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1000 7f0cb862-5218-0410-a997-914c9d46530a

16 files changed:
src/Common/freeglut_cursor.c
src/Common/freeglut_ext.c
src/Common/freeglut_gamemode.c
src/Common/freeglut_init.c
src/Common/freeglut_input_devices.c
src/Common/freeglut_internal.h
src/Common/freeglut_main.c
src/Common/freeglut_menu.c
src/Common/freeglut_xinput.c
src/mswin/freeglut_cursor_mswin.c
src/mswin/freeglut_ext_mswin.c
src/mswin/freeglut_gamemode_mswin.c
src/mswin/freeglut_init_mswin.c
src/mswin/freeglut_input_devices_mswin.c
src/mswin/freeglut_main_mswin.c
src/mswin/freeglut_menu_mswin.c

index 1eddf87..31af784 100644 (file)
@@ -39,8 +39,8 @@
 \r
 /* -- PRIVATE FUNCTIONS --------------------------------------------------- */\r
 \r
-extern void fghSetCursor ( SFG_Window *window, int cursorID );\r
-extern void fghWarpPointer ( int x, int y );\r
+extern void fgPlatformSetCursor ( SFG_Window *window, int cursorID );\r
+extern void fgPlatformWarpPointer ( int x, int y );\r
 \r
 #if TARGET_HOST_POSIX_X11 || TARGET_HOST_MAC_OSX || TARGET_HOST_SOLARIS\r
   #include <X11/cursorfont.h>\r
@@ -104,7 +104,7 @@ static cursorCacheEntry cursorCache[] = {
     { XC_bottom_left_corner,  None }  /* GLUT_CURSOR_BOTTOM_LEFT_CORNER */\r
 };\r
 \r
-static void fghSetCursor ( SFG_Window *window, int cursorID )\r
+static void fgPlatformSetCursor ( SFG_Window *window, int cursorID )\r
 {\r
     Cursor cursor;\r
     /*\r
@@ -150,7 +150,7 @@ static void fghSetCursor ( SFG_Window *window, int cursorID )
 }\r
 \r
 \r
-static void fghWarpPointer ( int x, int y )\r
+static void fgPlatformWarpPointer ( int x, int y )\r
 {\r
     XWarpPointer(\r
         fgDisplay.Display,\r
@@ -168,7 +168,7 @@ static void fghWarpPointer ( int x, int y )
 /* -- INTERNAL FUNCTIONS ---------------------------------------------------- */\r
 void fgSetCursor ( SFG_Window *window, int cursorID )\r
 {\r
-    fghSetCursor ( window, cursorID );\r
+    fgPlatformSetCursor ( window, cursorID );\r
 }\r
 \r
 \r
@@ -182,7 +182,7 @@ void FGAPIENTRY glutSetCursor( int cursorID )
     FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSetCursor" );\r
     FREEGLUT_EXIT_IF_NO_WINDOW ( "glutSetCursor" );\r
 \r
-    fghSetCursor ( fgStructure.CurrentWindow, cursorID );\r
+    fgPlatformSetCursor ( fgStructure.CurrentWindow, cursorID );\r
     fgStructure.CurrentWindow->State.Cursor = cursorID;\r
 }\r
 \r
@@ -194,7 +194,7 @@ void FGAPIENTRY glutWarpPointer( int x, int y )
     FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWarpPointer" );\r
     FREEGLUT_EXIT_IF_NO_WINDOW ( "glutWarpPointer" );\r
 \r
-    fghWarpPointer ( x, y );\r
+    fgPlatformWarpPointer ( x, y );\r
 }\r
 \r
 /*** END OF FILE ***/\r
index 5472e2a..598edb6 100644 (file)
@@ -30,7 +30,7 @@
 #include "freeglut_internal.h"\r
 \r
 extern SFG_Proc fghGetProcAddress( const char *procName );\r
-extern GLUTproc fghGetPlatformSpecificGLUTProcAddress( const char *procName );\r
+extern GLUTproc fgPlatformGlutGetProcAddress( const char *procName );\r
 \r
 static GLUTproc fghGetGLUTProcAddress( const char* procName )\r
 {\r
@@ -223,6 +223,12 @@ static GLUTproc fghGetGLUTProcAddress( const char* procName )
 }\r
 \r
 \r
+static GLUTproc fgPlatformGlutGetProcAddress( const char* procName )\r
+{\r
+    return NULL;\r
+}\r
+\r
+\r
 SFG_Proc fghGetProcAddress( const char *procName )\r
 {\r
 #if defined( GLX_ARB_get_proc_address )\r
@@ -245,7 +251,7 @@ glutGetProcAddress( const char *procName )
 \r
        /* Some GLUT functions are platform-specific: */\r
        if ( !p )\r
-      p = fghGetPlatformSpecificGLUTProcAddress( procName );\r
+      p = fgPlatformGlutGetProcAddress( procName );\r
 \r
     return ( p != NULL ) ? p : fghGetProcAddress( procName );\r
 }\r
index 48991a6..d2bbe9a 100644 (file)
@@ -39,9 +39,9 @@
 \r
 \r
 /* -- PRIVATE FUNCTIONS ---------------------------------------------------- */\r
-extern void fghRememberState( void );\r
-extern void fghRestoreState( void );\r
-extern GLboolean fghChangeDisplayMode( GLboolean haveToTest );\r
+extern void fgPlatformRememberState( void );\r
+extern void fgPlatformRestoreState( void );\r
+extern GLboolean fgPlatformChangeDisplayMode( GLboolean haveToTest );\r
 \r
 \r
 #if TARGET_HOST_POSIX_X11\r
@@ -163,7 +163,7 @@ static int xrandr_resize(int xsz, int ysz, int rate, int just_checking)
  * Remembers the current visual settings, so that\r
  * we can change them and restore later...\r
  */\r
-static void fghRememberState( void )\r
+static void fgPlatformRememberState( void )\r
 {\r
     int event_base, error_base;\r
 \r
@@ -248,7 +248,7 @@ static void fghRememberState( void )
 /*\r
  * Restores the previously remembered visual settings\r
  */\r
-static void fghRestoreState( void )\r
+static void fgPlatformRestoreState( void )\r
 {\r
     /* Restore the remembered pointer position: */\r
     XWarpPointer(\r
@@ -398,7 +398,7 @@ static int fghCheckDisplayModes( GLboolean exactMatch, int displayModesCount, XF
 /*\r
  * Changes the current display mode to match user's settings\r
  */\r
-static GLboolean fghChangeDisplayMode( GLboolean haveToTest )\r
+static GLboolean fgPlatformChangeDisplayMode( GLboolean haveToTest )\r
 {\r
     GLboolean success = GL_FALSE;\r
     /* first try to use XRandR, then fallback to XF86VidMode */\r
@@ -532,7 +532,7 @@ void FGAPIENTRY glutGameModeString( const char* string )
 \r
     /* All values not specified are now set to -1, which means those\r
      * aspects of the current display mode are not changed in\r
-     * fghChangeDisplayMode() above.\r
+     * fgPlatformChangeDisplayMode() above.\r
      */\r
     fgState.GameModeSize.X  = width;\r
     fgState.GameModeSize.Y  = height;\r
@@ -552,9 +552,9 @@ int FGAPIENTRY glutEnterGameMode( void )
     if( fgStructure.GameModeWindow )\r
         fgAddToWindowDestroyList( fgStructure.GameModeWindow );\r
     else\r
-        fghRememberState( );\r
+        fgPlatformRememberState( );\r
 \r
-    if( ! fghChangeDisplayMode( GL_FALSE ) )\r
+    if( ! fgPlatformChangeDisplayMode( GL_FALSE ) )\r
     {\r
         fgWarning( "failed to change screen settings" );\r
         return 0;\r
@@ -680,7 +680,7 @@ void FGAPIENTRY glutLeaveGameMode( void )
 \r
 #endif\r
 \r
-    fghRestoreState();\r
+    fgPlatformRestoreState();\r
 }\r
 \r
 /*\r
@@ -696,7 +696,7 @@ int FGAPIENTRY glutGameModeGet( GLenum eWhat )
         return !!fgStructure.GameModeWindow;\r
 \r
     case GLUT_GAME_MODE_POSSIBLE:\r
-        return fghChangeDisplayMode( GL_TRUE );\r
+        return fgPlatformChangeDisplayMode( GL_TRUE );\r
 \r
     case GLUT_GAME_MODE_WIDTH:\r
         return fgState.GameModeSize.X;\r
index 0543840..31631f1 100644 (file)
@@ -100,9 +100,9 @@ SFG_State fgState = { { -1, -1, GL_FALSE },  /* Position */
 \r
 /* -- PRIVATE FUNCTIONS ---------------------------------------------------- */\r
 \r
-extern void fghInitialize( const char* displayName );\r
-extern void fghDeinitialiseInputDevices ( void );\r
-extern void fghCloseDisplay ( void );\r
+extern void fgPlatformInitialize( const char* displayName );\r
+extern void fgPlatformDeinitialiseInputDevices ( void );\r
+extern void fgPlatformCloseDisplay ( void );\r
 \r
 #if TARGET_HOST_POSIX_X11\r
 \r
@@ -246,7 +246,7 @@ int fgHintPresent(Window window, Atom property, Atom hint)
 /*\r
  * A call to this function should initialize all the display stuff...\r
  */\r
-static void fghInitialize( const char* displayName )\r
+static void fgPlatformInitialize( const char* displayName )\r
 {\r
     fgDisplay.Display = XOpenDisplay( displayName );\r
 \r
@@ -437,7 +437,7 @@ void fghCloseInputDevices ( void )
 \r
 \r
 #if TARGET_HOST_POSIX_X11\r
-static void fghDeinitialiseInputDevices ( void )\r
+static void fgPlatformDeinitialiseInputDevices ( void )\r
 {\r
        fghCloseInputDevices ();\r
 \r
@@ -446,7 +446,7 @@ static void fghDeinitialiseInputDevices ( void )
 }\r
 \r
 \r
-static void fghCloseDisplay ( void )\r
+static void fgPlatformCloseDisplay ( void )\r
 {\r
     /*\r
      * Make sure all X-client data we have created will be destroyed on\r
@@ -506,7 +506,7 @@ void fgDeinitialize( void )
         free( timer );\r
     }\r
 \r
-       fghDeinitialiseInputDevices ();\r
+       fgPlatformDeinitialiseInputDevices ();\r
 \r
        fgState.MouseWheelTicks = 0;\r
 \r
@@ -560,7 +560,7 @@ void fgDeinitialize( void )
         fgState.ProgramName = NULL;\r
     }\r
 \r
-       fghCloseDisplay ();\r
+       fgPlatformCloseDisplay ();\r
 \r
     fgState.Initialised = GL_FALSE;\r
 }\r
@@ -617,7 +617,7 @@ void FGAPIENTRY glutInit( int* pargc, char** argv )
      * in the program arguments, we will use the DISPLAY environment\r
      * variable for opening the X display (see code above):\r
      */\r
-    fghInitialize( displayName );\r
+    fgPlatformInitialize( displayName );\r
 \r
     /*\r
      * Geometry parsing deffered until here because we may need the screen\r
index bcc98fb..a1780d4 100644 (file)
@@ -99,7 +99,7 @@ extern int serial_getchar ( SERIALPORT *port );
 extern int serial_putchar ( SERIALPORT *port, unsigned char ch );\r
 extern void serial_flush ( SERIALPORT *port );\r
 \r
-extern void fghRegisterDialDevice ( const char *dial_device );\r
+extern void fgPlatformRegisterDialDevice ( const char *dial_device );\r
 static void send_dial_event(int dial, int value);\r
 static void poll_dials(int id);\r
 \r
@@ -128,7 +128,7 @@ int fgInputDeviceDetect( void )
  * Try initializing the input device(s)\r
  */\r
 #if TARGET_HOST_POSIX_X11\r
-static void fghRegisterDialDevice ( const char *dial_device )\r
+static void fgPlatformRegisterDialDevice ( const char *dial_device )\r
 {\r
 }\r
 #endif\r
@@ -139,7 +139,7 @@ void fgInitialiseInputDevices ( void )
     {\r
         const char *dial_device=NULL;\r
         dial_device = getenv ( "GLUT_DIALS_SERIAL" );\r
-               fghRegisterDialDevice ( dial_device );\r
+               fgPlatformRegisterDialDevice ( dial_device );\r
 \r
         if ( !dial_device ) return;\r
         if ( !( dialbox_port = serial_open ( dial_device ) ) ) return;\r
index 38c465b..cacb55b 100644 (file)
@@ -859,7 +859,7 @@ GLXFBConfig* fgChooseFBConfig( int* numcfgs );
 \r
 /* The window procedure for Win32 events handling */\r
 #if TARGET_HOST_MS_WINDOWS\r
-LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg,\r
+LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg,\r
                                WPARAM wParam, LPARAM lParam );\r
 void fgNewWGLCreateContext( SFG_Window* window );\r
 GLboolean fgSetupPixelFormat( SFG_Window* window, GLboolean checkOnly,\r
index e7b4cb8..8c59640 100644 (file)
@@ -77,11 +77,11 @@ struct GXKeyList gxKeyList;
        static pCloseTouchInputHandle fghCloseTouchInputHandle = (pCloseTouchInputHandle)0xDEADBEEF;\r
 #endif\r
 \r
-extern void fghPlatformReshapeWindow ( SFG_Window *window, int width, int height );\r
-extern void fghcbPlatformDisplayWindow ( SFG_Window *window );\r
-extern void fghPlatformSleepForEvents( long msec );\r
-extern void fghProcessSingleEvent ( void );\r
-extern void fghMainLoopPreliminaryWork ( void );\r
+extern void fgPlatformReshapeWindow ( SFG_Window *window, int width, int height );\r
+extern void fgPlatformDisplayWindow ( SFG_Window *window );\r
+extern void fgPlatformSleepForEvents( long msec );\r
+extern void fgPlatformProcessSingleEvent ( void );\r
+extern void fgPlatformMainLoopPreliminaryWork ( void );\r
 \r
 \r
 /*\r
@@ -103,7 +103,7 @@ extern void fghMainLoopPreliminaryWork ( void );
  * match the new window size.\r
  */\r
 #if TARGET_HOST_POSIX_X11\r
-static void fghPlatformReshapeWindow ( SFG_Window *window, int width, int height )\r
+static void fgPlatformReshapeWindow ( SFG_Window *window, int width, int height )\r
 {\r
     XResizeWindow( fgDisplay.Display, window->Window.Handle,\r
                    width, height );\r
@@ -117,7 +117,7 @@ static void fghReshapeWindow ( SFG_Window *window, int width, int height )
 \r
     freeglut_return_if_fail( window != NULL );\r
 \r
-       fghPlatformReshapeWindow ( window, width, height );\r
+       fgPlatformReshapeWindow ( window, width, height );\r
 \r
     if( FETCH_WCB( *window, Reshape ) )\r
         INVOKE_WCB( *window, Reshape, ( width, height ) );\r
@@ -177,7 +177,7 @@ void fghRedrawWindow ( SFG_Window *window )
  * A static helper function to execute display callback for a window\r
  */\r
 #if TARGET_HOST_POSIX_X11\r
-static void fghcbPlatformDisplayWindow ( SFG_Window *window )\r
+static void fgPlatformDisplayWindow ( SFG_Window *window )\r
 {\r
         fghRedrawWindow ( window ) ;\r
 }\r
@@ -190,7 +190,7 @@ static void fghcbDisplayWindow( SFG_Window *window,
         window->State.Visible )\r
     {\r
         window->State.Redisplay = GL_FALSE;\r
-               fghcbPlatformDisplayWindow ( window );\r
+               fgPlatformDisplayWindow ( window );\r
     }\r
 \r
     fgEnumSubWindows( window, fghcbDisplayWindow, enumerator );\r
@@ -423,7 +423,7 @@ static long fghNextTimer( void )
  */\r
 \r
 #if TARGET_HOST_POSIX_X11\r
-static void fghPlatformSleepForEvents( long msec )\r
+static void fgPlatformSleepForEvents( long msec )\r
 {\r
     /*\r
      * Possibly due to aggressive use of XFlush() and friends,\r
@@ -469,14 +469,14 @@ static void fghSleepForEvents( void )
     if( fghHaveJoystick( ) && ( msec > 10 ) )     \r
         msec = 10;\r
 \r
-       fghPlatformSleepForEvents ( msec );\r
+       fgPlatformSleepForEvents ( msec );\r
 }\r
 \r
 #if TARGET_HOST_POSIX_X11\r
 /*\r
  * Returns GLUT modifier mask for the state field of an X11 event.\r
  */\r
-int fghGetModifiers( int state )\r
+int fgPlatformGetModifiers( int state )\r
 {\r
     int ret = 0;\r
 \r
@@ -933,7 +933,7 @@ static void fghPrintEvent( XEvent *event )
 }\r
 \r
 \r
-void fghProcessSingleEvent ( void )\r
+void fgPlatformProcessSingleEvent ( void )\r
 {\r
     SFG_Window* window;\r
     XEvent event;\r
@@ -1147,7 +1147,7 @@ void fghProcessSingleEvent ( void )
              * XXX track ButtonPress/ButtonRelease events in our own\r
              * XXX bit-mask?\r
              */\r
-            fgState.Modifiers = fghGetModifiers( event.xmotion.state );\r
+            fgState.Modifiers = fgPlatformGetModifiers( event.xmotion.state );\r
             if ( event.xmotion.state & ( Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask ) ) {\r
                 INVOKE_WCB( *window, Motion, ( event.xmotion.x,\r
                                                event.xmotion.y ) );\r
@@ -1201,7 +1201,7 @@ void fghProcessSingleEvent ( void )
                 ! FETCH_WCB( *window, MouseWheel ) )\r
                 break;\r
 \r
-            fgState.Modifiers = fghGetModifiers( event.xbutton.state );\r
+            fgState.Modifiers = fgPlatformGetModifiers( event.xbutton.state );\r
 \r
             /* Finally execute the mouse or mouse wheel callback */\r
             if( ( button < glutDeviceGet ( GLUT_NUM_MOUSE_BUTTONS ) ) || ( ! FETCH_WCB( *window, MouseWheel ) ) )\r
@@ -1316,7 +1316,7 @@ void fghProcessSingleEvent ( void )
                     if( keyboard_cb )\r
                     {\r
                         fgSetWindow( window );\r
-                        fgState.Modifiers = fghGetModifiers( event.xkey.state );\r
+                        fgState.Modifiers = fgPlatformGetModifiers( event.xkey.state );\r
                         keyboard_cb( asciiCode[ 0 ],\r
                                      event.xkey.x, event.xkey.y\r
                         );\r
@@ -1385,7 +1385,7 @@ void fghProcessSingleEvent ( void )
                     if( special_cb && (special != -1) )\r
                     {\r
                         fgSetWindow( window );\r
-                        fgState.Modifiers = fghGetModifiers( event.xkey.state );\r
+                        fgState.Modifiers = fgPlatformGetModifiers( event.xkey.state );\r
                         special_cb( special, event.xkey.x, event.xkey.y );\r
                         fgState.Modifiers = INVALID_MODIFIERS;\r
                     }\r
@@ -1412,7 +1412,7 @@ void fghProcessSingleEvent ( void )
 }\r
 \r
 \r
-static void fghMainLoopPreliminaryWork ( void )\r
+static void fgPlatformMainLoopPreliminaryWork ( void )\r
 {\r
 }\r
 #endif\r
@@ -1424,7 +1424,7 @@ static void fghMainLoopPreliminaryWork ( void )
  */\r
 void FGAPIENTRY glutMainLoopEvent( void )\r
 {\r
-       fghProcessSingleEvent ();\r
+       fgPlatformProcessSingleEvent ();\r
 \r
     if( fgState.Timers.First )\r
         fghCheckTimers( );\r
@@ -1444,7 +1444,7 @@ void FGAPIENTRY glutMainLoop( void )
 \r
     FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMainLoop" );\r
 \r
-       fghMainLoopPreliminaryWork ();\r
+       fgPlatformMainLoopPreliminaryWork ();\r
 \r
     fgState.ExecState = GLUT_EXEC_STATE_RUNNING ;\r
     while( fgState.ExecState == GLUT_EXEC_STATE_RUNNING )\r
index 91b2b83..7ad06ba 100644 (file)
@@ -85,7 +85,7 @@ static float menu_pen_hback [4] = {1.0f,  1.0f,  1.0f,  1.0f};
 #endif\r
 \r
 \r
-extern GLvoid fghGetGameModeVMaxExtent( SFG_Window* window, int* x, int* y );\r
+extern GLvoid fgPlatformGetGameModeVMaxExtent( SFG_Window* window, int* x, int* y );\r
 \r
 /* -- PRIVATE FUNCTIONS ---------------------------------------------------- */\r
 \r
@@ -143,7 +143,7 @@ static void fghDeactivateSubMenu( SFG_MenuEntry *menuEntry )
  * Private function to get the virtual maximum screen extent\r
  */\r
 #if TARGET_HOST_POSIX_X11\r
-static GLvoid fghGetGameModeVMaxExtent( SFG_Window* window, int* x, int* y )\r
+static GLvoid fgPlatformGetGameModeVMaxExtent( SFG_Window* window, int* x, int* y )\r
 {\r
     int wx, wy;\r
     Window w;\r
@@ -163,7 +163,7 @@ static GLvoid fghGetGameModeVMaxExtent( SFG_Window* window, int* x, int* y )
 static GLvoid fghGetVMaxExtent( SFG_Window* window, int* x, int* y )\r
 {\r
     if( fgStructure.GameModeWindow )\r
-               fghGetGameModeVMaxExtent ( window, x, y );\r
+               fgPlatformGetGameModeVMaxExtent ( window, x, y );\r
     else\r
     {\r
         *x = fgDisplay.ScreenWidth;\r
index 548d2cf..40677fa 100644 (file)
@@ -14,7 +14,7 @@
 #include <X11/extensions/XInput2.h>
 
 /* import function from freeglut_main.c */
-int fghGetModifiers( int state );
+extern int fgPlatformGetModifiers( int state );
 
 /* extension opcode for XInput */
 int xi_opcode = -1;
@@ -160,7 +160,7 @@ void fgHandleExtensionEvents( XEvent* base_ev ) {
 
                        case XI_Enter:
                        case XI_Leave:
-                               fgState.Modifiers = fghGetModifiers( ((XIEnterEvent*)event)->mods.base );
+                               fgState.Modifiers = fgPlatformGetModifiers( ((XIEnterEvent*)event)->mods.base );
                                INVOKE_WCB( *window, MultiEntry, (
                                        event->deviceid, 
                                        (event->evtype == XI_Enter ? GLUT_ENTERED : GLUT_LEFT)
@@ -172,7 +172,7 @@ void fgHandleExtensionEvents( XEvent* base_ev ) {
 
                        case XI_ButtonPress:
                        case XI_ButtonRelease:
-                               fgState.Modifiers = fghGetModifiers( event->mods.base );
+                               fgState.Modifiers = fgPlatformGetModifiers( event->mods.base );
                                INVOKE_WCB( *window, MultiButton, (
                                        event->deviceid, 
                                        event->event_x,
@@ -189,7 +189,7 @@ void fgHandleExtensionEvents( XEvent* base_ev ) {
                                break;
 
                        case XI_Motion:
-                               fgState.Modifiers = fghGetModifiers( event->mods.base );
+                               fgState.Modifiers = fgPlatformGetModifiers( event->mods.base );
                                for (i = 0; i < event->buttons.mask_len; i++) if (event->buttons.mask[i]) button = 1;
                                if (button) {
                                        INVOKE_WCB( *window, MultiMotion,  ( event->deviceid, event->event_x, event->event_y ) );
index 49ff128..8dd7a4c 100644 (file)
@@ -30,7 +30,7 @@
 \r
 \r
 \r
-void fghSetCursor ( SFG_Window *window, int cursorID )\r
+void fgPlatformSetCursor ( SFG_Window *window, int cursorID )\r
 {\r
     /*\r
      * Joe Krahn is re-writing the following code.\r
@@ -101,7 +101,7 @@ void fghSetCursor ( SFG_Window *window, int cursorID )
 }\r
 \r
 \r
-void fghWarpPointer ( int x, int y )\r
+void fgPlatformWarpPointer ( int x, int y )\r
 {\r
     POINT coords;\r
     coords.x = x;\r
index 2717553..da35307 100644 (file)
@@ -28,7 +28,7 @@
 #include <GL/freeglut.h>\r
 #include "freeglut_internal_mswin.h"\r
 \r
-GLUTproc fghGetPlatformSpecificGLUTProcAddress( const char* procName )\r
+GLUTproc fgPlatformGlutGetProcAddress( const char* procName )\r
 {\r
 #if !defined(_WIN32_WCE)\r
     /* optimization: quick initial check */\r
index 6a4d3c0..9f31fe7 100644 (file)
@@ -32,7 +32,7 @@
  * Remembers the current visual settings, so that\r
  * we can change them and restore later...\r
  */\r
-void fghRememberState( void )\r
+void fgPlatformRememberState( void )\r
 {\r
 /*    DEVMODE devMode; */\r
 \r
@@ -53,7 +53,7 @@ void fghRememberState( void )
 /*\r
  * Restores the previously remembered visual settings\r
  */\r
-void fghRestoreState( void )\r
+void fgPlatformRestoreState( void )\r
 {\r
     /* Restore the previously remembered desktop display settings */\r
     ChangeDisplaySettingsEx( fgDisplay.DisplayName,&fgDisplay.DisplayMode, 0,0,0 );\r
@@ -66,7 +66,7 @@ void fghRestoreState( void )
 /*\r
  * Changes the current display mode to match user's settings\r
  */\r
-GLboolean fghChangeDisplayMode( GLboolean haveToTest )\r
+GLboolean fgPlatformChangeDisplayMode( GLboolean haveToTest )\r
 {\r
     GLboolean success = GL_FALSE;\r
     DEVMODE  devMode;\r
index ff476fd..1777ebd 100644 (file)
@@ -32,7 +32,7 @@
 /*\r
  * A call to this function should initialize all the display stuff...\r
  */\r
-void fghInitialize( const char* displayName )\r
+void fgPlatformInitialize( const char* displayName )\r
 {\r
     WNDCLASS wc;\r
     ATOM atom;\r
@@ -54,7 +54,7 @@ void fghInitialize( const char* displayName )
          * XXX Old code had "| CS_DBCLCKS" commented out.  Plans for the\r
          * XXX future?  Dead-end idea?\r
          */\r
-        wc.lpfnWndProc    = fgWindowProc;\r
+        wc.lpfnWndProc    = fgPlatformWindowProc;\r
         wc.cbClsExtra     = 0;\r
         wc.cbWndExtra     = 0;\r
         wc.hInstance      = fgDisplay.Instance;\r
@@ -75,7 +75,7 @@ void fghInitialize( const char* displayName )
 \r
         /* Register the window class */\r
         atom = RegisterClass( &wc );\r
-        FREEGLUT_INTERNAL_ERROR_EXIT ( atom, "Window Class Not Registered", "fghInitialize" );\r
+        FREEGLUT_INTERNAL_ERROR_EXIT ( atom, "Window Class Not Registered", "fgPlatformInitialize" );\r
     }\r
 \r
     /* The screen dimensions can be obtained via GetSystemMetrics() calls */\r
@@ -104,7 +104,7 @@ void fghInitialize( const char* displayName )
            DeleteDC(context);\r
         }\r
         else\r
-           fgWarning("fghInitialize: "\r
+           fgWarning("fgPlatformInitialize: "\r
                      "CreateDC failed, Screen size info may be incorrect\n"\r
           "This is quite likely caused by a bad '-display' parameter");\r
       \r
@@ -131,7 +131,7 @@ void fghInitialize( const char* displayName )
 /* Platform-Specific Deinitialization Functions: */\r
 extern void fghCloseInputDevices ( void );\r
 \r
-void fghDeinitialiseInputDevices ( void )\r
+void fgPlatformDeinitialiseInputDevices ( void )\r
 {\r
 #if !defined(_WIN32_WCE)\r
        fghCloseInputDevices ();\r
@@ -140,7 +140,7 @@ void fghDeinitialiseInputDevices ( void )
     fgState.InputDevsInitialised = GL_FALSE;\r
 }\r
 \r
-void fghCloseDisplay ( void )\r
+void fgPlatformCloseDisplay ( void )\r
 {\r
     if( fgDisplay.DisplayName )\r
     {\r
index aa35de2..c0b795e 100644 (file)
@@ -45,7 +45,7 @@ int serial_putchar ( SERIALPORT *port, unsigned char ch );
 void serial_flush ( SERIALPORT *port );\r
 \r
 \r
-void fghRegisterDialDevice ( const char *dial_device )\r
+void fgPlatformRegisterDialDevice ( const char *dial_device )\r
 {\r
         if (!dial_device){\r
             static char devname[256];\r
index 81013d3..7037e3d 100644 (file)
@@ -32,7 +32,7 @@
 extern void fghRedrawWindow ( SFG_Window *window );\r
 \r
 \r
-void fghPlatformReshapeWindow ( SFG_Window *window, int width, int height )\r
+void fgPlatformReshapeWindow ( SFG_Window *window, int width, int height )\r
 {\r
     RECT windowRect;\r
 \r
@@ -80,7 +80,7 @@ void fghPlatformReshapeWindow ( SFG_Window *window, int width, int height )
 }\r
 \r
 \r
-void fghcbPlatformDisplayWindow ( SFG_Window *window )\r
+void fgPlatformDisplayWindow ( SFG_Window *window )\r
 {\r
     RedrawWindow(\r
         window->Window.Handle, NULL, NULL,\r
@@ -89,13 +89,13 @@ void fghcbPlatformDisplayWindow ( SFG_Window *window )
 }\r
 \r
 \r
-void fghPlatformSleepForEvents( long msec )\r
+void fgPlatformSleepForEvents( long msec )\r
 {\r
     MsgWaitForMultipleObjects( 0, NULL, FALSE, msec, QS_ALLINPUT );\r
 }\r
 \r
 \r
-void fghProcessSingleEvent ( void )\r
+void fgPlatformProcessSingleEvent ( void )\r
 {\r
     MSG stMsg;\r
 \r
@@ -123,7 +123,7 @@ void fghProcessSingleEvent ( void )
 \r
 \r
 \r
-void fghMainLoopPreliminaryWork ( void )\r
+void fgPlatformMainLoopPreliminaryWork ( void )\r
 {\r
     SFG_Window *window = (SFG_Window *)fgStructure.Windows.First ;\r
 \r
@@ -154,7 +154,7 @@ void fghMainLoopPreliminaryWork ( void )
 /*\r
  * Determine a GLUT modifer mask based on MS-WINDOWS system info.\r
  */\r
-static int fghGetModifiers (void)\r
+static int fgPlatformGetModifiers (void)\r
 {\r
     return\r
         ( ( ( GetKeyState( VK_LSHIFT   ) < 0 ) ||\r
@@ -168,8 +168,8 @@ static int fghGetModifiers (void)
 /*\r
  * The window procedure for handling Win32 events\r
  */\r
-LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,\r
-                               LPARAM lParam )\r
+LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,\r
+                                       LPARAM lParam )\r
 {\r
     static unsigned char lControl = 0, rControl = 0, lShift = 0,\r
                          rShift = 0, lAlt = 0, rAlt = 0;\r
@@ -307,7 +307,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
         /* The window structure is passed as the creation structure parameter... */\r
         window = (SFG_Window *) (((LPCREATESTRUCT) lParam)->lpCreateParams);\r
         FREEGLUT_INTERNAL_ERROR_EXIT ( ( window != NULL ), "Cannot create window",\r
-                                       "fgWindowProc" );\r
+                                       "fgPlatformWindowProc" );\r
 \r
         window->Window.Handle = hWnd;\r
         window->Window.Device = GetDC( hWnd );\r
@@ -497,7 +497,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
         }\r
         SetFocus(window->Window.Handle);\r
 \r
-        fgState.Modifiers = fghGetModifiers( );\r
+        fgState.Modifiers = fgPlatformGetModifiers( );\r
 \r
         if( ( wParam & MK_LBUTTON ) ||\r
             ( wParam & MK_MBUTTON ) ||\r
@@ -607,7 +607,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
             break;\r
 \r
         fgSetWindow( window );\r
-        fgState.Modifiers = fghGetModifiers( );\r
+        fgState.Modifiers = fgPlatformGetModifiers( );\r
 \r
         INVOKE_WCB(\r
             *window, Mouse,\r
@@ -641,7 +641,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
                 break;\r
 \r
             fgSetWindow( window );\r
-            fgState.Modifiers = fghGetModifiers( );\r
+            fgState.Modifiers = fgPlatformGetModifiers( );\r
 \r
             /*\r
              * XXX Should use WHEEL_DELTA instead of 120\r
@@ -702,7 +702,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
          * Remember the current modifiers state. This is done here in order\r
          * to make sure the VK_DELETE keyboard callback is executed properly.\r
          */\r
-        fgState.Modifiers = fghGetModifiers( );\r
+        fgState.Modifiers = fgPlatformGetModifiers( );\r
 \r
         GetCursorPos( &mouse_pos );\r
         ScreenToClient( window->Window.Handle, &mouse_pos );\r
@@ -792,7 +792,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
          * Remember the current modifiers state. This is done here in order\r
          * to make sure the VK_DELETE keyboard callback is executed properly.\r
          */\r
-        fgState.Modifiers = fghGetModifiers( );\r
+        fgState.Modifiers = fgPlatformGetModifiers( );\r
 \r
         GetCursorPos( &mouse_pos );\r
         ScreenToClient( window->Window.Handle, &mouse_pos );\r
@@ -877,7 +877,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
       if( (fgState.KeyRepeat==GLUT_KEY_REPEAT_OFF || window->State.IgnoreKeyRepeat==GL_TRUE) && (HIWORD(lParam) & KF_REPEAT) )\r
             break;\r
 \r
-        fgState.Modifiers = fghGetModifiers( );\r
+        fgState.Modifiers = fgPlatformGetModifiers( );\r
         INVOKE_WCB( *window, Keyboard,\r
                     ( (char)wParam,\r
                       window->State.MouseX, window->State.MouseY )\r
index 5d22b16..db15f14 100644 (file)
@@ -29,7 +29,7 @@
 #include "freeglut_internal_mswin.h"\r
 \r
 \r
-GLvoid fghGetGameModeVMaxExtent( SFG_Window* window, int* x, int* y )\r
+GLvoid fgPlatformGetGameModeVMaxExtent( SFG_Window* window, int* x, int* y )\r
 {\r
     *x = glutGet ( GLUT_SCREEN_WIDTH );\r
     *y = glutGet ( GLUT_SCREEN_HEIGHT );\r