X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fmswin%2Ffreeglut_internal_mswin.h;h=b37ad8c5e6e4104f38a10c5adbb84ba3b8baaec2;hb=6f1be614bfcc2312a92104b9d97319b06dbef7e8;hp=628c06d085b0f43148e263279306131b9fc33382;hpb=9486b7d6a3bf0d00cc00ab98380e99810250aa84;p=freeglut diff --git a/src/mswin/freeglut_internal_mswin.h b/src/mswin/freeglut_internal_mswin.h index 628c06d..b37ad8c 100644 --- a/src/mswin/freeglut_internal_mswin.h +++ b/src/mswin/freeglut_internal_mswin.h @@ -28,6 +28,42 @@ #ifndef FREEGLUT_INTERNAL_MSWIN_H #define FREEGLUT_INTERNAL_MSWIN_H + +/* All Win32 headers depend on the huge windows.h recursive include. + * Note: Lower-case header names are used, for best cross-platform + * compatibility. + */ +#if !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 + +#endif + + +#define HAVE_VFPRINTF 1 + +/* MinGW may lack a prototype for ChangeDisplaySettingsEx() (depending on the version?) */ +#if !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 + + +/* Structure Definitions */ + typedef struct tagSFG_PlatformDisplay SFG_PlatformDisplay; struct tagSFG_PlatformDisplay { @@ -49,6 +85,40 @@ struct tagSFG_PlatformContext }; +/* Window's state description. This structure should be kept portable. */ +typedef struct tagSFG_PlatformWindowState SFG_PlatformWindowState; +struct tagSFG_PlatformWindowState +{ + RECT OldRect; /* window rect - stored before the window is made fullscreen */ + DWORD OldStyle; /* window style - stored before the window is made fullscreen */ +}; + + + +/* Joystick-Specific Definitions */ +#if !defined(_WIN32_WCE) +# define _JS_MAX_AXES 8 +typedef struct tagSFG_PlatformJoystick SFG_PlatformJoystick; +struct tagSFG_PlatformJoystick +{ + JOYCAPS jsCaps; + JOYINFOEX js; + UINT js_id; +}; +#endif + + +/* Menu font and color definitions */ +#define FREEGLUT_MENU_FONT GLUT_BITMAP_8_BY_13 + +#define FREEGLUT_MENU_PEN_FORE_COLORS {0.0f, 0.0f, 0.0f, 1.0f} +#define FREEGLUT_MENU_PEN_BACK_COLORS {0.85f, 0.85f, 0.85f, 1.0f} +#define FREEGLUT_MENU_PEN_HFORE_COLORS {1.0f, 1.0f, 1.0f, 1.0f} +#define FREEGLUT_MENU_PEN_HBACK_COLORS {0.15f, 0.15f, 0.45f, 1.0f} + + +/* Function to be called on exit */ +extern void (__cdecl *__glutExitFunc)( int return_value ); #endif /* FREEGLUT_INTERNAL_MSWIN_H */ \ No newline at end of file