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 voidConstructL()
IMPORT_C CHuiGc &Context()
IMPORT_C TIntGetTexture(TInt, const CHuiTexture *&)
IMPORT_C THuiSkinLocationLocation(THuiSkinElement)
IMPORT_C voidNotifyDisplaySizeChangedL()
IMPORT_C THuiSkinOrientationOrientation()
IMPORT_C voidReleaseTexture(TInt)
IMPORT_C voidRestoreTextureContentL(CHuiTexture &)
IMPORT_C voidSetContext(CHuiGc &)
IMPORT_C voidSkinConfigurationChanged(const TAknsSkinStatusConfigurationChangeReason)
IMPORT_C voidSkinContentChanged()
CAknsBasicBackgroundControlContext *SkinControlContext()
IMPORT_C voidSkinPackageChanged(const TAknsSkinStatusPackageChangeReason)
TRect SkinRect(const TAknsItemID &)
IMPORT_C TRgbStyleTextColor(THuiPreconfiguredTextStyle, THuiBackgroundType)
IMPORT_C const CHuiTexture &TextureL(TInt)
voidUpdateBackgroundsL(const RArray< THuiDisplayBackgroundItem > &)
Protected Member Functions
CHuiTexture *CreateSkinBackgroundL(const TAknsItemID &)
voidFreeBackgrounds()
voidReloadBgTexturesL()
IMPORT_C voidSkinExtension(const TUid &, TAny **)
MAknsSkinInstance *SkinInstance()
voidUpdateBackgroundL()
Private Member Functions
voidFreeAllBackgroundTextureResources()
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_CCHuiS60Skin(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 voidConstructL()

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()

voidFreeAllBackgroundTextureResources()[private]

FreeBackgrounds()

voidFreeBackgrounds()[protected]

GetTexture(TInt, const CHuiTexture *&)

IMPORT_C TIntGetTexture(TIntaSkinTextureResource,
const CHuiTexture *&aOutTexture
)

Parameters

TInt aSkinTextureResource
const CHuiTexture *& aOutTexture

Location(THuiSkinElement)

IMPORT_C THuiSkinLocationLocation(THuiSkinElementaElement)

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 aElementElement whose location to determine.

NotifyDisplaySizeChangedL()

IMPORT_C voidNotifyDisplaySizeChangedL()

From CHuiSkin. Notification received when display size has changed.

Orientation()

IMPORT_C THuiSkinOrientationOrientation()const

! From CHuiSkin.

ReleaseTexture(TInt)

IMPORT_C voidReleaseTexture(TIntaSkinTextureResource)

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

Parameters

TInt aSkinTextureResourceThe THuiSkinTextureResource skin texture ID to free.

ReloadBgTexturesL()

voidReloadBgTexturesL()[protected]

RestoreTextureContentL(CHuiTexture &)

IMPORT_C voidRestoreTextureContentL(CHuiTexture &aTexture)

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

Parameters

CHuiTexture & aTextureTexture 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 voidSetContext(CHuiGc &aGc)

Parameters

CHuiGc & aGc

SkinConfigurationChanged(const TAknsSkinStatusConfigurationChangeReason)

IMPORT_C voidSkinConfigurationChanged(const TAknsSkinStatusConfigurationChangeReasonaReason)[virtual]

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

Since
2.5

Parameters

const TAknsSkinStatusConfigurationChangeReason aReasonReason code.

SkinContentChanged()

IMPORT_C voidSkinContentChanged()[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 voidSkinExtension(const TUid &aExtensionUid,
TAny **aExtensionParameters
)[protected]

Parameters

const TUid & aExtensionUid
TAny ** aExtensionParameters

SkinInstance()

MAknsSkinInstance *SkinInstance()const [protected]

SkinPackageChanged(const TAknsSkinStatusPackageChangeReason)

IMPORT_C voidSkinPackageChanged(const TAknsSkinStatusPackageChangeReasonaReason)[virtual]

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

Since
2.5

Parameters

const TAknsSkinStatusPackageChangeReason aReasonReason code.

SkinRect(const TAknsItemID &)

TRect SkinRect(const TAknsItemID &aID)

Parameters

const TAknsItemID & aID

StyleTextColor(THuiPreconfiguredTextStyle, THuiBackgroundType)

IMPORT_C TRgbStyleTextColor(THuiPreconfiguredTextStyleaStyle,
THuiBackgroundTypeaBackgroundType
)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 aStyleThe text style that is being used.
THuiBackgroundType aBackgroundTypeThe background type that is currently under the text.

TextureL(TInt)

IMPORT_C const CHuiTexture &TextureL(TIntaSkinTextureId)

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

Parameters

TInt aSkinTextureId

UpdateBackgroundL()

voidUpdateBackgroundL()[protected]

Copies the S60 skin background bitmap onto a texture.

UpdateBackgroundsL(const RArray< THuiDisplayBackgroundItem > &)

voidUpdateBackgroundsL(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]