diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/Platform.h | 11 | ||||
-rw-r--r-- | include/WinDefs.h | 12 |
2 files changed, 21 insertions, 2 deletions
diff --git a/include/Platform.h b/include/Platform.h index 500c71de3..74de63174 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -9,11 +9,13 @@ #ifndef PLATFORM_H #define PLATFORM_H -// PLAT_GTK = GTK+ on Linux, PLAT_WIN = Win32 API on Win32 OS +// PLAT_GTK = GTK+ on Linux or Win32 +// PLAT_GTK_WIN32 is defined additionally when running PLAT_GTK under Win32 +// PLAT_WIN = Win32 API on Win32 OS // PLAT_WX is wxWindows on any supported platform -// Could also have PLAT_GTKWIN = GTK+ on Win32 OS in future #define PLAT_GTK 0 +#define PLAT_GTK_WIN32 0 #define PLAT_WIN 0 #define PLAT_WX 0 @@ -25,6 +27,11 @@ #undef PLAT_GTK #define PLAT_GTK 1 +#ifdef _MSC_VER +#undef PLAT_GTK_WIN32 +#define PLAT_GTK_WIN32 1 +#endif + #else #undef PLAT_WIN #define PLAT_WIN 1 diff --git a/include/WinDefs.h b/include/WinDefs.h index bab41662e..b3421c0bc 100644 --- a/include/WinDefs.h +++ b/include/WinDefs.h @@ -8,6 +8,16 @@ #ifndef WINDEFS_H #define WINDEFS_H +/* Running GTK version on win32 */ +#if PLAT_GTK_WIN32 +#include "Windows.h" +#include "Richedit.h" + +/* Name conflicts */ +#undef DrawText +#undef FindText +#else + #define WORD short #define WPARAM unsigned long #define LPARAM long @@ -182,4 +192,6 @@ struct FORMATRANGE { //#define LOWORD(x) (x & 0xffff) //#define HIWORD(x) (x >> 16) +#endif /* !_MSC_VER */ + #endif |