X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a2d541ca9c552d1a30ba75970968a7a220f4955a..abcbaea73fa07b88ac681c78ea6933ba70a6fd72:/include/wx/defs.h diff --git a/include/wx/defs.h b/include/wx/defs.h index 7a07fa8be8..f87619fa48 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -174,12 +174,35 @@ typedef unsigned int bool; #endif // bool -// define boolean constants: don't use true/false here as not all compilers -// support them -#undef TRUE -#undef FALSE -#define TRUE ((bool)1) -#define FALSE ((bool)0) +#ifdef __cplusplus + // define boolean constants: don't use true/false here as not all compilers + // support them but also redefine TRUE which could have been defined as 1 + // by previous headers: this would be incorrect as our TRUE is supposed to + // be of type bool, just like true, not int + // + // however if the user code absolutely needs TRUE to be defined in its own + // way, it can predefine WX_TRUE_DEFINED to prevent the redefinition here + #ifdef TRUE + #ifndef WX_TRUE_DEFINED + #undef TRUE + #undef FALSE + #endif + #endif + + #ifndef TRUE + #define TRUE ((bool)1) + #define FALSE ((bool)0) + #endif +#else // !__cplusplus + // the definitions above don't work for C sources + #ifndef TRUE + #define TRUE 1 + #endif + + #ifndef FALSE + #define FALSE 0 + #endif +#endif // C++/!C++ typedef short int WXTYPE; @@ -1452,6 +1475,7 @@ enum wxDataFormatId wxDF_FILENAME = 15, /* CF_HDROP */ wxDF_LOCALE = 16, wxDF_PRIVATE = 20, + wxDF_HTML = 30, /* Note: does not correspond to CF_ constant */ wxDF_MAX };