X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e3f6cbd99cd7c5b86742d56114b21da5b34a5c74..c0ac3149bfac1e37fb6eb1a7388603020d319676:/include/wx/chartype.h diff --git a/include/wx/chartype.h b/include/wx/chartype.h index 0395e000a5..934e13d1bc 100644 --- a/include/wx/chartype.h +++ b/include/wx/chartype.h @@ -89,10 +89,6 @@ #ifdef HAVE_WIDEC_H #include #endif - - #if !defined(__GNUC__) || defined(__DARWIN__) - #define wxWINT_T_IS_TYPEDEF - #endif #endif /* wxUSE_WCHAR_T */ /* -------------------------------------------------------------------------- */ @@ -187,6 +183,31 @@ #endif /* __WCHAR_TYPE__ */ #endif /* ASCII/Unicode */ +/* ------------------------------------------------------------------------- */ +/* define wxStringCharType */ +/* ------------------------------------------------------------------------- */ + +/* depending on the platform, Unicode build can either store wxStrings as + wchar_t* or UTF-8 encoded char*: */ +#if wxUSE_UNICODE + /* for now, all Unicode builds are wchar_t* based: */ + #define wxUSE_UNICODE_WCHAR 1 + #define wxUSE_UNICODE_UTF8 0 +#else + #define wxUSE_UNICODE_WCHAR 0 + #define wxUSE_UNICODE_UTF8 0 +#endif + +/* define char type used by wxString internal representation: */ +#if wxUSE_UNICODE_UTF8 + typedef char wxStringCharType; +#elif wxUSE_UNICODE_WCHAR + typedef wchar_t wxStringCharType; +#else + typedef char wxStringCharType; +#endif + + /* ------------------------------------------------------------------------- */ /* define _T() and related macros */ /* ------------------------------------------------------------------------- */