Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
CDirectScreenAccess Class Reference

An active object used to start direct screen access. More...

#include <w32std.h>

Inheritance diagram for CDirectScreenAccess:
CActive CBase

Public Member Functions

 ~CDirectScreenAccess ()
 
IMPORT_C void StartL ()
 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.
 
CFbsBitGc * Gc ()
 Gets the graphics context for drawing to the screen.
 
CFbsScreenDevice *& ScreenDevice ()
 Gets the screen device to draw to.
 
RRegion * DrawingRegion ()
 Gets the clipping region to draw to.
 
- Public Member Functions inherited from CActive
IMPORT_C ~CActive ()
 Frees resources prior to destruction.
 
IMPORT_C void Cancel ()
 Cancels the wait for completion of an outstanding request.
 
IMPORT_C void Deque ()
 Removes the active object from the active scheduler's list of active objects.
 
IMPORT_C void SetPriority (TInt aPriority)
 Sets the priority of the active object.
 
TBool IsActive () const
 Determines whether the active object has a request outstanding.
 
TBool IsAdded () const
 Determines whether the active object has been added to the active scheduler's list of active objects.
 
TInt Priority () const
 Gets the priority of the active object.
 
- Public Member Functions inherited from CBase
 CBase ()
 Default constructor.
 
virtual IMPORT_C ~CBase ()
 Virtual destructor.
 
TAny * operator new (TUint aSize, TAny *aBase) __NO_THROW
 Initialises the object to binary zeroes.
 
TAny * operator new (TUint aSize) __NO_THROW
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 
TAny * operator new (TUint aSize, TLeave)
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 
TAny * operator new (TUint aSize, TUint aExtraSize) __NO_THROW
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 
TAny * operator new (TUint aSize, TLeave, TUint aExtraSize)
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 

Static Public Member Functions

static IMPORT_C CDirectScreenAccess * NewL (RWsSession &aWs, CWsScreenDevice &aScreenDevice, RWindowBase &aWin, MDirectScreenAccess &aAbort)
 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, TBool aRegionTrackingOnly)
 This is not supported in WSERV non NGA.
 
- Static Public Member Functions inherited from CBase
static IMPORT_C void Delete (CBase *aPtr)
 Deletes the specified object.
 

Additional Inherited Members

- Public Types inherited from CActive
enum  TPriority {
  EPriorityIdle =-100 , EPriorityLow =-20 , EPriorityStandard =0 , EPriorityUserInput =10 ,
  EPriorityHigh =20
}
 Defines standard priorities for active objects. More...
 
- Public Attributes inherited from CActive
TRequestStatus iStatus
 The request status associated with an asynchronous request.
 
- Protected Member Functions inherited from CActive
IMPORT_C CActive (TInt aPriority)
 Constructs the active object with the specified priority.
 
IMPORT_C void SetActive ()
 Indicates that the active object has issued a request and that it is now outstanding.
 
virtual IMPORT_C TInt RunError (TInt aError)
 Handles a leave occurring in the request completion event handler RunL().
 
virtual IMPORT_C TInt Extension_ (TUint aExtensionId, TAny *&a0, TAny *a1)
 Extension function.
 

Detailed Description

An active object used to start 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 may be 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.

The object's (private) RunL() function is called by the window server in order to abort direct screen access. This might occur when another window needs to be displayed in front or when the window with direct screen access is moved. The active object's priority is RDirectScreenAccess::EPriorityVeryHigh so that direct screen access will be aborted as quickly as possible.

API status
Published to all clients. Released API.

Definition at line 2722 of file w32std.h.

Constructor & Destructor Documentation

◆ ~CDirectScreenAccess()

CDirectScreenAccess::~CDirectScreenAccess ( )

Member Function Documentation

◆ DrawingRegion()

RRegion * CDirectScreenAccess::DrawingRegion ( )
inline

Gets the clipping region to draw to.

You must not draw outside of this region.

The clipping region is calculated when StartL() is called, and is only updated if StartL() is called again.

The region is specified in screen coordinates. This can be useful if you need to reapply the clipping region to the graphics context (CFbsBitGc::SetClippingRegion()).

Returns
The clipping region to draw to.

Definition at line 3187 of file w32std.h.

◆ Gc()

CFbsBitGc * CDirectScreenAccess::Gc ( )
inline

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.

Code built to run on the Emulator must call CFbsScreenDevice::Update() in order to see the results of drawing to this graphics context, but this may not be required on all target hardware.

Returns
The graphics context for drawing to the screen.

Definition at line 3163 of file w32std.h.

◆ NewL() [1/2]

static IMPORT_C CDirectScreenAccess * CDirectScreenAccess::NewL ( RWsSession &  aWs,
CWsScreenDevice &  aScreenDevice,
RWindowBase &  aWin,
MDirectScreenAccess &  aAbort 
)
static

Allocates and constructs the object and adds it to the current active scheduler.

This function always causes a flush of the window server buffer.

Parameters
aWsA session with the window server.
aScreenDeviceSpecifies the characteristics of the screen device to draw to.
aWinThe window to draw to directly.
aAbortDefines an AbortNow() and a Restart() function which are both called on aborting, as part of the RunL(). Restart() is called from an idle time active object (CIdle).

(generated from Symbian Developer Library)

◆ NewL() [2/2]

static IMPORT_C CDirectScreenAccess * CDirectScreenAccess::NewL ( RWsSession &  aWs,
CWsScreenDevice &  aScreenDevice,
RWindowBase &  aWin,
MDirectScreenAccess &  aAbort,
TBool  aRegionTrackingOnly 
)
static

This is not supported in WSERV non NGA.

It's available just when NGA is present.

(generated from Symbian Developer Library)

◆ ScreenDevice()

CFbsScreenDevice *& CDirectScreenAccess::ScreenDevice ( )
inline

Gets the screen device to draw to.

You should not use this screen device to create fonts because the object is deleted and recreated when direct screen access is aborted and restarted. Instead, create and use your own CFbsScreenDevice object to create fonts.

Returns
The target screen device.

Definition at line 3177 of file w32std.h.

◆ StartL()

IMPORT_C void CDirectScreenAccess::StartL ( )

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.

It should also be called to restart direct screen access after Cancel() has been called to stop it.

While the DSA is in operation, it is strongly advised that the client should not make any call to WSERV that will affect the visible area of the window in which the DSA is taking place.

When WSERV tells the client that it needs to abort its DSA, it waits to receive the acknowledgment from the client that it has done so. However, it doesn't wait for ever, since the client may have entered some long running calculation or even an infinite loop. So WSERV also waits on a timer: if the timer expires before the client acknowledges, then WSERV continues; if, later on, WSERV gets notification from the client that it has aborted the DSA, then WSERV will invalidate the region in which the DSA was taking place, just in case there had been a conflict between the DSA and another client.

This function always causes a flush of the window server buffer.

(generated from Symbian Developer Library)


The documentation for this class was generated from the following files: