#include "wx/dfb/wrapdfb.h"
#include <directfb_version.h>
-//-----------------------------------------------------------------------------
-// strings conversion
-//-----------------------------------------------------------------------------
-
-// convert string from wxString to UTF-8 encoded const char*
-#if wxUSE_UNICODE
- #define wxSTR_TO_DFB(s) (s).mb_str(wxConvUTF8)
-#else
- #define wxSTR_TO_DFB(s) wxConvUTF8.cWC2MB((s).wc_str(*wxConvUI))
-#endif
-
//-----------------------------------------------------------------------------
// misc helpers
//-----------------------------------------------------------------------------
wxCHECK_RET( m_textForegroundColour.Ok(),
wxT("invalid foreground color") );
SelectColour(m_textForegroundColour);
- m_surface->DrawString(wxSTR_TO_DFB(text), -1, xx, yy, DSTF_LEFT | DSTF_TOP);
+ m_surface->DrawString(text.utf8_str(), -1, xx, yy, DSTF_LEFT | DSTF_TOP);
// restore pen's colour, because other drawing functions expect the colour
// to be set to the pen:
DFBRectangle rect;
wxIDirectFBFontPtr f = GetCurrentFont();
- if ( f->GetStringExtents(wxSTR_TO_DFB(string), -1, &rect, NULL) )
+ if ( f->GetStringExtents(string.utf8_str(), -1, &rect, NULL) )
{
// VS: YDEV is corrent, it should *not* be XDEV, because font's are
// only scaled according to m_scaleY