36 #ifdef HB_SGIMAGE_ICON |
36 #ifdef HB_SGIMAGE_ICON |
37 #include <sgresource/sgimage.h> |
37 #include <sgresource/sgimage.h> |
38 #endif |
38 #endif |
39 |
39 |
40 #define THEME_SERVER_NAME "hbthemeserver" |
40 #define THEME_SERVER_NAME "hbthemeserver" |
|
41 #define BIN_CSS_APP "hbbincssmaker" |
|
42 #define BIN_CSS_APP_SYMBIAN "hbbincssmaker_symbian" |
|
43 #ifdef HB_BIN_CSS |
|
44 #define HB_THEME_SHARED_PIXMAP_CHUNK "themeserver_tool_chunk" |
|
45 #else |
41 #define HB_THEME_SHARED_PIXMAP_CHUNK "themeserver_chunk" |
46 #define HB_THEME_SHARED_PIXMAP_CHUNK "themeserver_chunk" |
|
47 #endif |
42 #define ORGANIZATION "Nokia" |
48 #define ORGANIZATION "Nokia" |
43 #define THEME_COMPONENT "Hb Themes" |
49 #define THEME_COMPONENT "Hb Themes" |
44 #define CURRENT_THEME_KEY "CurrentTheme" |
50 #define CURRENT_THEME_KEY "CurrentTheme" |
45 |
51 |
46 // To enable/disable debug messages for theme server functionality |
52 // To enable/disable debug messages for theme server functionality |
48 #undef THEME_SERVER_TRACES |
54 #undef THEME_SERVER_TRACES |
49 |
55 |
50 // To enable/disable debug messages for theme index functionality |
56 // To enable/disable debug messages for theme index functionality |
51 #undef THEME_INDEX_TRACES |
57 #undef THEME_INDEX_TRACES |
52 |
58 |
|
59 #undef CSSBIN_TRACES |
|
60 |
53 // To enable memory report creation (memory usage, fragmentation etc.) |
61 // To enable memory report creation (memory usage, fragmentation etc.) |
54 #undef HB_THEME_SERVER_MEMORY_REPORT |
62 #undef HB_THEME_SERVER_MEMORY_REPORT |
|
63 // To enable full memory report including all allocs, frees and reallocs |
|
64 #undef HB_THEME_SERVER_FULL_MEMORY_REPORT |
|
65 |
|
66 #ifdef HB_THEME_SERVER_FULL_MEMORY_REPORT |
|
67 #define HB_THEME_SERVER_MEMORY_REPORT |
|
68 #endif |
|
69 |
55 // If master trace macro is defined, define also other theme traces |
70 // If master trace macro is defined, define also other theme traces |
56 #ifdef THEME_SERVER_TRACES |
71 #ifdef THEME_SERVER_TRACES |
57 #define THEME_INDEX_TRACES |
72 #define THEME_INDEX_TRACES |
58 #endif |
73 #define CSSBIN_TRACES |
59 |
74 #endif |
60 |
75 |
61 // To enable fute testing for cache |
76 // To enable fute testing for cache |
62 //#define HB_ICON_CACHE_DEBUG |
77 //#define HB_ICON_CACHE_DEBUG |
63 |
78 |
64 const unsigned int INITIALIZED_CHUNK_IDENTIFIER = 0x54535256; //'TSRV' |
79 |
|
80 enum HbThemeType { |
|
81 BaseTheme = 0, |
|
82 OperatorC = 1, |
|
83 OperatorROM = 2, |
|
84 ActiveTheme = 3 |
|
85 }; |
|
86 |
|
87 const quint32 INITIALIZED_CHUNK_IDENTIFIER = 0x54535256; //'TSRV' |
65 struct HbSharedChunkHeader |
88 struct HbSharedChunkHeader |
66 { |
89 { |
67 unsigned int identifier; |
90 quint32 identifier; |
68 unsigned int mainAllocatorOffset; |
91 quint32 mainAllocatorOffset; |
69 unsigned int subAllocatorOffset; |
92 quint32 subAllocatorOffset; |
|
93 quint32 sharedCacheOffset; |
|
94 // Base theme offsets |
|
95 quint32 baseThemePathOffset; |
|
96 quint32 baseThemeNameOffset; |
|
97 quint32 baseThemeIndexOffset; |
|
98 // Operator theme in C-drive offsets |
|
99 quint32 operatorThemeDriveCPathOffset; |
|
100 quint32 operatorThemeDriveCNameOffset; |
|
101 quint32 operatorThemeDriveCIndexOffset; |
|
102 // Operator theme in ROM offsets |
|
103 quint32 operatorThemeRomPathOffset; |
|
104 quint32 operatorThemeRomNameOffset; |
|
105 quint32 operatorThemeRomIndexOffset; |
|
106 // Active theme offsets |
|
107 quint32 activeThemePathOffset; |
|
108 quint32 activeThemeNameOffset; |
|
109 quint32 activeThemeIndexOffset; |
|
110 |
70 }; |
111 }; |
71 |
112 |
72 enum LayerPriority { |
113 enum LayerPriority { |
73 Priority_Core, |
114 Priority_Core, |
74 Priority_Theme, |
115 Priority_Theme, |
169 }; |
211 }; |
170 |
212 |
171 struct HbSharedIconInfo |
213 struct HbSharedIconInfo |
172 { |
214 { |
173 HbIconFormatType type; |
215 HbIconFormatType type; |
174 |
216 |
175 union |
217 union |
176 { |
218 { |
177 HbSharedPixmapInfo pixmapData; |
219 HbSharedPixmapInfo pixmapData; |
178 HbSharedNVGInfo nvgData; |
220 HbSharedNVGInfo nvgData; |
179 HbSharedPICInfo picData; |
221 HbSharedPICInfo picData; |
180 HbSharedSgimageInfo sgImageData; |
222 HbSharedSgimageInfo sgImageData; |
181 HbSharedBLOBInfo blobData; |
223 HbSharedBLOBInfo blobData; |
182 }; |
224 }; |
183 |
225 |
184 HbSharedIconInfo():type(INVALID_FORMAT){} |
226 HbSharedIconInfo():type(INVALID_FORMAT){} |
185 |
227 |
186 }; |
228 }; |
187 |
229 |
188 struct HbSharedIconInfoList |
230 struct HbSharedIconInfoList |
189 { |
231 { |
190 HbSharedIconInfo icon[9]; |
232 HbSharedIconInfo icon[9]; |
221 { |
263 { |
222 int offset; |
264 int offset; |
223 HbSecondaryCacheInfo() : offset(-1) {} |
265 HbSecondaryCacheInfo() : offset(-1) {} |
224 }; |
266 }; |
225 |
267 |
226 struct HbSharedCacheItem { |
268 |
227 HbString key; |
269 struct HbTypefaceDataInfo |
228 int offset; |
270 { |
229 HbSharedCacheItem():key(HbMemoryManager::SharedMemory),offset(-1) |
271 int offset; |
230 { |
272 HbTypefaceDataInfo() : offset(-1) {} |
231 } |
273 }; |
232 HbSharedCacheItem(const QString &cacheKey, |
|
233 int cacheOffset):key(cacheKey,HbMemoryManager::SharedMemory), |
|
234 offset(cacheOffset) |
|
235 { |
|
236 } |
|
237 }; |
|
238 |
|
239 // Currently HbVector is used. This one should be replaced with the Map/Hash |
|
240 // data structure. |
|
241 typedef HbVector<HbSharedCacheItem> HbSharedCache; |
|
242 |
274 |
243 // Function codes (opcodes) used in message passing between client and server |
275 // Function codes (opcodes) used in message passing between client and server |
244 enum HbThemeServerRequest |
276 enum HbThemeServerRequest |
245 { |
277 { |
246 EInvalidServerRequest = 0, |
278 EInvalidServerRequest = 0, |