{
}
-IDirectFBPtr wxApp::GetDirectFBInterface()
-{
- return m_dfb;
-}
-
bool wxApp::Initialize(int& argc, wxChar **argv)
{
if ( !wxAppBase::Initialize(argc, argv) )
return false;
- if ( !DFB_CALL( DirectFBInit(&argc, &argv) ) )
+ if ( !wxDfbCheckReturn(DirectFBInit(&argc, &argv)) )
return false;
- if ( !DFB_CALL( DirectFBCreate(&m_dfb) ) )
+ if ( !wxIDirectFB::Get() )
return false;
- #warning "FIXME: theme override is temporary"
- wxTheme::Set(wxTheme::Create(_T("gtk")));
-
return true;
}
{
wxAppBase::CleanUp();
- m_dfb.Reset();
+ wxEventLoop::CleanUp();
+ wxIDirectFB::CleanUp();
}
//-----------------------------------------------------------------------------
{
wxVideoMode m;
- IDirectFBSurfacePtr surface(wxDfbGetPrimarySurface());
+ wxIDirectFBSurfacePtr surface(wxIDirectFB::Get()->GetPrimarySurface());
if ( !surface )
return m; // invalid
- DFB_CALL( surface->GetSize(surface, &m.w, &m.h) );
- m.bpp = wxDfbGetSurfaceDepth(surface);
+ surface->GetSize(&m.w, &m.h);
+ m.bpp = surface->GetDepth();
return m;
}
bool wxApp::SetDisplayMode(const wxVideoMode& mode)
{
- if ( !DFB_CALL( m_dfb->SetVideoMode(m_dfb, mode.w, mode.h, mode.bpp) ) )
+ if ( !wxIDirectFB::Get()->SetVideoMode(mode.w, mode.h, mode.bpp) )
return false;
m_videoMode = mode;