CHuiS60Skin Class Reference

class CHuiS60Skin : public MAknsSkinChangeObserver

An S60 skin implementation. Uses bitmaps, fonts, and layout from the currently active S60 skin.

Inherits from

Nested Classes and Structures

Public Member Functions
CHuiS60Skin (CHuiEnv &)
~CHuiS60Skin ()
IMPORT_C CHuiTexture * BackgroundTexture (const TAknsItemID &)
IMPORT_C void ConstructL ()
IMPORT_C CHuiGc & Context ()
IMPORT_C TInt GetTexture ( TInt , const CHuiTexture *&)
IMPORT_C THuiSkinLocation Location ( THuiSkinElement )
IMPORT_C void NotifyDisplaySizeChangedL ()
IMPORT_C THuiSkinOrientation Orientation ()
IMPORT_C void ReleaseTexture ( TInt )
IMPORT_C void RestoreTextureContentL ( CHuiTexture &)
IMPORT_C void SetContext ( CHuiGc &)
IMPORT_C void SkinConfigurationChanged (const TAknsSkinStatusConfigurationChangeReason )
IMPORT_C void SkinContentChanged ()
CAknsBasicBackgroundControlContext * SkinControlContext ()
IMPORT_C void SkinPackageChanged (const TAknsSkinStatusPackageChangeReason )
TRect SkinRect (const TAknsItemID &)
IMPORT_C TRgb StyleTextColor ( THuiPreconfiguredTextStyle , THuiBackgroundType )
IMPORT_C const CHuiTexture & TextureL ( TInt )
void UpdateBackgroundsL (const RArray < THuiDisplayBackgroundItem > &)
Protected Member Functions
CHuiTexture * CreateSkinBackgroundL (const TAknsItemID &)
void FreeBackgrounds ()
void ReloadBgTexturesL ()
IMPORT_C void SkinExtension (const TUid &, TAny **)
MAknsSkinInstance * SkinInstance ()
void UpdateBackgroundL ()
Private Member Functions
void FreeAllBackgroundTextureResources ()
CFbsBitmap * SearchCachedSkinItemBitmap (const TAknsItemID &)
TInt SearchCachedSkinItemIndex (const TAknsItemID &)
TRect SearchCachedSkinItemRect (const TAknsItemID &)
Inherited Functions
MAknsSkinChangeObserver::FlushLocalCaches()
Private Attributes
CFbsBitmap * iBackgroundBitmap
TRect iBackgroundRect
CHuiTexture * iBackgroundTexture
RPointerArray < CSkinItem > iCachedSkinItems
TBool iReloadBackground
CAknsBasicBackgroundControlContext * iSkinControlContext
TBool iSkinSrvConnected
RAknsSrvSession iSkinSrvSession
TAny * iSpare

Constructor & Destructor Documentation

CHuiS60Skin(CHuiEnv &)

IMPORT_C CHuiS60Skin ( CHuiEnv & aEnv )

Constructor.

Parameters

CHuiEnv & aEnv

~CHuiS60Skin()

IMPORT_C ~CHuiS60Skin ( )

Destructor.

Member Functions Documentation

BackgroundTexture(const TAknsItemID &)

IMPORT_C CHuiTexture * BackgroundTexture ( const TAknsItemID & aID )

Parameters

const TAknsItemID & aID

ConstructL()

IMPORT_C void ConstructL ( )

From CHuiSkin. Second-phase constructor.

Context()

IMPORT_C CHuiGc & Context ( ) const

CreateSkinBackgroundL(const TAknsItemID &)

CHuiTexture * CreateSkinBackgroundL ( const TAknsItemID & aID ) [protected]

Parameters

const TAknsItemID & aID

FreeAllBackgroundTextureResources()

void FreeAllBackgroundTextureResources ( ) [private]

FreeBackgrounds()

void FreeBackgrounds ( ) [protected]

GetTexture(TInt, const CHuiTexture *&)

IMPORT_C TInt GetTexture ( TInt aSkinTextureResource,
const CHuiTexture *& aOutTexture
)

Parameters

TInt aSkinTextureResource
const CHuiTexture *& aOutTexture

Location(THuiSkinElement)

IMPORT_C THuiSkinLocation Location ( THuiSkinElement aElement )

From CHuiSkin. Determines the preferred location for an element of the skin. The location of skin elements is determined with Avkon layout utilities.

Parameters

THuiSkinElement aElement Element whose location to determine.

NotifyDisplaySizeChangedL()

IMPORT_C void NotifyDisplaySizeChangedL ( )

From CHuiSkin. Notification received when display size has changed.

Orientation()

IMPORT_C THuiSkinOrientation Orientation ( ) const

! From CHuiSkin.

ReleaseTexture(TInt)

IMPORT_C void ReleaseTexture ( TInt aSkinTextureResource )

From CHuiSkin. Release a skin texture. Will free up the given texture used by the skin.

Parameters

