X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fmswin%2Ffreeglut_internal_mswin.h;h=a18efb246ca5b7c214248b3343a91a2e4462d50e;hb=0533f65a199109084a2cfc04ccb1e1fbae700729;hp=baf48007464da5e1bbb8f7ea9be0959db25482ce;hpb=83a7f1444d1388983a7b756dde26b0cc74101b13;p=freeglut diff --git a/src/mswin/freeglut_internal_mswin.h b/src/mswin/freeglut_internal_mswin.h index baf4800..a18efb2 100644 --- a/src/mswin/freeglut_internal_mswin.h +++ b/src/mswin/freeglut_internal_mswin.h @@ -28,6 +28,27 @@ #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 + + + typedef struct tagSFG_PlatformDisplay SFG_PlatformDisplay; struct tagSFG_PlatformDisplay { @@ -36,6 +57,35 @@ struct tagSFG_PlatformDisplay 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 ; +typedef struct tagSFG_PlatformContext SFG_PlatformContext; +struct tagSFG_PlatformContext +{ + HDC Device; /* The window's device context */ +}; + + +/* 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 + + + +/* Function to be called on exit */ +extern void (__cdecl *__glutExitFunc)( int return_value ); #endif /* FREEGLUT_INTERNAL_MSWIN_H */ \ No newline at end of file