uiaccelerator_plat/alf_core_toolkit_api/inc/uiacceltk/HuiS60Skin.h
branchRCL_3
changeset 3 d8a3531bc6b8
parent 0 15bf7259bb7c
child 6 10534483575f
equal deleted inserted replaced
0:15bf7259bb7c 3:d8a3531bc6b8
    55 	 */
    55 	 */
    56 	IMPORT_C ~CHuiS60Skin();
    56 	IMPORT_C ~CHuiS60Skin();
    57 
    57 
    58 
    58 
    59 	/* Methods from MAknsSkinChangeObserver */
    59 	/* Methods from MAknsSkinChangeObserver */
    60 	  void SkinContentChanged();
    60 	IMPORT_C void SkinContentChanged();
    61 
    61 
    62 	  void SkinConfigurationChanged(
    62 	IMPORT_C void SkinConfigurationChanged(
    63 	          const TAknsSkinStatusConfigurationChangeReason aReason );
    63 	          const TAknsSkinStatusConfigurationChangeReason aReason );
    64 	  
    64 	  
    65 	  void SkinPackageChanged(
    65 	IMPORT_C void SkinPackageChanged(
    66 	         const TAknsSkinStatusPackageChangeReason aReason );
    66 	         const TAknsSkinStatusPackageChangeReason aReason );
    67 public:
    67 public:
    68 
    68 
    69     /**
    69     /**
    70 	 * From CHuiSkin. Determines the preferred location for an element of the skin.
    70 	 * From CHuiSkin. Determines the preferred location for an element of the skin.
   125 	{
   125 	{
   126 		return iSkinControlContext;
   126 		return iSkinControlContext;
   127 	}
   127 	}
   128     void UpdateBackgroundsL(const RArray<THuiDisplayBackgroundItem>& aItems);
   128     void UpdateBackgroundsL(const RArray<THuiDisplayBackgroundItem>& aItems);
   129     IMPORT_C CHuiTexture* BackgroundTexture(const TAknsItemID& aID);
   129     IMPORT_C CHuiTexture* BackgroundTexture(const TAknsItemID& aID);
       
   130     
       
   131     TRect SkinRect(const TAknsItemID& aID);
       
   132     
   130 protected: // from CHuiSkin
   133 protected: // from CHuiSkin
   131     IMPORT_C void SkinExtension(const TUid& aExtensionUid, TAny** aExtensionParameters);
   134     IMPORT_C void SkinExtension(const TUid& aExtensionUid, TAny** aExtensionParameters);
   132     void FreeBackgrounds();
   135     void FreeBackgrounds();
   133     CHuiTexture* CreateSkinBackgroundL(const TAknsItemID& aID);
   136     CHuiTexture* CreateSkinBackgroundL(const TAknsItemID& aID);
   134     void ReloadBgTexturesL();
   137     void ReloadBgTexturesL();
   141     /**
   144     /**
   142      * Copies the S60 skin background bitmap onto a texture.
   145      * Copies the S60 skin background bitmap onto a texture.
   143      */
   146      */
   144     void UpdateBackgroundL();
   147     void UpdateBackgroundL();
   145 
   148 
       
   149 
   146 private:
   150 private:
   147 
   151 
   148     /** Control context for the skin. */
   152     /** Control context for the skin. */
   149     CAknsBasicBackgroundControlContext* iSkinControlContext;
   153     CAknsBasicBackgroundControlContext* iSkinControlContext;
   150 
   154 
   151     /** Background texture from S60. */
   155     /** Background texture from S60. */
   152     CHuiTexture* iBackgroundTexture;
   156     CHuiTexture* iBackgroundTexture;
       
   157     CFbsBitmap* iBackgroundBitmap;
       
   158     TRect iBackgroundRect;
   153 
   159 
   154     /** To get CallBack from SkinServer when skin is changed */
   160     /** To get CallBack from SkinServer when skin is changed */
   155     RAknsSrvSession iSkinSrvSession;
   161     RAknsSrvSession iSkinSrvSession;
   156     TBool iSkinSrvConnected;
   162     TBool iSkinSrvConnected;
   157      
   163      
   158     /** Background should be reloaded the next time it is needed. */
   164     /** Background should be reloaded the next time it is needed. */
   159     TBool iReloadBackground;
   165     TBool iReloadBackground;
   160     TBool iSkinChanged;
   166     TBool iSkinChanged;
   161     CFbsBitmap* iBackgroundBitmap;
   167 
       
   168     class CSkinItem : public CBase
       
   169         {
       
   170         public :
       
   171         
       
   172         ~CSkinItem()
       
   173             {
       
   174             delete iBitmap;
       
   175             };
       
   176         TAknsItemID iId;
       
   177         TRect iSkinRect;
       
   178         CFbsBitmap* iBitmap;
       
   179         };
       
   180     RPointerArray<CSkinItem> iCachedSkinItems;
       
   181     
   162     TAny* iSpare;    
   182     TAny* iSpare;    
   163     };
   183 
       
   184 private: // helpers
       
   185     
       
   186     TInt SearchCachedSkinItemIndex(const TAknsItemID& aId);
       
   187     TRect SearchCachedSkinItemRect(const TAknsItemID& aId);
       
   188     CFbsBitmap* SearchCachedSkinItemBitmap(const TAknsItemID& aId);
       
   189 	};
       
   190 
   164 
   191 
   165 #endif  // __HUIS60SKIN_H__
   192 #endif  // __HUIS60SKIN_H__