TInt aSkinTextureResource The THuiSkinTextureResource skin texture ID to free.

ReloadBgTexturesL()

void ReloadBgTexturesL ( ) [protected]

RestoreTextureContentL(CHuiTexture &)

IMPORT_C void RestoreTextureContentL ( CHuiTexture & aTexture )

From CHuiSkin. Restore content of texture. Restore content of the given texture.

Parameters

CHuiTexture & aTexture Texture to restore the content of.

SearchCachedSkinItemBitmap(const TAknsItemID &)

CFbsBitmap * SearchCachedSkinItemBitmap ( const TAknsItemID & aId ) [private]

Parameters

const TAknsItemID & aId

SearchCachedSkinItemIndex(const TAknsItemID &)

TInt SearchCachedSkinItemIndex ( const TAknsItemID & aId ) [private]

Parameters

const TAknsItemID & aId

SearchCachedSkinItemRect(const TAknsItemID &)

TRect SearchCachedSkinItemRect ( const TAknsItemID & aId ) [private]

Parameters

const TAknsItemID & aId

SetContext(CHuiGc &)

IMPORT_C void SetContext ( CHuiGc & aGc )

Parameters

CHuiGc & aGc

SkinConfigurationChanged(const TAknsSkinStatusConfigurationChangeReason)

IMPORT_C void SkinConfigurationChanged ( const TAknsSkinStatusConfigurationChangeReason aReason ) [virtual]

Called by the skin server to indicate that the current skin configuration has changed.

Since
2.5

Parameters

const TAknsSkinStatusConfigurationChangeReason aReason Reason code.

SkinContentChanged()

IMPORT_C void SkinContentChanged ( ) [virtual]

Called by the skin server when skin content is changed and the connected client wants to be informed.

Since
2.0

SkinControlContext()

CAknsBasicBackgroundControlContext * SkinControlContext ( ) const [inline]

Return the skin control context.

SkinExtension(const TUid &, TAny **)

IMPORT_C void SkinExtension ( const TUid & aExtensionUid,
TAny ** aExtensionParameters
) [protected]

Parameters

const TUid & aExtensionUid
TAny ** aExtensionParameters

SkinInstance()

MAknsSkinInstance * SkinInstance ( ) const [protected]

SkinPackageChanged(const TAknsSkinStatusPackageChangeReason)

IMPORT_C void SkinPackageChanged ( const TAknsSkinStatusPackageChangeReason aReason ) [virtual]

Called by the skin server to indicate that the available skin packages have changed.

Since
2.5

Parameters

const TAknsSkinStatusPackageChangeReason aReason Reason code.

SkinRect(const TAknsItemID &)

TRect SkinRect ( const TAknsItemID & aID )

Parameters

const TAknsItemID & aID

StyleTextColor(THuiPreconfiguredTextStyle, THuiBackgroundType)

IMPORT_C TRgb StyleTextColor ( THuiPreconfiguredTextStyle aStyle,
THuiBackgroundType aBackgroundType
) const

From CHuiSkin. Get text color based on style and background. Determines the colour to use for text, based on the current text style and the background type.

Parameters

THuiPreconfiguredTextStyle aStyle The text style that is being used.
THuiBackgroundType aBackgroundType The background type that is currently under the text.

TextureL(TInt)

IMPORT_C const CHuiTexture & TextureL ( TInt aSkinTextureId )

From CHuiSkin. Returns a Series60 theme specific background image when parameter EHuiSkinBackgroundTexture is specified.

Parameters

TInt aSkinTextureId

UpdateBackgroundL()

void UpdateBackgroundL ( ) [protected]

Copies the S60 skin background bitmap onto a texture.

UpdateBackgroundsL(const RArray< THuiDisplayBackgroundItem > &)

void UpdateBackgroundsL ( const RArray < THuiDisplayBackgroundItem > & aItems )

Parameters

const RArray < THuiDisplayBackgroundItem > & aItems

Member Data Documentation

CFbsBitmap * iBackgroundBitmap

CFbsBitmap * iBackgroundBitmap [private]

TRect iBackgroundRect

TRect iBackgroundRect [private]

CHuiTexture * iBackgroundTexture

CHuiTexture * iBackgroundTexture [private]

Background texture from S60.

RPointerArray< CSkinItem > iCachedSkinItems

RPointerArray < CSkinItem > iCachedSkinItems [private]

TBool iReloadBackground

TBool iReloadBackground [private]

Background should be reloaded the next time it is needed.

CAknsBasicBackgroundControlContext * iSkinControlContext

CAknsBasicBackgroundControlContext * iSkinControlContext [private]

Control context for the skin.

TBool iSkinSrvConnected

TBool iSkinSrvConnected [private]

RAknsSrvSession iSkinSrvSession

RAknsSrvSession iSkinSrvSession [private]

To get CallBack from SkinServer when skin is changed

TAny * iSpare

TAny * iSpare [private]