X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2FCommon%2Ffreeglut_internal.h;h=ebd93403c4468ecf8e10bb96207b780284c17492;hb=0cd6817079c9f545bbff65d6ac86d9fac6b92db9;hp=d6d1743dc5ba58a093a1c2ad6b038bd4f4e72501;hpb=0533f65a199109084a2cfc04ccb1e1fbae700729;p=freeglut diff --git a/src/Common/freeglut_internal.h b/src/Common/freeglut_internal.h index d6d1743..ebd9340 100644 --- a/src/Common/freeglut_internal.h +++ b/src/Common/freeglut_internal.h @@ -148,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 @@ -434,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 */