MWsUiBuffer Class Reference

class MWsUiBuffer : public MWsObjectProvider

This class provides direct access to the memory of the UI buffer.

This interface is to be used by CRPs that don't want to go through MWsGraphicsContext to handle their rendering, but want direct memory access.

Inherits from

Member Functions Documentation

DECLARE_WS_TYPE_ID(KMWsUiBufferInterfaceId)

DECLARE_WS_TYPE_ID ( KMWsUiBufferInterfaceId )

Finishes pending rendering to the buffer and temporarily makes the pixel data of the buffer image accessible for reading and writing by the CPU.

When finished with the pixel data, the caller must end the mapping by calling Unmap() .

This method should only be called from the context of CWsGraphicDrawer::Draw() . Unmap()

Parameters

KMWsUiBufferInterfaceId

MapWriteOnly(TAny *&, TInt &)

TInt MapWriteOnly ( TAny *& aDataAddress,
TInt & aDataStride
) [pure virtual]

Finishes pending rendering to the buffer and temporarily makes the pixel data of the buffer image accessible for writing by the CPU.

When finished with the pixel data, the caller must end the mapping by calling Unmap() .

This method should only be called from the context of CWsGraphicDrawer::Draw() . Unmap()

Parameters

TAny *& aDataAddress On return, the base address of the pixel data in the address space of the calling process
TInt & aDataStride On return, the number of bytes between rows of the pixel data

PixelFormat()

TUidPixelFormat PixelFormat ( ) const [pure virtual]

Gets the pixel format of the buffer.

SizeInPixels()

TSize SizeInPixels ( ) const [pure virtual]

Gets the current size of the buffer.

The actual size of the whole buffer might be larger than the returned value depending on the current screen mode. However, it is the size returned by this method that should be used when accessing the pixel data.

Unmap()

TInt Unmap ( ) [pure virtual]

Makes the pixel data of an image no longer accessible to the CPU.

Before calling this method the buffer must be mapped for CPU access by a previous call to MapReadWrite() or MapWriteOnly() .

This method should only be called from the context of CWsGraphicDrawer::Draw() . MapReadWrite() MapWriteOnly()