Splitting Windows-specific "freeglut_structure.c" code into its own file (there isn...
[freeglut] / src / Common / freeglut_structure.c
index 4ae0e1f..f8d748f 100644 (file)
@@ -48,6 +48,8 @@ SFG_Structure fgStructure = { { NULL, NULL },  /* The list of windows       */
 \r
 /* -- PRIVATE FUNCTIONS ---------------------------------------------------- */\r
 \r
+extern void fgPlatformCreateWindow ( SFG_Window *window );\r
+\r
 static void fghClearCallBacks( SFG_Window *window )\r
 {\r
     if( window )\r
@@ -58,6 +60,15 @@ static void fghClearCallBacks( SFG_Window *window )
     }\r
 }\r
 \r
+#if TARGET_HOST_POSIX_X11\r
+void fgPlatformCreateWindow ( SFG_Window *window )\r
+{\r
+    window->Window.FBConfig = NULL;\r
+\r
+    window->State.OldHeight = window->State.OldWidth = -1;\r
+}\r
+#endif\r
+\r
 /*\r
  * This private function creates, opens and adds to the hierarchy\r
  * a freeglut window complete with OpenGL context and stuff...\r
@@ -72,16 +83,12 @@ SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title,
     /* Have the window object created */\r
     SFG_Window *window = (SFG_Window *)calloc( sizeof(SFG_Window), 1 );\r
 \r
-#if TARGET_HOST_UNIX_X11\r
-    window->Window.FBConfig = NULL;\r
-#endif\r
+       fgPlatformCreateWindow ( window );\r
+\r
     fghClearCallBacks( window );\r
 \r
     /* Initialize the object properties */\r
     window->ID = ++fgStructure.WindowID;\r
-#if TARGET_HOST_POSIX_X11\r
-    window->State.OldHeight = window->State.OldWidth = -1;\r
-#endif\r
 \r
     fgListInit( &window->Children );\r
     if( parent )\r