EPOC   SDK Home Glossary Indexes Previous Next Up

RWsSession class


RWsSession class — Window server session

Section Contents

The following functions are new in EPOC Release 5. For complete documentation of the RWsSession class, see The RWsSession class.


GetDefModeMaxNumColors() — Retrieve the device's colour capabilities

TDisplayMode GetDefModeMaxNumColors(TInt& aColor,TInt& aGray);

Compatibility

Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.

Description

Retrieves the device's colour capabilities. On return, aColor and aGray are set to contain the number of colours that are available in the richest colour display mode supported by the device and the number of greys available in the richest greyscale display mode, respectively. The function's return value is the display mode in which windows are created by default.

Arguments

TInt& aColor

On return, contains the number of colours that are available in the richest colour display mode supported by the device.

TInt& aGray

On return, contains the the number of greys available in the richest greyscale display mode.

Return value

TDisplayMode

The device's default display mode.


GetColorModeList() — Get list of supported display modes

TInt GetColorModeList(CArrayFixFlat<TInt> *aModeList);

Compatibility

Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.

Description

Retrieves a list of the display modes available on the device, both colour and greyscale.

The function can only fail if the aModeList array needs to be expanded, thus if you pass in an array whose size is equal to the maximum number of display modes over all hardware then this function cannot cause a leave. Currently there is a maximum of 9 display modes, which is the number of TDisplayMode values which represent display modes.

Arguments

CArrayFixFlat<TInt> *aModeList

On return, set to contain an array of TInts, representing the display modes available, as enumerated in the GDI's TDisplayMode type. The contents of the array passed in will be deleted.

Return value

TInt

An error code, which can either be KErrNone or KErrNoMemory, (so this function should usually be called within User::LeaveIfError()).

EPOC       SDK Home Glossary Indexes Previous Next Up