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

The interface between an application that directly accesses the screen and the window server. More...

#include <w32std.h>

Inheritance diagram for RDirectScreenAccess:
MWsClientClass

Public Types

enum  TTerminationReasons { ETerminateCancel , ETerminateRegion , ETerminateScreenMode , ETerminateRotation }
 Provides the reason why direct screen access must terminate. More...
 
enum  TPriority { EPriorityVeryHigh =2000 }
 The priority of the active object that responds to notification that direct screen access must stop. More...
 

Public Member Functions

IMPORT_C RDirectScreenAccess ()
 Default constructor.
 
IMPORT_C RDirectScreenAccess (RWsSession &aWs)
 C++ constructor with a connected window server session.
 
IMPORT_C TInt Construct ()
 Second phase constructor.
 
IMPORT_C TInt Construct (TBool aRegionTrackingOnly)
 Second phase constructor.
 
IMPORT_C TInt Request (RRegion *&aRegion, TRequestStatus &aStatus, const RWindowBase &aWindow)
 Issues a request to the window server for permission to perform direct screen access on a window.
 
IMPORT_C void Completed ()
 Indicates to the window server that you have responded to the completion of the request status passed to Request(), by stopping direct screen access.
 
IMPORT_C void Cancel ()
 Indicates to the window server that you have finished performing direct screen access.
 
IMPORT_C void Close ()
 Calls Completed() then deletes the server side resource and sets the client's handle to it to NULL.
 
- Public Member Functions inherited from MWsClientClass
 MWsClientClass ()
 
 MWsClientClass (RWsBuffer *aBuffer)
 
TInt WsHandle () const
 Gets the server side handle for the object.
 

Additional Inherited Members

- Protected Member Functions inherited from MWsClientClass
void Write (const TAny *aData1, TInt aLength1, TInt aLength2, TUint aOpcode) const
 
void Write (const TAny *aData, TInt aLength, const TAny *aData2, TInt aLength2, TUint aOpcode, const TIpcArgs *aIpcArgs=NULL) const
 
void Write (const TAny *aBuf, TInt aBufLen, TUint aOpcode, const TIpcArgs *aIpcArgs=NULL) const
 
void Write (TUint aOpcode) const
 
void WriteInt (TInt aInt, TUint aOpcode) const
 
void WriteRect (const TRect &aRect, TUint aOpcode) const
 
void WritePoint (const TPoint &aPoint, TUint aOpcode) const
 
void WriteSize (const TSize &aSize, TUint aOpcode) const
 
TInt WriteReply (TUint aOpcode, const TIpcArgs *aIpcArgs=NULL) const
 
TInt WriteReplyInt (TInt aInt, TUint aOpcode, const TIpcArgs *aIpcArgs=NULL) const
 
TInt WriteReply (const TAny *aBuf, TInt aBufLen, TUint aOpcode, const TIpcArgs *aIpcArgs=NULL) const
 
TInt WriteReply (const TAny *aBuf, TInt aBufLen, const TAny *aBuf2, TInt aBuflen2, TUint aOpcode, const TIpcArgs *aIpcArgs=NULL) const
 
TInt WriteReplyP (const TWriteDescriptorType &aReplyPackage, TUint aOpcode) const
 
TInt WriteReplyIntP (TInt aInt, const TWriteDescriptorType &aReplyPackage, TUint aOpcode) const
 
TInt WriteReplyP (const TAny *aBuf, TInt aBufLen, const TWriteDescriptorType &aReplyPackage, TUint aOpcode) const
 
TInt WriteReplyP (const TAny *aBuf, TInt aBufLen, const TAny *aBuf2, TInt aBuflen2, const TWriteDescriptorType &aReplyPackage, TUint aOpcode) const
 
TInt WriteReplyByProvidingRemoteReadAccess (const TAny *aBuf, TInt aBufLen, const TReadDescriptorType &aRemoteReadBuffer, TUint aOpcode) const
 
void AddToBitmapArray (const TInt aBitmapHandle) const
 
void AsyncRequest (TRequestStatus &aStatus, TUint aOpcode) const
 
TBool WindowSizeCacheEnabled () const
 
void MarkWindowSizeCacheDirty ()
 
void RefreshWindowSizeCache (const TSize &aNewSize) const
 
TInt CachedWindowSize (TSize &aSize) const
 
void DestroyWindowSizeCacheEntry ()
 
- Protected Attributes inherited from MWsClientClass
TInt32 iWsHandle
 WARNING: Member variable for internal use ONLY.
 
