Moving the platform-specific window handle and context type definitions into platform-specific code regions

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1013 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
fayjf 2012-01-29 03:04:35 +00:00
parent 137cc6d75c
commit 9d8d27aa4f
2 changed files with 17 additions and 16 deletions

View File

@ -214,6 +214,7 @@ LONG WINAPI ChangeDisplaySettingsExW(LPCWSTR,LPDEVMODEW,HWND,DWORD,LPVOID);
/* Platform-specific includes */ /* Platform-specific includes */
#if TARGET_HOST_POSIX_X11 #if TARGET_HOST_POSIX_X11
typedef struct tagSFG_PlatformDisplay SFG_PlatformDisplay; typedef struct tagSFG_PlatformDisplay SFG_PlatformDisplay;
struct tagSFG_PlatformDisplay struct tagSFG_PlatformDisplay
{ {
@ -247,6 +248,15 @@ struct tagSFG_PlatformDisplay
int DisplayPointerY; /* saved Y location of the pointer */ 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 #endif
#if TARGET_HOST_MS_WINDOWS #if TARGET_HOST_MS_WINDOWS
#include "../mswin/freeglut_internal_mswin.h" #include "../mswin/freeglut_internal_mswin.h"
@ -418,22 +428,6 @@ struct tagSFG_Timer
long TriggerTime; /* The timer trigger time */ long TriggerTime; /* The timer trigger time */
}; };
/*
* 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 * A window and its OpenGL context. The contents of this structure
* are highly dependant on the target operating system we aim at... * are highly dependant on the target operating system we aim at...

View File

@ -36,6 +36,13 @@ struct tagSFG_PlatformDisplay
char *DisplayName; /* Display name for multi display support*/ 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 */ #endif /* FREEGLUT_INTERNAL_MSWIN_H */