MAlfBitmapProvider Class Reference

class MAlfBitmapProvider

MAlfBitmapProvider is an interface that provides a bitmap and its alpha mask when requested.

By storing MAlfBitmapProviders in the CAlfTextureManager we can delete and regenerate the textures used by the toolkit as needed - enabling improved use of memory resource, such as when the application goes to background. In this case, when we want to restore all the textures, we may just recall the providers to reload the textures.

Typically, control classes would implement the ProvideBitmapL method of this class, which would handle all the loading or generation needed to produce the bitmaps stored by the TextureManager.

A provider should exist as long as the associated texture is stored within the texture manager.

Public Member Functions
~MAlfBitmapProvider()
voidProvideBitmapL(TInt, CFbsBitmap *&, CFbsBitmap *&)

Constructor & Destructor Documentation

~MAlfBitmapProvider()

~MAlfBitmapProvider()[inline, virtual]

Member Functions Documentation

ProvideBitmapL(TInt, CFbsBitmap *&, CFbsBitmap *&)

voidProvideBitmapL(TIntaId,
CFbsBitmap *&aBitmap,
CFbsBitmap *&aMaskBitmap
)[pure virtual]

Provide a bitmap and mask from the given UID. This method should create a bitmap and its mask, usually by loading it from disk.

CAlfTextureManager::CreateTextureL()

Parameters

TInt aIdTextureManager id of this bitmap, may be used for extracting an icon resource.
CFbsBitmap *& aBitmapOutput parameter for the provider: On return, has to store a pointer to the generated bitmap. Ownership transferred to caller. The support for input CFbsBitmap formats varies between different renderers. See cfbsbitmapsupport Table describing renderer bitmap support.
CFbsBitmap *& aMaskBitmapOutput parameter for the provider: On return, has to store a pointer to the generated alpha mask or NULL if there is no mask. Ownership of the bitmap is transferred to the caller.