Direct Screen Access
Direct screen access is a way of drawing to the screen without using the window server. As this avoids client-server communication, it is much faster, and mostly useful for games and video. Note that some interaction with the window server is needed in order to prevent the application from drawing over other application's data.
class CDirectScreenAccess : public CActive;
Members defined in CDirectScreenAccess are:
Gets the clipping region to draw to.
inline RRegion *DrawingRegion();
Gets the graphics context for drawing to the screen. This is set up by calling StartL(). Its origin is set so that you should use window coordinates to specify which part of the screen to draw to and its clipping region is set to the visible part of the window.
inline CFbsBitGc *Gc();
Allocates and constructs the object and adds it to the current active scheduler.
static IMPORT_C CDirectScreenAccess *NewL(RWsSession &aWs, CWsScreenDevice
&aScreenDevice, RWindowBase &aWin, MDirectScreenAccess &aAbort);
Gets the screen device to draw to.
inline CFbsScreenDevice *&ScreenDevice();
Informs the window server that you are going to start direct screen access and sets up a graphics context with which you can draw to the screen.
IMPORT_C void StartL();
MDirectScreenAccess is the interface for restarting direct screen access.
virtual void Restart(RDirectScreenAccess::TTerminationReasons aReason)=0;
This function is called by the window server as soon as direct screen access can resume.
This function should call CDirectScreenAccess::StartL() within a trap harness. If this leaves, e.g. through lack of memory, direct screen access cannot be restarted. StartL() re-calculates the clipping region, so that if direct screen access was aborted because another window appeared in front of it, that window will not be overwritten when direct screen access resumes.