]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/chartype.h
added implicit conversion of wxString to const void * for compatibility with the...
[wxWidgets.git] / include / wx / chartype.h
index 0395e000a541311afdb118c17ba98f13db1b4984..e5ddbf0c9a19590edb1bd33b1ae2b9d93cd35d69 100644 (file)
     #ifdef HAVE_WIDEC_H
         #include <widec.h>
     #endif
-
-    #if !defined(__GNUC__) || defined(__DARWIN__)
-        #define wxWINT_T_IS_TYPEDEF
-    #endif
 #endif /* wxUSE_WCHAR_T */
 
 /* -------------------------------------------------------------------------- */
     #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
+    #ifndef wxUSE_UNICODE_UTF8
+        #define wxUSE_UNICODE_UTF8 0
+    #endif
+
+    #if wxUSE_UNICODE_UTF8
+        #define wxUSE_UNICODE_WCHAR 0
+    #else
+        #define wxUSE_UNICODE_WCHAR 1
+    #endif
+#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                                            */
 /* ------------------------------------------------------------------------- */