40 * Background manager. |
40 * Background manager. |
41 * |
41 * |
42 * @since S60 v5.0 |
42 * @since S60 v5.0 |
43 */ |
43 */ |
44 NONSHARABLE_CLASS( CXnBackgroundManager ) : public CCoeControl, |
44 NONSHARABLE_CLASS( CXnBackgroundManager ) : public CCoeControl, |
45 public MAknsSkinChangeObserver, public MCoeViewActivationObserver, |
45 public MAknsSkinChangeObserver, public MDiskNotifyHandlerCallback |
46 public MDiskNotifyHandlerCallback |
|
47 { |
46 { |
48 public: |
47 public: |
49 |
48 |
50 /** |
49 /** |
51 * Two-phased constructor. |
50 * Two-phased constructor. |
62 /** |
61 /** |
63 * Caches wallpaper image. |
62 * Caches wallpaper image. |
64 * |
63 * |
65 * @since S60 5.0 |
64 * @since S60 5.0 |
66 * @param aFileName WallpaperImage image path and filename to be cached |
65 * @param aFileName WallpaperImage image path and filename to be cached |
|
66 * @param aViewData Page that owns the given wallpaper. |
67 * @return Error code. |
67 * @return Error code. |
68 */ |
68 */ |
69 TInt CacheWallpaperL( const TDesC& aFileName, CXnViewData& aViewData ); |
69 TInt CacheWallpaperL( const TDesC& aFileName, CXnViewData& aViewData ); |
70 |
70 |
71 /** |
71 /** |
72 * Changes wallpaper image of the current page. |
72 * Changes wallpaper image of the current page. |
73 * |
73 * |
74 * @since S60 5.0 |
74 * @since S60 5.0 |
75 * @param aFileName WallpaperImage image path and filename |
75 * @param aFileName WallpaperImage image path and filename |
|
76 * @return Error code. |
76 */ |
77 */ |
77 void AddWallpaperL( const TDesC& aFileName ); |
78 TInt AddWallpaperL( const TDesC& aFileName ); |
|
79 |
|
80 /** |
|
81 * Deletes wallpaper from the given page as well as from the cache. |
|
82 * |
|
83 * @since S60 5.0 |
|
84 * @param aViewData Page where the wallpaper is to be destroyed. |
|
85 */ |
|
86 void DeleteWallpaper( CXnViewData& aViewData ); |
78 |
87 |
79 /** |
88 /** |
80 * Checks whether page specific wallpaper feature is activated or not. |
89 * Checks whether page specific wallpaper feature is activated or not. |
81 * |
90 * |
82 * @since S60 5.0 |
91 * @since S60 5.0 |
96 * @since S60 5.0 |
105 * @since S60 5.0 |
97 * @param aOldView Old view |
106 * @param aOldView Old view |
98 * @param aNewView New view |
107 * @param aNewView New view |
99 */ |
108 */ |
100 void WallpaperChanged( CXnViewData& aOldView, CXnViewData& aNewView ); |
109 void WallpaperChanged( CXnViewData& aOldView, CXnViewData& aNewView ); |
101 |
110 |
|
111 public: // Functions from base classes |
|
112 |
|
113 /** |
|
114 * @see CCoeControl |
|
115 */ |
|
116 void MakeVisible( TBool aVisible ); |
|
117 |
102 private: // Functions from base classes |
118 private: // Functions from base classes |
103 |
119 |
104 /** |
120 /** |
105 * see CCoeControl |
121 * see CCoeControl |
106 */ |
122 */ |
125 /** |
141 /** |
126 * see MAknsSkinChangeObserver |
142 * see MAknsSkinChangeObserver |
127 */ |
143 */ |
128 void SkinPackageChanged( |
144 void SkinPackageChanged( |
129 const TAknsSkinStatusPackageChangeReason aReason ); |
145 const TAknsSkinStatusPackageChangeReason aReason ); |
130 |
|
131 /** |
|
132 * @see MCoeViewActivationObserver |
|
133 */ |
|
134 void HandleViewActivation( const TVwsViewId& aNewlyActivatedViewId, |
|
135 const TVwsViewId& aViewIdToBeDeactivated ); |
|
136 |
146 |
137 /** |
147 /** |
138 * From MDiskNotifyHandlerCallback. |
148 * From MDiskNotifyHandlerCallback. |
139 */ |
149 */ |
140 void HandleNotifyDisk( TInt aError, const TDiskEvent& aEvent ); |
150 void HandleNotifyDisk( TInt aError, const TDiskEvent& aEvent ); |
141 |
151 |
142 private: |
152 private: |
143 |
153 |
144 /** |
154 /** |
145 * C++ default constructor. |
155 * C++ default constructor. |
146 */ |
156 */ |
155 TInt SetSettingPropertyL( const TDesC8& aPluginId, const TDesC8& aItemId, |
165 TInt SetSettingPropertyL( const TDesC8& aPluginId, const TDesC8& aItemId, |
156 const TDesC8& aPropertyName, const TDesC8& aPropertyValue ); |
166 const TDesC8& aPropertyName, const TDesC8& aPropertyValue ); |
157 void UpdateWallpapersL(); |
167 void UpdateWallpapersL(); |
158 void CleanCache(); |
168 void CleanCache(); |
159 void RemoveWallpaperL( CXnViewData& aViewData ); |
169 void RemoveWallpaperL( CXnViewData& aViewData ); |
160 void RemoveWallpaperFromCache( const TDesC& aFileName ); |
170 void RemoveWallpaperFromCache( const TDesC& aFileName, CXnViewData* aViewData = NULL ); |
161 void RemovableDiskInsertedL(); |
171 void RemovableDiskInsertedL(); |
162 void CheckFeatureTypeL(); |
172 void CheckFeatureTypeL(); |
163 void AddPageSpecificWallpaperL( const TDesC& aFileName ); |
173 TInt AddPageSpecificWallpaperL( const TDesC& aFileName ); |
164 void AddCommonWallpaperL( const TDesC& aFileName, TBool aSave = ETrue ); |
174 TInt AddCommonWallpaperL( const TDesC& aFileName, TBool aSave = ETrue ); |
165 void ReadWallpaperFromCenrepL(); |
175 void ReadWallpaperFromCenrepL(); |
|
176 void UpdateScreen(); |
166 |
177 |
167 private: // data |
178 private: // data |
168 |
179 |
169 /** |
180 /** |
170 * Provides needed services |
181 * Provides needed services |
213 |
224 |
214 /** |
225 /** |
215 * Internal wallpaper update in progress |
226 * Internal wallpaper update in progress |
216 */ |
227 */ |
217 TInt iIntUpdate; |
228 TInt iIntUpdate; |
218 |
229 |
219 /** |
230 /** |
220 * States whether transparent CBA and status pane is used. |
231 * True if screen needs to be drawn when view becomes visible. |
221 * Homescreen uses transparency, but e.g. Widget catalog does not. |
232 */ |
222 */ |
233 TBool iScreenUpdateNeeded; |
223 TBool iTransparencyEnabled; |
|
224 |
234 |
225 /** |
235 /** |
226 * Pointer to wallpaper image. This is used only if same wallpaper |
236 * Pointer to wallpaper image. This is used only if same wallpaper |
227 * is shared among all HS pages. |
237 * is shared among all HS pages. |
228 * Own. |
238 * Own. |