Moving the platform dependencies from the "freeglut_menu.c" file to the platform...
[freeglut] / src / mswin / freeglut_internal_mswin.h
index 4f8aaba..b37ad8c 100644 (file)
 #ifndef  FREEGLUT_INTERNAL_MSWIN_H\r
 #define  FREEGLUT_INTERNAL_MSWIN_H\r
 \r
+\r
+/* All Win32 headers depend on the huge windows.h recursive include.\r
+ * Note: Lower-case header names are used, for best cross-platform\r
+ * compatibility.\r
+ */\r
+#if !defined(_WIN32_WCE)\r
+#    include <windows.h>\r
+#    include <windowsx.h>\r
+#    include <mmsystem.h>\r
+/* CYGWIN does not have tchar.h, but has TEXT(x), defined in winnt.h. */\r
+#    ifndef __CYGWIN__\r
+#      include <tchar.h>\r
+#    else\r
+#      define _TEXT(x) TEXT(x)\r
+#      define _T(x)    TEXT(x)\r
+#    endif\r
+\r
+#endif\r
+\r
+\r
+#define  HAVE_VFPRINTF 1\r
+\r
+/* MinGW may lack a prototype for ChangeDisplaySettingsEx() (depending on the version?) */\r
+#if !defined(ChangeDisplaySettingsEx)\r
+LONG WINAPI ChangeDisplaySettingsExA(LPCSTR,LPDEVMODEA,HWND,DWORD,LPVOID);\r
+LONG WINAPI ChangeDisplaySettingsExW(LPCWSTR,LPDEVMODEW,HWND,DWORD,LPVOID);\r
+#    ifdef UNICODE\r
+#        define ChangeDisplaySettingsEx ChangeDisplaySettingsExW\r
+#    else\r
+#        define ChangeDisplaySettingsEx ChangeDisplaySettingsExA\r
+#    endif\r
+#endif\r
+\r
+\r
+/* Structure Definitions */\r
+\r
 typedef struct tagSFG_PlatformDisplay SFG_PlatformDisplay;\r
 struct tagSFG_PlatformDisplay\r
 {\r
@@ -49,6 +85,16 @@ struct tagSFG_PlatformContext
 };\r
 \r
 \r
+/* Window's state description. This structure should be kept portable. */\r
+typedef struct tagSFG_PlatformWindowState SFG_PlatformWindowState;\r
+struct tagSFG_PlatformWindowState\r
+{\r
+    RECT            OldRect;            /* window rect - stored before the window is made fullscreen */\r
+    DWORD           OldStyle;           /* window style - stored before the window is made fullscreen */\r
+};\r
+\r
+\r
+\r
 /* Joystick-Specific Definitions */\r
 #if !defined(_WIN32_WCE)\r
 #    define _JS_MAX_AXES  8\r
@@ -62,6 +108,14 @@ struct tagSFG_PlatformJoystick
 #endif\r
 \r
 \r
+/* Menu font and color definitions */\r
+#define  FREEGLUT_MENU_FONT    GLUT_BITMAP_8_BY_13\r
+\r
+#define  FREEGLUT_MENU_PEN_FORE_COLORS   {0.0f,  0.0f,  0.0f,  1.0f}\r
+#define  FREEGLUT_MENU_PEN_BACK_COLORS   {0.85f, 0.85f, 0.85f, 1.0f}\r
+#define  FREEGLUT_MENU_PEN_HFORE_COLORS  {1.0f,  1.0f,  1.0f,  1.0f}\r
+#define  FREEGLUT_MENU_PEN_HBACK_COLORS  {0.15f, 0.15f, 0.45f, 1.0f}\r
+\r
 \r
 /* Function to be called on exit */\r
 extern void (__cdecl *__glutExitFunc)( int return_value );\r