X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b3c861501a451503b31c075ccb59d16b0ae01e99..2c8204062697e1d3c6600bc73c40c97fd29a13dd:/src/dfb/font.cpp diff --git a/src/dfb/font.cpp b/src/dfb/font.cpp index e954b9faf3..e17ff385fd 100644 --- a/src/dfb/font.cpp +++ b/src/dfb/font.cpp @@ -37,7 +37,7 @@ // ---------------------------------------------------------------------------- // FIXME: for now, always use single font -static IDirectFBFontPtr gs_font = NULL; +static wxIDirectFBFontPtr gs_font = NULL; static unsigned gs_fontRefCnt = 0; class wxFontRefData : public wxObjectRefData @@ -71,12 +71,10 @@ public: // FIXME: always use default font for now if ( !gs_font ) { - IDirectFBPtr dfb(wxTheApp->GetDirectFBInterface()); - DFBFontDescription desc; desc.flags = (DFBFontDescriptionFlags)0; - IDirectFBFontPtr f; - if ( DFB_CALL( dfb->CreateFont(dfb, NULL, &desc, &f) ) ) + wxIDirectFBFontPtr f(wxIDirectFB::Get()->CreateFont(NULL, &desc)); + if ( f ) gs_font = f; } if ( gs_font ) // the above may fail @@ -104,7 +102,7 @@ public: } wxNativeFontInfo m_info; - IDirectFBFontPtr m_font; + wxIDirectFBFontPtr m_font; }; @@ -148,7 +146,7 @@ wxObjectRefData *wxFont::CloneRefData(const wxObjectRefData *data) const // accessors // ---------------------------------------------------------------------------- -IDirectFBFontPtr wxFont::GetDirectFBFont() const +wxIDirectFBFontPtr wxFont::GetDirectFBFont() const { wxCHECK_MSG( Ok(), NULL, wxT("invalid font") );