-// error checking
-//-----------------------------------------------------------------------------
-
-inline bool wxDfbCheckReturn(DFBResult code)
-{
- switch ( code )
- {
- case DFB_OK:
- return true;
-
- // these are programming errors, assert:
- #define DFB_ASSERT(code) \
- case code: \
- wxFAIL_MSG( _T("DirectFB error: ") _T(#code) ); \
- return false \
-
- DFB_ASSERT(DFB_DEAD);
- DFB_ASSERT(DFB_UNSUPPORTED);
- DFB_ASSERT(DFB_UNIMPLEMENTED);
- DFB_ASSERT(DFB_INVARG);
- DFB_ASSERT(DFB_NOIMPL);
- DFB_ASSERT(DFB_MISSINGFONT);
- DFB_ASSERT(DFB_THIZNULL);
- DFB_ASSERT(DFB_INVAREA);
- DFB_ASSERT(DFB_DESTROYED);
- DFB_ASSERT(DFB_NOSUCHMETHOD);
- DFB_ASSERT(DFB_NOSUCHINSTANCE);
- DFB_ASSERT(DFB_VERSIONMISMATCH);
-
- #undef DFB_ASSERT
-
- // these are not errors, but valid return codes:
- case DFB_INTERRUPTED:
- case DFB_BUFFEREMPTY:
- return true;
-
- default:
- // FIXME: should handle the errors individually
- wxLogError(_("DirectFB error %d occured."), (int)code);
- return false;
- }
-}
-
-/**
- Wrap all calls to DirectFB in this macro so that the return value is
- checked and errors reported as appropriate.
-
- Returns true if the call succeeded, false otherwise.
- */
-#define DFB_CALL(call) (wxDfbCheckReturn(call))
-
-
-//-----------------------------------------------------------------------------
-// surface manipulation helpers
-//-----------------------------------------------------------------------------
-
-/// Mode of wxDfbCloneSurface() call
-enum wxDfbCloneSurfaceMode
-{
- /// Don't copy surface pixels, just clone surface size and attributes
- wxDfbCloneSurface_NoPixels = 0,
- /// Make exact copy, including the pixels
- wxDfbCloneSurface_CopyPixels
-};
-
-/**
- Creates a new surface by cloning existing one. Depending on @a mode,
- either makes exact copy (wxDfbCloneSurface_CopyPixels) or only creates a
- new surface with the same size and attributes (wxDfbCloneSurface_NoPixels).
- */
-IDirectFBSurfacePtr wxDfbCloneSurface(const IDirectFBSurfacePtr& s,
- wxDfbCloneSurfaceMode mode);
-
-/// Returns bit depth used by the surface
-int wxDfbGetSurfaceDepth(const IDirectFBSurfacePtr& s);
-
-/// Returns interface to the primary display layer:
-IDirectFBDisplayLayerPtr wxDfbGetDisplayLayer();
-
-/// Returns interface to the primary surface:
-IDirectFBSurfacePtr wxDfbGetPrimarySurface();
-
-
-//-----------------------------------------------------------------------------
-// wxDfbEvent