RWsBuffer * iBuffer
 WARNING: Member variable for internal use ONLY.
 

Detailed Description

The interface between an application that directly accesses the screen and the window server.

Note that most applications that need to access the screen directly should use CDirectScreenAccess instead. RDirectScreenAccess only needs to be used directly by applications without access to an active scheduler.

API status
Published to all clients. Released API.

Definition at line 2595 of file w32std.h.

Member Enumeration Documentation

◆ TPriority

The priority of the active object that responds to notification that direct screen access must stop.

Enumerator
EPriorityVeryHigh 

A suggested value for the priority of the active object that responds to notification from the window server that direct screen access must stop.

This is also the value used by CDirectScreenAccess for this purpose.

Definition at line 2633 of file w32std.h.

◆ TTerminationReasons

Provides the reason why direct screen access must terminate.

This enum is used in the MAbortDirectScreenAccess::AbortNow() and MDirectScreenAccess::Restart() functions.

The first value (ETerminateCancel) indicates that direct screen access is being terminated by the application. The final three values indicate that direct screen access is being terminated by the window server. Note that for users of CDirectScreenAccess, the termination code is not important because these issues are dealt with by CDirectScreenAccess::StartL().

Enumerator
ETerminateCancel 

The application has finished direct screen access.

ETerminateRegion 

A window is about to come in front of a part of the area that is being used for direct screen access.

ETerminateScreenMode 

The screen's color depth (as enumerated by TDisplayMode) is about to change.

ETerminateRotation 

The current screen mode (the combination of screen rotation and screen size) is about to change.

Definition at line 2618 of file w32std.h.

Constructor & Destructor Documentation

◆ RDirectScreenAccess() [1/2]

IMPORT_C RDirectScreenAccess::RDirectScreenAccess ( )

Default constructor.

Developers should use the other constructor overload instead.

(generated from Symbian Developer Library)

◆ RDirectScreenAccess() [2/2]

IMPORT_C RDirectScreenAccess::RDirectScreenAccess ( RWsSession &  aWs)

C++ constructor with a connected window server session.

Construct() must be called to complete construction.

Parameters
aWsConnected session with the window server.

(generated from Symbian Developer Library)

Member Function Documentation

◆ Cancel()

IMPORT_C void RDirectScreenAccess::Cancel ( )

Indicates to the window server that you have finished performing direct screen access.

(generated from Symbian Developer Library)

◆ Close()

IMPORT_C void RDirectScreenAccess::Close ( )

Calls Completed() then deletes the server side resource and sets the client's handle to it to NULL.

(generated from Symbian Developer Library)

◆ Completed()

IMPORT_C void RDirectScreenAccess::Completed ( )

Indicates to the window server that you have responded to the completion of the request status passed to Request(), by stopping direct screen access.

(generated from Symbian Developer Library)

◆ Construct() [1/2]

IMPORT_C TInt RDirectScreenAccess::Construct ( )

Second phase constructor.

Creates the server side resource and initialises the client's handle to it.

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

Panic condition: TW32Panic 17 in debug builds if called on an already constructed object.

(generated from Symbian Developer Library)

◆ Construct() [2/2]

IMPORT_C TInt RDirectScreenAccess::Construct ( TBool  aRegionTrackingOnly)

Second phase constructor.

This is not supported in WSERV non NGA. It's available just when NGA is present.

(generated from Symbian Developer Library)

◆ Request()

IMPORT_C TInt RDirectScreenAccess::Request ( RRegion *&  aRegion,
TRequestStatus &  aStatus,
const RWindowBase &  aWindow 
)

Issues a request to the window server for permission to perform direct screen access on a window.

Direct access to the screen may be refused due to lack of memory or if the target window is completely obscured.

If direct access is allowed, the function passes back a clipping region which is the part of the screen the caller can draw to.

When direct screen access must stop, for instance because a dialog is to be displayed in front of the region where direct screen access is taking place, the window server completes the request. The recommended way to check for this is for aStatus to be the request status of an active object that will be run when the request completes, i.e. if Request() returns KErrNone, call SetActive(), and in the object's RunL(), you should immediately abort direct screen access.

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.

Parameters
aRegionOn return, the clipping region that the caller can draw to. NULL if the function was not successful. If the target window is invisible or completely covered by other windows then the region will be empty.
aStatusA request status that is set to a completion code by the window server when direct screen access must stop.
aWindowThe window that you want to perform the direct screen access on. There must not already be direct access on this window or a panic occurs.

(generated from Symbian Developer Library)


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