X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2FCommon%2Ffreeglut_internal.h;h=ebd93403c4468ecf8e10bb96207b780284c17492;hb=0cd6817079c9f545bbff65d6ac86d9fac6b92db9;hp=7199da72d13f576af1e0b1e991d6667126271668;hpb=7662d246c2686f027ab71cbe4eb9d7310a236583;p=freeglut diff --git a/src/Common/freeglut_internal.h b/src/Common/freeglut_internal.h index 7199da7..ebd9340 100644 --- a/src/Common/freeglut_internal.h +++ b/src/Common/freeglut_internal.h @@ -88,23 +88,7 @@ /* -- PLATFORM-SPECIFIC INCLUDES ------------------------------------------- */ -/* All Win32 headers depend on the huge windows.h recursive include. - * Note: Lower-case header names are used, for best cross-platform - * compatibility. - */ -#if TARGET_HOST_MS_WINDOWS && !defined(_WIN32_WCE) -# include -# include -# include -/* CYGWIN does not have tchar.h, but has TEXT(x), defined in winnt.h. */ -# ifndef __CYGWIN__ -# include -# else -# define _TEXT(x) TEXT(x) -# define _T(x) TEXT(x) -# endif - -#elif TARGET_HOST_POSIX_X11 +#if TARGET_HOST_POSIX_X11 # include # include # include @@ -164,21 +148,6 @@ # endif #endif -#if TARGET_HOST_MS_WINDOWS -# define HAVE_VFPRINTF 1 -#endif - -/* MinGW may lack a prototype for ChangeDisplaySettingsEx() (depending on the version?) */ -#if TARGET_HOST_MS_WINDOWS && !defined(ChangeDisplaySettingsEx) -LONG WINAPI ChangeDisplaySettingsExA(LPCSTR,LPDEVMODEA,HWND,DWORD,LPVOID); -LONG WINAPI ChangeDisplaySettingsExW(LPCWSTR,LPDEVMODEW,HWND,DWORD,LPVOID); -# ifdef UNICODE -# define ChangeDisplaySettingsEx ChangeDisplaySettingsExW -# else -# define ChangeDisplaySettingsEx ChangeDisplaySettingsExA -# endif -#endif - #if defined(_MSC_VER) || defined(__WATCOMC__) /* strdup() is non-standard, for all but POSIX-2001 */ #define strdup _strdup @@ -450,19 +419,24 @@ struct tagSFG_Context }; /* Window's state description. This structure should be kept portable. */ +#if TARGET_HOST_POSIX_X11 +typedef struct tagSFG_PlatformWindowState SFG_PlatformWindowState; +struct tagSFG_PlatformWindowState +{ + int OldWidth; /* Window width from before a resize */ + int OldHeight; /* " height " " " " */ +}; +#endif + + typedef struct tagSFG_WindowState SFG_WindowState; struct tagSFG_WindowState { /* Note that on Windows, sizes always refer to the client area, thus without the window decorations */ int Width; /* Window's width in pixels */ int Height; /* The same about the height */ -#if TARGET_HOST_POSIX_X11 - int OldWidth; /* Window width from before a resize */ - int OldHeight; /* " height " " " " */ -#elif TARGET_HOST_MS_WINDOWS - RECT OldRect; /* window rect - stored before the window is made fullscreen */ - DWORD OldStyle; /* window style - stored before the window is made fullscreen */ -#endif + + SFG_PlatformWindowState pWState; /* Window width/height (X11) or rectangle/style (Windows) from before a resize */ GLboolean Redisplay; /* Do we have to redisplay? */ GLboolean Visible; /* Is the window visible now */