// special cases for converting strings:
-// FIXME-UTF8: move this to chartype.h!
-#if wxUSE_UNICODE
- /* for now, all Unicode builds are wchar_t* based: */
- #define wxUSE_UNICODE_WCHAR 1
-#else
- #define wxUSE_UNICODE_WCHAR 0
-#endif
-
-// FIXME-UTF8: include wx/chartype.h and use wxChar after headers split
-// FIXME-UTF8: this will be char* in UTF-8 build and wchar_t* on Windows
-#if wxUSE_UNICODE_WCHAR
- typedef wchar_t wxArgNativeCharType;
-#else
- typedef char wxArgNativeCharType;
-#endif
-
template<>
struct WXDLLIMPEXP_BASE wxArgNormalizer<const wxCStrData&>
{
wxArgNormalizer(const wxCStrData& value) : m_value(value) {}
- const wxArgNativeCharType *get() const;
+ const wxStringCharType *get() const;
const wxCStrData& m_value;
};
struct WXDLLIMPEXP_BASE wxArgNormalizer<const wxString&>
{
wxArgNormalizer(const wxString& value) : m_value(value) {}
- const wxArgNativeCharType *get() const;
+ const wxStringCharType *get() const;
const wxString& m_value;
};
#endif // wxUSE_UNICODE_WCHAR / !wxUSE_UNICODE_WCHAR && wxUSE_WCHAR_T
+// versions for passing wx[W]CharBuffer:
+template<>
+struct WXDLLIMPEXP_BASE wxArgNormalizer<wxCharBuffer>
+ : public wxArgNormalizer<const char*>
+{
+ wxArgNormalizer(const wxCharBuffer& buf);
+};
+
+template<>
+struct WXDLLIMPEXP_BASE wxArgNormalizer<wxWCharBuffer>
+ : public wxArgNormalizer<const wchar_t*>
+{
+ wxArgNormalizer(const wxWCharBuffer& buf);
+};
+
+
+
// NB: The vararg emulation code is limited to 30 arguments at the moment.
// If you need more, you need to
// 1) increase the value of _WX_VARARG_MAX_ARGS