X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2FCommon%2Ffreeglut_internal.h;h=e4b9d8f392756318d04ef7633f7d966e8b526d18;hb=e511ea0b35c08dd69bf1d8b898b68187c6fdd2ee;hp=7697094d75af646178816908941424fc391822d4;hpb=83a7f1444d1388983a7b756dde26b0cc74101b13;p=freeglut diff --git a/src/Common/freeglut_internal.h b/src/Common/freeglut_internal.h index 7697094..e4b9d8f 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,21 @@ 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 ; +typedef struct tagSFG_PlatformContext SFG_PlatformContext; +struct tagSFG_PlatformContext +{ + GLXFBConfig* FBConfig; /* The window's FBConfig */ +}; + + + #endif #if TARGET_HOST_MS_WINDOWS #include "../mswin/freeglut_internal_mswin.h" @@ -419,22 +435,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... */ @@ -444,11 +444,7 @@ struct tagSFG_Context SFG_WindowHandleType Handle; /* The window's handle */ SFG_WindowContextType Context; /* The window's OpenGL/WGL context */ -#if TARGET_HOST_POSIX_X11 - GLXFBConfig* FBConfig; /* The window's FBConfig */ -#elif TARGET_HOST_MS_WINDOWS - HDC Device; /* The window's device context */ -#endif + SFG_PlatformContext pContext; /* The window's FBConfig (X11) or device context (Windows) */ int DoubleBuffered; /* Treat the window as double-buffered */ }; @@ -995,10 +991,6 @@ int fgHintPresent(Window window, Atom property, Atom hint); SFG_Proc fghGetProcAddress( const char *procName ); -#if TARGET_HOST_MS_WINDOWS -extern void (__cdecl *__glutExitFunc)( int return_value ); -#endif - #endif /* FREEGLUT_INTERNAL_H */ /*** END OF FILE ***/