From: John F. Fay Date: Sun, 29 Jan 2012 03:04:35 +0000 (+0000) Subject: Moving the platform-specific window handle and context type definitions into platform... X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;ds=inline;h=28ba5e26f5546a236e93dc3e23ce4777b41f9ffc;p=freeglut Moving the platform-specific window handle and context type definitions into platform-specific code regions git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1013 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/src/Common/freeglut_internal.h b/src/Common/freeglut_internal.h index 7697094..815d13e 100644 --- a/src/Common/freeglut_internal.h +++ b/src/Common/freeglut_internal.h @@ -214,6 +214,7 @@ LONG WINAPI ChangeDisplaySettingsExW(LPCWSTR,LPDEVMODEW,HWND,DWORD,LPVOID); /* Platform-specific includes */ #if TARGET_HOST_POSIX_X11 + typedef struct tagSFG_PlatformDisplay SFG_PlatformDisplay; struct tagSFG_PlatformDisplay { @@ -247,6 +248,15 @@ struct tagSFG_PlatformDisplay int DisplayPointerY; /* saved Y location of the pointer */ }; + +/* + * Make "freeglut" window handle and context types so that we don't need so + * much conditionally-compiled code later in the library. + */ +typedef Window SFG_WindowHandleType ; +typedef GLXContext SFG_WindowContextType ; + + #endif #if TARGET_HOST_MS_WINDOWS #include "../mswin/freeglut_internal_mswin.h" @@ -419,22 +429,6 @@ struct tagSFG_Timer }; /* - * Make "freeglut" window handle and context types so that we don't need so - * much conditionally-compiled code later in the library. - */ -#if TARGET_HOST_POSIX_X11 - -typedef Window SFG_WindowHandleType ; -typedef GLXContext SFG_WindowContextType ; - -#elif TARGET_HOST_MS_WINDOWS - -typedef HWND SFG_WindowHandleType ; -typedef HGLRC SFG_WindowContextType ; - -#endif - -/* * A window and its OpenGL context. The contents of this structure * are highly dependant on the target operating system we aim at... */ diff --git a/src/mswin/freeglut_internal_mswin.h b/src/mswin/freeglut_internal_mswin.h index baf4800..bd392f0 100644 --- a/src/mswin/freeglut_internal_mswin.h +++ b/src/mswin/freeglut_internal_mswin.h @@ -36,6 +36,13 @@ struct tagSFG_PlatformDisplay char *DisplayName; /* Display name for multi display support*/ }; +/* + * Make "freeglut" window handle and context types so that we don't need so + * much conditionally-compiled code later in the library. + */ +typedef HWND SFG_WindowHandleType ; +typedef HGLRC SFG_WindowContextType ; + #endif /* FREEGLUT_INTERNAL_MSWIN_H */ \ No newline at end of file