Moving the X11-specific code from "freeglut_menu.c" into its own file
[freeglut] / src / Common / freeglut_menu.c
index 91b2b83..8444d6e 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
@@ -142,28 +142,10 @@ static void fghDeactivateSubMenu( SFG_MenuEntry *menuEntry )
 /*\r
  * 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
-{\r
-    int wx, wy;\r
-    Window w;\r
-\r
-    XTranslateCoordinates(\r
-        fgDisplay.Display,\r
-        window->Window.Handle,\r
-        fgDisplay.RootWindow,\r
-        0, 0, &wx, &wy, &w);\r
-\r
-    *x = fgState.GameModeSize.X + wx;\r
-    *y = fgState.GameModeSize.Y + wy;\r
-}\r
-#endif\r
-\r
-\r
 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
@@ -783,14 +765,6 @@ int FGAPIENTRY glutCreateMenu( void(* callback)( int ) )
     return fgCreateMenu( callback )->ID;\r
 }\r
 \r
-#if TARGET_HOST_MS_WINDOWS\r
-int FGAPIENTRY __glutCreateMenuWithExit( void(* callback)( int ), void (__cdecl *exit_function)(int) )\r
-{\r
-  __glutExitFunc = exit_function;\r
-  return glutCreateMenu( callback );\r
-}\r
-#endif\r
-\r
 /*\r
  * Destroys a menu object, removing all references to it\r
  */\r