|
1 /* |
|
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Symbian Foundation License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "T_GraphicsUtil.h" |
|
19 #include "../../wserv/AnimPlugin/inc/T_AnimDef.h" |
|
20 // EPOC includes |
|
21 #include <apgtask.h> // used for apatask |
|
22 |
|
23 #define INFO_PRINTF1_UTIL(p1) aDataWrapper.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrInfo, (p1)) |
|
24 #define INFO_PRINTF2_UTIL(p1, p2) aDataWrapper.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrInfo, (p1), (p2)) |
|
25 /*@{*/ |
|
26 _LIT(KFormatEntryField, "%S_%S"); |
|
27 _LIT(KFormatFieldNumber, "%S%d"); |
|
28 |
|
29 _LIT(KTagTextCursorType, "type"); |
|
30 _LIT(KTagTextCursorHeight, "height"); |
|
31 _LIT(KTagTextCursorAscent, "ascent"); |
|
32 _LIT(KTagTextCursorWidth, "width"); |
|
33 _LIT(KTagTextCursorFlags, "flags"); |
|
34 _LIT(KTagTextCursorColor, "color"); |
|
35 |
|
36 _LIT(KTagSpriteMemberBitmap, "bitmap"); |
|
37 _LIT(KTagSpriteMemberMaskBitmap, "maskbitmap"); |
|
38 _LIT(KTagSpriteMemberInvertMask, "invertmask"); |
|
39 _LIT(KTagSpriteMemberDrawMode, "drawmode"); |
|
40 _LIT(KTagSpriteMemberOffset, "offset"); |
|
41 _LIT(KTagSpriteMemberInterval, "interval"); |
|
42 _LIT(KTagParamStart, "start"); |
|
43 _LIT(KTagParamEnd, "end"); |
|
44 _LIT(KTagParamFlags, "flags"); |
|
45 _LIT(KTagParamEnabled, "enabled"); |
|
46 |
|
47 /// Enumerations type parameter names and their possible values |
|
48 _LIT(KRLECompression, "ERLECompression"); |
|
49 _LIT(KPaletteCompression, "EPaletteCompression"); |
|
50 _LIT(KPaletteCompressionWithRLEFallback, "EPaletteCompressionWithRLEFallback"); |
|
51 |
|
52 _LIT(KBrushStyleNull, "ENullBrush"); |
|
53 _LIT(KBrushStyleSolid, "ESolidBrush"); |
|
54 _LIT(KBrushStylePatterned, "EPatternedBrush"); |
|
55 _LIT(KBrushStyleVerticalHatch, "EVerticalHatchBrush"); |
|
56 _LIT(KBrushStyleForwardDiagonalHatch, "EForwardDiagonalHatchBrush"); |
|
57 _LIT(KBrushStyleHorizontalHatch, "EHorizontalHatchBrush"); |
|
58 _LIT(KBrushStyleRearwardDiagonalHatch, "ERearwardDiagonalHatchBrush"); |
|
59 _LIT(KBrushStyleSquareCrossHatch, "ESquareCrossHatchBrush"); |
|
60 _LIT(KBrushStyleDiamondCrossHatch, "EDiamondCrossHatchBrush"); |
|
61 |
|
62 _LIT(KCaptureFlagEnabled, "TCaptureFlagEnabled"); |
|
63 _LIT(KCaptureFlagDragDrop, "TCaptureFlagDragDrop"); |
|
64 _LIT(KCaptureFlagAllGroups, "TCaptureFlagAllGroups"); |
|
65 _LIT(KCaptureDisabled, "TCaptureDisabled"); |
|
66 _LIT(KCaptureEnabled, "TCaptureEnabled"); |
|
67 _LIT(KCaptureDragDrop, "TCaptureDragDrop"); |
|
68 |
|
69 _LIT(KComputeModePriorityControlDisabled, "EPriorityControlDisabled"); |
|
70 _LIT(KComputeModePriorityControlComputeOn, "EPriorityControlComputeOn"); |
|
71 _LIT(KComputeModePriorityControlComputeOff, "EPriorityControlComputeOff"); |
|
72 |
|
73 _LIT(KCornerTypeWindowSquare, "EWindowCornerSquare"); |
|
74 _LIT(KCornerTypeWindow1, "EWindowCorner1"); |
|
75 _LIT(KCornerTypeWindow2, "EWindowCorner2"); |
|
76 _LIT(KCornerTypeWindow3, "EWindowCorner3"); |
|
77 _LIT(KCornerTypeWindow5, "EWindowCorner5"); |
|
78 _LIT(KCornerTypeWindowRegion, "EWindowCornerRegion"); |
|
79 _LIT(KCornerTypeMask, "ECornerTypeMask"); |
|
80 |
|
81 _LIT(KDisplayModeNone, "ENone"); |
|
82 _LIT(KDisplayModeGray2, "EGray2"); |
|
83 _LIT(KDisplayModeGray4, "EGray4"); |
|
84 _LIT(KDisplayModeGray16, "EGray16"); |
|
85 _LIT(KDisplayModeGray256, "EGray256"); |
|
86 _LIT(KDisplayModeColor16, "EColor16"); |
|
87 _LIT(KDisplayModeColor256, "EColor256"); |
|
88 _LIT(KDisplayModeColor64K, "EColor64K"); |
|
89 _LIT(KDisplayModeColor16M, "EColor16M"); |
|
90 _LIT(KDisplayModeRgb, "ERgb"); |
|
91 _LIT(KDisplayModeColor4K, "EColor4K"); |
|
92 _LIT(KDisplayModeColor16MU, "EColor16MU"); |
|
93 _LIT(KDisplayModeColor16MA, "EColor16MA"); |
|
94 _LIT(KDisplayModeColor16MAP, "EColor16MAP"); |
|
95 _LIT(KDisplayModeColorLast, "EColorLast"); |
|
96 |
|
97 _LIT(KDrawModeAND, "EDrawModeAND"); |
|
98 _LIT(KDrawModeNOTAND, "EDrawModeNOTAND"); |
|
99 _LIT(KDrawModePEN, "EDrawModePEN"); |
|
100 _LIT(KDrawModeANDNOT, "EDrawModeANDNOT"); |
|
101 _LIT(KDrawModeXOR, "EDrawModeXOR"); |
|
102 _LIT(KDrawModeOR, "EDrawModeOR"); |
|
103 _LIT(KDrawModeNOTANDNOT, "EDrawModeNOTANDNOT"); |
|
104 _LIT(KDrawModeNOTXOR, "EDrawModeNOTXOR"); |
|
105 _LIT(KDrawModeNOTSCREEN, "EDrawModeNOTSCREEN"); |
|
106 _LIT(KDrawModeNOTOR, "EDrawModeNOTOR"); |
|
107 _LIT(KDrawModeNOTPEN, "EDrawModeNOTPEN"); |
|
108 _LIT(KDrawModeORNOT, "EDrawModeORNOT"); |
|
109 _LIT(KDrawModeNOTORNOT, "EDrawModeNOTORNOT"); |
|
110 _LIT(KDrawModeWriteAlpha, "EDrawModeWriteAlpha"); |
|
111 |
|
112 _LIT(KErrorCategoryDrawingRegion, "EDrawingRegion"); |
|
113 _LIT(KErrorCategoryBackLight, "EBackLight"); |
|
114 _LIT(KErrorCategoryLogging, "ELogging"); |
|
115 _LIT(KErrorCategoryContrast, "EContrast"); |
|
116 |
|
117 _LIT(KEventCodeNull, "EEventNull"); |
|
118 _LIT(KEventCodeKey, "EEventKey"); |
|
119 _LIT(KEventCodeKeyUp, "EEventKeyUp"); |
|
120 _LIT(KEventCodeKeyDown, "EEventKeyDown"); |
|
121 _LIT(KEventCodeModifiersChanged, "EEventModifiersChanged"); |
|
122 _LIT(KEventCodePointer, "EEventPointer"); |
|
123 _LIT(KEventCodePointerEnter, "EEventPointerEnter"); |
|
124 _LIT(KEventCodePointerExit, "EEventPointerExit"); |
|
125 _LIT(KEventCodePointerBufferReady, "EEventPointerBufferReady"); |
|
126 _LIT(KEventCodeDragDrop, "EEventDragDrop"); |
|
127 _LIT(KEventCodeFocusLost, "EEventFocusLost"); |
|
128 _LIT(KEventCodeFocusGained, "EEventFocusGained"); |
|
129 _LIT(KEventCodeSwitchOn, "EEventSwitchOn"); |
|
130 _LIT(KEventCodePassword, "EEventPassword"); |
|
131 _LIT(KEventCodeWindowGroupsChanged, "EEventWindowGroupsChanged"); |
|
132 _LIT(KEventCodeErrorMessage, "EEventErrorMessage"); |
|
133 _LIT(KEventCodeMessageReady, "EEventMessageReady"); |
|
134 _LIT(KEventCodeMarkInvalid, "EEventMarkInvalid"); |
|
135 _LIT(KEventCodeSwitchOff, "EEventSwitchOff"); |
|
136 _LIT(KEventCodeKeySwitchOff, "EEventKeySwitchOff"); |
|
137 _LIT(KEventCodeScreenDeviceChanged, "EEventScreenDeviceChanged"); |
|
138 _LIT(KEventCodeFocusGroupChanged, "EEventFocusGroupChanged"); |
|
139 _LIT(KEventCodeCaseOpened, "EEventCaseOpened"); |
|
140 _LIT(KEventCodeCaseClosed, "EEventCaseClosed"); |
|
141 _LIT(KEventCodeWindowGroupListChanged, "EEventWindowGroupListChanged"); |
|
142 _LIT(KEventCodeWindowVisibilityChanged, "EEventWindowVisibilityChanged"); |
|
143 #if (defined SYMBIAN_PROCESS_MONITORING_AND_STARTUP) |
|
144 _LIT(KEventCodeRestartSystem, "EEventRestartSystem"); |
|
145 #endif |
|
146 _LIT(KEventCodeKeyRepeat, "EEventKeyRepeat"); |
|
147 _LIT(KEventCodeDirectScreenAccessBegin, "EEventDirectScreenAccessBegin"); |
|
148 _LIT(KEventCodeDirectScreenAccessEnd, "EEventDirectScreenAccessEnd"); |
|
149 _LIT(KEventCodeHeartbeatTimerStateChange, "EEventHeartbeatTimerStateChange"); |
|
150 _LIT(KEventCodePowerMgmt, "EEventPowerMgmt"); |
|
151 _LIT(KEventCodeReserved, "EEventReserved"); |
|
152 _LIT(KEventCodeUser, "EEventUser"); |
|
153 |
|
154 _LIT(KEventControlAlways, "EEventControlAlways"); |
|
155 _LIT(KEventControlOnlyWithKeyboardFocus, "EEventControlOnlyWithKeyboardFocus"); |
|
156 _LIT(KEventControlOnlyWhenVisible, "EEventControlOnlyWhenVisible"); |
|
157 |
|
158 _LIT(KEventModifierAutorepeatable, "EModifierAutorepeatable"); |
|
159 _LIT(KEventModifierKeypad, "EModifierKeypad"); |
|
160 _LIT(KEventModifierLeftAlt, "EModifierLeftAlt"); |
|
161 _LIT(KEventModifierRightAlt, "EModifierRightAlt"); |
|
162 _LIT(KEventModifierAlt, "EModifierAlt"); |
|
163 _LIT(KEventModifierLeftCtrl, "EModifierLeftCtrl"); |
|
164 _LIT(KEventModifierRightCtrl, "EModifierRightCtrl"); |
|
165 _LIT(KEventModifierCtrl, "EModifierCtrl"); |
|
166 _LIT(KEventModifierLeftShift, "EModifierLeftShift"); |
|
167 _LIT(KEventModifierRightShift, "EModifierRightShift"); |
|
168 _LIT(KEventModifierShift, "EModifierShift"); |
|
169 _LIT(KEventModifierLeftFunc, "EModifierLeftFunc"); |
|
170 _LIT(KEventModifierRightFunc, "EModifierRightFunc"); |
|
171 _LIT(KEventModifierFunc, "EModifierFunc"); |
|
172 _LIT(KEventModifierCapsLock, "EModifierCapsLock"); |
|
173 _LIT(KEventModifierNumLock, "EModifierNumLock"); |
|
174 _LIT(KEventModifierScrollLock, "EModifierScrollLock"); |
|
175 _LIT(KEventModifierKeyUp, "EModifierKeyUp"); |
|
176 _LIT(KEventModifierSpecial, "EModifierSpecial"); |
|
177 _LIT(KEventModifierDoubleClick, "EModifierDoubleClick"); |
|
178 _LIT(KEventModifierPureKeycode, "EModifierPureKeycode"); |
|
179 _LIT(KEventModifierKeyboardExtend, "EModifierKeyboardExtend"); |
|
180 _LIT(KEventModifierCancelRotation, "EModifierCancelRotation"); |
|
181 _LIT(KEventModifierRotateBy90, "EModifierRotateBy90"); |
|
182 _LIT(KEventModifierRotateBy180, "EModifierRotateBy180"); |
|
183 _LIT(KEventModifierRotateBy270, "EModifierRotateBy270"); |
|
184 _LIT(KEventModifierPointer3DButton1, "EModifierPointer3DButton1"); |
|
185 _LIT(KEventModifierPointer3DButton2, "EModifierPointer3DButton2"); |
|
186 _LIT(KEventModifierPointer3DButton3, "EModifierPointer3DButton3"); |
|
187 _LIT(KEventModifierAll, "EAllModifiers"); |
|
188 |
|
189 _LIT(KFadeControlIncludeChildren, "EFadeIncludeChildren"); |
|
190 _LIT(KFadeControlWindowOnly, "EFadeWindowOnly"); |
|
191 |
|
192 _LIT(KFillRuleAlternate, "EAlternate"); |
|
193 _LIT(KFillRuleEWinding, "EWinding"); |
|
194 |
|
195 _LIT(KFontStrikethroughOff, "EStrikethroughOff"); |
|
196 _LIT(KFontStrikethroughOn, "EStrikethroughOn"); |
|
197 |
|
198 _LIT(KFontUnderlineOff, "EUnderlineOff"); |
|
199 _LIT(KFontUnderlineOn, "EUnderlineOn"); |
|
200 |
|
201 _LIT(KGlyphBitmapTypeDefault, "EDefaultGlyphBitmap"); |
|
202 _LIT(KGlyphBitmapTypeMonochrome, "EMonochromeGlyphBitmap"); |
|
203 _LIT(KGlyphBitmapTypeAntiAliased, "EAntiAliasedGlyphBitmap"); |
|
204 _LIT(KGlyphBitmapTypeSubPixel, "ESubPixelGlyphBitmap"); |
|
205 _LIT(KGlyphBitmapTypeFourColourBlend, "EFourColourBlendGlyphBitmap"); |
|
206 |
|
207 _LIT(KGraphicsOrientationNormal, "EGraphicsOrientationNormal"); |
|
208 _LIT(KGraphicsOrientationRotated90, "EGraphicsOrientationRotated90"); |
|
209 _LIT(KGraphicsOrientationRotated180, "EGraphicsOrientationRotated180"); |
|
210 _LIT(KGraphicsOrientationRotated270, "EGraphicsOrientationRotated270"); |
|
211 |
|
212 _LIT(KHotKeyEnableLogging, "EHotKeyEnableLogging"); |
|
213 _LIT(KHotKeyDisableLogging, "EHotKeyDisableLogging"); |
|
214 _LIT(KHotKeyStateDump, "EHotKeyStateDump"); |
|
215 _LIT(KHotKeyOfDeath, "EHotKeyOfDeath"); |
|
216 _LIT(KHotKeyShutDown, "EHotKeyShutDown"); |
|
217 _LIT(KHotKeyHeapDump, "EHotKeyHeapDump"); |
|
218 _LIT(KHotKeyIncContrast, "EHotKeyIncContrast"); |
|
219 _LIT(KHotKeyDecContrast, "EHotKeyDecContrast"); |
|
220 _LIT(KHotKeyOff, "EHotKeyOff"); |
|
221 _LIT(KHotKeyBacklightOn, "EHotKeyBacklightOn"); |
|
222 _LIT(KHotKeyBacklightOff, "EHotKeyBacklightOff"); |
|
223 _LIT(KHotKeyBacklightToggle, "EHotKeyBacklightToggle"); |
|
224 _LIT(KHotKeyScreenDimension0, "EHotKeyScreenDimension0"); |
|
225 _LIT(KHotKeyScreenDimension1, "EHotKeyScreenDimension1"); |
|
226 _LIT(KHotKeyScreenDimension2, "EHotKeyScreenDimension2"); |
|
227 _LIT(KHotKeyScreenDimension3, "EHotKeyScreenDimension3"); |
|
228 _LIT(KHotKeyCycleDisplaySize, "EHotKeyCycleDisplaySize"); |
|
229 _LIT(KHotKeyCycleOrientation, "EHotKeyCycleOrientation"); |
|
230 _LIT(KHotKeyIncBrightness, "EHotKeyIncBrightness"); |
|
231 _LIT(KHotKeyDecBrightness, "EHotKeyDecBrightness"); |
|
232 _LIT(KHotKeyCycleFocusScreen, "EHotKeyCycleFocusScreen"); |
|
233 _LIT(KHotKeyFirstKeyType, "EHotKeyFirstKeyType"); |
|
234 _LIT(KHotKeyLastKeyType, "EHotKeyLastKeyType"); |
|
235 |
|
236 _LIT(KKeyNull, "EKeyNull"); |
|
237 _LIT(KKeyBell, "EKeyBell"); |
|
238 _LIT(KKeyBackspace, "EKeyBackspace"); |
|
239 _LIT(KKeyTab, "EKeyTab"); |
|
240 _LIT(KKeyLineFeed, "EKeyLineFeed"); |
|
241 _LIT(KKeyVerticalTab, "EKeyVerticalTab"); |
|
242 _LIT(KKeyFormFeed, "EKeyFormFeed"); |
|
243 _LIT(KKeyEnter, "EKeyEnter"); |
|
244 _LIT(KKeyEscape, "EKeyEscape"); |
|
245 _LIT(KKeySpace, "EKeySpace"); |
|
246 _LIT(KKeyDelete, "EKeyDelete"); |
|
247 _LIT(KKeyPrintScreen, "EKeyPrintScreen"); |
|
248 _LIT(KKeyPause, "EKeyPause"); |
|
249 _LIT(KKeyHome, "EKeyHome"); |
|
250 _LIT(KKeyEnd, "EKeyEnd"); |
|
251 _LIT(KKeyPageUp, "EKeyPageUp"); |
|
252 _LIT(KKeyPageDown, "EKeyPageDown"); |
|
253 _LIT(KKeyInsert, "EKeyInsert"); |
|
254 _LIT(KKeyLeftArrow, "EKeyLeftArrow"); |
|
255 _LIT(KKeyRightArrow, "EKeyRightArrow"); |
|
256 _LIT(KKeyUpArrow, "EKeyUpArrow"); |
|
257 _LIT(KKeyDownArrow, "EKeyDownArrow"); |
|
258 _LIT(KKeyLeftShift, "EKeyLeftShift"); |
|
259 _LIT(KKeyRightShift, "EKeyRightShift"); |
|
260 _LIT(KKeyLeftAlt, "EKeyLeftAlt"); |
|
261 _LIT(KKeyRightAlt, "EKeyRightAlt"); |
|
262 _LIT(KKeyLeftCtrl, "EKeyLeftCtrl"); |
|
263 _LIT(KKeyRightCtrl, "EKeyRightCtrl"); |
|
264 _LIT(KKeyLeftFunc, "EKeyLeftFunc"); |
|
265 _LIT(KKeyRightFunc, "EKeyRightFunc"); |
|
266 _LIT(KKeyCapsLock, "EKeyCapsLock"); |
|
267 _LIT(KKeyNumLock, "EKeyNumLock"); |
|
268 _LIT(KKeyScrollLock, "EKeyScrollLock"); |
|
269 _LIT(KKeyF1, "EKeyF1"); |
|
270 _LIT(KKeyF2, "EKeyF2"); |
|
271 _LIT(KKeyF3, "EKeyF3"); |
|
272 _LIT(KKeyF4, "EKeyF4"); |
|
273 _LIT(KKeyF5, "EKeyF5"); |
|
274 _LIT(KKeyF6, "EKeyF6"); |
|
275 _LIT(KKeyF7, "EKeyF7"); |
|
276 _LIT(KKeyF8, "EKeyF8"); |
|
277 _LIT(KKeyF9, "EKeyF9"); |
|
278 _LIT(KKeyF10, "EKeyF10"); |
|
279 _LIT(KKeyF11, "EKeyF11"); |
|
280 _LIT(KKeyF12, "EKeyF12"); |
|
281 _LIT(KKeyF13, "EKeyF13"); |
|
282 _LIT(KKeyF14, "EKeyF14"); |
|
283 _LIT(KKeyF15, "EKeyF15"); |
|
284 _LIT(KKeyF16, "EKeyF16"); |
|
285 _LIT(KKeyF17, "EKeyF17"); |
|
286 _LIT(KKeyF18, "EKeyF18"); |
|
287 _LIT(KKeyF19, "EKeyF19"); |
|
288 _LIT(KKeyF20, "EKeyF20"); |
|
289 _LIT(KKeyF21, "EKeyF21"); |
|
290 _LIT(KKeyF22, "EKeyF22"); |
|
291 _LIT(KKeyF23, "EKeyF23"); |
|
292 _LIT(KKeyF24, "EKeyF24"); |
|
293 _LIT(KKeyOff, "EKeyOff"); |
|
294 _LIT(KKeyIncContrast, "EKeyIncContrast"); |
|
295 _LIT(KKeyDecContrast, "EKeyDecContrast"); |
|
296 _LIT(KKeyBacklightOn, "EKeyBacklightOn"); |
|
297 _LIT(KKeyBacklightOff, "EKeyBacklightOff"); |
|
298 _LIT(KKeyBacklightToggle, "EKeyBacklightToggle"); |
|
299 _LIT(KKeySliderDown, "EKeySliderDown"); |
|
300 _LIT(KKeySliderUp, "EKeySliderUp"); |
|
301 _LIT(KKeyMenu, "EKeyMenu"); |
|
302 _LIT(KKeyDictaphonePlay, "EKeyDictaphonePlay"); |
|
303 _LIT(KKeyDictaphoneStop, "EKeyDictaphoneStop"); |
|
304 _LIT(KKeyDictaphoneRecord, "EKeyDictaphoneRecord"); |
|
305 _LIT(KKeyHelp, "EKeyHelp"); |
|
306 _LIT(KKeyDial, "EKeyDial"); |
|
307 _LIT(KKeyScreenDimension0, "EKeyScreenDimension0"); |
|
308 _LIT(KKeyScreenDimension1, "EKeyScreenDimension1"); |
|
309 _LIT(KKeyScreenDimension2, "EKeyScreenDimension2"); |
|
310 _LIT(KKeyScreenDimension3, "EKeyScreenDimension3"); |
|
311 _LIT(KKeyIncVolume, "EKeyIncVolume"); |
|
312 _LIT(KKeyDecVolume, "EKeyDecVolume"); |
|
313 _LIT(KKeyDevice0, "EKeyDevice0"); |
|
314 _LIT(KKeyDevice1, "EKeyDevice1"); |
|
315 _LIT(KKeyDevice2, "EKeyDevice2"); |
|
316 _LIT(KKeyDevice3, "EKeyDevice3"); |
|
317 _LIT(KKeyDevice4, "EKeyDevice4"); |
|
318 _LIT(KKeyDevice5, "EKeyDevice5"); |
|
319 _LIT(KKeyDevice6, "EKeyDevice6"); |
|
320 _LIT(KKeyDevice7, "EKeyDevice7"); |
|
321 _LIT(KKeyDevice8, "EKeyDevice8"); |
|
322 _LIT(KKeyDevice9, "EKeyDevice9"); |
|
323 _LIT(KKeyDeviceA, "EKeyDeviceA"); |
|
324 _LIT(KKeyDeviceB, "EKeyDeviceB"); |
|
325 _LIT(KKeyDeviceC, "EKeyDeviceC"); |
|
326 _LIT(KKeyDeviceD, "EKeyDeviceD"); |
|
327 _LIT(KKeyDeviceE, "EKeyDeviceE"); |
|
328 _LIT(KKeyDeviceF, "EKeyDeviceF"); |
|
329 _LIT(KKeyApplication0, "EKeyApplication0"); |
|
330 _LIT(KKeyApplication1, "EKeyApplication1"); |
|
331 _LIT(KKeyApplication2, "EKeyApplication2"); |
|
332 _LIT(KKeyApplication3, "EKeyApplication3"); |
|
333 _LIT(KKeyApplication4, "EKeyApplication4"); |
|
334 _LIT(KKeyApplication5, "EKeyApplication5"); |
|
335 _LIT(KKeyApplication6, "EKeyApplication6"); |
|
336 _LIT(KKeyApplication7, "EKeyApplication7"); |
|
337 _LIT(KKeyApplication8, "EKeyApplication8"); |
|
338 _LIT(KKeyApplication9, "EKeyApplication9"); |
|
339 _LIT(KKeyApplicationA, "EKeyApplicationA"); |
|
340 _LIT(KKeyApplicationB, "EKeyApplicationB"); |
|
341 _LIT(KKeyApplicationC, "EKeyApplicationC"); |
|
342 _LIT(KKeyApplicationD, "EKeyApplicationD"); |
|
343 _LIT(KKeyApplicationE, "EKeyApplicationE"); |
|
344 _LIT(KKeyApplicationF, "EKeyApplicationF"); |
|
345 _LIT(KKeyYes, "EKeyYes"); |
|
346 _LIT(KKeyNo, "EKeyNo"); |
|
347 _LIT(KKeyIncBrightness, "EKeyIncBrightness"); |
|
348 _LIT(KKeyDecBrightness, "EKeyDecBrightness"); |
|
349 _LIT(KKeyKeyboardExtend, "EKeyKeyboardExtend"); |
|
350 _LIT(KKeyDevice10, "EKeyDevice10"); |
|
351 _LIT(KKeyDevice11, "EKeyDevice11"); |
|
352 _LIT(KKeyDevice12, "EKeyDevice12"); |
|
353 _LIT(KKeyDevice13, "EKeyDevice13"); |
|
354 _LIT(KKeyDevice14, "EKeyDevice14"); |
|
355 _LIT(KKeyDevice15, "EKeyDevice15"); |
|
356 _LIT(KKeyDevice16, "EKeyDevice16"); |
|
357 _LIT(KKeyDevice17, "EKeyDevice17"); |
|
358 _LIT(KKeyDevice18, "EKeyDevice18"); |
|
359 _LIT(KKeyDevice19, "EKeyDevice19"); |
|
360 _LIT(KKeyDevice1A, "EKeyDevice1A"); |
|
361 _LIT(KKeyDevice1B, "EKeyDevice1B"); |
|
362 _LIT(KKeyDevice1C, "EKeyDevice1C"); |
|
363 _LIT(KKeyDevice1D, "EKeyDevice1D"); |
|
364 _LIT(KKeyDevice1E, "EKeyDevice1E"); |
|
365 _LIT(KKeyDevice1F, "EKeyDevice1F"); |
|
366 _LIT(KKeyApplication10, "EKeyApplication10"); |
|
367 _LIT(KKeyApplication11, "EKeyApplication11"); |
|
368 _LIT(KKeyApplication12, "EKeyApplication12"); |
|
369 _LIT(KKeyApplication13, "EKeyApplication13"); |
|
370 _LIT(KKeyApplication14, "EKeyApplication14"); |
|
371 _LIT(KKeyApplication15, "EKeyApplication15"); |
|
372 _LIT(KKeyApplication16, "EKeyApplication16"); |
|
373 _LIT(KKeyApplication17, "EKeyApplication17"); |
|
374 _LIT(KKeyApplication18, "EKeyApplication18"); |
|
375 _LIT(KKeyApplication19, "EKeyApplication19"); |
|
376 _LIT(KKeyApplication1A, "EKeyApplication1A"); |
|
377 _LIT(KKeyApplication1B, "EKeyApplication1B"); |
|
378 _LIT(KKeyApplication1C, "EKeyApplication1C"); |
|
379 _LIT(KKeyApplication1D, "EKeyApplication1D"); |
|
380 _LIT(KKeyApplication1E, "EKeyApplication1E"); |
|
381 _LIT(KKeyApplication1F, "EKeyApplication1F"); |
|
382 |
|
383 _LIT(KLoggingEnable, "ELoggingEnable"); |
|
384 _LIT(KLoggingDisable, "ELoggingDisable"); |
|
385 _LIT(KLoggingStatusDump, "ELoggingStatusDump"); |
|
386 _LIT(KLoggingHeapDump, "ELoggingHeapDump"); |
|
387 |
|
388 _LIT(KModifierStateTurnOnModifier, "ETurnOnModifier"); |
|
389 _LIT(KModifierStateTurnOffModifier, "ETurnOffModifier"); |
|
390 _LIT(KModifierStateToggleModifier, "EToggleModifier"); |
|
391 |
|
392 _LIT(KPasswordModeCancel, "EPasswordCancel"); |
|
393 _LIT(KPasswordModeNone, "EPasswordNone"); |
|
394 _LIT(KPasswordModeOnceADay, "EPasswordOnceADay"); |
|
395 _LIT(KPasswordModeAlways, "EPasswordAlways"); |
|
396 _LIT(KPasswordModeAlwaysTriggerNow, "EPasswordAlwaysTriggerNow"); |
|
397 _LIT(KPasswordModeOnceADayTriggerNow, "EPasswordOnceADayTriggerNow"); |
|
398 |
|
399 _LIT(KPenStyleNull, "ENullPen"); |
|
400 _LIT(KPenStyleSolid, "ESolidPen"); |
|
401 _LIT(KPenStyleDotted, "EDottedPen"); |
|
402 _LIT(KPenStyleDashed, "EDashedPen"); |
|
403 _LIT(KPenStyleDotDash, "EDotDashPen"); |
|
404 _LIT(KPenStyleDotDotDash, "EDotDotDashPen"); |
|
405 |
|
406 _LIT(KPointerCursorNone, "EPointerCursorNone"); |
|
407 _LIT(KPointerCursorFixed, "EPointerCursorFixed"); |
|
408 _LIT(KPointerCursorNormal, "EPointerCursorNormal"); |
|
409 _LIT(KPointerCursorWindow, "EPointerCursorWindow"); |
|
410 _LIT(KPointerCursorFirstMode, "EPointerCursorFirstMode"); |
|
411 _LIT(KPointerCursorLastMode, "EPointerCursorLastMode"); |
|
412 |
|
413 _LIT(KPointerFilterEnterExit, "EPointerFilterEnterExit"); |
|
414 _LIT(KPointerFilterMove, "EPointerFilterMove"); |
|
415 _LIT(KPointerFilterDrag, "EPointerFilterDrag"); |
|
416 _LIT(KPointerFilterGenerateSimulatedMove, "EPointerGenerateSimulatedMove"); |
|
417 _LIT(KPointerFilterMoveEvents, "EPointerMoveEvents"); |
|
418 |
|
419 #if defined(SYMBIAN_WSERV_AND_CONE_MULTIPLE_SCREENS) |
|
420 _LIT(KPrioritiesAll, "EAllPriorities"); |
|
421 #endif |
|
422 |
|
423 _LIT(KPriorityIdle, "EPriorityIdle"); |
|
424 _LIT(KPriorityLow, "EPriorityLow"); |
|
425 _LIT(KPriorityStandard, "EPriorityStandard"); |
|
426 _LIT(KPriorityUserInput, "EPriorityUserInput"); |
|
427 _LIT(KPriorityHigh, "EPriorityHigh"); |
|
428 |
|
429 _LIT(KSizeEnforcementNone, "ESizeEnforcementNone"); |
|
430 _LIT(KSizeEnforcementPixelsAndRotation, "ESizeEnforcementPixelsAndRotation"); |
|
431 _LIT(KSizeEnforcementPixelsTwipsAndRotation, "ESizeEnforcementPixelsTwipsAndRotation"); |
|
432 |
|
433 _LIT(KSpriteInCompareRemoveSprite, "ERemoveSprite"); |
|
434 _LIT(KSpriteInCompareIncludeSprite, "EIncludeSprite"); |
|
435 _LIT(KSpriteInCompareIncludeTextCursor, "EIncludeTextCursor"); |
|
436 |
|
437 _LIT(KStdKeyNull, "EStdKeyNull"); |
|
438 _LIT(KStdKeyBackspace, "EStdKeyBackspace"); |
|
439 _LIT(KStdKeyTab, "EStdKeyTab"); |
|
440 _LIT(KStdKeyEnter, "EStdKeyEnter"); |
|
441 _LIT(KStdKeyEscape, "EStdKeyEscape"); |
|
442 _LIT(KStdKeySpace, "EStdKeySpace"); |
|
443 _LIT(KStdKeyPrintScreen, "EStdKeyPrintScreen"); |
|
444 _LIT(KStdKeyPause, "EStdKeyPause"); |
|
445 _LIT(KStdKeyHome, "EStdKeyHome"); |
|
446 _LIT(KStdKeyEnd, "EStdKeyEnd"); |
|
447 _LIT(KStdKeyPageUp, "EStdKeyPageUp"); |
|
448 _LIT(KStdKeyPageDown, "EStdKeyPageDown"); |
|
449 _LIT(KStdKeyInsert, "EStdKeyInsert"); |
|
450 _LIT(KStdKeyDelete, "EStdKeyDelete"); |
|
451 _LIT(KStdKeyLeftArrow, "EStdKeyLeftArrow"); |
|
452 _LIT(KStdKeyRightArrow, "EStdKeyRightArrow"); |
|
453 _LIT(KStdKeyUpArrow, "EStdKeyUpArrow"); |
|
454 _LIT(KStdKeyDownArrow, "EStdKeyDownArrow"); |
|
455 _LIT(KStdKeyLeftShift, "EStdKeyLeftShift"); |
|
456 _LIT(KStdKeyRightShift, "EStdKeyRightShift"); |
|
457 _LIT(KStdKeyLeftAlt, "EStdKeyLeftAlt"); |
|
458 _LIT(KStdKeyRightAlt, "EStdKeyRightAlt"); |
|
459 _LIT(KStdKeyLeftCtrl, "EStdKeyLeftCtrl"); |
|
460 _LIT(KStdKeyRightCtrl, "EStdKeyRightCtrl"); |
|
461 _LIT(KStdKeyLeftFunc, "EStdKeyLeftFunc"); |
|
462 _LIT(KStdKeyRightFunc, "EStdKeyRightFunc"); |
|
463 _LIT(KStdKeyCapsLock, "EStdKeyCapsLock"); |
|
464 _LIT(KStdKeyNumLock, "EStdKeyNumLock"); |
|
465 _LIT(KStdKeyScrollLock, "EStdKeyScrollLock"); |
|
466 _LIT(KStdKeyF1, "EStdKeyF1"); |
|
467 _LIT(KStdKeyF2, "EStdKeyF2"); |
|
468 _LIT(KStdKeyF3, "EStdKeyF3"); |
|
469 _LIT(KStdKeyF4, "EStdKeyF4"); |
|
470 _LIT(KStdKeyF5, "EStdKeyF5"); |
|
471 _LIT(KStdKeyF6, "EStdKeyF6"); |
|
472 _LIT(KStdKeyF7, "EStdKeyF7"); |
|
473 _LIT(KStdKeyF8, "EStdKeyF8"); |
|
474 _LIT(KStdKeyF9, "EStdKeyF9"); |
|
475 _LIT(KStdKeyF10, "EStdKeyF10"); |
|
476 _LIT(KStdKeyF11, "EStdKeyF11"); |
|
477 _LIT(KStdKeyF12, "EStdKeyF12"); |
|
478 _LIT(KStdKeyF13, "EStdKeyF13"); |
|
479 _LIT(KStdKeyF14, "EStdKeyF14"); |
|
480 _LIT(KStdKeyF15, "EStdKeyF15"); |
|
481 _LIT(KStdKeyF16, "EStdKeyF16"); |
|
482 _LIT(KStdKeyF17, "EStdKeyF17"); |
|
483 _LIT(KStdKeyF18, "EStdKeyF18"); |
|
484 _LIT(KStdKeyF19, "EStdKeyF19"); |
|
485 _LIT(KStdKeyF20, "EStdKeyF20"); |
|
486 _LIT(KStdKeyF21, "EStdKeyF21"); |
|
487 _LIT(KStdKeyF22, "EStdKeyF22"); |
|
488 _LIT(KStdKeyF23, "EStdKeyF23"); |
|
489 _LIT(KStdKeyF24, "EStdKeyF24"); |
|
490 _LIT(KStdKeyXXX, "EStdKeyXXX"); |
|
491 _LIT(KStdKeyComma, "EStdKeyComma"); |
|
492 _LIT(KStdKeyFullStop, "EStdKeyFullStop"); |
|
493 _LIT(KStdKeyForwardSlash, "EStdKeyForwardSlash"); |
|
494 _LIT(KStdKeyBackSlash, "EStdKeyBackSlash"); |
|
495 _LIT(KStdKeySemiColon, "EStdKeySemiColon"); |
|
496 _LIT(KStdKeySingleQuote, "EStdKeySingleQuote"); |
|
497 _LIT(KStdKeyHash, "EStdKeyHash"); |
|
498 _LIT(KStdKeySquareBracketLeft, "EStdKeySquareBracketLeft"); |
|
499 _LIT(KStdKeySquareBracketRight, "EStdKeySquareBracketRight"); |
|
500 _LIT(KStdKeyMinus, "EStdKeyMinus"); |
|
501 _LIT(KStdKeyEquals, "EStdKeyEquals"); |
|
502 _LIT(KStdKeyNkpForwardSlash, "EStdKeyNkpForwardSlash"); |
|
503 _LIT(KStdKeyNkpAsterisk, "EStdKeyNkpAsterisk"); |
|
504 _LIT(KStdKeyNkpMinus, "EStdKeyNkpMinus"); |
|
505 _LIT(KStdKeyNkpPlus, "EStdKeyNkpPlus"); |
|
506 _LIT(KStdKeyNkpEnter, "EStdKeyNkpEnter"); |
|
507 _LIT(KStdKeyNkp1, "EStdKeyNkp1"); |
|
508 _LIT(KStdKeyNkp2, "EStdKeyNkp2"); |
|
509 _LIT(KStdKeyNkp3, "EStdKeyNkp3"); |
|
510 _LIT(KStdKeyNkp4, "EStdKeyNkp4"); |
|
511 _LIT(KStdKeyNkp5, "EStdKeyNkp5"); |
|
512 _LIT(KStdKeyNkp6, "EStdKeyNkp6"); |
|
513 _LIT(KStdKeyNkp7, "EStdKeyNkp7"); |
|
514 _LIT(KStdKeyNkp8, "EStdKeyNkp8"); |
|
515 _LIT(KStdKeyNkp9, "EStdKeyNkp9"); |
|
516 _LIT(KStdKeyNkp0, "EStdKeyNkp0"); |
|
517 _LIT(KStdKeyNkpFullStop, "EStdKeyNkpFullStop"); |
|
518 _LIT(KStdKeyMenu, "EStdKeyMenu"); |
|
519 _LIT(KStdKeyBacklightOn, "EStdKeyBacklightOn"); |
|
520 _LIT(KStdKeyBacklightOff, "EStdKeyBacklightOff"); |
|
521 _LIT(KStdKeyBacklightToggle, "EStdKeyBacklightToggle"); |
|
522 _LIT(KStdKeyIncContrast, "EStdKeyIncContrast"); |
|
523 _LIT(KStdKeyDecContrast, "EStdKeyDecContrast"); |
|
524 _LIT(KStdKeySliderDown, "EStdKeySliderDown"); |
|
525 _LIT(KStdKeySliderUp, "EStdKeySliderUp"); |
|
526 _LIT(KStdKeyDictaphonePlay, "EStdKeyDictaphonePlay"); |
|
527 _LIT(KStdKeyDictaphoneStop, "EStdKeyDictaphoneStop"); |
|
528 _LIT(KStdKeyDictaphoneRecord, "EStdKeyDictaphoneRecord"); |
|
529 _LIT(KStdKeyHelp, "EStdKeyHelp"); |
|
530 _LIT(KStdKeyOff, "EStdKeyOff"); |
|
531 _LIT(KStdKeyDial, "EStdKeyDial"); |
|
532 _LIT(KStdKeyIncVolume, "EStdKeyIncVolume"); |
|
533 _LIT(KStdKeyDecVolume, "EStdKeyDecVolume"); |
|
534 _LIT(KStdKeyDevice0, "EStdKeyDevice0"); |
|
535 _LIT(KStdKeyDevice1, "EStdKeyDevice1"); |
|
536 _LIT(KStdKeyDevice2, "EStdKeyDevice2"); |
|
537 _LIT(KStdKeyDevice3, "EStdKeyDevice3"); |
|
538 _LIT(KStdKeyDevice4, "EStdKeyDevice4"); |
|
539 _LIT(KStdKeyDevice5, "EStdKeyDevice5"); |
|
540 _LIT(KStdKeyDevice6, "EStdKeyDevice6"); |
|
541 _LIT(KStdKeyDevice7, "EStdKeyDevice7"); |
|
542 _LIT(KStdKeyDevice8, "EStdKeyDevice8"); |
|
543 _LIT(KStdKeyDevice9, "EStdKeyDevice9"); |
|
544 _LIT(KStdKeyDeviceA, "EStdKeyDeviceA"); |
|
545 _LIT(KStdKeyDeviceB, "EStdKeyDeviceB"); |
|
546 _LIT(KStdKeyDeviceC, "EStdKeyDeviceC"); |
|
547 _LIT(KStdKeyDeviceD, "EStdKeyDeviceD"); |
|
548 _LIT(KStdKeyDeviceE, "EStdKeyDeviceE"); |
|
549 _LIT(KStdKeyDeviceF, "EStdKeyDeviceF"); |
|
550 _LIT(KStdKeyApplication0, "EStdKeyApplication0"); |
|
551 _LIT(KStdKeyApplication1, "EStdKeyApplication1"); |
|
552 _LIT(KStdKeyApplication2, "EStdKeyApplication2"); |
|
553 _LIT(KStdKeyApplication3, "EStdKeyApplication3"); |
|
554 _LIT(KStdKeyApplication4, "EStdKeyApplication4"); |
|
555 _LIT(KStdKeyApplication5, "EStdKeyApplication5"); |
|
556 _LIT(KStdKeyApplication6, "EStdKeyApplication6"); |
|
557 _LIT(KStdKeyApplication7, "EStdKeyApplication7"); |
|
558 _LIT(KStdKeyApplication8, "EStdKeyApplication8"); |
|
559 _LIT(KStdKeyApplication9, "EStdKeyApplication9"); |
|
560 _LIT(KStdKeyApplicationA, "EStdKeyApplicationA"); |
|
561 _LIT(KStdKeyApplicationB, "EStdKeyApplicationB"); |
|
562 _LIT(KStdKeyApplicationC, "EStdKeyApplicationC"); |
|
563 _LIT(KStdKeyApplicationD, "EStdKeyApplicationD"); |
|
564 _LIT(KStdKeyApplicationE, "EStdKeyApplicationE"); |
|
565 _LIT(KStdKeyApplicationF, "EStdKeyApplicationF"); |
|
566 _LIT(KStdKeyYes, "EStdKeyYes"); |
|
567 _LIT(KStdKeyNo, "EStdKeyNo"); |
|
568 _LIT(KStdKeyIncBrightness, "EStdKeyIncBrightness"); |
|
569 _LIT(KStdKeyDecBrightness, "EStdKeyDecBrightness"); |
|
570 _LIT(KStdKeyKeyboardExtend, "EStdKeyKeyboardExtend"); |
|
571 _LIT(KStdKeyDevice10, "EStdKeyDevice10"); |
|
572 _LIT(KStdKeyDevice11, "EStdKeyDevice11"); |
|
573 _LIT(KStdKeyDevice12, "EStdKeyDevice12"); |
|
574 _LIT(KStdKeyDevice13, "EStdKeyDevice13"); |
|
575 _LIT(KStdKeyDevice14, "EStdKeyDevice14"); |
|
576 _LIT(KStdKeyDevice15, "EStdKeyDevice15"); |
|
577 _LIT(KStdKeyDevice16, "EStdKeyDevice16"); |
|
578 _LIT(KStdKeyDevice17, "EStdKeyDevice17"); |
|
579 _LIT(KStdKeyDevice18, "EStdKeyDevice18"); |
|
580 _LIT(KStdKeyDevice19, "EStdKeyDevice19"); |
|
581 _LIT(KStdKeyDevice1A, "EStdKeyDevice1A"); |
|
582 _LIT(KStdKeyDevice1B, "EStdKeyDevice1B"); |
|
583 _LIT(KStdKeyDevice1C, "EStdKeyDevice1C"); |
|
584 _LIT(KStdKeyDevice1D, "EStdKeyDevice1D"); |
|
585 _LIT(KStdKeyDevice1E, "EStdKeyDevice1E"); |
|
586 _LIT(KStdKeyDevice1F, "EStdKeyDevice1F"); |
|
587 _LIT(KStdKeyApplication10, "EStdKeyApplication10"); |
|
588 _LIT(KStdKeyApplication11, "EStdKeyApplication11"); |
|
589 _LIT(KStdKeyApplication12, "EStdKeyApplication12"); |
|
590 _LIT(KStdKeyApplication13, "EStdKeyApplication13"); |
|
591 _LIT(KStdKeyApplication14, "EStdKeyApplication14"); |
|
592 _LIT(KStdKeyApplication15, "EStdKeyApplication15"); |
|
593 _LIT(KStdKeyApplication16, "EStdKeyApplication16"); |
|
594 _LIT(KStdKeyApplication17, "EStdKeyApplication17"); |
|
595 _LIT(KStdKeyApplication18, "EStdKeyApplication18"); |
|
596 _LIT(KStdKeyApplication19, "EStdKeyApplication19"); |
|
597 _LIT(KStdKeyApplication1A, "EStdKeyApplication1A"); |
|
598 _LIT(KStdKeyApplication1B, "EStdKeyApplication1B"); |
|
599 _LIT(KStdKeyApplication1C, "EStdKeyApplication1C"); |
|
600 _LIT(KStdKeyApplication1D, "EStdKeyApplication1D"); |
|
601 _LIT(KStdKeyApplication1E, "EStdKeyApplication1E"); |
|
602 _LIT(KStdKeyApplication1F, "EStdKeyApplication1F"); |
|
603 |
|
604 _LIT(KTextAlignLeft, "ELeft"); |
|
605 _LIT(KTextAlignCenter, "ECenter"); |
|
606 _LIT(KTextAlignRight, "ERight"); |
|
607 |
|
608 _LIT(KTextDirectionHorizontal, "EHorizontal"); |
|
609 _LIT(KTextDirectionVertical, "EVertical"); |
|
610 |
|
611 _LIT(KTypeNone, "ENone"); |
|
612 _LIT(KTypePointerMove, "EPointerMove"); |
|
613 _LIT(KTypePointerSwitchOn, "EPointerSwitchOn"); |
|
614 _LIT(KTypeKeyDown, "EKeyDown"); |
|
615 _LIT(KTypeKeyUp, "EKeyUp"); |
|
616 _LIT(KTypeRedraw, "ERedraw"); |
|
617 _LIT(KTypeSwitchOn, "ESwitchOn"); |
|
618 _LIT(KTypeActive, "EActive"); |
|
619 _LIT(KTypeInactive, "EInactive"); |
|
620 _LIT(KTypeUpdateModifiers, "EUpdateModifiers"); |
|
621 _LIT(KTypeButton1Down, "EButton1Down"); |
|
622 _LIT(KTypeButton1Up, "EButton1Up"); |
|
623 _LIT(KTypeButton2Down, "EButton2Down"); |
|
624 _LIT(KTypeButton2Up, "EButton2Up"); |
|
625 _LIT(KTypeButton3Down, "EButton3Down"); |
|
626 _LIT(KTypeButton3Up, "EButton3Up"); |
|
627 _LIT(KTypeSwitchOff, "ESwitchOff"); |
|
628 _LIT(KTypeKeyRepeat, "EKeyRepeat"); |
|
629 _LIT(KTypeCaseOpen, "ECaseOpen"); |
|
630 _LIT(KTypeCaseClose, "ECaseClose"); |
|
631 _LIT(KTypePointer3DInRange, "EPointer3DInRange"); |
|
632 _LIT(KTypePointer3DOutOfRange, "EPointer3DOutOfRange"); |
|
633 _LIT(KTypePointer3DTilt, "EPointer3DTilt"); |
|
634 _LIT(KTypePointer3DRotation, "EPointer3DRotation"); |
|
635 _LIT(KTypePointer3DTiltAndMove, "EPointer3DTiltAndMove"); |
|
636 _LIT(KTypeButton4Down, "EButton4Down"); |
|
637 _LIT(KTypeButton4Up, "EButton4Up"); |
|
638 _LIT(KTypeButton5Down, "EButton5Down"); |
|
639 _LIT(KTypeButton5Up, "EButton5Up"); |
|
640 _LIT(KTypeButton6Down, "EButton6Down"); |
|
641 _LIT(KTypeButton6Up, "EButton6Up"); |
|
642 _LIT(KTypeRestartSystem, "ERestartSystem"); |
|
643 |
|
644 _LIT(KTypeDrag, "EDrag"); |
|
645 _LIT(KTypeMove, "EMove"); |
|
646 _LIT(KTypeButtonRepeat, "EButtonRepeat"); |
|
647 |
|
648 _LIT(KWindowBackupTypeAreaBehind, "EWindowBackupAreaBehind"); |
|
649 _LIT(KWindowBackupTypeFullScreen, "EWindowBackupFullScreen"); |
|
650 |
|
651 _LIT(KWsTransparencyPolicyDefault, "ETransparencyDefault"); |
|
652 _LIT(KWsTransparencyPolicyFreezeUnder, "ETransparencyFreezeUnder"); |
|
653 |
|
654 _LIT(KWsVisibilityChangedCanBeSeen, "ECanBeSeen"); |
|
655 _LIT(KWsVisibilityChangedCantBeSeen, "ECantBeSeen"); |
|
656 _LIT(KWsVisibilityChangedPartiallyVisible, "EPartiallyVisible"); |
|
657 _LIT(KWsVisibilityChangedNotVisible, "ENotVisible"); |
|
658 _LIT(KWsVisibilityChangedFullyVisible, "EFullyVisible"); |
|
659 |
|
660 _LIT(KELongCaptureShortEventImmediately, "ELongCaptureShortEventImmediately"); |
|
661 _LIT(KELongCaptureRepeatEvents, "ELongCaptureRepeatEvents"); |
|
662 _LIT(KELongCaptureNormal, "ELongCaptureNormal"); |
|
663 _LIT(KELongCaptureWaitShort, "ELongCaptureWaitShort"); |
|
664 |
|
665 _LIT(KESpriteFlash, "ESpriteFlash"); |
|
666 _LIT(KESpriteNoChildClip, "ESpriteNoChildClip"); |
|
667 _LIT(KESpriteNoShadows, "ESpriteNoShadows"); |
|
668 |
|
669 _LIT(KECustomTextCursorAlignTop, "ECustomTextCursorAlignTop"); |
|
670 _LIT(KECustomTextCursorAlignBaseline, "ECustomTextCursorAlignBaseline"); |
|
671 _LIT(KECustomTextCursorAlignBottom, "ECustomTextCursorAlignBottom"); |
|
672 |
|
673 _LIT(KETypeRectangle, "ETypeRectangle"); |
|
674 _LIT(KETypeHollowRectangle, "ETypeHollowRectangle"); |
|
675 _LIT(KETypeFirst, "ETypeFirst"); |
|
676 _LIT(KETypeLast, "ETypeLast"); |
|
677 _LIT(KETypeLastBasic, "ETypeHollowRectangle"); |
|
678 |
|
679 _LIT(KEFlagNoFlash, "EFlagNoFlash"); |
|
680 _LIT(KEFlagClipHorizontal, "EFlagClipHorizontal"); |
|
681 _LIT(KEFlagClipVertical, "EFlagClipVertical"); |
|
682 |
|
683 _LIT(KTypefaceFontName, "typeface_name"); |
|
684 _LIT(KIsScalable, "is_scalable"); |
|
685 _LIT(KNumHeights, "num_heights"); |
|
686 _LIT(KMinHeightInTwips, "min_height_in_twips"); |
|
687 _LIT(KMaxHeightInTwips, "max_height_in_twips"); |
|
688 |
|
689 _LIT(KProportional, "typeface_attribute_proportional"); |
|
690 _LIT(KSerif, "typeface_attribute_serif"); |
|
691 _LIT(KSymbol, "typeface_attribute_symbol"); |
|
692 |
|
693 _LIT(KETerminateCancel, "ETerminateCancel"); |
|
694 _LIT(KETerminateRegion, "ETerminateRegion"); |
|
695 _LIT(KETerminateRotation, "ETerminateRotation"); |
|
696 _LIT(KETerminateScreenMode, "EETerminateScreenMode"); |
|
697 |
|
698 _LIT(KEColor, "EColor"); |
|
699 _LIT(KETransparencyPossible, "ETransparencyPossible"); |
|
700 _LIT(KEFullyScaleable, "EFullyScaleable"); |
|
701 _LIT(KEConstantAspectRatio, "EConstantAspectRatio"); |
|
702 _LIT(KECanDither, "ECanDither"); |
|
703 _LIT(KEAlphaChannel, "EAlphaChannel"); |
|
704 _LIT(KELeaveInPlace, "ELeaveInPlace"); |
|
705 _LIT(KERestoreToBackground, "ERestoreToBackground"); |
|
706 _LIT(KERestoreToPrevious, "ERestoreToPrevious"); |
|
707 _LIT(KEPartialDecodeInvalid, "EPartialDecodeInvalid"); |
|
708 _LIT(KEMngMoreFramesToDecode, "EMngMoreFramesToDecode"); |
|
709 _LIT(KEUsesFrameSizeInPixels, "EUsesFrameSizeInPixels"); |
|
710 |
|
711 _LIT(KEFrameInfoUninitialised, "EFrameInfoUninitialised"); |
|
712 _LIT(KEFrameInfoProcessingFrameHeader, "EFrameInfoProcessingFrameHeader"); |
|
713 _LIT(KEFrameInfoProcessingFrame, "EFrameInfoProcessingFrame"); |
|
714 _LIT(KEFrameInfoProcessingComplete, "EFrameInfoProcessingComplete"); |
|
715 |
|
716 _LIT(KFldFrameInfoState, "frameinfostate"); |
|
717 _LIT(KFldCurrentDataOffset, "currentdataoffset"); |
|
718 _LIT(KFldFrameDataOffset, "framedataoffset"); |
|
719 _LIT(KFldFrameCoordsInPixels, "framecoordsinpixels"); |
|
720 _LIT(KFldFrameSizeInTwips, "framesizeintwips"); |
|
721 _LIT(KFldBitsPerPixel, "bitsPerPixel"); |
|
722 _LIT(KFldDelay, "delay"); |
|
723 _LIT(KFldFlags, "flags"); |
|
724 _LIT(KFldOverallSizeInPixels, "overallsizeinpixels"); |
|
725 _LIT(KFldFrameDisplayMode, "framedisplaymode"); |
|
726 _LIT(KFldBackgroundColor, "backgroundcolor"); |
|
727 _LIT(KFldFrameSizeInPixels, "framesizeinpixels"); |
|
728 |
|
729 _LIT(KFldProcessName, "processname"); |
|
730 _LIT(KFldId, "id"); |
|
731 _LIT(KFldRect, "rect"); |
|
732 _LIT(KFldWsga, "wsga"); |
|
733 |
|
734 //For MAnim |
|
735 //Opcodes for Util |
|
736 _LIT(KEMAnimECmdRetrieveResult, "ECmdRetrieveResult"); |
|
737 _LIT(KEMAnimECmdUtilEatupMemory, "ECmdUtilEatupMemory"); |
|
738 _LIT(KEMAnimECmdUtilFreeEatenMemory, "ECmdUtilFreeEatenMemory"); |
|
739 //Opcodes for MAnimGeneralFunctions |
|
740 _LIT(KEMAnimECmdGeneralAnimate, "ECmdGeneralAnimate"); |
|
741 _LIT(KEMAnimECmdGeneralClient, "ECmdGeneralClient"); |
|
742 _LIT(KEMAnimECmdGeneralFlashStateOn, "ECmdGeneralFlashStateOn"); |
|
743 _LIT(KEMAnimECmdGeneralPanic, "ECmdGeneralPanic"); |
|
744 _LIT(KEMAnimECmdGeneralScreenDevice, "ECmdGeneralScreenDevice"); |
|
745 _LIT(KEMAnimECmdGeneralExtendedInterface, "ECmdGeneralExtendedInterface"); |
|
746 _LIT(KEMAnimECmdGeneralWindowExtension, "ECmdGeneralWindowExtension"); |
|
747 _LIT(KEMAnimECmdGeneralNumOfExtInterfaces, "ECmdGeneralNumOfExtInterfaces"); |
|
748 _LIT(KEMAnimECmdGeneralEventExtension , "ECmdGeneralEventExtension"); |
|
749 _LIT(KEMAnimECmdGeneralGetRawEvents , "ECmdGeneralGetRawEvents"); |
|
750 _LIT(KEMAnimECmdGeneralPostRawEvent , "ECmdGeneralPostRawEvent"); |
|
751 _LIT(KEMAnimECmdGeneralPostKeyEvent , "ECmdGeneralPostKeyEvent"); |
|
752 _LIT(KEMAnimECmdGeneralSetSync , "ECmdGeneralSetSync"); |
|
753 _LIT(KEMAnimECmdGeneralSync , "ECmdGeneralSync"); |
|
754 _LIT(KEMAnimECmdGeneralSetInterval , "ECmdGeneralSetInterval"); |
|
755 _LIT(KEMAnimECmdGeneralSetNextInterval , "ECmdGeneralSetNextInterval"); |
|
756 _LIT(KEMAnimECmdGeneralSystemTime, "ECmdGeneralSystemTime"); |
|
757 _LIT(KEMAnimECmdGeneralRegisterForNotis, "ECmdGeneralRegisterForNotis"); |
|
758 _LIT(KEMAnimECmdGeneralMessage, "ECmdGeneralMessage"); |
|
759 _LIT(KEMAnimECmdGeneralDuplicateBitmapL, "ECmdGeneralDuplicateBitmapL"); |
|
760 _LIT(KEMAnimECmdGeneralDuplicateFontL, "ECmdGeneralDuplicateFontL"); |
|
761 _LIT(KEMAnimECmdGeneralCloseFont, "ECmdGeneralCloseFont"); |
|
762 _LIT(KEMAnimECmdGeneralReplyBuf8, "ECmdGeneralReplyBuf8"); |
|
763 _LIT(KEMAnimECmdGeneralReplyBuf16, "ECmdGeneralReplyBuf16"); |
|
764 |
|
765 //Opcodes for MAnimSpriteFunctions |
|
766 _LIT(KEMAnimECmdSpriteGetSpriteMember, "ECmdSpriteGetSpriteMember"); |
|
767 _LIT(KEMAnimECmdSpriteUpdateMember, "ECmdSpriteUpdateMember"); |
|
768 _LIT(KEMAnimECmdSpriteActivate, "ECmdSpriteActivate"); |
|
769 _LIT(KEMAnimECmdSpriteSpriteCanBeSeen, "ECmdSpriteSpriteCanBeSeen"); |
|
770 _LIT(KEMAnimECmdSpriteSizeChangedL, "ECmdSpriteSizeChangedL"); |
|
771 _LIT(KEMAnimECmdSpriteSetPosition, "ECmdSpriteSetPosition"); |
|
772 |
|
773 |
|
774 |
|
775 //Opcodes for MAnimWindowFunctions |
|
776 _LIT(KEMAnimECmdWindowActivateGc, "ECmdWindowActivateGc");//Verify the return value is expected |
|
777 _LIT(KEMAnimECmdWindowSetRect, "ECmdWindowSetRect"); |
|
778 _LIT(KEMAnimECmdWindowWindowSize, "ECmdWindowWindowSize"); |
|
779 _LIT(KEMAnimECmdWindowIsHidden, "ECmdWindowIsHidden"); |
|
780 _LIT(KEMAnimECmdWindowSetVisible, "ECmdWindowSetVisible"); |
|
781 _LIT(KEMAnimECmdWindowInvalidate, "ECmdWindowInvalidate"); |
|
782 _LIT(KEMAnimECmdWindowParameters, "ECmdWindowParameters"); |
|
783 _LIT(KEMAnimECmdWindowVisibleRegion, "ECmdWindowVisibleRegion"); |
|
784 _LIT(KEMAnimECmdWindowIsStarted, "ECmdWindowIsStarted"); |
|
785 |
|
786 //Opcodes for MAnimFreeTimerWindowFunctions |
|
787 _LIT(KEMAnimECmdFreeTimerWinDeactivateGc, "ECmdFreeTimerWinDeactivateGc"); |
|
788 _LIT(KEMAnimECmdFreeTimerWinUpdate, "ECmdFreeTimerWinUpdate"); |
|
789 |
|
790 //Opcodes for MAnimGeneralFunctionsWindowExtension |
|
791 _LIT(KEMAnimECmdGfweScreens, "ECmdGfweScreens"); |
|
792 _LIT(KEMAnimECmdGfweFocusScreens, "ECmdGfweFocusScreens"); |
|
793 _LIT(KEMAnimECmdGfweSetFocusScreen, "ECmdGfweSetFocusScreen"); |
|
794 _LIT(KEMAnimECmdGfweWindowGroups, "ECmdGfweWindowGroups"); |
|
795 _LIT(KEMAnimECmdGfweWindowGroupInfo, "ECmdGfweWindowGroupInfo"); |
|
796 _LIT(KEMAnimECmdGfweWindowGroupName, "ECmdGfweWindowGroupName");//use handle to verify it in server side |
|
797 _LIT(KEMAnimECmdGfweSetOrdinalPosition, "ECmdGfweSetOrdinalPosition"); |
|
798 _LIT(KEMAnimECmdGfweIsFocusable, "ECmdGfweIsFocusable"); |
|
799 |
|
800 |
|
801 _LIT(KEAnimWindows, "EKWindowAnim"); |
|
802 _LIT(KEAnimSprite, "EKSpriteAnim"); |
|
803 _LIT(KEAnimFreeTimer, "EKFreeTimerWindowAnim"); |
|
804 |
|
805 |
|
806 _LIT(KEAnimCmdSync, "ECmdSync"); |
|
807 _LIT(KEAnimCmdTestWithoutPara, "ECmdTestWithoutPara"); |
|
808 _LIT(KEAnimCmdTestWithPara, "ECmdTestWithPara"); |
|
809 _LIT(KEAnimCmdGetLast, "ECmdGetLast"); |
|
810 _LIT(KEAnimCmdGetAnimInterval, "ECmdGetAnimInterval"); |
|
811 |
|
812 _LIT(KEGraphicsOrientationNormal, "EGraphicsOrientationNormal"); |
|
813 _LIT(KEGraphicsOrientationRotated90, "EGraphicsOrientationRotated90"); |
|
814 _LIT(KEGraphicsOrientationRotated180, "EGraphicsOrientationRotated180"); |
|
815 _LIT(KEGraphicsOrientationRotated270, "EGraphicsOrientationRotated270"); |
|
816 //For CPolygonFiller |
|
817 _LIT(KUsageEGetAllPixelRunsSequentially, "EGetAllPixelRunsSequentially"); |
|
818 _LIT(KUsageEGetPixelRunsSequentiallyForSpecifiedScanLines,"EGetPixelRunsSequentiallyForSpecifiedScanLines"); |
|
819 |
|
820 /*@}*/ |
|
821 |
|
822 RPointerArray < TAny > CT_GraphicsUtil::iMemArray; |
|
823 TInt CT_GraphicsUtil::iAvaiableSpace=0; |
|
824 TInt CT_GraphicsUtil::iBiggestBlock=0; |
|
825 |
|
826 TBool CT_GraphicsUtil::ReadBitmapfileCompressionScheme(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TBitmapfileCompressionScheme& aCompressionScheme) |
|
827 { |
|
828 // Read dither from INI file |
|
829 TPtrC str; |
|
830 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
831 if ( ret ) |
|
832 { |
|
833 if ( str==KRLECompression ) |
|
834 { |
|
835 aCompressionScheme=ERLECompression; |
|
836 } |
|
837 else if ( str==KPaletteCompression ) |
|
838 { |
|
839 aCompressionScheme=EPaletteCompression; |
|
840 } |
|
841 else if ( str==KPaletteCompressionWithRLEFallback ) |
|
842 { |
|
843 aCompressionScheme=EPaletteCompressionWithRLEFallback; |
|
844 } |
|
845 else |
|
846 { |
|
847 TInt intVal=0; |
|
848 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
849 if ( ret ) |
|
850 { |
|
851 aCompressionScheme=(TBitmapfileCompressionScheme)intVal; |
|
852 } |
|
853 } |
|
854 } |
|
855 |
|
856 return ret; |
|
857 } |
|
858 |
|
859 TBool CT_GraphicsUtil::ReadBrushStyle(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, CGraphicsContext::TBrushStyle& aBrushStyle) |
|
860 { |
|
861 // Read displaymode from INI file |
|
862 TPtrC str; |
|
863 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
864 if ( ret ) |
|
865 { |
|
866 if ( str==KBrushStyleNull ) |
|
867 { |
|
868 aBrushStyle=CGraphicsContext::ENullBrush; |
|
869 } |
|
870 else if ( str==KBrushStyleSolid ) |
|
871 { |
|
872 aBrushStyle=CGraphicsContext::ESolidBrush; |
|
873 } |
|
874 else if ( str==KBrushStylePatterned ) |
|
875 { |
|
876 aBrushStyle=CGraphicsContext::EPatternedBrush; |
|
877 } |
|
878 else if ( str==KBrushStyleVerticalHatch ) |
|
879 { |
|
880 aBrushStyle=CGraphicsContext::EVerticalHatchBrush; |
|
881 } |
|
882 else if ( str==KBrushStyleForwardDiagonalHatch ) |
|
883 { |
|
884 aBrushStyle=CGraphicsContext::EForwardDiagonalHatchBrush; |
|
885 } |
|
886 else if ( str==KBrushStyleHorizontalHatch ) |
|
887 { |
|
888 aBrushStyle=CGraphicsContext::EHorizontalHatchBrush; |
|
889 } |
|
890 else if ( str==KBrushStyleRearwardDiagonalHatch ) |
|
891 { |
|
892 aBrushStyle=CGraphicsContext::ERearwardDiagonalHatchBrush; |
|
893 } |
|
894 else if ( str==KBrushStyleSquareCrossHatch ) |
|
895 { |
|
896 aBrushStyle=CGraphicsContext::ESquareCrossHatchBrush; |
|
897 } |
|
898 else if ( str==KBrushStyleDiamondCrossHatch ) |
|
899 { |
|
900 aBrushStyle=CGraphicsContext::EDiamondCrossHatchBrush; |
|
901 } |
|
902 else |
|
903 { |
|
904 TInt intVal=0; |
|
905 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
906 if ( ret ) |
|
907 { |
|
908 aBrushStyle=(CGraphicsContext::TBrushStyle)intVal; |
|
909 } |
|
910 } |
|
911 } |
|
912 |
|
913 return ret; |
|
914 } |
|
915 |
|
916 TBool CT_GraphicsUtil::ReadCaptureFlags(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TUint& aCaptureFlags) |
|
917 { |
|
918 TPtrC str; |
|
919 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
920 if ( ret ) |
|
921 { |
|
922 TUint temp=0; |
|
923 ret=ConvertToCaptureFlags(str, temp); |
|
924 if ( ret ) |
|
925 { |
|
926 aCaptureFlags=temp; |
|
927 } |
|
928 } |
|
929 |
|
930 return ret; |
|
931 } |
|
932 |
|
933 TBool CT_GraphicsUtil::ConvertToCaptureFlags(const TDesC& aStr, RWindowBase::TCaptureFlags& aCaptureFlags) |
|
934 { |
|
935 TBool ret=ETrue; |
|
936 if ( aStr==KCaptureFlagEnabled ) |
|
937 { |
|
938 aCaptureFlags=RWindowBase::TCaptureFlagEnabled; |
|
939 } |
|
940 else if ( aStr==KCaptureFlagDragDrop ) |
|
941 { |
|
942 aCaptureFlags=RWindowBase::TCaptureFlagDragDrop; |
|
943 } |
|
944 else if ( aStr==KCaptureFlagAllGroups ) |
|
945 { |
|
946 aCaptureFlags=RWindowBase::TCaptureFlagAllGroups; |
|
947 } |
|
948 else if ( aStr==KCaptureDisabled ) |
|
949 { |
|
950 aCaptureFlags=RWindowBase::TCaptureDisabled; |
|
951 } |
|
952 else if ( aStr==KCaptureEnabled ) |
|
953 { |
|
954 aCaptureFlags=RWindowBase::TCaptureEnabled; |
|
955 } |
|
956 else if ( aStr==KCaptureDragDrop ) |
|
957 { |
|
958 aCaptureFlags=RWindowBase::TCaptureDragDrop; |
|
959 } |
|
960 else |
|
961 { |
|
962 TUint captureFlags; |
|
963 TLex lex(aStr); |
|
964 ret=(lex.Val(captureFlags, EHex)==KErrNone); |
|
965 if ( ret ) |
|
966 { |
|
967 aCaptureFlags=(RWindowBase::TCaptureFlags)captureFlags; |
|
968 } |
|
969 } |
|
970 |
|
971 return ret; |
|
972 } |
|
973 |
|
974 TBool CT_GraphicsUtil::ConvertToCaptureFlags(const TDesC& aStr, TUint& aCaptureFlags) |
|
975 { |
|
976 TBool ret=ETrue; |
|
977 TInt location=aStr.Match(_L("*|*")); |
|
978 if( location!=KErrNotFound ) |
|
979 { |
|
980 // Converting Left part of the data |
|
981 TPtrC tempStr=aStr.Left(location); |
|
982 ret=ConvertToCaptureFlags(tempStr, aCaptureFlags); |
|
983 |
|
984 // Converting right data can be with another "|" |
|
985 tempStr.Set(aStr.Mid(location+1)); |
|
986 |
|
987 TUint temp; |
|
988 if ( ConvertToCaptureFlags(tempStr, temp) ) |
|
989 { |
|
990 aCaptureFlags|=temp; |
|
991 } |
|
992 else |
|
993 { |
|
994 ret=EFalse; |
|
995 } |
|
996 } |
|
997 else |
|
998 { |
|
999 RWindowBase::TCaptureFlags captureFlags; |
|
1000 ret=ConvertToCaptureFlags(aStr, captureFlags); |
|
1001 if ( ret ) |
|
1002 { |
|
1003 aCaptureFlags=(TUint)captureFlags; |
|
1004 } |
|
1005 } |
|
1006 |
|
1007 return ret; |
|
1008 } |
|
1009 |
|
1010 TBool CT_GraphicsUtil::ReadComputeMode(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, RWsSession::TComputeMode& aComputeMode) |
|
1011 { |
|
1012 // Read dither from INI file |
|
1013 TPtrC str; |
|
1014 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
1015 if ( ret ) |
|
1016 { |
|
1017 if ( str==KComputeModePriorityControlDisabled ) |
|
1018 { |
|
1019 aComputeMode=RWsSession::EPriorityControlDisabled; |
|
1020 } |
|
1021 else if ( str==KComputeModePriorityControlComputeOn ) |
|
1022 { |
|
1023 aComputeMode=RWsSession::EPriorityControlComputeOn; |
|
1024 } |
|
1025 else if ( str==KComputeModePriorityControlComputeOff ) |
|
1026 { |
|
1027 aComputeMode=RWsSession::EPriorityControlComputeOff; |
|
1028 } |
|
1029 else |
|
1030 { |
|
1031 TInt intVal=0; |
|
1032 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
1033 if ( ret ) |
|
1034 { |
|
1035 aComputeMode=(RWsSession::TComputeMode)intVal; |
|
1036 } |
|
1037 } |
|
1038 } |
|
1039 |
|
1040 return ret; |
|
1041 } |
|
1042 |
|
1043 TBool CT_GraphicsUtil::ReadCornerType(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TCornerType& aCornerType) |
|
1044 { |
|
1045 // Read dither from INI file |
|
1046 TPtrC str; |
|
1047 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
1048 if ( ret ) |
|
1049 { |
|
1050 if ( str==KCornerTypeWindowSquare ) |
|
1051 { |
|
1052 aCornerType=EWindowCornerSquare; |
|
1053 } |
|
1054 else if ( str==KCornerTypeWindow1 ) |
|
1055 { |
|
1056 aCornerType=EWindowCorner1; |
|
1057 } |
|
1058 else if ( str==KCornerTypeWindow2 ) |
|
1059 { |
|
1060 aCornerType=EWindowCorner2; |
|
1061 } |
|
1062 else if ( str==KCornerTypeWindow3 ) |
|
1063 { |
|
1064 aCornerType=EWindowCorner3; |
|
1065 } |
|
1066 else if ( str==KCornerTypeWindow5 ) |
|
1067 { |
|
1068 aCornerType=EWindowCorner5; |
|
1069 } |
|
1070 else if ( str==KCornerTypeWindowRegion ) |
|
1071 { |
|
1072 aCornerType=EWindowCornerRegion; |
|
1073 } |
|
1074 else if ( str==KCornerTypeMask ) |
|
1075 { |
|
1076 aCornerType=ECornerTypeMask; |
|
1077 } |
|
1078 else |
|
1079 { |
|
1080 TInt intVal=0; |
|
1081 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
1082 if ( ret ) |
|
1083 { |
|
1084 aCornerType=(TCornerType)intVal; |
|
1085 } |
|
1086 } |
|
1087 } |
|
1088 |
|
1089 return ret; |
|
1090 } |
|
1091 |
|
1092 TBool CT_GraphicsUtil::ReadDisplayMode(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TDisplayMode& aDisplayMode) |
|
1093 { |
|
1094 // Read displaymode from INI file |
|
1095 TPtrC str; |
|
1096 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
1097 if ( ret ) |
|
1098 { |
|
1099 if ( str==KDisplayModeNone ) |
|
1100 { |
|
1101 aDisplayMode=ENone; |
|
1102 } |
|
1103 else if ( str==KDisplayModeGray2 ) |
|
1104 { |
|
1105 aDisplayMode=EGray2; |
|
1106 } |
|
1107 else if ( str==KDisplayModeGray4 ) |
|
1108 { |
|
1109 aDisplayMode=EGray4; |
|
1110 } |
|
1111 else if ( str==KDisplayModeGray16 ) |
|
1112 { |
|
1113 aDisplayMode=EGray16; |
|
1114 } |
|
1115 else if ( str==KDisplayModeGray256 ) |
|
1116 { |
|
1117 aDisplayMode=EGray256; |
|
1118 } |
|
1119 else if ( str==KDisplayModeColor16 ) |
|
1120 { |
|
1121 aDisplayMode=EColor16; |
|
1122 } |
|
1123 else if ( str==KDisplayModeColor256 ) |
|
1124 { |
|
1125 aDisplayMode=EColor256; |
|
1126 } |
|
1127 else if ( str==KDisplayModeColor64K ) |
|
1128 { |
|
1129 aDisplayMode=EColor64K; |
|
1130 } |
|
1131 else if ( str==KDisplayModeColor16M ) |
|
1132 { |
|
1133 aDisplayMode=EColor16M; |
|
1134 } |
|
1135 else if ( str==KDisplayModeRgb ) |
|
1136 { |
|
1137 aDisplayMode=ERgb; |
|
1138 } |
|
1139 else if ( str==KDisplayModeColor4K ) |
|
1140 { |
|
1141 aDisplayMode=EColor4K; |
|
1142 } |
|
1143 else if ( str==KDisplayModeColor16MU ) |
|
1144 { |
|
1145 aDisplayMode=EColor16MU; |
|
1146 } |
|
1147 else if ( str==KDisplayModeColor16MA ) |
|
1148 { |
|
1149 aDisplayMode=EColor16MA; |
|
1150 } |
|
1151 else if ( str==KDisplayModeColor16MAP ) |
|
1152 { |
|
1153 aDisplayMode=EColor16MAP; |
|
1154 } |
|
1155 else if ( str==KDisplayModeColorLast ) |
|
1156 { |
|
1157 aDisplayMode=EColorLast; |
|
1158 } |
|
1159 else |
|
1160 { |
|
1161 TInt intVal=0; |
|
1162 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
1163 if ( ret ) |
|
1164 { |
|
1165 aDisplayMode=(TDisplayMode)intVal; |
|
1166 } |
|
1167 } |
|
1168 } |
|
1169 |
|
1170 return ret; |
|
1171 } |
|
1172 |
|
1173 TBool CT_GraphicsUtil::ReadDrawMode(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, CGraphicsContext::TDrawMode& aDrawMode) |
|
1174 { |
|
1175 // Read displaymode from INI file |
|
1176 TPtrC str; |
|
1177 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
1178 if ( ret ) |
|
1179 { |
|
1180 if ( str==KDrawModeAND ) |
|
1181 { |
|
1182 aDrawMode=CGraphicsContext::EDrawModeAND; |
|
1183 } |
|
1184 else if ( str==KDrawModeNOTAND ) |
|
1185 { |
|
1186 aDrawMode=CGraphicsContext::EDrawModeNOTAND; |
|
1187 } |
|
1188 else if ( str==KDrawModePEN ) |
|
1189 { |
|
1190 aDrawMode=CGraphicsContext::EDrawModePEN; |
|
1191 } |
|
1192 else if ( str==KDrawModeANDNOT ) |
|
1193 { |
|
1194 aDrawMode=CGraphicsContext::EDrawModeANDNOT; |
|
1195 } |
|
1196 else if ( str==KDrawModeXOR ) |
|
1197 { |
|
1198 aDrawMode=CGraphicsContext::EDrawModeXOR; |
|
1199 } |
|
1200 else if ( str==KDrawModeOR ) |
|
1201 { |
|
1202 aDrawMode=CGraphicsContext::EDrawModeOR; |
|
1203 } |
|
1204 else if ( str==KDrawModeNOTANDNOT ) |
|
1205 { |
|
1206 aDrawMode=CGraphicsContext::EDrawModeNOTANDNOT; |
|
1207 } |
|
1208 else if ( str==KDrawModeNOTXOR ) |
|
1209 { |
|
1210 aDrawMode=CGraphicsContext::EDrawModeNOTXOR; |
|
1211 } |
|
1212 else if ( str==KDrawModeNOTSCREEN ) |
|
1213 { |
|
1214 aDrawMode=CGraphicsContext::EDrawModeNOTSCREEN; |
|
1215 } |
|
1216 else if ( str==KDrawModeNOTOR ) |
|
1217 { |
|
1218 aDrawMode=CGraphicsContext::EDrawModeNOTOR; |
|
1219 } |
|
1220 else if ( str==KDrawModeNOTPEN ) |
|
1221 { |
|
1222 aDrawMode=CGraphicsContext::EDrawModeNOTPEN; |
|
1223 } |
|
1224 else if ( str==KDrawModeORNOT ) |
|
1225 { |
|
1226 aDrawMode=CGraphicsContext::EDrawModeORNOT; |
|
1227 } |
|
1228 else if ( str==KDrawModeNOTORNOT ) |
|
1229 { |
|
1230 aDrawMode=CGraphicsContext::EDrawModeNOTORNOT; |
|
1231 } |
|
1232 else if ( str==KDrawModeWriteAlpha ) |
|
1233 { |
|
1234 aDrawMode=CGraphicsContext::EDrawModeWriteAlpha; |
|
1235 } |
|
1236 else |
|
1237 { |
|
1238 TInt intVal=0; |
|
1239 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
1240 if ( ret ) |
|
1241 { |
|
1242 aDrawMode=(CGraphicsContext::TDrawMode)intVal; |
|
1243 } |
|
1244 } |
|
1245 } |
|
1246 |
|
1247 return ret; |
|
1248 } |
|
1249 |
|
1250 TBool CT_GraphicsUtil::ReadErrorCategory(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TWsErrorMessage::TErrorCategory& aErrorCategory) |
|
1251 { |
|
1252 // Read dither from INI file |
|
1253 TPtrC str; |
|
1254 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
1255 if ( ret ) |
|
1256 { |
|
1257 if ( str==KErrorCategoryDrawingRegion ) |
|
1258 { |
|
1259 aErrorCategory=TWsErrorMessage::EDrawingRegion; |
|
1260 } |
|
1261 else if ( str==KErrorCategoryBackLight ) |
|
1262 { |
|
1263 aErrorCategory=TWsErrorMessage::EBackLight; |
|
1264 } |
|
1265 else if ( str==KErrorCategoryLogging ) |
|
1266 { |
|
1267 aErrorCategory=TWsErrorMessage::ELogging; |
|
1268 } |
|
1269 else if ( str==KErrorCategoryContrast ) |
|
1270 { |
|
1271 aErrorCategory=TWsErrorMessage::EContrast; |
|
1272 } |
|
1273 else |
|
1274 { |
|
1275 TInt intVal=0; |
|
1276 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
1277 if ( ret ) |
|
1278 { |
|
1279 aErrorCategory=(TWsErrorMessage::TErrorCategory)intVal; |
|
1280 } |
|
1281 } |
|
1282 } |
|
1283 |
|
1284 return ret; |
|
1285 } |
|
1286 |
|
1287 TBool CT_GraphicsUtil::ReadEventCode(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TEventCode& aEventCode) |
|
1288 { |
|
1289 // Read dither from INI file |
|
1290 TPtrC str; |
|
1291 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
1292 if ( ret ) |
|
1293 { |
|
1294 if ( str==KEventCodeNull ) |
|
1295 { |
|
1296 aEventCode=EEventNull; |
|
1297 } |
|
1298 else if ( str==KEventCodeKey ) |
|
1299 { |
|
1300 aEventCode=EEventKey; |
|
1301 } |
|
1302 else if ( str==KEventCodeKeyUp ) |
|
1303 { |
|
1304 aEventCode=EEventKeyUp; |
|
1305 } |
|
1306 else if ( str==KEventCodeKeyDown ) |
|
1307 { |
|
1308 aEventCode=EEventKeyDown; |
|
1309 } |
|
1310 else if ( str==KEventCodeModifiersChanged ) |
|
1311 { |
|
1312 aEventCode=EEventModifiersChanged; |
|
1313 } |
|
1314 else if ( str==KEventCodePointer ) |
|
1315 { |
|
1316 aEventCode=EEventPointer; |
|
1317 } |
|
1318 else if ( str==KEventCodePointerEnter ) |
|
1319 { |
|
1320 aEventCode=EEventPointerEnter; |
|
1321 } |
|
1322 else if ( str==KEventCodePointerExit ) |
|
1323 { |
|
1324 aEventCode=EEventPointerExit; |
|
1325 } |
|
1326 else if ( str==KEventCodePointerBufferReady ) |
|
1327 { |
|
1328 aEventCode=EEventPointerBufferReady; |
|
1329 } |
|
1330 else if ( str==KEventCodeDragDrop ) |
|
1331 { |
|
1332 aEventCode=EEventDragDrop; |
|
1333 } |
|
1334 else if ( str==KEventCodeFocusLost ) |
|
1335 { |
|
1336 aEventCode=EEventFocusLost; |
|
1337 } |
|
1338 else if ( str==KEventCodeFocusGained ) |
|
1339 { |
|
1340 aEventCode=EEventFocusGained; |
|
1341 } |
|
1342 else if ( str==KEventCodeSwitchOn ) |
|
1343 { |
|
1344 aEventCode=EEventSwitchOn; |
|
1345 } |
|
1346 else if ( str==KEventCodePassword ) |
|
1347 { |
|
1348 aEventCode=EEventPassword; |
|
1349 } |
|
1350 else if ( str==KEventCodeWindowGroupsChanged ) |
|
1351 { |
|
1352 aEventCode=EEventWindowGroupsChanged; |
|
1353 } |
|
1354 else if ( str==KEventCodeErrorMessage ) |
|
1355 { |
|
1356 aEventCode=EEventErrorMessage; |
|
1357 } |
|
1358 else if ( str==KEventCodeMessageReady ) |
|
1359 { |
|
1360 aEventCode=EEventMessageReady; |
|
1361 } |
|
1362 else if ( str==KEventCodeMarkInvalid ) |
|
1363 { |
|
1364 aEventCode=EEventMarkInvalid; |
|
1365 } |
|
1366 else if ( str==KEventCodeSwitchOff ) |
|
1367 { |
|
1368 aEventCode=EEventSwitchOff; |
|
1369 } |
|
1370 else if ( str==KEventCodeKeySwitchOff ) |
|
1371 { |
|
1372 aEventCode=EEventKeySwitchOff; |
|
1373 } |
|
1374 else if ( str==KEventCodeScreenDeviceChanged ) |
|
1375 { |
|
1376 aEventCode=EEventScreenDeviceChanged; |
|
1377 } |
|
1378 else if ( str==KEventCodeFocusGroupChanged ) |
|
1379 { |
|
1380 aEventCode=EEventFocusGroupChanged; |
|
1381 } |
|
1382 else if ( str==KEventCodeCaseOpened ) |
|
1383 { |
|
1384 aEventCode=EEventCaseOpened; |
|
1385 } |
|
1386 else if ( str==KEventCodeCaseClosed ) |
|
1387 { |
|
1388 aEventCode=EEventCaseClosed; |
|
1389 } |
|
1390 else if ( str==KEventCodeWindowGroupListChanged ) |
|
1391 { |
|
1392 aEventCode=EEventWindowGroupListChanged; |
|
1393 } |
|
1394 else if ( str==KEventCodeWindowVisibilityChanged ) |
|
1395 { |
|
1396 aEventCode=EEventWindowVisibilityChanged; |
|
1397 } |
|
1398 #if (defined SYMBIAN_PROCESS_MONITORING_AND_STARTUP) |
|
1399 else if ( str==KEventCodeRestartSystem ) |
|
1400 { |
|
1401 aEventCode=EEventRestartSystem; |
|
1402 } |
|
1403 #endif |
|
1404 else if ( str==KEventCodeKeyRepeat ) |
|
1405 { |
|
1406 aEventCode=EEventKeyRepeat; |
|
1407 } |
|
1408 else if ( str==KEventCodeDirectScreenAccessBegin ) |
|
1409 { |
|
1410 aEventCode=EEventDirectScreenAccessBegin; |
|
1411 } |
|
1412 else if ( str==KEventCodeDirectScreenAccessEnd ) |
|
1413 { |
|
1414 aEventCode=EEventDirectScreenAccessEnd; |
|
1415 } |
|
1416 else if ( str==KEventCodeHeartbeatTimerStateChange ) |
|
1417 { |
|
1418 aEventCode=EEventHeartbeatTimerStateChange; |
|
1419 } |
|
1420 else if ( str==KEventCodePowerMgmt ) |
|
1421 { |
|
1422 aEventCode=EEventPowerMgmt; |
|
1423 } |
|
1424 else if ( str==KEventCodeReserved ) |
|
1425 { |
|
1426 aEventCode=EEventReserved; |
|
1427 } |
|
1428 else if ( str==KEventCodeUser ) |
|
1429 { |
|
1430 aEventCode=EEventUser; |
|
1431 } |
|
1432 else |
|
1433 { |
|
1434 TInt intVal=0; |
|
1435 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
1436 if ( ret ) |
|
1437 { |
|
1438 aEventCode=(TEventCode)intVal; |
|
1439 } |
|
1440 } |
|
1441 } |
|
1442 |
|
1443 return ret; |
|
1444 } |
|
1445 |
|
1446 TBool CT_GraphicsUtil::ReadEventControl(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TEventControl& aEventControl) |
|
1447 { |
|
1448 // Read displaymode from INI file |
|
1449 TPtrC str; |
|
1450 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
1451 if ( ret ) |
|
1452 { |
|
1453 if ( str==KEventControlAlways ) |
|
1454 { |
|
1455 aEventControl=EEventControlAlways; |
|
1456 } |
|
1457 else if ( str==KEventControlOnlyWithKeyboardFocus ) |
|
1458 { |
|
1459 aEventControl=EEventControlOnlyWithKeyboardFocus; |
|
1460 } |
|
1461 else if ( str==KEventControlOnlyWhenVisible ) |
|
1462 { |
|
1463 aEventControl=EEventControlOnlyWhenVisible; |
|
1464 } |
|
1465 else |
|
1466 { |
|
1467 TInt intVal=0; |
|
1468 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
1469 if ( ret ) |
|
1470 { |
|
1471 aEventControl=(TEventControl)intVal; |
|
1472 } |
|
1473 } |
|
1474 } |
|
1475 |
|
1476 return ret; |
|
1477 } |
|
1478 |
|
1479 TBool CT_GraphicsUtil::ReadEventModifier(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TEventModifier& aEventModifier) |
|
1480 { |
|
1481 TPtrC str; |
|
1482 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
1483 if ( ret ) |
|
1484 { |
|
1485 ret=ConvertToEventModifier(str, aEventModifier); |
|
1486 } |
|
1487 |
|
1488 return ret; |
|
1489 } |
|
1490 |
|
1491 TBool CT_GraphicsUtil::ReadEventModifier(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TUint& aEventModifier) |
|
1492 { |
|
1493 TPtrC str; |
|
1494 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
1495 if ( ret ) |
|
1496 { |
|
1497 TUint temp=0; |
|
1498 ret=ConvertToEventModifier(str, temp); |
|
1499 if ( ret ) |
|
1500 { |
|
1501 aEventModifier=temp; |
|
1502 } |
|
1503 } |
|
1504 |
|
1505 return ret; |
|
1506 } |
|
1507 |
|
1508 TBool CT_GraphicsUtil::ConvertToEventModifier(const TDesC& aStr, TEventModifier& aEventModifier) |
|
1509 { |
|
1510 TBool ret=ETrue; |
|
1511 if ( aStr==KEventModifierAutorepeatable ) |
|
1512 { |
|
1513 aEventModifier=EModifierAutorepeatable; |
|
1514 } |
|
1515 else if ( aStr==KEventModifierKeypad ) |
|
1516 { |
|
1517 aEventModifier=EModifierKeypad; |
|
1518 } |
|
1519 else if ( aStr==KEventModifierLeftAlt ) |
|
1520 { |
|
1521 aEventModifier=EModifierLeftAlt; |
|
1522 } |
|
1523 else if ( aStr==KEventModifierRightAlt ) |
|
1524 { |
|
1525 aEventModifier=EModifierRightAlt; |
|
1526 } |
|
1527 else if ( aStr==KEventModifierAlt ) |
|
1528 { |
|
1529 aEventModifier=EModifierAlt; |
|
1530 } |
|
1531 else if ( aStr==KEventModifierLeftCtrl ) |
|
1532 { |
|
1533 aEventModifier=EModifierLeftCtrl; |
|
1534 } |
|
1535 else if ( aStr==KEventModifierRightCtrl ) |
|
1536 { |
|
1537 aEventModifier=EModifierRightCtrl; |
|
1538 } |
|
1539 else if ( aStr==KEventModifierCtrl ) |
|
1540 { |
|
1541 aEventModifier=EModifierCtrl; |
|
1542 } |
|
1543 else if ( aStr==KEventModifierLeftShift ) |
|
1544 { |
|
1545 aEventModifier=EModifierLeftShift; |
|
1546 } |
|
1547 else if ( aStr==KEventModifierRightShift ) |
|
1548 { |
|
1549 aEventModifier=EModifierRightShift; |
|
1550 } |
|
1551 else if ( aStr==KEventModifierShift ) |
|
1552 { |
|
1553 aEventModifier=EModifierShift; |
|
1554 } |
|
1555 else if ( aStr==KEventModifierLeftFunc ) |
|
1556 { |
|
1557 aEventModifier=EModifierLeftFunc; |
|
1558 } |
|
1559 else if ( aStr==KEventModifierRightFunc ) |
|
1560 { |
|
1561 aEventModifier=EModifierRightFunc; |
|
1562 } |
|
1563 else if ( aStr==KEventModifierFunc ) |
|
1564 { |
|
1565 aEventModifier=EModifierFunc; |
|
1566 } |
|
1567 else if ( aStr==KEventModifierCapsLock ) |
|
1568 { |
|
1569 aEventModifier=EModifierCapsLock; |
|
1570 } |
|
1571 else if ( aStr==KEventModifierNumLock ) |
|
1572 { |
|
1573 aEventModifier=EModifierNumLock; |
|
1574 } |
|
1575 else if ( aStr==KEventModifierScrollLock ) |
|
1576 { |
|
1577 aEventModifier=EModifierScrollLock; |
|
1578 } |
|
1579 else if ( aStr==KEventModifierKeyUp ) |
|
1580 { |
|
1581 aEventModifier=EModifierKeyUp; |
|
1582 } |
|
1583 else if ( aStr==KEventModifierSpecial ) |
|
1584 { |
|
1585 aEventModifier=EModifierSpecial; |
|
1586 } |
|
1587 else if ( aStr==KEventModifierDoubleClick ) |
|
1588 { |
|
1589 aEventModifier=EModifierDoubleClick; |
|
1590 } |
|
1591 else if ( aStr==KEventModifierPureKeycode ) |
|
1592 { |
|
1593 aEventModifier=EModifierPureKeycode; |
|
1594 } |
|
1595 else if ( aStr==KEventModifierKeyboardExtend ) |
|
1596 { |
|
1597 aEventModifier=EModifierKeyboardExtend; |
|
1598 } |
|
1599 else if ( aStr==KEventModifierCancelRotation ) |
|
1600 { |
|
1601 aEventModifier=EModifierCancelRotation; |
|
1602 } |
|
1603 else if ( aStr==KEventModifierRotateBy90 ) |
|
1604 { |
|
1605 aEventModifier=EModifierRotateBy90; |
|
1606 } |
|
1607 else if ( aStr==KEventModifierRotateBy180 ) |
|
1608 { |
|
1609 aEventModifier=EModifierRotateBy180; |
|
1610 } |
|
1611 else if ( aStr==KEventModifierRotateBy270 ) |
|
1612 { |
|
1613 aEventModifier=EModifierRotateBy270; |
|
1614 } |
|
1615 else if ( aStr==KEventModifierPointer3DButton1 ) |
|
1616 { |
|
1617 aEventModifier=EModifierPointer3DButton1; |
|
1618 } |
|
1619 else if ( aStr==KEventModifierPointer3DButton2 ) |
|
1620 { |
|
1621 aEventModifier=EModifierPointer3DButton2; |
|
1622 } |
|
1623 else if ( aStr==KEventModifierPointer3DButton3 ) |
|
1624 { |
|
1625 aEventModifier=EModifierPointer3DButton3; |
|
1626 } |
|
1627 else if ( aStr==KEventModifierAll ) |
|
1628 { |
|
1629 aEventModifier=EAllModifiers; |
|
1630 } |
|
1631 else |
|
1632 { |
|
1633 TUint eventModifier; |
|
1634 TLex lex(aStr); |
|
1635 ret=(lex.Val(eventModifier, EHex)==KErrNone); |
|
1636 if ( ret ) |
|
1637 { |
|
1638 aEventModifier=(TEventModifier)eventModifier; |
|
1639 } |
|
1640 } |
|
1641 |
|
1642 return ret; |
|
1643 } |
|
1644 |
|
1645 TBool CT_GraphicsUtil::ConvertToEventModifier(const TDesC& aStr, TUint& aEventModifier) |
|
1646 { |
|
1647 TBool ret=ETrue; |
|
1648 TInt location=aStr.Match(_L("*|*")); |
|
1649 if( location!=KErrNotFound ) |
|
1650 { |
|
1651 // Converting Left part of the data |
|
1652 TPtrC tempStr=aStr.Left(location); |
|
1653 ret=ConvertToEventModifier(tempStr, aEventModifier); |
|
1654 |
|
1655 // Converting right data can be with another "|" |
|
1656 tempStr.Set(aStr.Mid(location+1)); |
|
1657 |
|
1658 TUint temp; |
|
1659 if ( ConvertToEventModifier(tempStr, temp) ) |
|
1660 { |
|
1661 aEventModifier|=temp; |
|
1662 } |
|
1663 else |
|
1664 { |
|
1665 ret=EFalse; |
|
1666 } |
|
1667 } |
|
1668 else |
|
1669 { |
|
1670 TEventModifier eventModifier; |
|
1671 ret=ConvertToEventModifier(aStr, eventModifier); |
|
1672 if ( ret ) |
|
1673 { |
|
1674 aEventModifier=(TUint)eventModifier; |
|
1675 } |
|
1676 } |
|
1677 |
|
1678 return ret; |
|
1679 } |
|
1680 |
|
1681 TBool CT_GraphicsUtil::ReadFadeControl(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, RWindowTreeNode::TFadeControl& aFadeControl) |
|
1682 { |
|
1683 // Read displaymode from INI file |
|
1684 TPtrC str; |
|
1685 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
1686 if ( ret ) |
|
1687 { |
|
1688 if ( str==KFadeControlIncludeChildren ) |
|
1689 { |
|
1690 aFadeControl=RWindowTreeNode::EFadeIncludeChildren; |
|
1691 } |
|
1692 else if ( str==KFadeControlWindowOnly ) |
|
1693 { |
|
1694 aFadeControl=RWindowTreeNode::EFadeWindowOnly; |
|
1695 } |
|
1696 else |
|
1697 { |
|
1698 TInt intVal=0; |
|
1699 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
1700 if ( ret ) |
|
1701 { |
|
1702 aFadeControl=(RWindowTreeNode::TFadeControl)intVal; |
|
1703 } |
|
1704 } |
|
1705 } |
|
1706 |
|
1707 return ret; |
|
1708 } |
|
1709 |
|
1710 TBool CT_GraphicsUtil::ReadFillRule(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, CGraphicsContext::TFillRule& aFillRule) |
|
1711 { |
|
1712 // Read displaymode from INI file |
|
1713 TPtrC str; |
|
1714 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
1715 if ( ret ) |
|
1716 { |
|
1717 if ( str==KFillRuleAlternate ) |
|
1718 { |
|
1719 aFillRule=CGraphicsContext::EAlternate; |
|
1720 } |
|
1721 else if ( str==KFillRuleEWinding ) |
|
1722 { |
|
1723 aFillRule=CGraphicsContext::EWinding; |
|
1724 } |
|
1725 else |
|
1726 { |
|
1727 TInt intVal=0; |
|
1728 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
1729 if ( ret ) |
|
1730 { |
|
1731 aFillRule=(CGraphicsContext::TFillRule)intVal; |
|
1732 } |
|
1733 } |
|
1734 } |
|
1735 |
|
1736 return ret; |
|
1737 } |
|
1738 |
|
1739 TBool CT_GraphicsUtil::ReadTUsage(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, CPolygonFiller::TUsage& aUsage) |
|
1740 { |
|
1741 TPtrC str; |
|
1742 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
1743 if (ret) |
|
1744 { |
|
1745 if (str==KUsageEGetAllPixelRunsSequentially) |
|
1746 { |
|
1747 aUsage=CPolygonFiller::EGetAllPixelRunsSequentially; |
|
1748 } |
|
1749 else if (str==KUsageEGetPixelRunsSequentiallyForSpecifiedScanLines) |
|
1750 { |
|
1751 aUsage=CPolygonFiller::EGetPixelRunsSequentiallyForSpecifiedScanLines; |
|
1752 } |
|
1753 } |
|
1754 return ret; |
|
1755 } |
|
1756 |
|
1757 TBool CT_GraphicsUtil::ReadFontStrikethrough(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TFontStrikethrough& aFontStrikethrough) |
|
1758 { |
|
1759 // Read displaymode from INI file |
|
1760 TPtrC str; |
|
1761 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
1762 if ( ret ) |
|
1763 { |
|
1764 if ( str==KFontStrikethroughOff ) |
|
1765 { |
|
1766 aFontStrikethrough=EStrikethroughOff; |
|
1767 } |
|
1768 else if ( str==KFontStrikethroughOn ) |
|
1769 { |
|
1770 aFontStrikethrough=EStrikethroughOn; |
|
1771 } |
|
1772 else |
|
1773 { |
|
1774 TInt intVal=0; |
|
1775 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
1776 if ( ret ) |
|
1777 { |
|
1778 aFontStrikethrough=(TFontStrikethrough)intVal; |
|
1779 } |
|
1780 } |
|
1781 } |
|
1782 |
|
1783 return ret; |
|
1784 } |
|
1785 |
|
1786 TBool CT_GraphicsUtil::ReadFontUnderline(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TFontUnderline& aFontUnderline) |
|
1787 { |
|
1788 // Read displaymode from INI file |
|
1789 TPtrC str; |
|
1790 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
1791 if ( ret ) |
|
1792 { |
|
1793 if ( str==KFontUnderlineOff ) |
|
1794 { |
|
1795 aFontUnderline=EUnderlineOff; |
|
1796 } |
|
1797 else if ( str==KFontUnderlineOn ) |
|
1798 { |
|
1799 aFontUnderline=EUnderlineOn; |
|
1800 } |
|
1801 else |
|
1802 { |
|
1803 TInt intVal=0; |
|
1804 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
1805 if ( ret ) |
|
1806 { |
|
1807 aFontUnderline=(TFontUnderline)intVal; |
|
1808 } |
|
1809 } |
|
1810 } |
|
1811 |
|
1812 return ret; |
|
1813 } |
|
1814 |
|
1815 TBool CT_GraphicsUtil::ReadHotKey(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, THotKey& aHotKey) |
|
1816 { |
|
1817 // Read dither from INI file |
|
1818 TPtrC str; |
|
1819 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
1820 if ( ret ) |
|
1821 { |
|
1822 if ( str==KHotKeyEnableLogging ) |
|
1823 { |
|
1824 aHotKey=EHotKeyEnableLogging; |
|
1825 } |
|
1826 else if ( str==KHotKeyDisableLogging ) |
|
1827 { |
|
1828 aHotKey=EHotKeyDisableLogging; |
|
1829 } |
|
1830 else if ( str==KHotKeyStateDump ) |
|
1831 { |
|
1832 aHotKey=EHotKeyStateDump; |
|
1833 } |
|
1834 else if ( str==KHotKeyOfDeath ) |
|
1835 { |
|
1836 aHotKey=EHotKeyOfDeath; |
|
1837 } |
|
1838 else if ( str==KHotKeyShutDown ) |
|
1839 { |
|
1840 aHotKey=EHotKeyShutDown; |
|
1841 } |
|
1842 else if ( str==KHotKeyHeapDump ) |
|
1843 { |
|
1844 aHotKey=EHotKeyHeapDump; |
|
1845 } |
|
1846 else if ( str==KHotKeyIncContrast ) |
|
1847 { |
|
1848 aHotKey=EHotKeyIncContrast; |
|
1849 } |
|
1850 else if ( str==KHotKeyDecContrast ) |
|
1851 { |
|
1852 aHotKey=EHotKeyDecContrast; |
|
1853 } |
|
1854 else if ( str==KHotKeyOff ) |
|
1855 { |
|
1856 aHotKey=EHotKeyOff; |
|
1857 } |
|
1858 else if ( str==KHotKeyBacklightOn ) |
|
1859 { |
|
1860 aHotKey=EHotKeyBacklightOn; |
|
1861 } |
|
1862 else if ( str==KHotKeyBacklightOff ) |
|
1863 { |
|
1864 aHotKey=EHotKeyBacklightOff; |
|
1865 } |
|
1866 else if ( str==KHotKeyBacklightToggle ) |
|
1867 { |
|
1868 aHotKey=EHotKeyBacklightToggle; |
|
1869 } |
|
1870 else if ( str==KHotKeyScreenDimension0 ) |
|
1871 { |
|
1872 aHotKey=EHotKeyScreenDimension0; |
|
1873 } |
|
1874 else if ( str==KHotKeyScreenDimension1 ) |
|
1875 { |
|
1876 aHotKey=EHotKeyScreenDimension1; |
|
1877 } |
|
1878 else if ( str==KHotKeyScreenDimension2 ) |
|
1879 { |
|
1880 aHotKey=EHotKeyScreenDimension2; |
|
1881 } |
|
1882 else if ( str==KHotKeyScreenDimension3 ) |
|
1883 { |
|
1884 aHotKey=EHotKeyScreenDimension3; |
|
1885 } |
|
1886 else if ( str==KHotKeyCycleDisplaySize ) |
|
1887 { |
|
1888 aHotKey=EHotKeyCycleDisplaySize; |
|
1889 } |
|
1890 else if ( str==KHotKeyCycleOrientation ) |
|
1891 { |
|
1892 aHotKey=EHotKeyCycleOrientation; |
|
1893 } |
|
1894 else if ( str==KHotKeyIncBrightness ) |
|
1895 { |
|
1896 aHotKey=EHotKeyIncBrightness; |
|
1897 } |
|
1898 else if ( str==KHotKeyDecBrightness ) |
|
1899 { |
|
1900 aHotKey=EHotKeyDecBrightness; |
|
1901 } |
|
1902 else if ( str==KHotKeyCycleFocusScreen ) |
|
1903 { |
|
1904 aHotKey=EHotKeyCycleFocusScreen; |
|
1905 } |
|
1906 else if ( str==KHotKeyFirstKeyType ) |
|
1907 { |
|
1908 aHotKey=EHotKeyFirstKeyType; |
|
1909 } |
|
1910 else if ( str==KHotKeyLastKeyType ) |
|
1911 { |
|
1912 aHotKey=EHotKeyLastKeyType; |
|
1913 } |
|
1914 else |
|
1915 { |
|
1916 TInt intVal=0; |
|
1917 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
1918 if ( ret ) |
|
1919 { |
|
1920 aHotKey=(THotKey)intVal; |
|
1921 } |
|
1922 } |
|
1923 } |
|
1924 |
|
1925 return ret; |
|
1926 } |
|
1927 |
|
1928 TBool CT_GraphicsUtil::ReadKeyCode(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TKeyCode& aKeyCode) |
|
1929 { |
|
1930 // Read dither from INI file |
|
1931 TPtrC str; |
|
1932 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
1933 if ( ret ) |
|
1934 { |
|
1935 if ( str==KKeyNull ) |
|
1936 { |
|
1937 aKeyCode=EKeyNull; |
|
1938 } |
|
1939 else if ( str==KKeyBell ) |
|
1940 { |
|
1941 aKeyCode=EKeyBell; |
|
1942 } |
|
1943 else if ( str==KKeyBackspace ) |
|
1944 { |
|
1945 aKeyCode=EKeyBackspace; |
|
1946 } |
|
1947 else if ( str==KKeyTab ) |
|
1948 { |
|
1949 aKeyCode=EKeyTab; |
|
1950 } |
|
1951 else if ( str==KKeyLineFeed ) |
|
1952 { |
|
1953 aKeyCode=EKeyLineFeed; |
|
1954 } |
|
1955 else if ( str==KKeyVerticalTab ) |
|
1956 { |
|
1957 aKeyCode=EKeyVerticalTab; |
|
1958 } |
|
1959 else if ( str==KKeyFormFeed ) |
|
1960 { |
|
1961 aKeyCode=EKeyFormFeed; |
|
1962 } |
|
1963 else if ( str==KKeyEnter ) |
|
1964 { |
|
1965 aKeyCode=EKeyEnter; |
|
1966 } |
|
1967 else if ( str==KKeyEscape ) |
|
1968 { |
|
1969 aKeyCode=EKeyEscape; |
|
1970 } |
|
1971 else if ( str==KKeySpace ) |
|
1972 { |
|
1973 aKeyCode=EKeySpace; |
|
1974 } |
|
1975 else if ( str==KKeyDelete ) |
|
1976 { |
|
1977 aKeyCode=EKeyDelete; |
|
1978 } |
|
1979 else if ( str==KKeyPrintScreen ) |
|
1980 { |
|
1981 aKeyCode=EKeyPrintScreen; |
|
1982 } |
|
1983 else if ( str==KKeyPause ) |
|
1984 { |
|
1985 aKeyCode=EKeyPause; |
|
1986 } |
|
1987 else if ( str==KKeyHome ) |
|
1988 { |
|
1989 aKeyCode=EKeyHome; |
|
1990 } |
|
1991 else if ( str==KKeyEnd ) |
|
1992 { |
|
1993 aKeyCode=EKeyEnd; |
|
1994 } |
|
1995 else if ( str==KKeyPageUp ) |
|
1996 { |
|
1997 aKeyCode=EKeyPageUp; |
|
1998 } |
|
1999 else if ( str==KKeyPageDown ) |
|
2000 { |
|
2001 aKeyCode=EKeyPageDown; |
|
2002 } |
|
2003 else if ( str==KKeyInsert ) |
|
2004 { |
|
2005 aKeyCode=EKeyInsert; |
|
2006 } |
|
2007 else if ( str==KKeyLeftArrow ) |
|
2008 { |
|
2009 aKeyCode=EKeyLeftArrow; |
|
2010 } |
|
2011 else if ( str==KKeyRightArrow ) |
|
2012 { |
|
2013 aKeyCode=EKeyRightArrow; |
|
2014 } |
|
2015 else if ( str==KKeyUpArrow ) |
|
2016 { |
|
2017 aKeyCode=EKeyUpArrow; |
|
2018 } |
|
2019 else if ( str==KKeyDownArrow ) |
|
2020 { |
|
2021 aKeyCode=EKeyDownArrow; |
|
2022 } |
|
2023 else if ( str==KKeyLeftShift ) |
|
2024 { |
|
2025 aKeyCode=EKeyLeftShift; |
|
2026 } |
|
2027 else if ( str==KKeyRightShift ) |
|
2028 { |
|
2029 aKeyCode=EKeyRightShift; |
|
2030 } |
|
2031 else if ( str==KKeyLeftAlt ) |
|
2032 { |
|
2033 aKeyCode=EKeyLeftAlt; |
|
2034 } |
|
2035 else if ( str==KKeyRightAlt ) |
|
2036 { |
|
2037 aKeyCode=EKeyRightAlt; |
|
2038 } |
|
2039 else if ( str==KKeyLeftCtrl ) |
|
2040 { |
|
2041 aKeyCode=EKeyLeftCtrl; |
|
2042 } |
|
2043 else if ( str==KKeyRightCtrl ) |
|
2044 { |
|
2045 aKeyCode=EKeyRightCtrl; |
|
2046 } |
|
2047 else if ( str==KKeyLeftFunc ) |
|
2048 { |
|
2049 aKeyCode=EKeyLeftFunc; |
|
2050 } |
|
2051 else if ( str==KKeyRightFunc ) |
|
2052 { |
|
2053 aKeyCode=EKeyRightFunc; |
|
2054 } |
|
2055 else if ( str==KKeyCapsLock ) |
|
2056 { |
|
2057 aKeyCode=EKeyCapsLock; |
|
2058 } |
|
2059 else if ( str==KKeyNumLock ) |
|
2060 { |
|
2061 aKeyCode=EKeyNumLock; |
|
2062 } |
|
2063 else if ( str==KKeyScrollLock ) |
|
2064 { |
|
2065 aKeyCode=EKeyScrollLock; |
|
2066 } |
|
2067 else if ( str==KKeyF1 ) |
|
2068 { |
|
2069 aKeyCode=EKeyF1; |
|
2070 } |
|
2071 else if ( str==KKeyF2 ) |
|
2072 { |
|
2073 aKeyCode=EKeyF2; |
|
2074 } |
|
2075 else if ( str==KKeyF3 ) |
|
2076 { |
|
2077 aKeyCode=EKeyF3; |
|
2078 } |
|
2079 else if ( str==KKeyF4 ) |
|
2080 { |
|
2081 aKeyCode=EKeyF4; |
|
2082 } |
|
2083 else if ( str==KKeyF5 ) |
|
2084 { |
|
2085 aKeyCode=EKeyF5; |
|
2086 } |
|
2087 else if ( str==KKeyF6 ) |
|
2088 { |
|
2089 aKeyCode=EKeyF6; |
|
2090 } |
|
2091 else if ( str==KKeyF7 ) |
|
2092 { |
|
2093 aKeyCode=EKeyF7; |
|
2094 } |
|
2095 else if ( str==KKeyF8 ) |
|
2096 { |
|
2097 aKeyCode=EKeyF8; |
|
2098 } |
|
2099 else if ( str==KKeyF9 ) |
|
2100 { |
|
2101 aKeyCode=EKeyF9; |
|
2102 } |
|
2103 else if ( str==KKeyF10 ) |
|
2104 { |
|
2105 aKeyCode=EKeyF10; |
|
2106 } |
|
2107 else if ( str==KKeyF11 ) |
|
2108 { |
|
2109 aKeyCode=EKeyF11; |
|
2110 } |
|
2111 else if ( str==KKeyF12 ) |
|
2112 { |
|
2113 aKeyCode=EKeyF12; |
|
2114 } |
|
2115 else if ( str==KKeyF13 ) |
|
2116 { |
|
2117 aKeyCode=EKeyF13; |
|
2118 } |
|
2119 else if ( str==KKeyF14 ) |
|
2120 { |
|
2121 aKeyCode=EKeyF14; |
|
2122 } |
|
2123 else if ( str==KKeyF15 ) |
|
2124 { |
|
2125 aKeyCode=EKeyF15; |
|
2126 } |
|
2127 else if ( str==KKeyF16 ) |
|
2128 { |
|
2129 aKeyCode=EKeyF16; |
|
2130 } |
|
2131 else if ( str==KKeyF17 ) |
|
2132 { |
|
2133 aKeyCode=EKeyF17; |
|
2134 } |
|
2135 else if ( str==KKeyF18 ) |
|
2136 { |
|
2137 aKeyCode=EKeyF18; |
|
2138 } |
|
2139 else if ( str==KKeyF19 ) |
|
2140 { |
|
2141 aKeyCode=EKeyF19; |
|
2142 } |
|
2143 else if ( str==KKeyF20 ) |
|
2144 { |
|
2145 aKeyCode=EKeyF20; |
|
2146 } |
|
2147 else if ( str==KKeyF21 ) |
|
2148 { |
|
2149 aKeyCode=EKeyF21; |
|
2150 } |
|
2151 else if ( str==KKeyF22 ) |
|
2152 { |
|
2153 aKeyCode=EKeyF22; |
|
2154 } |
|
2155 else if ( str==KKeyF23 ) |
|
2156 { |
|
2157 aKeyCode=EKeyF23; |
|
2158 } |
|
2159 else if ( str==KKeyF24 ) |
|
2160 { |
|
2161 aKeyCode=EKeyF24; |
|
2162 } |
|
2163 else if ( str==KKeyOff ) |
|
2164 { |
|
2165 aKeyCode=EKeyOff; |
|
2166 } |
|
2167 else if ( str==KKeyIncContrast ) |
|
2168 { |
|
2169 aKeyCode=EKeyIncContrast; |
|
2170 } |
|
2171 else if ( str==KKeyDecContrast ) |
|
2172 { |
|
2173 aKeyCode=EKeyDecContrast; |
|
2174 } |
|
2175 else if ( str==KKeyBacklightOn ) |
|
2176 { |
|
2177 aKeyCode=EKeyBacklightOn; |
|
2178 } |
|
2179 else if ( str==KKeyBacklightOff ) |
|
2180 { |
|
2181 aKeyCode=EKeyBacklightOff; |
|
2182 } |
|
2183 else if ( str==KKeyBacklightToggle ) |
|
2184 { |
|
2185 aKeyCode=EKeyBacklightToggle; |
|
2186 } |
|
2187 else if ( str==KKeySliderDown ) |
|
2188 { |
|
2189 aKeyCode=EKeySliderDown; |
|
2190 } |
|
2191 else if ( str==KKeySliderUp ) |
|
2192 { |
|
2193 aKeyCode=EKeySliderUp; |
|
2194 } |
|
2195 else if ( str==KKeyMenu ) |
|
2196 { |
|
2197 aKeyCode=EKeyMenu; |
|
2198 } |
|
2199 else if ( str==KKeyDictaphonePlay ) |
|
2200 { |
|
2201 aKeyCode=EKeyDictaphonePlay; |
|
2202 } |
|
2203 else if ( str==KKeyDictaphoneStop ) |
|
2204 { |
|
2205 aKeyCode=EKeyDictaphoneStop; |
|
2206 } |
|
2207 else if ( str==KKeyDictaphoneRecord ) |
|
2208 { |
|
2209 aKeyCode=EKeyDictaphoneRecord; |
|
2210 } |
|
2211 else if ( str==KKeyHelp ) |
|
2212 { |
|
2213 aKeyCode=EKeyHelp; |
|
2214 } |
|
2215 else if ( str==KKeyDial ) |
|
2216 { |
|
2217 aKeyCode=EKeyDial; |
|
2218 } |
|
2219 else if ( str==KKeyScreenDimension0 ) |
|
2220 { |
|
2221 aKeyCode=EKeyScreenDimension0; |
|
2222 } |
|
2223 else if ( str==KKeyScreenDimension1 ) |
|
2224 { |
|
2225 aKeyCode=EKeyScreenDimension1; |
|
2226 } |
|
2227 else if ( str==KKeyScreenDimension2 ) |
|
2228 { |
|
2229 aKeyCode=EKeyScreenDimension2; |
|
2230 } |
|
2231 else if ( str==KKeyScreenDimension3 ) |
|
2232 { |
|
2233 aKeyCode=EKeyScreenDimension3; |
|
2234 } |
|
2235 else if ( str==KKeyIncVolume ) |
|
2236 { |
|
2237 aKeyCode=EKeyIncVolume; |
|
2238 } |
|
2239 else if ( str==KKeyDecVolume ) |
|
2240 { |
|
2241 aKeyCode=EKeyDecVolume; |
|
2242 } |
|
2243 else if ( str==KKeyDevice0 ) |
|
2244 { |
|
2245 aKeyCode=EKeyDevice0; |
|
2246 } |
|
2247 else if ( str==KKeyDevice1 ) |
|
2248 { |
|
2249 aKeyCode=EKeyDevice1; |
|
2250 } |
|
2251 else if ( str==KKeyDevice2 ) |
|
2252 { |
|
2253 aKeyCode=EKeyDevice2; |
|
2254 } |
|
2255 else if ( str==KKeyDevice3 ) |
|
2256 { |
|
2257 aKeyCode=EKeyDevice3; |
|
2258 } |
|
2259 else if ( str==KKeyDevice4 ) |
|
2260 { |
|
2261 aKeyCode=EKeyDevice4; |
|
2262 } |
|
2263 else if ( str==KKeyDevice5 ) |
|
2264 { |
|
2265 aKeyCode=EKeyDevice5; |
|
2266 } |
|
2267 else if ( str==KKeyDevice6 ) |
|
2268 { |
|
2269 aKeyCode=EKeyDevice6; |
|
2270 } |
|
2271 else if ( str==KKeyDevice7 ) |
|
2272 { |
|
2273 aKeyCode=EKeyDevice7; |
|
2274 } |
|
2275 else if ( str==KKeyDevice8 ) |
|
2276 { |
|
2277 aKeyCode=EKeyDevice8; |
|
2278 } |
|
2279 else if ( str==KKeyDevice9 ) |
|
2280 { |
|
2281 aKeyCode=EKeyDevice9; |
|
2282 } |
|
2283 else if ( str==KKeyDeviceA ) |
|
2284 { |
|
2285 aKeyCode=EKeyDeviceA; |
|
2286 } |
|
2287 else if ( str==KKeyDeviceB ) |
|
2288 { |
|
2289 aKeyCode=EKeyDeviceB; |
|
2290 } |
|
2291 else if ( str==KKeyDeviceC ) |
|
2292 { |
|
2293 aKeyCode=EKeyDeviceC; |
|
2294 } |
|
2295 else if ( str==KKeyDeviceD ) |
|
2296 { |
|
2297 aKeyCode=EKeyDeviceD; |
|
2298 } |
|
2299 else if ( str==KKeyDeviceE ) |
|
2300 { |
|
2301 aKeyCode=EKeyDeviceE; |
|
2302 } |
|
2303 else if ( str==KKeyDeviceF ) |
|
2304 { |
|
2305 aKeyCode=EKeyDeviceF; |
|
2306 } |
|
2307 else if ( str==KKeyApplication0 ) |
|
2308 { |
|
2309 aKeyCode=EKeyApplication0; |
|
2310 } |
|
2311 else if ( str==KKeyApplication1 ) |
|
2312 { |
|
2313 aKeyCode=EKeyApplication1; |
|
2314 } |
|
2315 else if ( str==KKeyApplication2 ) |
|
2316 { |
|
2317 aKeyCode=EKeyApplication2; |
|
2318 } |
|
2319 else if ( str==KKeyApplication3 ) |
|
2320 { |
|
2321 aKeyCode=EKeyApplication3; |
|
2322 } |
|
2323 else if ( str==KKeyApplication4 ) |
|
2324 { |
|
2325 aKeyCode=EKeyApplication4; |
|
2326 } |
|
2327 else if ( str==KKeyApplication5 ) |
|
2328 { |
|
2329 aKeyCode=EKeyApplication5; |
|
2330 } |
|
2331 else if ( str==KKeyApplication6 ) |
|
2332 { |
|
2333 aKeyCode=EKeyApplication6; |
|
2334 } |
|
2335 else if ( str==KKeyApplication7 ) |
|
2336 { |
|
2337 aKeyCode=EKeyApplication7; |
|
2338 } |
|
2339 else if ( str==KKeyApplication8 ) |
|
2340 { |
|
2341 aKeyCode=EKeyApplication8; |
|
2342 } |
|
2343 else if ( str==KKeyApplication9 ) |
|
2344 { |
|
2345 aKeyCode=EKeyApplication9; |
|
2346 } |
|
2347 else if ( str==KKeyApplicationA ) |
|
2348 { |
|
2349 aKeyCode=EKeyApplicationA; |
|
2350 } |
|
2351 else if ( str==KKeyApplicationB ) |
|
2352 { |
|
2353 aKeyCode=EKeyApplicationB; |
|
2354 } |
|
2355 else if ( str==KKeyApplicationC ) |
|
2356 { |
|
2357 aKeyCode=EKeyApplicationC; |
|
2358 } |
|
2359 else if ( str==KKeyApplicationD ) |
|
2360 { |
|
2361 aKeyCode=EKeyApplicationD; |
|
2362 } |
|
2363 else if ( str==KKeyApplicationE ) |
|
2364 { |
|
2365 aKeyCode=EKeyApplicationE; |
|
2366 } |
|
2367 else if ( str==KKeyApplicationF ) |
|
2368 { |
|
2369 aKeyCode=EKeyApplicationF; |
|
2370 } |
|
2371 else if ( str==KKeyYes ) |
|
2372 { |
|
2373 aKeyCode=EKeyYes; |
|
2374 } |
|
2375 else if ( str==KKeyNo ) |
|
2376 { |
|
2377 aKeyCode=EKeyNo; |
|
2378 } |
|
2379 else if ( str==KKeyIncBrightness ) |
|
2380 { |
|
2381 aKeyCode=EKeyIncBrightness; |
|
2382 } |
|
2383 else if ( str==KKeyDecBrightness ) |
|
2384 { |
|
2385 aKeyCode=EKeyDecBrightness; |
|
2386 } |
|
2387 else if ( str==KKeyKeyboardExtend ) |
|
2388 { |
|
2389 aKeyCode=EKeyKeyboardExtend; |
|
2390 } |
|
2391 else if ( str==KKeyDevice10 ) |
|
2392 { |
|
2393 aKeyCode=EKeyDevice10; |
|
2394 } |
|
2395 else if ( str==KKeyDevice11 ) |
|
2396 { |
|
2397 aKeyCode=EKeyDevice11; |
|
2398 } |
|
2399 else if ( str==KKeyDevice12 ) |
|
2400 { |
|
2401 aKeyCode=EKeyDevice12; |
|
2402 } |
|
2403 else if ( str==KKeyDevice13 ) |
|
2404 { |
|
2405 aKeyCode=EKeyDevice13; |
|
2406 } |
|
2407 else if ( str==KKeyDevice14 ) |
|
2408 { |
|
2409 aKeyCode=EKeyDevice14; |
|
2410 } |
|
2411 else if ( str==KKeyDevice15 ) |
|
2412 { |
|
2413 aKeyCode=EKeyDevice15; |
|
2414 } |
|
2415 else if ( str==KKeyDevice16 ) |
|
2416 { |
|
2417 aKeyCode=EKeyDevice16; |
|
2418 } |
|
2419 else if ( str==KKeyDevice17 ) |
|
2420 { |
|
2421 aKeyCode=EKeyDevice17; |
|
2422 } |
|
2423 else if ( str==KKeyDevice18 ) |
|
2424 { |
|
2425 aKeyCode=EKeyDevice18; |
|
2426 } |
|
2427 else if ( str==KKeyDevice19 ) |
|
2428 { |
|
2429 aKeyCode=EKeyDevice19; |
|
2430 } |
|
2431 else if ( str==KKeyDevice1A ) |
|
2432 { |
|
2433 aKeyCode=EKeyDevice1A; |
|
2434 } |
|
2435 else if ( str==KKeyDevice1B ) |
|
2436 { |
|
2437 aKeyCode=EKeyDevice1B; |
|
2438 } |
|
2439 else if ( str==KKeyDevice1C ) |
|
2440 { |
|
2441 aKeyCode=EKeyDevice1C; |
|
2442 } |
|
2443 else if ( str==KKeyDevice1D ) |
|
2444 { |
|
2445 aKeyCode=EKeyDevice1D; |
|
2446 } |
|
2447 else if ( str==KKeyDevice1E ) |
|
2448 { |
|
2449 aKeyCode=EKeyDevice1E; |
|
2450 } |
|
2451 else if ( str==KKeyDevice1F ) |
|
2452 { |
|
2453 aKeyCode=EKeyDevice1F; |
|
2454 } |
|
2455 else if ( str==KKeyApplication10 ) |
|
2456 { |
|
2457 aKeyCode=EKeyApplication10; |
|
2458 } |
|
2459 else if ( str==KKeyApplication11 ) |
|
2460 { |
|
2461 aKeyCode=EKeyApplication11; |
|
2462 } |
|
2463 else if ( str==KKeyApplication12 ) |
|
2464 { |
|
2465 aKeyCode=EKeyApplication12; |
|
2466 } |
|
2467 else if ( str==KKeyApplication13 ) |
|
2468 { |
|
2469 aKeyCode=EKeyApplication13; |
|
2470 } |
|
2471 else if ( str==KKeyApplication14 ) |
|
2472 { |
|
2473 aKeyCode=EKeyApplication14; |
|
2474 } |
|
2475 else if ( str==KKeyApplication15 ) |
|
2476 { |
|
2477 aKeyCode=EKeyApplication15; |
|
2478 } |
|
2479 else if ( str==KKeyApplication16 ) |
|
2480 { |
|
2481 aKeyCode=EKeyApplication16; |
|
2482 } |
|
2483 else if ( str==KKeyApplication17 ) |
|
2484 { |
|
2485 aKeyCode=EKeyApplication17; |
|
2486 } |
|
2487 else if ( str==KKeyApplication18 ) |
|
2488 { |
|
2489 aKeyCode=EKeyApplication18; |
|
2490 } |
|
2491 else if ( str==KKeyApplication19 ) |
|
2492 { |
|
2493 aKeyCode=EKeyApplication19; |
|
2494 } |
|
2495 else if ( str==KKeyApplication1A ) |
|
2496 { |
|
2497 aKeyCode=EKeyApplication1A; |
|
2498 } |
|
2499 else if ( str==KKeyApplication1B ) |
|
2500 { |
|
2501 aKeyCode=EKeyApplication1B; |
|
2502 } |
|
2503 else if ( str==KKeyApplication1C ) |
|
2504 { |
|
2505 aKeyCode=EKeyApplication1C; |
|
2506 } |
|
2507 else if ( str==KKeyApplication1D ) |
|
2508 { |
|
2509 aKeyCode=EKeyApplication1D; |
|
2510 } |
|
2511 else if ( str==KKeyApplication1E ) |
|
2512 { |
|
2513 aKeyCode=EKeyApplication1E; |
|
2514 } |
|
2515 else if ( str==KKeyApplication1F ) |
|
2516 { |
|
2517 aKeyCode=EKeyApplication1F; |
|
2518 } |
|
2519 else |
|
2520 { |
|
2521 TInt intVal=0; |
|
2522 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
2523 if ( ret ) |
|
2524 { |
|
2525 aKeyCode=(TKeyCode)intVal; |
|
2526 } |
|
2527 } |
|
2528 } |
|
2529 |
|
2530 return ret; |
|
2531 } |
|
2532 |
|
2533 TBool CT_GraphicsUtil::ReadGlyphBitmapType(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TGlyphBitmapType& aGlyphBitmapType) |
|
2534 { |
|
2535 // Read dither from INI file |
|
2536 TPtrC str; |
|
2537 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
2538 if ( ret ) |
|
2539 { |
|
2540 if ( str==KGlyphBitmapTypeDefault ) |
|
2541 { |
|
2542 aGlyphBitmapType=EDefaultGlyphBitmap; |
|
2543 } |
|
2544 else if ( str==KGlyphBitmapTypeMonochrome ) |
|
2545 { |
|
2546 aGlyphBitmapType=EMonochromeGlyphBitmap; |
|
2547 } |
|
2548 else if ( str==KGlyphBitmapTypeAntiAliased ) |
|
2549 { |
|
2550 aGlyphBitmapType=EAntiAliasedGlyphBitmap; |
|
2551 } |
|
2552 else if ( str==KGlyphBitmapTypeSubPixel ) |
|
2553 { |
|
2554 aGlyphBitmapType=ESubPixelGlyphBitmap; |
|
2555 } |
|
2556 else if ( str==KGlyphBitmapTypeFourColourBlend ) |
|
2557 { |
|
2558 aGlyphBitmapType=EFourColourBlendGlyphBitmap; |
|
2559 } |
|
2560 else |
|
2561 { |
|
2562 TInt intVal=0; |
|
2563 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
2564 if ( ret ) |
|
2565 { |
|
2566 aGlyphBitmapType=(TGlyphBitmapType)intVal; |
|
2567 } |
|
2568 } |
|
2569 } |
|
2570 |
|
2571 return ret; |
|
2572 } |
|
2573 |
|
2574 TBool CT_GraphicsUtil::ReadGraphicsOrientation(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, CFbsBitGc::TGraphicsOrientation& aGraphicsOrientation) |
|
2575 { |
|
2576 // Read dither from INI file |
|
2577 TPtrC str; |
|
2578 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
2579 if ( ret ) |
|
2580 { |
|
2581 if ( str==KGraphicsOrientationNormal ) |
|
2582 { |
|
2583 aGraphicsOrientation=CFbsBitGc::EGraphicsOrientationNormal; |
|
2584 } |
|
2585 else if ( str==KGraphicsOrientationRotated90 ) |
|
2586 { |
|
2587 aGraphicsOrientation=CFbsBitGc::EGraphicsOrientationRotated90; |
|
2588 } |
|
2589 else if ( str==KGraphicsOrientationRotated180 ) |
|
2590 { |
|
2591 aGraphicsOrientation=CFbsBitGc::EGraphicsOrientationRotated180; |
|
2592 } |
|
2593 else if ( str==KGraphicsOrientationRotated270 ) |
|
2594 { |
|
2595 aGraphicsOrientation=CFbsBitGc::EGraphicsOrientationRotated270; |
|
2596 } |
|
2597 else |
|
2598 { |
|
2599 TInt intVal=0; |
|
2600 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
2601 if ( ret ) |
|
2602 { |
|
2603 aGraphicsOrientation=(CFbsBitGc::TGraphicsOrientation)intVal; |
|
2604 } |
|
2605 } |
|
2606 } |
|
2607 |
|
2608 return ret; |
|
2609 } |
|
2610 |
|
2611 TBool CT_GraphicsUtil::ReadLoggingCommand(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, RWsSession::TLoggingCommand& aLoggingCommand) |
|
2612 { |
|
2613 // Read dither from INI file |
|
2614 TPtrC str; |
|
2615 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
2616 if ( ret ) |
|
2617 { |
|
2618 if ( str==KLoggingEnable ) |
|
2619 { |
|
2620 aLoggingCommand=RWsSession::ELoggingEnable; |
|
2621 } |
|
2622 else if ( str==KLoggingDisable ) |
|
2623 { |
|
2624 aLoggingCommand=RWsSession::ELoggingDisable; |
|
2625 } |
|
2626 else if ( str==KLoggingStatusDump ) |
|
2627 { |
|
2628 aLoggingCommand=RWsSession::ELoggingStatusDump; |
|
2629 } |
|
2630 else if ( str==KLoggingHeapDump ) |
|
2631 { |
|
2632 aLoggingCommand=RWsSession::ELoggingHeapDump; |
|
2633 } |
|
2634 else |
|
2635 { |
|
2636 TInt intVal=0; |
|
2637 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
2638 if ( ret ) |
|
2639 { |
|
2640 aLoggingCommand=(RWsSession::TLoggingCommand)intVal; |
|
2641 } |
|
2642 } |
|
2643 } |
|
2644 |
|
2645 return ret; |
|
2646 } |
|
2647 |
|
2648 TBool CT_GraphicsUtil::ReadModifierState(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TModifierState& aModifierState) |
|
2649 { |
|
2650 // Read dither from INI file |
|
2651 TPtrC str; |
|
2652 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
2653 if ( ret ) |
|
2654 { |
|
2655 if ( str==KModifierStateTurnOnModifier ) |
|
2656 { |
|
2657 aModifierState=ETurnOnModifier; |
|
2658 } |
|
2659 else if ( str==KModifierStateTurnOffModifier ) |
|
2660 { |
|
2661 aModifierState=ETurnOffModifier; |
|
2662 } |
|
2663 else if ( str==KModifierStateToggleModifier ) |
|
2664 { |
|
2665 aModifierState=EToggleModifier; |
|
2666 } |
|
2667 else |
|
2668 { |
|
2669 TInt intVal=0; |
|
2670 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
2671 if ( ret ) |
|
2672 { |
|
2673 aModifierState=(TModifierState)intVal; |
|
2674 } |
|
2675 } |
|
2676 } |
|
2677 |
|
2678 return ret; |
|
2679 } |
|
2680 |
|
2681 TBool CT_GraphicsUtil::ReadPasswordMode(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TPasswordMode& aPasswordMode) |
|
2682 { |
|
2683 // Read dither from INI file |
|
2684 TPtrC str; |
|
2685 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
2686 if ( ret ) |
|
2687 { |
|
2688 if ( str==KPasswordModeCancel ) |
|
2689 { |
|
2690 aPasswordMode=EPasswordCancel; |
|
2691 } |
|
2692 else if ( str==KPasswordModeNone ) |
|
2693 { |
|
2694 aPasswordMode=EPasswordNone; |
|
2695 } |
|
2696 else if ( str==KPasswordModeOnceADay ) |
|
2697 { |
|
2698 aPasswordMode=EPasswordOnceADay; |
|
2699 } |
|
2700 else if ( str==KPasswordModeAlways ) |
|
2701 { |
|
2702 aPasswordMode=EPasswordAlways; |
|
2703 } |
|
2704 else if ( str==KPasswordModeAlwaysTriggerNow ) |
|
2705 { |
|
2706 aPasswordMode=EPasswordAlwaysTriggerNow; |
|
2707 } |
|
2708 else if ( str==KPasswordModeOnceADayTriggerNow ) |
|
2709 { |
|
2710 aPasswordMode=EPasswordOnceADayTriggerNow; |
|
2711 } |
|
2712 else |
|
2713 { |
|
2714 TInt intVal=0; |
|
2715 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
2716 if ( ret ) |
|
2717 { |
|
2718 aPasswordMode=(TPasswordMode)intVal; |
|
2719 } |
|
2720 } |
|
2721 } |
|
2722 |
|
2723 return ret; |
|
2724 } |
|
2725 |
|
2726 TBool CT_GraphicsUtil::ReadPenStyle(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, CGraphicsContext::TPenStyle& aPenStyle) |
|
2727 { |
|
2728 // Read displaymode from INI file |
|
2729 TPtrC str; |
|
2730 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
2731 if ( ret ) |
|
2732 { |
|
2733 if ( str==KPenStyleNull ) |
|
2734 { |
|
2735 aPenStyle=CGraphicsContext::ENullPen; |
|
2736 } |
|
2737 else if ( str==KPenStyleSolid ) |
|
2738 { |
|
2739 aPenStyle=CGraphicsContext::ESolidPen; |
|
2740 } |
|
2741 else if ( str==KPenStyleDotted ) |
|
2742 { |
|
2743 aPenStyle=CGraphicsContext::EDottedPen; |
|
2744 } |
|
2745 else if ( str==KPenStyleDashed ) |
|
2746 { |
|
2747 aPenStyle=CGraphicsContext::EDashedPen; |
|
2748 } |
|
2749 else if ( str==KPenStyleDotDash ) |
|
2750 { |
|
2751 aPenStyle=CGraphicsContext::EDotDashPen; |
|
2752 } |
|
2753 else if ( str==KPenStyleDotDotDash ) |
|
2754 { |
|
2755 aPenStyle=CGraphicsContext::EDotDotDashPen; |
|
2756 } |
|
2757 else |
|
2758 { |
|
2759 TInt intVal=0; |
|
2760 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
2761 if ( ret ) |
|
2762 { |
|
2763 aPenStyle=(CGraphicsContext::TPenStyle)intVal; |
|
2764 } |
|
2765 } |
|
2766 } |
|
2767 |
|
2768 return ret; |
|
2769 } |
|
2770 |
|
2771 TBool CT_GraphicsUtil::ReadPointerCursorMode(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TPointerCursorMode& aPointerCursorMode) |
|
2772 { |
|
2773 // Read displaymode from INI file |
|
2774 TPtrC str; |
|
2775 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
2776 if ( ret ) |
|
2777 { |
|
2778 if ( str==KPointerCursorNone ) |
|
2779 { |
|
2780 aPointerCursorMode=EPointerCursorNone; |
|
2781 } |
|
2782 else if ( str==KPointerCursorFixed ) |
|
2783 { |
|
2784 aPointerCursorMode=EPointerCursorFixed; |
|
2785 } |
|
2786 else if ( str==KPointerCursorNormal ) |
|
2787 { |
|
2788 aPointerCursorMode=EPointerCursorNormal; |
|
2789 } |
|
2790 else if ( str==KPointerCursorWindow ) |
|
2791 { |
|
2792 aPointerCursorMode=EPointerCursorWindow; |
|
2793 } |
|
2794 else if ( str==KPointerCursorFirstMode ) |
|
2795 { |
|
2796 aPointerCursorMode=EPointerCursorFirstMode; |
|
2797 } |
|
2798 else if ( str==KPointerCursorLastMode ) |
|
2799 { |
|
2800 aPointerCursorMode=EPointerCursorLastMode; |
|
2801 } |
|
2802 else |
|
2803 { |
|
2804 TInt intVal=0; |
|
2805 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
2806 if ( ret ) |
|
2807 { |
|
2808 aPointerCursorMode=(TPointerCursorMode)intVal; |
|
2809 } |
|
2810 } |
|
2811 } |
|
2812 |
|
2813 return ret; |
|
2814 } |
|
2815 |
|
2816 TBool CT_GraphicsUtil::ReadPointerFilter(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TPointerFilter& aPointerFilter) |
|
2817 { |
|
2818 TPtrC str; |
|
2819 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
2820 if ( ret ) |
|
2821 { |
|
2822 ret=ConvertToPointerFilter(str, aPointerFilter); |
|
2823 } |
|
2824 |
|
2825 return ret; |
|
2826 } |
|
2827 |
|
2828 TBool CT_GraphicsUtil::ReadPointerFilter(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TUint& aPointerFilter) |
|
2829 { |
|
2830 TPtrC str; |
|
2831 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
2832 if ( ret ) |
|
2833 { |
|
2834 TUint temp=0; |
|
2835 ret=ConvertToPointerFilter(str, temp); |
|
2836 if ( ret ) |
|
2837 { |
|
2838 aPointerFilter=temp; |
|
2839 } |
|
2840 } |
|
2841 |
|
2842 return ret; |
|
2843 } |
|
2844 |
|
2845 TBool CT_GraphicsUtil::ConvertToPointerFilter(const TDesC& aStr, TPointerFilter& aPointerFilter) |
|
2846 { |
|
2847 TBool ret=ETrue; |
|
2848 |
|
2849 if ( aStr==KPointerFilterEnterExit ) |
|
2850 { |
|
2851 aPointerFilter=EPointerFilterEnterExit; |
|
2852 } |
|
2853 else if ( aStr==KPointerFilterMove ) |
|
2854 { |
|
2855 aPointerFilter=EPointerFilterMove; |
|
2856 } |
|
2857 else if ( aStr==KPointerFilterDrag ) |
|
2858 { |
|
2859 aPointerFilter=EPointerFilterDrag; |
|
2860 } |
|
2861 else if ( aStr==KPointerFilterGenerateSimulatedMove ) |
|
2862 { |
|
2863 aPointerFilter=EPointerGenerateSimulatedMove; |
|
2864 } |
|
2865 else if ( aStr==KPointerFilterMoveEvents ) |
|
2866 { |
|
2867 aPointerFilter=EPointerMoveEvents; |
|
2868 } |
|
2869 else |
|
2870 { |
|
2871 TUint pointerFilter; |
|
2872 TLex lex(aStr); |
|
2873 ret=(lex.Val(pointerFilter, EHex)==KErrNone); |
|
2874 if ( ret ) |
|
2875 { |
|
2876 aPointerFilter=(TPointerFilter)pointerFilter; |
|
2877 } |
|
2878 } |
|
2879 |
|
2880 return ret; |
|
2881 } |
|
2882 |
|
2883 TBool CT_GraphicsUtil::ConvertToPointerFilter(const TDesC& aStr, TUint& aPointerFilter) |
|
2884 { |
|
2885 TBool ret=ETrue; |
|
2886 TInt location=aStr.Match(_L("*|*")); |
|
2887 if( location!=KErrNotFound ) |
|
2888 { |
|
2889 // Converting Left part of the data |
|
2890 TPtrC tempStr=aStr.Left(location); |
|
2891 ret=ConvertToPointerFilter(tempStr, aPointerFilter); |
|
2892 |
|
2893 // Converting right data can be with another "|" |
|
2894 tempStr.Set(aStr.Mid(location+1)); |
|
2895 |
|
2896 TUint temp; |
|
2897 if ( ConvertToPointerFilter(tempStr, temp) ) |
|
2898 { |
|
2899 aPointerFilter|=temp; |
|
2900 } |
|
2901 else |
|
2902 { |
|
2903 ret=EFalse; |
|
2904 } |
|
2905 } |
|
2906 else |
|
2907 { |
|
2908 TPointerFilter pointerFilter; |
|
2909 ret=ConvertToPointerFilter(aStr, pointerFilter); |
|
2910 if ( ret ) |
|
2911 { |
|
2912 aPointerFilter=(TUint)pointerFilter; |
|
2913 } |
|
2914 } |
|
2915 |
|
2916 return ret; |
|
2917 } |
|
2918 |
|
2919 #if defined(SYMBIAN_WSERV_AND_CONE_MULTIPLE_SCREENS) |
|
2920 TBool CT_GraphicsUtil::ReadPriorities(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TInt& aPriorities) |
|
2921 { |
|
2922 TPtrC str; |
|
2923 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
2924 if ( ret ) |
|
2925 { |
|
2926 if ( str==KPrioritiesAll ) |
|
2927 { |
|
2928 aPriorities=EAllPriorities; |
|
2929 } |
|
2930 else |
|
2931 { |
|
2932 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, aPriorities); |
|
2933 } |
|
2934 } |
|
2935 |
|
2936 return ret; |
|
2937 } |
|
2938 #endif |
|
2939 |
|
2940 TBool CT_GraphicsUtil::ReadPriority(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, CActive::TPriority& aPriority) |
|
2941 { |
|
2942 TPtrC str; |
|
2943 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
2944 if ( ret ) |
|
2945 { |
|
2946 if ( str==KPriorityIdle ) |
|
2947 { |
|
2948 aPriority=CActive::EPriorityIdle; |
|
2949 } |
|
2950 else if ( str==KPriorityLow ) |
|
2951 { |
|
2952 aPriority=CActive::EPriorityLow; |
|
2953 } |
|
2954 else if ( str==KPriorityStandard ) |
|
2955 { |
|
2956 aPriority=CActive::EPriorityStandard; |
|
2957 } |
|
2958 else if ( str==KPriorityUserInput ) |
|
2959 { |
|
2960 aPriority=CActive::EPriorityUserInput; |
|
2961 } |
|
2962 else if ( str==KPriorityHigh ) |
|
2963 { |
|
2964 aPriority=CActive::EPriorityHigh; |
|
2965 } |
|
2966 else |
|
2967 { |
|
2968 TInt intVal=0; |
|
2969 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
2970 if ( ret ) |
|
2971 { |
|
2972 aPriority=(CActive::TPriority)intVal; |
|
2973 } |
|
2974 } |
|
2975 } |
|
2976 |
|
2977 return ret; |
|
2978 } |
|
2979 |
|
2980 TBool CT_GraphicsUtil::ReadScreenModeEnforcement(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TScreenModeEnforcement& aScreenModeEnforcement) |
|
2981 { |
|
2982 TPtrC str; |
|
2983 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
2984 if ( ret ) |
|
2985 { |
|
2986 if ( str==KSizeEnforcementNone ) |
|
2987 { |
|
2988 aScreenModeEnforcement=ESizeEnforcementNone; |
|
2989 } |
|
2990 else if ( str==KSizeEnforcementPixelsAndRotation ) |
|
2991 { |
|
2992 aScreenModeEnforcement=ESizeEnforcementPixelsAndRotation; |
|
2993 } |
|
2994 else if ( str==KSizeEnforcementPixelsTwipsAndRotation ) |
|
2995 { |
|
2996 aScreenModeEnforcement=ESizeEnforcementPixelsTwipsAndRotation; |
|
2997 } |
|
2998 else |
|
2999 { |
|
3000 TInt intVal=0; |
|
3001 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
3002 if ( ret ) |
|
3003 { |
|
3004 aScreenModeEnforcement=(TScreenModeEnforcement)intVal; |
|
3005 } |
|
3006 } |
|
3007 } |
|
3008 |
|
3009 return ret; |
|
3010 } |
|
3011 |
|
3012 TBool CT_GraphicsUtil::ReadSpriteInCompare(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TUint& aSpriteInCompare) |
|
3013 { |
|
3014 TPtrC str; |
|
3015 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
3016 if ( ret ) |
|
3017 { |
|
3018 TUint temp=0; |
|
3019 ret=ConvertToSpriteInCompare(str, temp); |
|
3020 if ( ret ) |
|
3021 { |
|
3022 aSpriteInCompare=temp; |
|
3023 } |
|
3024 } |
|
3025 |
|
3026 return ret; |
|
3027 } |
|
3028 |
|
3029 TBool CT_GraphicsUtil::ConvertToSpriteInCompare(const TDesC& aStr, TUint& aSpriteInCompare) |
|
3030 { |
|
3031 TBool ret=ETrue; |
|
3032 TInt location=aStr.Match(_L("*|*")); |
|
3033 if( location!=KErrNotFound ) |
|
3034 { |
|
3035 // Converting Left part of the data |
|
3036 TPtrC tempStr=aStr.Left(location); |
|
3037 ret=ConvertToSpriteInCompare(tempStr, aSpriteInCompare); |
|
3038 |
|
3039 // Converting right data can be with another "|" |
|
3040 tempStr.Set(aStr.Mid(location+1)); |
|
3041 |
|
3042 TUint temp; |
|
3043 if ( ConvertToPointerFilter(tempStr, temp) ) |
|
3044 { |
|
3045 aSpriteInCompare|=temp; |
|
3046 } |
|
3047 else |
|
3048 { |
|
3049 ret=EFalse; |
|
3050 } |
|
3051 } |
|
3052 else |
|
3053 { |
|
3054 if ( aStr==KSpriteInCompareRemoveSprite ) |
|
3055 { |
|
3056 aSpriteInCompare=CWsScreenDevice::ERemoveSprite; |
|
3057 } |
|
3058 else if ( aStr==KSpriteInCompareIncludeSprite ) |
|
3059 { |
|
3060 aSpriteInCompare=CWsScreenDevice::EIncludeSprite; |
|
3061 } |
|
3062 else if ( aStr==KSpriteInCompareIncludeTextCursor ) |
|
3063 { |
|
3064 aSpriteInCompare=CWsScreenDevice::EIncludeTextCursor; |
|
3065 } |
|
3066 else |
|
3067 { |
|
3068 TLex lex(aStr); |
|
3069 ret=(lex.Val(aSpriteInCompare, EHex)==KErrNone); |
|
3070 } |
|
3071 } |
|
3072 |
|
3073 return ret; |
|
3074 } |
|
3075 |
|
3076 TBool CT_GraphicsUtil::ReadStdScanCode(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TStdScanCode& aStdScanCode) |
|
3077 { |
|
3078 TPtrC str; |
|
3079 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
3080 if ( ret ) |
|
3081 { |
|
3082 if ( str==KStdKeyNull ) |
|
3083 { |
|
3084 aStdScanCode=EStdKeyNull; |
|
3085 } |
|
3086 else if ( str==KStdKeyBackspace ) |
|
3087 { |
|
3088 aStdScanCode=EStdKeyBackspace; |
|
3089 } |
|
3090 else if ( str==KStdKeyTab ) |
|
3091 { |
|
3092 aStdScanCode=EStdKeyTab; |
|
3093 } |
|
3094 else if ( str==KStdKeyEnter ) |
|
3095 { |
|
3096 aStdScanCode=EStdKeyEnter; |
|
3097 } |
|
3098 else if ( str==KStdKeyEscape ) |
|
3099 { |
|
3100 aStdScanCode=EStdKeyEscape; |
|
3101 } |
|
3102 else if ( str==KStdKeySpace ) |
|
3103 { |
|
3104 aStdScanCode=EStdKeySpace; |
|
3105 } |
|
3106 else if ( str==KStdKeyPrintScreen ) |
|
3107 { |
|
3108 aStdScanCode=EStdKeyPrintScreen; |
|
3109 } |
|
3110 else if ( str==KStdKeyPause ) |
|
3111 { |
|
3112 aStdScanCode=EStdKeyPause; |
|
3113 } |
|
3114 else if ( str==KStdKeyHome ) |
|
3115 { |
|
3116 aStdScanCode=EStdKeyHome; |
|
3117 } |
|
3118 else if ( str==KStdKeyEnd ) |
|
3119 { |
|
3120 aStdScanCode=EStdKeyEnd; |
|
3121 } |
|
3122 else if ( str==KStdKeyPageUp ) |
|
3123 { |
|
3124 aStdScanCode=EStdKeyPageUp; |
|
3125 } |
|
3126 else if ( str==KStdKeyPageDown ) |
|
3127 { |
|
3128 aStdScanCode=EStdKeyPageDown; |
|
3129 } |
|
3130 else if ( str==KStdKeyInsert ) |
|
3131 { |
|
3132 aStdScanCode=EStdKeyInsert; |
|
3133 } |
|
3134 else if ( str==KStdKeyDelete ) |
|
3135 { |
|
3136 aStdScanCode=EStdKeyDelete; |
|
3137 } |
|
3138 else if ( str==KStdKeyLeftArrow ) |
|
3139 { |
|
3140 aStdScanCode=EStdKeyLeftArrow; |
|
3141 } |
|
3142 else if ( str==KStdKeyRightArrow ) |
|
3143 { |
|
3144 aStdScanCode=EStdKeyRightArrow; |
|
3145 } |
|
3146 else if ( str==KStdKeyUpArrow ) |
|
3147 { |
|
3148 aStdScanCode=EStdKeyUpArrow; |
|
3149 } |
|
3150 else if ( str==KStdKeyDownArrow ) |
|
3151 { |
|
3152 aStdScanCode=EStdKeyDownArrow; |
|
3153 } |
|
3154 else if ( str==KStdKeyLeftShift ) |
|
3155 { |
|
3156 aStdScanCode=EStdKeyLeftShift; |
|
3157 } |
|
3158 else if ( str==KStdKeyRightShift ) |
|
3159 { |
|
3160 aStdScanCode=EStdKeyRightShift; |
|
3161 } |
|
3162 else if ( str==KStdKeyLeftAlt ) |
|
3163 { |
|
3164 aStdScanCode=EStdKeyLeftAlt; |
|
3165 } |
|
3166 else if ( str==KStdKeyRightAlt ) |
|
3167 { |
|
3168 aStdScanCode=EStdKeyRightAlt; |
|
3169 } |
|
3170 else if ( str==KStdKeyLeftCtrl ) |
|
3171 { |
|
3172 aStdScanCode=EStdKeyLeftCtrl; |
|
3173 } |
|
3174 else if ( str==KStdKeyRightCtrl ) |
|
3175 { |
|
3176 aStdScanCode=EStdKeyRightCtrl; |
|
3177 } |
|
3178 else if ( str==KStdKeyLeftFunc ) |
|
3179 { |
|
3180 aStdScanCode=EStdKeyLeftFunc; |
|
3181 } |
|
3182 else if ( str==KStdKeyRightFunc ) |
|
3183 { |
|
3184 aStdScanCode=EStdKeyRightFunc; |
|
3185 } |
|
3186 else if ( str==KStdKeyCapsLock ) |
|
3187 { |
|
3188 aStdScanCode=EStdKeyCapsLock; |
|
3189 } |
|
3190 else if ( str==KStdKeyNumLock ) |
|
3191 { |
|
3192 aStdScanCode=EStdKeyNumLock; |
|
3193 } |
|
3194 else if ( str==KStdKeyScrollLock ) |
|
3195 { |
|
3196 aStdScanCode=EStdKeyScrollLock; |
|
3197 } |
|
3198 else if ( str==KStdKeyF1 ) |
|
3199 { |
|
3200 aStdScanCode=EStdKeyF1; |
|
3201 } |
|
3202 else if ( str==KStdKeyF2 ) |
|
3203 { |
|
3204 aStdScanCode=EStdKeyF2; |
|
3205 } |
|
3206 else if ( str==KStdKeyF3 ) |
|
3207 { |
|
3208 aStdScanCode=EStdKeyF3; |
|
3209 } |
|
3210 else if ( str==KStdKeyF4 ) |
|
3211 { |
|
3212 aStdScanCode=EStdKeyF4; |
|
3213 } |
|
3214 else if ( str==KStdKeyF5 ) |
|
3215 { |
|
3216 aStdScanCode=EStdKeyF5; |
|
3217 } |
|
3218 else if ( str==KStdKeyF6 ) |
|
3219 { |
|
3220 aStdScanCode=EStdKeyF6; |
|
3221 } |
|
3222 else if ( str==KStdKeyF7 ) |
|
3223 { |
|
3224 aStdScanCode=EStdKeyF7; |
|
3225 } |
|
3226 else if ( str==KStdKeyF8 ) |
|
3227 { |
|
3228 aStdScanCode=EStdKeyF8; |
|
3229 } |
|
3230 else if ( str==KStdKeyF9 ) |
|
3231 { |
|
3232 aStdScanCode=EStdKeyF9; |
|
3233 } |
|
3234 else if ( str==KStdKeyF10 ) |
|
3235 { |
|
3236 aStdScanCode=EStdKeyF10; |
|
3237 } |
|
3238 else if ( str==KStdKeyF11 ) |
|
3239 { |
|
3240 aStdScanCode=EStdKeyF11; |
|
3241 } |
|
3242 else if ( str==KStdKeyF12 ) |
|
3243 { |
|
3244 aStdScanCode=EStdKeyF12; |
|
3245 } |
|
3246 else if ( str==KStdKeyF13 ) |
|
3247 { |
|
3248 aStdScanCode=EStdKeyF13; |
|
3249 } |
|
3250 else if ( str==KStdKeyF14 ) |
|
3251 { |
|
3252 aStdScanCode=EStdKeyF14; |
|
3253 } |
|
3254 else if ( str==KStdKeyF15 ) |
|
3255 { |
|
3256 aStdScanCode=EStdKeyF15; |
|
3257 } |
|
3258 else if ( str==KStdKeyF16 ) |
|
3259 { |
|
3260 aStdScanCode=EStdKeyF16; |
|
3261 } |
|
3262 else if ( str==KStdKeyF17 ) |
|
3263 { |
|
3264 aStdScanCode=EStdKeyF17; |
|
3265 } |
|
3266 else if ( str==KStdKeyF18 ) |
|
3267 { |
|
3268 aStdScanCode=EStdKeyF18; |
|
3269 } |
|
3270 else if ( str==KStdKeyF19 ) |
|
3271 { |
|
3272 aStdScanCode=EStdKeyF19; |
|
3273 } |
|
3274 else if ( str==KStdKeyF20 ) |
|
3275 { |
|
3276 aStdScanCode=EStdKeyF20; |
|
3277 } |
|
3278 else if ( str==KStdKeyF21 ) |
|
3279 { |
|
3280 aStdScanCode=EStdKeyF21; |
|
3281 } |
|
3282 else if ( str==KStdKeyF22 ) |
|
3283 { |
|
3284 aStdScanCode=EStdKeyF22; |
|
3285 } |
|
3286 else if ( str==KStdKeyF23 ) |
|
3287 { |
|
3288 aStdScanCode=EStdKeyF23; |
|
3289 } |
|
3290 else if ( str==KStdKeyF24 ) |
|
3291 { |
|
3292 aStdScanCode=EStdKeyF24; |
|
3293 } |
|
3294 else if ( str==KStdKeyXXX ) |
|
3295 { |
|
3296 aStdScanCode=EStdKeyXXX; |
|
3297 } |
|
3298 else if ( str==KStdKeyComma ) |
|
3299 { |
|
3300 aStdScanCode=EStdKeyComma; |
|
3301 } |
|
3302 else if ( str==KStdKeyFullStop ) |
|
3303 { |
|
3304 aStdScanCode=EStdKeyFullStop; |
|
3305 } |
|
3306 else if ( str==KStdKeyForwardSlash ) |
|
3307 { |
|
3308 aStdScanCode=EStdKeyForwardSlash; |
|
3309 } |
|
3310 else if ( str==KStdKeyBackSlash ) |
|
3311 { |
|
3312 aStdScanCode=EStdKeyBackSlash; |
|
3313 } |
|
3314 else if ( str==KStdKeySemiColon ) |
|
3315 { |
|
3316 aStdScanCode=EStdKeySemiColon; |
|
3317 } |
|
3318 else if ( str==KStdKeySingleQuote ) |
|
3319 { |
|
3320 aStdScanCode=EStdKeySingleQuote; |
|
3321 } |
|
3322 else if ( str==KStdKeyHash ) |
|
3323 { |
|
3324 aStdScanCode=EStdKeyHash; |
|
3325 } |
|
3326 else if ( str==KStdKeySquareBracketLeft ) |
|
3327 { |
|
3328 aStdScanCode=EStdKeySquareBracketLeft; |
|
3329 } |
|
3330 else if ( str==KStdKeySquareBracketRight ) |
|
3331 { |
|
3332 aStdScanCode=EStdKeySquareBracketRight; |
|
3333 } |
|
3334 else if ( str==KStdKeyMinus ) |
|
3335 { |
|
3336 aStdScanCode=EStdKeyMinus; |
|
3337 } |
|
3338 else if ( str==KStdKeyEquals ) |
|
3339 { |
|
3340 aStdScanCode=EStdKeyEquals; |
|
3341 } |
|
3342 else if ( str==KStdKeyNkpForwardSlash ) |
|
3343 { |
|
3344 aStdScanCode=EStdKeyNkpForwardSlash; |
|
3345 } |
|
3346 else if ( str==KStdKeyNkpAsterisk ) |
|
3347 { |
|
3348 aStdScanCode=EStdKeyNkpAsterisk; |
|
3349 } |
|
3350 else if ( str==KStdKeyNkpMinus ) |
|
3351 { |
|
3352 aStdScanCode=EStdKeyNkpMinus; |
|
3353 } |
|
3354 else if ( str==KStdKeyNkpPlus ) |
|
3355 { |
|
3356 aStdScanCode=EStdKeyNkpPlus; |
|
3357 } |
|
3358 else if ( str==KStdKeyNkpEnter ) |
|
3359 { |
|
3360 aStdScanCode=EStdKeyNkpEnter; |
|
3361 } |
|
3362 else if ( str==KStdKeyNkp1 ) |
|
3363 { |
|
3364 aStdScanCode=EStdKeyNkp1; |
|
3365 } |
|
3366 else if ( str==KStdKeyNkp2 ) |
|
3367 { |
|
3368 aStdScanCode=EStdKeyNkp2; |
|
3369 } |
|
3370 else if ( str==KStdKeyNkp3 ) |
|
3371 { |
|
3372 aStdScanCode=EStdKeyNkp3; |
|
3373 } |
|
3374 else if ( str==KStdKeyNkp4 ) |
|
3375 { |
|
3376 aStdScanCode=EStdKeyNkp4; |
|
3377 } |
|
3378 else if ( str==KStdKeyNkp5 ) |
|
3379 { |
|
3380 aStdScanCode=EStdKeyNkp5; |
|
3381 } |
|
3382 else if ( str==KStdKeyNkp6 ) |
|
3383 { |
|
3384 aStdScanCode=EStdKeyNkp6; |
|
3385 } |
|
3386 else if ( str==KStdKeyNkp7 ) |
|
3387 { |
|
3388 aStdScanCode=EStdKeyNkp7; |
|
3389 } |
|
3390 else if ( str==KStdKeyNkp8 ) |
|
3391 { |
|
3392 aStdScanCode=EStdKeyNkp8; |
|
3393 } |
|
3394 else if ( str==KStdKeyNkp9 ) |
|
3395 { |
|
3396 aStdScanCode=EStdKeyNkp9; |
|
3397 } |
|
3398 else if ( str==KStdKeyNkp0 ) |
|
3399 { |
|
3400 aStdScanCode=EStdKeyNkp0; |
|
3401 } |
|
3402 else if ( str==KStdKeyNkpFullStop ) |
|
3403 { |
|
3404 aStdScanCode=EStdKeyNkpFullStop; |
|
3405 } |
|
3406 else if ( str==KStdKeyMenu ) |
|
3407 { |
|
3408 aStdScanCode=EStdKeyMenu; |
|
3409 } |
|
3410 else if ( str==KStdKeyBacklightOn ) |
|
3411 { |
|
3412 aStdScanCode=EStdKeyBacklightOn; |
|
3413 } |
|
3414 else if ( str==KStdKeyBacklightOff ) |
|
3415 { |
|
3416 aStdScanCode=EStdKeyBacklightOff; |
|
3417 } |
|
3418 else if ( str==KStdKeyBacklightToggle ) |
|
3419 { |
|
3420 aStdScanCode=EStdKeyBacklightToggle; |
|
3421 } |
|
3422 else if ( str==KStdKeyIncContrast ) |
|
3423 { |
|
3424 aStdScanCode=EStdKeyIncContrast; |
|
3425 } |
|
3426 else if ( str==KStdKeyDecContrast ) |
|
3427 { |
|
3428 aStdScanCode=EStdKeyDecContrast; |
|
3429 } |
|
3430 else if ( str==KStdKeySliderDown ) |
|
3431 { |
|
3432 aStdScanCode=EStdKeySliderDown; |
|
3433 } |
|
3434 else if ( str==KStdKeySliderUp ) |
|
3435 { |
|
3436 aStdScanCode=EStdKeySliderUp; |
|
3437 } |
|
3438 else if ( str==KStdKeyDictaphonePlay ) |
|
3439 { |
|
3440 aStdScanCode=EStdKeyDictaphonePlay; |
|
3441 } |
|
3442 else if ( str==KStdKeyDictaphoneStop ) |
|
3443 { |
|
3444 aStdScanCode=EStdKeyDictaphoneStop; |
|
3445 } |
|
3446 else if ( str==KStdKeyDictaphoneRecord ) |
|
3447 { |
|
3448 aStdScanCode=EStdKeyDictaphoneRecord; |
|
3449 } |
|
3450 else if ( str==KStdKeyHelp ) |
|
3451 { |
|
3452 aStdScanCode=EStdKeyHelp; |
|
3453 } |
|
3454 else if ( str==KStdKeyOff ) |
|
3455 { |
|
3456 aStdScanCode=EStdKeyOff; |
|
3457 } |
|
3458 else if ( str==KStdKeyDial ) |
|
3459 { |
|
3460 aStdScanCode=EStdKeyDial; |
|
3461 } |
|
3462 else if ( str==KStdKeyIncVolume ) |
|
3463 { |
|
3464 aStdScanCode=EStdKeyIncVolume; |
|
3465 } |
|
3466 else if ( str==KStdKeyDecVolume ) |
|
3467 { |
|
3468 aStdScanCode=EStdKeyDecVolume; |
|
3469 } |
|
3470 else if ( str==KStdKeyDevice0 ) |
|
3471 { |
|
3472 aStdScanCode=EStdKeyDevice0; |
|
3473 } |
|
3474 else if ( str==KStdKeyDevice1 ) |
|
3475 { |
|
3476 aStdScanCode=EStdKeyDevice1; |
|
3477 } |
|
3478 else if ( str==KStdKeyDevice2 ) |
|
3479 { |
|
3480 aStdScanCode=EStdKeyDevice2; |
|
3481 } |
|
3482 else if ( str==KStdKeyDevice3 ) |
|
3483 { |
|
3484 aStdScanCode=EStdKeyDevice3; |
|
3485 } |
|
3486 else if ( str==KStdKeyDevice4 ) |
|
3487 { |
|
3488 aStdScanCode=EStdKeyDevice4; |
|
3489 } |
|
3490 else if ( str==KStdKeyDevice5 ) |
|
3491 { |
|
3492 aStdScanCode=EStdKeyDevice5; |
|
3493 } |
|
3494 else if ( str==KStdKeyDevice6 ) |
|
3495 { |
|
3496 aStdScanCode=EStdKeyDevice6; |
|
3497 } |
|
3498 else if ( str==KStdKeyDevice7 ) |
|
3499 { |
|
3500 aStdScanCode=EStdKeyDevice7; |
|
3501 } |
|
3502 else if ( str==KStdKeyDevice8 ) |
|
3503 { |
|
3504 aStdScanCode=EStdKeyDevice8; |
|
3505 } |
|
3506 else if ( str==KStdKeyDevice9 ) |
|
3507 { |
|
3508 aStdScanCode=EStdKeyDevice9; |
|
3509 } |
|
3510 else if ( str==KStdKeyDeviceA ) |
|
3511 { |
|
3512 aStdScanCode=EStdKeyDeviceA; |
|
3513 } |
|
3514 else if ( str==KStdKeyDeviceB ) |
|
3515 { |
|
3516 aStdScanCode=EStdKeyDeviceB; |
|
3517 } |
|
3518 else if ( str==KStdKeyDeviceC ) |
|
3519 { |
|
3520 aStdScanCode=EStdKeyDeviceC; |
|
3521 } |
|
3522 else if ( str==KStdKeyDeviceD ) |
|
3523 { |
|
3524 aStdScanCode=EStdKeyDeviceD; |
|
3525 } |
|
3526 else if ( str==KStdKeyDeviceE ) |
|
3527 { |
|
3528 aStdScanCode=EStdKeyDeviceE; |
|
3529 } |
|
3530 else if ( str==KStdKeyDeviceF ) |
|
3531 { |
|
3532 aStdScanCode=EStdKeyDeviceF; |
|
3533 } |
|
3534 else if ( str==KStdKeyApplication0 ) |
|
3535 { |
|
3536 aStdScanCode=EStdKeyApplication0; |
|
3537 } |
|
3538 else if ( str==KStdKeyApplication1 ) |
|
3539 { |
|
3540 aStdScanCode=EStdKeyApplication1; |
|
3541 } |
|
3542 else if ( str==KStdKeyApplication2 ) |
|
3543 { |
|
3544 aStdScanCode=EStdKeyApplication2; |
|
3545 } |
|
3546 else if ( str==KStdKeyApplication3 ) |
|
3547 { |
|
3548 aStdScanCode=EStdKeyApplication3; |
|
3549 } |
|
3550 else if ( str==KStdKeyApplication4 ) |
|
3551 { |
|
3552 aStdScanCode=EStdKeyApplication4; |
|
3553 } |
|
3554 else if ( str==KStdKeyApplication5 ) |
|
3555 { |
|
3556 aStdScanCode=EStdKeyApplication5; |
|
3557 } |
|
3558 else if ( str==KStdKeyApplication6 ) |
|
3559 { |
|
3560 aStdScanCode=EStdKeyApplication6; |
|
3561 } |
|
3562 else if ( str==KStdKeyApplication7 ) |
|
3563 { |
|
3564 aStdScanCode=EStdKeyApplication7; |
|
3565 } |
|
3566 else if ( str==KStdKeyApplication8 ) |
|
3567 { |
|
3568 aStdScanCode=EStdKeyApplication8; |
|
3569 } |
|
3570 else if ( str==KStdKeyApplication9 ) |
|
3571 { |
|
3572 aStdScanCode=EStdKeyApplication9; |
|
3573 } |
|
3574 else if ( str==KStdKeyApplicationA ) |
|
3575 { |
|
3576 aStdScanCode=EStdKeyApplicationA; |
|
3577 } |
|
3578 else if ( str==KStdKeyApplicationB ) |
|
3579 { |
|
3580 aStdScanCode=EStdKeyApplicationB; |
|
3581 } |
|
3582 else if ( str==KStdKeyApplicationC ) |
|
3583 { |
|
3584 aStdScanCode=EStdKeyApplicationC; |
|
3585 } |
|
3586 else if ( str==KStdKeyApplicationD ) |
|
3587 { |
|
3588 aStdScanCode=EStdKeyApplicationD; |
|
3589 } |
|
3590 else if ( str==KStdKeyApplicationE ) |
|
3591 { |
|
3592 aStdScanCode=EStdKeyApplicationE; |
|
3593 } |
|
3594 else if ( str==KStdKeyApplicationF ) |
|
3595 { |
|
3596 aStdScanCode=EStdKeyApplicationF; |
|
3597 } |
|
3598 else if ( str==KStdKeyYes ) |
|
3599 { |
|
3600 aStdScanCode=EStdKeyYes; |
|
3601 } |
|
3602 else if ( str==KStdKeyNo ) |
|
3603 { |
|
3604 aStdScanCode=EStdKeyNo; |
|
3605 } |
|
3606 else if ( str==KStdKeyIncBrightness ) |
|
3607 { |
|
3608 aStdScanCode=EStdKeyIncBrightness; |
|
3609 } |
|
3610 else if ( str==KStdKeyDecBrightness ) |
|
3611 { |
|
3612 aStdScanCode=EStdKeyDecBrightness; |
|
3613 } |
|
3614 else if ( str==KStdKeyKeyboardExtend ) |
|
3615 { |
|
3616 aStdScanCode=EStdKeyKeyboardExtend; |
|
3617 } |
|
3618 else if ( str==KStdKeyDevice10 ) |
|
3619 { |
|
3620 aStdScanCode=EStdKeyDevice10; |
|
3621 } |
|
3622 else if ( str==KStdKeyDevice11 ) |
|
3623 { |
|
3624 aStdScanCode=EStdKeyDevice11; |
|
3625 } |
|
3626 else if ( str==KStdKeyDevice12 ) |
|
3627 { |
|
3628 aStdScanCode=EStdKeyDevice12; |
|
3629 } |
|
3630 else if ( str==KStdKeyDevice13 ) |
|
3631 { |
|
3632 aStdScanCode=EStdKeyDevice13; |
|
3633 } |
|
3634 else if ( str==KStdKeyDevice14 ) |
|
3635 { |
|
3636 aStdScanCode=EStdKeyDevice14; |
|
3637 } |
|
3638 else if ( str==KStdKeyDevice15 ) |
|
3639 { |
|
3640 aStdScanCode=EStdKeyDevice15; |
|
3641 } |
|
3642 else if ( str==KStdKeyDevice16 ) |
|
3643 { |
|
3644 aStdScanCode=EStdKeyDevice16; |
|
3645 } |
|
3646 else if ( str==KStdKeyDevice17 ) |
|
3647 { |
|
3648 aStdScanCode=EStdKeyDevice17; |
|
3649 } |
|
3650 else if ( str==KStdKeyDevice18 ) |
|
3651 { |
|
3652 aStdScanCode=EStdKeyDevice18; |
|
3653 } |
|
3654 else if ( str==KStdKeyDevice19 ) |
|
3655 { |
|
3656 aStdScanCode=EStdKeyDevice19; |
|
3657 } |
|
3658 else if ( str==KStdKeyDevice1A ) |
|
3659 { |
|
3660 aStdScanCode=EStdKeyDevice1A; |
|
3661 } |
|
3662 else if ( str==KStdKeyDevice1B ) |
|
3663 { |
|
3664 aStdScanCode=EStdKeyDevice1B; |
|
3665 } |
|
3666 else if ( str==KStdKeyDevice1C ) |
|
3667 { |
|
3668 aStdScanCode=EStdKeyDevice1C; |
|
3669 } |
|
3670 else if ( str==KStdKeyDevice1D ) |
|
3671 { |
|
3672 aStdScanCode=EStdKeyDevice1D; |
|
3673 } |
|
3674 else if ( str==KStdKeyDevice1E ) |
|
3675 { |
|
3676 aStdScanCode=EStdKeyDevice1E; |
|
3677 } |
|
3678 else if ( str==KStdKeyDevice1F ) |
|
3679 { |
|
3680 aStdScanCode=EStdKeyDevice1F; |
|
3681 } |
|
3682 else if ( str==KStdKeyApplication10 ) |
|
3683 { |
|
3684 aStdScanCode=EStdKeyApplication10; |
|
3685 } |
|
3686 else if ( str==KStdKeyApplication11 ) |
|
3687 { |
|
3688 aStdScanCode=EStdKeyApplication11; |
|
3689 } |
|
3690 else if ( str==KStdKeyApplication12 ) |
|
3691 { |
|
3692 aStdScanCode=EStdKeyApplication12; |
|
3693 } |
|
3694 else if ( str==KStdKeyApplication13 ) |
|
3695 { |
|
3696 aStdScanCode=EStdKeyApplication13; |
|
3697 } |
|
3698 else if ( str==KStdKeyApplication14 ) |
|
3699 { |
|
3700 aStdScanCode=EStdKeyApplication14; |
|
3701 } |
|
3702 else if ( str==KStdKeyApplication15 ) |
|
3703 { |
|
3704 aStdScanCode=EStdKeyApplication15; |
|
3705 } |
|
3706 else if ( str==KStdKeyApplication16 ) |
|
3707 { |
|
3708 aStdScanCode=EStdKeyApplication16; |
|
3709 } |
|
3710 else if ( str==KStdKeyApplication17 ) |
|
3711 { |
|
3712 aStdScanCode=EStdKeyApplication17; |
|
3713 } |
|
3714 else if ( str==KStdKeyApplication18 ) |
|
3715 { |
|
3716 aStdScanCode=EStdKeyApplication18; |
|
3717 } |
|
3718 else if ( str==KStdKeyApplication19 ) |
|
3719 { |
|
3720 aStdScanCode=EStdKeyApplication19; |
|
3721 } |
|
3722 else if ( str==KStdKeyApplication1A ) |
|
3723 { |
|
3724 aStdScanCode=EStdKeyApplication1A; |
|
3725 } |
|
3726 else if ( str==KStdKeyApplication1B ) |
|
3727 { |
|
3728 aStdScanCode=EStdKeyApplication1B; |
|
3729 } |
|
3730 else if ( str==KStdKeyApplication1C ) |
|
3731 { |
|
3732 aStdScanCode=EStdKeyApplication1C; |
|
3733 } |
|
3734 else if ( str==KStdKeyApplication1D ) |
|
3735 { |
|
3736 aStdScanCode=EStdKeyApplication1D; |
|
3737 } |
|
3738 else if ( str==KStdKeyApplication1E ) |
|
3739 { |
|
3740 aStdScanCode=EStdKeyApplication1E; |
|
3741 } |
|
3742 else if ( str==KStdKeyApplication1F ) |
|
3743 { |
|
3744 aStdScanCode=EStdKeyApplication1F; |
|
3745 } |
|
3746 else |
|
3747 { |
|
3748 TInt intVal=0; |
|
3749 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
3750 if ( ret ) |
|
3751 { |
|
3752 aStdScanCode=(TStdScanCode)intVal; |
|
3753 } |
|
3754 } |
|
3755 } |
|
3756 |
|
3757 return ret; |
|
3758 } |
|
3759 |
|
3760 TBool CT_GraphicsUtil::ReadTextAlign(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, CGraphicsContext::TTextAlign& aTextAlign) |
|
3761 { |
|
3762 // Read displaymode from INI file |
|
3763 TPtrC str; |
|
3764 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
3765 if ( ret ) |
|
3766 { |
|
3767 if ( str==KTextAlignLeft ) |
|
3768 { |
|
3769 aTextAlign=CGraphicsContext::ELeft; |
|
3770 } |
|
3771 else if ( str==KTextAlignCenter ) |
|
3772 { |
|
3773 aTextAlign=CGraphicsContext::ECenter; |
|
3774 } |
|
3775 else if ( str==KTextAlignRight ) |
|
3776 { |
|
3777 aTextAlign=CGraphicsContext::ERight; |
|
3778 } |
|
3779 else |
|
3780 { |
|
3781 TInt intVal=0; |
|
3782 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
3783 if ( ret ) |
|
3784 { |
|
3785 aTextAlign=(CGraphicsContext::TTextAlign)intVal; |
|
3786 } |
|
3787 } |
|
3788 } |
|
3789 |
|
3790 return ret; |
|
3791 } |
|
3792 |
|
3793 TBool CT_GraphicsUtil::ReadTextDirection(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, CFont::TTextDirection& aTextDirection) |
|
3794 { |
|
3795 // Read displaymode from INI file |
|
3796 TPtrC str; |
|
3797 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
3798 if ( ret ) |
|
3799 { |
|
3800 if ( str==KTextDirectionHorizontal ) |
|
3801 { |
|
3802 aTextDirection=CFont::EHorizontal; |
|
3803 } |
|
3804 else if ( str==KTextDirectionVertical ) |
|
3805 { |
|
3806 aTextDirection=CFont::EVertical; |
|
3807 } |
|
3808 else |
|
3809 { |
|
3810 TInt intVal=0; |
|
3811 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
3812 if ( ret ) |
|
3813 { |
|
3814 aTextDirection=(CFont::TTextDirection)intVal; |
|
3815 } |
|
3816 } |
|
3817 } |
|
3818 |
|
3819 return ret; |
|
3820 } |
|
3821 |
|
3822 TBool CT_GraphicsUtil::ReadType(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TPointerEvent::TType& aType) |
|
3823 { |
|
3824 // Read displaymode from INI file |
|
3825 TPtrC str; |
|
3826 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
3827 if ( ret ) |
|
3828 { |
|
3829 if ( str==KTypeButton1Down ) |
|
3830 { |
|
3831 aType=TPointerEvent::EButton1Down; |
|
3832 } |
|
3833 else if ( str==KTypeButton1Up ) |
|
3834 { |
|
3835 aType=TPointerEvent::EButton1Up; |
|
3836 } |
|
3837 else if ( str==KTypeButton2Down ) |
|
3838 { |
|
3839 aType=TPointerEvent::EButton2Down; |
|
3840 } |
|
3841 else if ( str==KTypeButton2Up ) |
|
3842 { |
|
3843 aType=TPointerEvent::EButton2Up; |
|
3844 } |
|
3845 else if ( str==KTypeButton3Down ) |
|
3846 { |
|
3847 aType=TPointerEvent::EButton3Down; |
|
3848 } |
|
3849 else if ( str==KTypeButton3Up ) |
|
3850 { |
|
3851 aType=TPointerEvent::EButton3Up; |
|
3852 } |
|
3853 else if ( str==KTypeDrag ) |
|
3854 { |
|
3855 aType=TPointerEvent::EDrag; |
|
3856 } |
|
3857 else if ( str==KTypeMove ) |
|
3858 { |
|
3859 aType=TPointerEvent::EMove; |
|
3860 } |
|
3861 else if ( str==KTypeButtonRepeat ) |
|
3862 { |
|
3863 aType=TPointerEvent::EButtonRepeat; |
|
3864 } |
|
3865 else if ( str==KTypeSwitchOn ) |
|
3866 { |
|
3867 aType=TPointerEvent::ESwitchOn; |
|
3868 } |
|
3869 else |
|
3870 { |
|
3871 TInt intVal=0; |
|
3872 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
3873 if ( ret ) |
|
3874 { |
|
3875 aType=(TPointerEvent::TType)intVal; |
|
3876 } |
|
3877 } |
|
3878 } |
|
3879 |
|
3880 return ret; |
|
3881 } |
|
3882 |
|
3883 TBool CT_GraphicsUtil::ReadType(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TRawEvent::TType& aType) |
|
3884 { |
|
3885 // Read displaymode from INI file |
|
3886 TPtrC str; |
|
3887 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
3888 if ( ret ) |
|
3889 { |
|
3890 if ( str==KTypeNone ) |
|
3891 { |
|
3892 aType=TRawEvent::ENone; |
|
3893 } |
|
3894 else if ( str==KTypePointerMove ) |
|
3895 { |
|
3896 aType=TRawEvent::EPointerMove; |
|
3897 } |
|
3898 else if ( str==KTypePointerSwitchOn ) |
|
3899 { |
|
3900 aType=TRawEvent::EPointerSwitchOn; |
|
3901 } |
|
3902 else if ( str==KTypeKeyDown ) |
|
3903 { |
|
3904 aType=TRawEvent::EKeyDown; |
|
3905 } |
|
3906 else if ( str==KTypeKeyUp ) |
|
3907 { |
|
3908 aType=TRawEvent::EKeyUp; |
|
3909 } |
|
3910 else if ( str==KTypeRedraw ) |
|
3911 { |
|
3912 aType=TRawEvent::ERedraw; |
|
3913 } |
|
3914 else if ( str==KTypeSwitchOn ) |
|
3915 { |
|
3916 aType=TRawEvent::ESwitchOn; |
|
3917 } |
|
3918 else if ( str==KTypeActive ) |
|
3919 { |
|
3920 aType=TRawEvent::EActive; |
|
3921 } |
|
3922 else if ( str==KTypeInactive ) |
|
3923 { |
|
3924 aType=TRawEvent::EInactive; |
|
3925 } |
|
3926 else if ( str==KTypeUpdateModifiers ) |
|
3927 { |
|
3928 aType=TRawEvent::EUpdateModifiers; |
|
3929 } |
|
3930 else if ( str==KTypeButton1Down ) |
|
3931 { |
|
3932 aType=TRawEvent::EButton1Down; |
|
3933 } |
|
3934 else if ( str==KTypeButton1Up ) |
|
3935 { |
|
3936 aType=TRawEvent::EButton1Up; |
|
3937 } |
|
3938 else if ( str==KTypeButton2Down ) |
|
3939 { |
|
3940 aType=TRawEvent::EButton2Down; |
|
3941 } |
|
3942 else if ( str==KTypeButton2Up ) |
|
3943 { |
|
3944 aType=TRawEvent::EButton2Up; |
|
3945 } |
|
3946 else if ( str==KTypeButton3Down ) |
|
3947 { |
|
3948 aType=TRawEvent::EButton3Down; |
|
3949 } |
|
3950 else if ( str==KTypeButton3Up ) |
|
3951 { |
|
3952 aType=TRawEvent::EButton3Up; |
|
3953 } |
|
3954 else if ( str==KTypeSwitchOff ) |
|
3955 { |
|
3956 aType=TRawEvent::ESwitchOff; |
|
3957 } |
|
3958 else if ( str==KTypeKeyRepeat ) |
|
3959 { |
|
3960 aType=TRawEvent::EKeyRepeat; |
|
3961 } |
|
3962 else if ( str==KTypeCaseOpen ) |
|
3963 { |
|
3964 aType=TRawEvent::ECaseOpen; |
|
3965 } |
|
3966 else if ( str==KTypeCaseClose ) |
|
3967 { |
|
3968 aType=TRawEvent::ECaseClose; |
|
3969 } |
|
3970 else if ( str==KTypePointer3DInRange ) |
|
3971 { |
|
3972 aType=TRawEvent::EPointer3DInRange; |
|
3973 } |
|
3974 else if ( str==KTypePointer3DOutOfRange ) |
|
3975 { |
|
3976 aType=TRawEvent::EPointer3DOutOfRange; |
|
3977 } |
|
3978 else if ( str==KTypePointer3DTilt ) |
|
3979 { |
|
3980 aType=TRawEvent::EPointer3DTilt; |
|
3981 } |
|
3982 else if ( str==KTypePointer3DRotation ) |
|
3983 { |
|
3984 aType=TRawEvent::EPointer3DRotation; |
|
3985 } |
|
3986 else if ( str==KTypePointer3DTiltAndMove ) |
|
3987 { |
|
3988 aType=TRawEvent::EPointer3DTiltAndMove; |
|
3989 } |
|
3990 else if ( str==KTypeButton4Down ) |
|
3991 { |
|
3992 aType=TRawEvent::EButton4Down; |
|
3993 } |
|
3994 else if ( str==KTypeButton4Up ) |
|
3995 { |
|
3996 aType=TRawEvent::EButton4Up; |
|
3997 } |
|
3998 else if ( str==KTypeButton5Down ) |
|
3999 { |
|
4000 aType=TRawEvent::EButton5Down; |
|
4001 } |
|
4002 else if ( str==KTypeButton5Up ) |
|
4003 { |
|
4004 aType=TRawEvent::EButton5Up; |
|
4005 } |
|
4006 else if ( str==KTypeButton6Down ) |
|
4007 { |
|
4008 aType=TRawEvent::EButton6Down; |
|
4009 } |
|
4010 else if ( str==KTypeButton6Up ) |
|
4011 { |
|
4012 aType=TRawEvent::EButton6Up; |
|
4013 } |
|
4014 else if ( str==KTypeRestartSystem ) |
|
4015 { |
|
4016 aType=TRawEvent::ERestartSystem; |
|
4017 } |
|
4018 else |
|
4019 { |
|
4020 TInt intVal=0; |
|
4021 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
4022 if ( ret ) |
|
4023 { |
|
4024 aType=(TRawEvent::TType)intVal; |
|
4025 } |
|
4026 } |
|
4027 } |
|
4028 |
|
4029 return ret; |
|
4030 } |
|
4031 |
|
4032 TBool CT_GraphicsUtil::ReadTerminateReason(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, RDirectScreenAccess::TTerminationReasons& aReason) |
|
4033 { |
|
4034 TPtrC str; |
|
4035 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
4036 if ( ret ) |
|
4037 { |
|
4038 if(str == KETerminateCancel) |
|
4039 { |
|
4040 aReason = RDirectScreenAccess::ETerminateCancel; |
|
4041 } |
|
4042 else if(str == KETerminateRegion) |
|
4043 { |
|
4044 aReason = RDirectScreenAccess::ETerminateRegion; |
|
4045 } |
|
4046 else if(str == KETerminateRotation) |
|
4047 { |
|
4048 aReason = RDirectScreenAccess::ETerminateRotation; |
|
4049 } |
|
4050 else if(str == KETerminateScreenMode) |
|
4051 { |
|
4052 aReason = RDirectScreenAccess::ETerminateScreenMode; |
|
4053 } |
|
4054 else |
|
4055 { |
|
4056 ret = EFalse; |
|
4057 } |
|
4058 } |
|
4059 return ret; |
|
4060 } |
|
4061 |
|
4062 TBool CT_GraphicsUtil::ReadWindowBackupType(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TUint& aWindowBackupType) |
|
4063 { |
|
4064 TPtrC str; |
|
4065 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
4066 if ( ret ) |
|
4067 { |
|
4068 TUint temp=0; |
|
4069 ret=ConvertToWindowBackupType(str, temp); |
|
4070 if ( ret ) |
|
4071 { |
|
4072 aWindowBackupType=temp; |
|
4073 } |
|
4074 } |
|
4075 |
|
4076 return ret; |
|
4077 } |
|
4078 |
|
4079 TBool CT_GraphicsUtil::ConvertToWindowBackupType(const TDesC& aStr, TWindowBackupType& aWindowBackupType) |
|
4080 { |
|
4081 TBool ret=ETrue; |
|
4082 if ( aStr==KWindowBackupTypeAreaBehind ) |
|
4083 { |
|
4084 aWindowBackupType=EWindowBackupAreaBehind; |
|
4085 } |
|
4086 else if ( aStr==KWindowBackupTypeFullScreen ) |
|
4087 { |
|
4088 aWindowBackupType=EWindowBackupFullScreen; |
|
4089 } |
|
4090 else |
|
4091 { |
|
4092 TUint windowBackupType; |
|
4093 TLex lex(aStr); |
|
4094 ret=(lex.Val(windowBackupType, EHex)==KErrNone); |
|
4095 if ( ret ) |
|
4096 { |
|
4097 aWindowBackupType=(TWindowBackupType)windowBackupType; |
|
4098 } |
|
4099 } |
|
4100 |
|
4101 return ret; |
|
4102 } |
|
4103 |
|
4104 TBool CT_GraphicsUtil::ConvertToWindowBackupType(const TDesC& aStr, TUint& aWindowBackupType) |
|
4105 { |
|
4106 TBool ret=ETrue; |
|
4107 TInt location=aStr.Match(_L("*|*")); |
|
4108 if( location!=KErrNotFound ) |
|
4109 { |
|
4110 // Converting Left part of the data |
|
4111 TPtrC tempStr=aStr.Left(location); |
|
4112 ret=ConvertToWindowBackupType(tempStr, aWindowBackupType); |
|
4113 |
|
4114 // Converting right data can be with another "|" |
|
4115 tempStr.Set(aStr.Mid(location+1)); |
|
4116 |
|
4117 TUint temp; |
|
4118 if ( ConvertToWindowBackupType(tempStr, temp) ) |
|
4119 { |
|
4120 aWindowBackupType|=temp; |
|
4121 } |
|
4122 else |
|
4123 { |
|
4124 ret=EFalse; |
|
4125 } |
|
4126 } |
|
4127 else |
|
4128 { |
|
4129 TWindowBackupType windowBackupType; |
|
4130 ret=ConvertToWindowBackupType(aStr, windowBackupType); |
|
4131 if ( ret ) |
|
4132 { |
|
4133 aWindowBackupType=(TUint)windowBackupType; |
|
4134 } |
|
4135 } |
|
4136 |
|
4137 return ret; |
|
4138 } |
|
4139 |
|
4140 TBool CT_GraphicsUtil::ReadWsTransparencyPolicy(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TWsTransparencyPolicy& aWsTransparencyPolicy) |
|
4141 { |
|
4142 // Read displaymode from INI file |
|
4143 TPtrC str; |
|
4144 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
4145 if ( ret ) |
|
4146 { |
|
4147 if ( str==KWsTransparencyPolicyDefault ) |
|
4148 { |
|
4149 aWsTransparencyPolicy=ETransparencyDefault; |
|
4150 } |
|
4151 else if ( str==KWsTransparencyPolicyFreezeUnder ) |
|
4152 { |
|
4153 aWsTransparencyPolicy=ETransparencyFreezeUnder; |
|
4154 } |
|
4155 else |
|
4156 { |
|
4157 TInt intVal=0; |
|
4158 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
4159 if ( ret ) |
|
4160 { |
|
4161 aWsTransparencyPolicy=(TWsTransparencyPolicy)intVal; |
|
4162 } |
|
4163 } |
|
4164 } |
|
4165 |
|
4166 return ret; |
|
4167 } |
|
4168 |
|
4169 TBool CT_GraphicsUtil::ReadWsVisibilityChangedEvent(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TWsVisibilityChangedEvent& aWsVisibilityChangedEvent) |
|
4170 { |
|
4171 TPtrC str; |
|
4172 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
4173 if ( ret ) |
|
4174 { |
|
4175 ret=ConvertToWsVisibilityChangedEvent(str, aWsVisibilityChangedEvent.iFlags); |
|
4176 } |
|
4177 |
|
4178 return ret; |
|
4179 } |
|
4180 |
|
4181 TBool CT_GraphicsUtil::ConvertToWsVisibilityChangedEvent(const TDesC& aStr, TUint& aWsVisibilityChangedEvent) |
|
4182 { |
|
4183 TBool ret=ETrue; |
|
4184 TInt location=aStr.Match(_L("*|*")); |
|
4185 if( location!=KErrNotFound ) |
|
4186 { |
|
4187 // Converting Left part of the data |
|
4188 TPtrC tempStr=aStr.Left(location); |
|
4189 ret=ConvertToWsVisibilityChangedEvent(tempStr, aWsVisibilityChangedEvent); |
|
4190 |
|
4191 // Converting right data can be with another "|" |
|
4192 tempStr.Set(aStr.Mid(location+1)); |
|
4193 |
|
4194 TUint temp; |
|
4195 if ( ConvertToWsVisibilityChangedEvent(tempStr, temp) ) |
|
4196 { |
|
4197 aWsVisibilityChangedEvent|=temp; |
|
4198 } |
|
4199 else |
|
4200 { |
|
4201 ret=EFalse; |
|
4202 } |
|
4203 } |
|
4204 else |
|
4205 { |
|
4206 if ( aStr==KWsVisibilityChangedCanBeSeen ) |
|
4207 { |
|
4208 aWsVisibilityChangedEvent=TWsVisibilityChangedEvent::ECanBeSeen; |
|
4209 } |
|
4210 else if ( aStr==KWsVisibilityChangedCantBeSeen ) |
|
4211 { |
|
4212 aWsVisibilityChangedEvent=TWsVisibilityChangedEvent::ECantBeSeen; |
|
4213 } |
|
4214 else if ( aStr==KWsVisibilityChangedPartiallyVisible ) |
|
4215 { |
|
4216 aWsVisibilityChangedEvent=TWsVisibilityChangedEvent::EPartiallyVisible; |
|
4217 } |
|
4218 else if ( aStr==KWsVisibilityChangedNotVisible ) |
|
4219 { |
|
4220 aWsVisibilityChangedEvent=TWsVisibilityChangedEvent::ENotVisible; |
|
4221 } |
|
4222 else if ( aStr==KWsVisibilityChangedFullyVisible ) |
|
4223 { |
|
4224 aWsVisibilityChangedEvent=TWsVisibilityChangedEvent::EFullyVisible; |
|
4225 } |
|
4226 else |
|
4227 { |
|
4228 TLex lex(aStr); |
|
4229 ret=(lex.Val(aWsVisibilityChangedEvent, EHex)==KErrNone); |
|
4230 } |
|
4231 } |
|
4232 |
|
4233 return ret; |
|
4234 } |
|
4235 |
|
4236 TBool CT_GraphicsUtil::ReadLongCaptureFlags(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TLongCaptureFlags& aLongCaptureFlags) |
|
4237 { |
|
4238 TPtrC str; |
|
4239 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
4240 if ( ret ) |
|
4241 { |
|
4242 if ( str==KELongCaptureShortEventImmediately ) |
|
4243 { |
|
4244 aLongCaptureFlags = ELongCaptureShortEventImmediately; |
|
4245 } |
|
4246 else if ( str==KELongCaptureRepeatEvents ) |
|
4247 { |
|
4248 aLongCaptureFlags = ELongCaptureRepeatEvents; |
|
4249 } |
|
4250 else if ( str==KELongCaptureNormal ) |
|
4251 { |
|
4252 aLongCaptureFlags = ELongCaptureNormal; |
|
4253 } |
|
4254 else if ( str==KELongCaptureWaitShort ) |
|
4255 { |
|
4256 aLongCaptureFlags = ELongCaptureWaitShort; |
|
4257 } |
|
4258 else |
|
4259 { |
|
4260 TInt intVal=0; |
|
4261 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
4262 if ( ret ) |
|
4263 { |
|
4264 aLongCaptureFlags=(TLongCaptureFlags)intVal; |
|
4265 } |
|
4266 } |
|
4267 } |
|
4268 return ret; |
|
4269 } |
|
4270 |
|
4271 TBool CT_GraphicsUtil::ReadSpriteFlags(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TSpriteFlags& aSpriteFlags) |
|
4272 { |
|
4273 TPtrC str; |
|
4274 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
4275 if ( ret ) |
|
4276 { |
|
4277 ret=ConvertToSpriteFlags(str, aSpriteFlags); |
|
4278 } |
|
4279 |
|
4280 return ret; |
|
4281 } |
|
4282 |
|
4283 TBool CT_GraphicsUtil::ReadSpriteFlags(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TUint& aSpriteFlags) |
|
4284 { |
|
4285 TPtrC str; |
|
4286 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
4287 if ( ret ) |
|
4288 { |
|
4289 ret=ConvertToSpriteFlags(str, aSpriteFlags); |
|
4290 } |
|
4291 |
|
4292 return ret; |
|
4293 } |
|
4294 |
|
4295 TBool CT_GraphicsUtil::ConvertToSpriteFlags(const TDesC& aStr, TSpriteFlags& aSpriteFlags) |
|
4296 { |
|
4297 TBool ret=ETrue; |
|
4298 if ( aStr==KESpriteFlash ) |
|
4299 { |
|
4300 aSpriteFlags=ESpriteFlash; |
|
4301 } |
|
4302 else if ( aStr==KESpriteNoChildClip ) |
|
4303 { |
|
4304 aSpriteFlags=ESpriteNoChildClip; |
|
4305 } |
|
4306 else if ( aStr==KESpriteNoShadows ) |
|
4307 { |
|
4308 aSpriteFlags=ESpriteNoShadows; |
|
4309 } |
|
4310 else |
|
4311 { |
|
4312 TUint spriteFlag; |
|
4313 TLex lex(aStr); |
|
4314 ret=(lex.Val(spriteFlag, EHex)==KErrNone); |
|
4315 if ( ret ) |
|
4316 { |
|
4317 aSpriteFlags=(TSpriteFlags)spriteFlag; |
|
4318 } |
|
4319 } |
|
4320 |
|
4321 return ret; |
|
4322 } |
|
4323 |
|
4324 TBool CT_GraphicsUtil::ConvertToSpriteFlags(const TDesC& aStr, TUint& aSpriteFlags) |
|
4325 { |
|
4326 TBool ret=ETrue; |
|
4327 TInt location=aStr.Match(_L("*|*")); |
|
4328 if( location!=KErrNotFound ) |
|
4329 { |
|
4330 // Converting Left part of the data |
|
4331 TPtrC tempStr=aStr.Left(location); |
|
4332 ret=ConvertToSpriteFlags(tempStr, aSpriteFlags); |
|
4333 |
|
4334 // Converting right data can be with another "|" |
|
4335 tempStr.Set(aStr.Mid(location+1)); |
|
4336 |
|
4337 TUint temp; |
|
4338 if ( ConvertToSpriteFlags(tempStr, temp) ) |
|
4339 { |
|
4340 aSpriteFlags|=temp; |
|
4341 } |
|
4342 else |
|
4343 { |
|
4344 ret=EFalse; |
|
4345 } |
|
4346 } |
|
4347 else |
|
4348 { |
|
4349 TSpriteFlags spriteFlag; |
|
4350 ret=ConvertToSpriteFlags(aStr, spriteFlag); |
|
4351 if ( ret ) |
|
4352 { |
|
4353 aSpriteFlags=(TUint)spriteFlag; |
|
4354 } |
|
4355 } |
|
4356 |
|
4357 return ret; |
|
4358 } |
|
4359 |
|
4360 TBool CT_GraphicsUtil::ReadCustomTextCursorAlignment(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, RWsSession::TCustomTextCursorAlignment& aAlignment) |
|
4361 { |
|
4362 TPtrC str; |
|
4363 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
4364 if ( ret ) |
|
4365 { |
|
4366 if ( str==KECustomTextCursorAlignTop ) |
|
4367 { |
|
4368 aAlignment=RWsSession::ECustomTextCursorAlignTop; |
|
4369 } |
|
4370 else if ( str==KECustomTextCursorAlignBaseline ) |
|
4371 { |
|
4372 aAlignment=RWsSession::ECustomTextCursorAlignBaseline; |
|
4373 } |
|
4374 else if ( str==KECustomTextCursorAlignBottom ) |
|
4375 { |
|
4376 aAlignment=RWsSession::ECustomTextCursorAlignBottom; |
|
4377 } |
|
4378 else |
|
4379 { |
|
4380 TInt intVal=0; |
|
4381 ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal); |
|
4382 if ( ret ) |
|
4383 { |
|
4384 aAlignment=(RWsSession::TCustomTextCursorAlignment)intVal; |
|
4385 } |
|
4386 } |
|
4387 } |
|
4388 |
|
4389 return ret; |
|
4390 } |
|
4391 |
|
4392 /** |
|
4393 * Utility method that fetches TAlgStyle pointer by command parameter name from INI-file. |
|
4394 */ |
|
4395 TBool CT_GraphicsUtil::GetAlgStyleL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TAlgStyle*& aData) |
|
4396 { |
|
4397 // get AlgStyleData object from parameters |
|
4398 TPtrC name; |
|
4399 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name); |
|
4400 if ( ret ) |
|
4401 { |
|
4402 // Data object found |
|
4403 aData=static_cast<TAlgStyle*>(aDataWrapper.GetDataObjectL(name)); |
|
4404 } |
|
4405 |
|
4406 return ret; |
|
4407 } |
|
4408 |
|
4409 /** |
|
4410 * Utility method that fetches RDrawableWindow pointer by command parameter name from INI-file. |
|
4411 */ |
|
4412 TBool CT_GraphicsUtil::GetDrawableWindowL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, RDrawableWindow*& aData) |
|
4413 { |
|
4414 // get CFbsBitmap data object from parameters |
|
4415 TPtrC name; |
|
4416 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name); |
|
4417 if ( ret ) |
|
4418 { |
|
4419 // Data object found |
|
4420 aData=static_cast<RDrawableWindow*>(aDataWrapper.GetDataObjectL(name)); |
|
4421 } |
|
4422 |
|
4423 return ret; |
|
4424 } |
|
4425 |
|
4426 /** |
|
4427 * Utility method that fetches CGraphicsContext::TDrawTextExtendedParam pointer by command parameter name from INI-file. |
|
4428 */ |
|
4429 TBool CT_GraphicsUtil::GetDrawTextExtendedParamL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, CGraphicsContext::TDrawTextExtendedParam*& aData) |
|
4430 { |
|
4431 // get CFbsBitmap data object from parameters |
|
4432 TPtrC name; |
|
4433 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name); |
|
4434 if ( ret ) |
|
4435 { |
|
4436 // Data object found |
|
4437 aData=static_cast<CGraphicsContext::TDrawTextExtendedParam*>(aDataWrapper.GetDataObjectL(name)); |
|
4438 } |
|
4439 |
|
4440 return ret; |
|
4441 } |
|
4442 |
|
4443 /** |
|
4444 * Utility method that fetches CFbsBitmap pointer by command parameter name from INI-file. |
|
4445 */ |
|
4446 TBool CT_GraphicsUtil::GetFbsBitmapL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, CFbsBitmap*& aData) |
|
4447 { |
|
4448 // get CFbsBitmap data object from parameters |
|
4449 TPtrC name; |
|
4450 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name); |
|
4451 if ( ret ) |
|
4452 { |
|
4453 // Data object found |
|
4454 aData=static_cast<CFbsBitmap*>(aDataWrapper.GetDataObjectL(name)); |
|
4455 } |
|
4456 |
|
4457 return ret; |
|
4458 } |
|
4459 |
|
4460 /** |
|
4461 * Utility method that fetches CFbsDevice pointer by command parameter name from INI-file. |
|
4462 */ |
|
4463 TBool CT_GraphicsUtil::GetFbsDeviceL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, CFbsDevice*& aData) |
|
4464 { |
|
4465 // get CFbsBitmap data object from parameters |
|
4466 TPtrC name; |
|
4467 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name); |
|
4468 if ( ret ) |
|
4469 { |
|
4470 // Data object found |
|
4471 aData=static_cast<CFbsDevice*>(aDataWrapper.GetDataObjectL(name)); |
|
4472 } |
|
4473 |
|
4474 return ret; |
|
4475 } |
|
4476 |
|
4477 /** |
|
4478 * Utility method that fetches CFont pointer by command parameter name from INI-file. |
|
4479 */ |
|
4480 TBool CT_GraphicsUtil::GetFontL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, CFont*& aData) |
|
4481 { |
|
4482 // get CFbsBitmap data object from parameters |
|
4483 TPtrC name; |
|
4484 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name); |
|
4485 if ( ret ) |
|
4486 { |
|
4487 // Data object found |
|
4488 aData=static_cast<CFont*>(aDataWrapper.GetDataObjectL(name)); |
|
4489 } |
|
4490 |
|
4491 return ret; |
|
4492 } |
|
4493 |
|
4494 /** |
|
4495 * Utility method that fetches CPalette pointer by command parameter name from INI-file. |
|
4496 */ |
|
4497 TBool CT_GraphicsUtil::GetPaletteL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, CPalette*& aData) |
|
4498 { |
|
4499 // get PaletteData object from parameters |
|
4500 TPtrC name; |
|
4501 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name); |
|
4502 if ( ret ) |
|
4503 { |
|
4504 // Data object found |
|
4505 aData=static_cast<CPalette*>(aDataWrapper.GetDataObjectL(name)); |
|
4506 } |
|
4507 |
|
4508 return ret; |
|
4509 } |
|
4510 |
|
4511 /** |
|
4512 * Utility method that fetches CWsBitmap pointer by command parameter name from INI-file. |
|
4513 */ |
|
4514 TBool CT_GraphicsUtil::GetWsBitmapL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, CWsBitmap*& aData) |
|
4515 { |
|
4516 // get CWsBitmap data object from parameters |
|
4517 TPtrC name; |
|
4518 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name); |
|
4519 if ( ret ) |
|
4520 { |
|
4521 // Data object found |
|
4522 aData=static_cast<CWsBitmap*>(aDataWrapper.GetDataObjectL(name)); |
|
4523 } |
|
4524 |
|
4525 return ret; |
|
4526 } |
|
4527 |
|
4528 /** |
|
4529 * Utility method that fetches TWsEvent pointer by command parameter name from INI-file. |
|
4530 */ |
|
4531 TBool CT_GraphicsUtil::GetWsEventL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TWsEvent*& aData) |
|
4532 { |
|
4533 // get CWsBitmap data object from parameters |
|
4534 TPtrC name; |
|
4535 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name); |
|
4536 if ( ret ) |
|
4537 { |
|
4538 // Data object found |
|
4539 aData=static_cast<TWsEvent*>(aDataWrapper.GetDataObjectL(name)); |
|
4540 } |
|
4541 |
|
4542 return ret; |
|
4543 } |
|
4544 |
|
4545 /** |
|
4546 * Utility method that fetches RWsGraphicMsgBuf pointer by command parameter name from INI-file. |
|
4547 */ |
|
4548 TBool CT_GraphicsUtil::GetWsGraphicMsgBufL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, RWsGraphicMsgBuf*& aData) |
|
4549 { |
|
4550 // get CWsBitmap data object from parameters |
|
4551 TPtrC name; |
|
4552 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name); |
|
4553 if ( ret ) |
|
4554 { |
|
4555 // Data object found |
|
4556 aData=static_cast<RWsGraphicMsgBuf*>(aDataWrapper.GetDataObjectL(name)); |
|
4557 } |
|
4558 |
|
4559 return ret; |
|
4560 } |
|
4561 |
|
4562 /** |
|
4563 * Utility method that fetches CWsScreenDevice pointer by command parameter name from INI-file. |
|
4564 */ |
|
4565 TBool CT_GraphicsUtil::GetWsScreenDeviceL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, CWsScreenDevice*& aData) |
|
4566 { |
|
4567 // get CWsBitmap data object from parameters |
|
4568 TPtrC name; |
|
4569 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name); |
|
4570 if ( ret ) |
|
4571 { |
|
4572 // Data object found |
|
4573 aData=static_cast<CWsScreenDevice*>(aDataWrapper.GetDataObjectL(name)); |
|
4574 } |
|
4575 |
|
4576 return ret; |
|
4577 } |
|
4578 |
|
4579 /** |
|
4580 * Utility method that fetches TWsGraphicMsgFixedBase pointer by command parameter name from INI-file. |
|
4581 */ |
|
4582 TBool CT_GraphicsUtil::GetWsGraphicMsgFixedBaseL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TWsGraphicMsgFixedBase*& aData) |
|
4583 { |
|
4584 // get CWsBitmap data object from parameters |
|
4585 TPtrC name; |
|
4586 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name); |
|
4587 if ( ret ) |
|
4588 { |
|
4589 // Data object found |
|
4590 aData=static_cast<TWsGraphicMsgFixedBase*>(aDataWrapper.GetDataObjectL(name)); |
|
4591 } |
|
4592 |
|
4593 return ret; |
|
4594 } |
|
4595 |
|
4596 /** |
|
4597 * Utility method that fetches TWsPriorityKeyEvent pointer by command parameter name from INI-file. |
|
4598 */ |
|
4599 TBool CT_GraphicsUtil::GetWsPriorityKeyEventL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TWsPriorityKeyEvent*& aData) |
|
4600 { |
|
4601 // get CWsBitmap data object from parameters |
|
4602 TPtrC name; |
|
4603 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name); |
|
4604 if ( ret ) |
|
4605 { |
|
4606 // Data object found |
|
4607 aData=static_cast<TWsPriorityKeyEvent*>(aDataWrapper.GetDataObjectL(name)); |
|
4608 } |
|
4609 |
|
4610 return ret; |
|
4611 } |
|
4612 |
|
4613 /** |
|
4614 * Utility method that fetches TWsRedrawEvent pointer by command parameter name from INI-file. |
|
4615 */ |
|
4616 TBool CT_GraphicsUtil::GetWsRedrawEventL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TWsRedrawEvent*& aData) |
|
4617 { |
|
4618 // get CWsBitmap data object from parameters |
|
4619 TPtrC name; |
|
4620 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name); |
|
4621 if ( ret ) |
|
4622 { |
|
4623 // Data object found |
|
4624 aData=static_cast<TWsRedrawEvent*>(aDataWrapper.GetDataObjectL(name)); |
|
4625 } |
|
4626 |
|
4627 return ret; |
|
4628 } |
|
4629 |
|
4630 TBool CT_GraphicsUtil::GetTextCursor(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TTextCursor& aTextCursor) |
|
4631 { |
|
4632 TBuf<KMaxTestExecuteCommandLength> tempStore; |
|
4633 TPtrC str; |
|
4634 |
|
4635 tempStore.Format(KFormatEntryField, &aKeyName, &KTagTextCursorType); |
|
4636 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, tempStore, str); |
|
4637 if ( ret ) |
|
4638 { |
|
4639 if ( str==KETypeRectangle ) |
|
4640 { |
|
4641 aTextCursor.iType = TTextCursor::ETypeRectangle; |
|
4642 } |
|
4643 else if ( str==KETypeHollowRectangle ) |
|
4644 { |
|
4645 aTextCursor.iType = TTextCursor::ETypeHollowRectangle; |
|
4646 } |
|
4647 else if ( str==KETypeFirst ) |
|
4648 { |
|
4649 aTextCursor.iType = TTextCursor::ETypeFirst; |
|
4650 } |
|
4651 else if ( str==KETypeLast ) |
|
4652 { |
|
4653 aTextCursor.iType = TTextCursor::ETypeLast; |
|
4654 } |
|
4655 else if ( str==KETypeLastBasic ) |
|
4656 { |
|
4657 aTextCursor.iType = TTextCursor::ETypeLastBasic; |
|
4658 } |
|
4659 else |
|
4660 { |
|
4661 ret=aDataWrapper.GetIntFromConfig(aSectName, tempStore, aTextCursor.iType); |
|
4662 } |
|
4663 } |
|
4664 |
|
4665 tempStore.Format(KFormatEntryField, &aKeyName, &KTagTextCursorFlags); |
|
4666 if ( aDataWrapper.GetStringFromConfig(aSectName, tempStore, str) ) |
|
4667 { |
|
4668 if ( str==KEFlagNoFlash ) |
|
4669 { |
|
4670 aTextCursor.iFlags = TTextCursor::EFlagNoFlash; |
|
4671 } |
|
4672 else if ( str==KEFlagClipHorizontal ) |
|
4673 { |
|
4674 aTextCursor.iFlags = TTextCursor::EFlagClipHorizontal; |
|
4675 } |
|
4676 else if ( str==KEFlagClipVertical ) |
|
4677 { |
|
4678 aTextCursor.iFlags = TTextCursor::EFlagClipVertical; |
|
4679 } |
|
4680 else |
|
4681 { |
|
4682 TInt intVal=0; |
|
4683 ret=aDataWrapper.GetIntFromConfig(aSectName, tempStore, intVal); |
|
4684 if ( ret ) |
|
4685 { |
|
4686 aTextCursor.iFlags = (TUint)intVal; |
|
4687 } |
|
4688 } |
|
4689 } |
|
4690 |
|
4691 tempStore.Format(KFormatEntryField, &aKeyName, &KTagTextCursorHeight); |
|
4692 aDataWrapper.GetIntFromConfig(aSectName, tempStore, aTextCursor.iHeight); |
|
4693 |
|
4694 tempStore.Format(KFormatEntryField, &aKeyName, &KTagTextCursorAscent); |
|
4695 aDataWrapper.GetIntFromConfig(aSectName, tempStore, aTextCursor.iAscent); |
|
4696 |
|
4697 tempStore.Format(KFormatEntryField, &aKeyName, &KTagTextCursorWidth); |
|
4698 aDataWrapper.GetIntFromConfig(aSectName, tempStore, aTextCursor.iWidth); |
|
4699 |
|
4700 tempStore.Format(KFormatEntryField, &aKeyName, &KTagTextCursorColor); |
|
4701 aDataWrapper.GetRgbFromConfig(aSectName, tempStore, aTextCursor.iColor); |
|
4702 |
|
4703 return ret; |
|
4704 } |
|
4705 |
|
4706 TBool CT_GraphicsUtil::GetSpriteMemberL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TSpriteMember& aSpriteMember) |
|
4707 { |
|
4708 TBuf<KMaxTestExecuteCommandLength> tempStore; |
|
4709 TBool ret=ETrue; |
|
4710 |
|
4711 tempStore.Format(KFormatEntryField, &aKeyName, &KTagSpriteMemberBitmap); |
|
4712 if ( !CT_GraphicsUtil::GetFbsBitmapL(aDataWrapper, aSectName, tempStore, aSpriteMember.iBitmap) ) |
|
4713 { |
|
4714 ret=EFalse; |
|
4715 } |
|
4716 |
|
4717 tempStore.Format(KFormatEntryField, &aKeyName, &KTagSpriteMemberMaskBitmap); |
|
4718 if ( !CT_GraphicsUtil::GetFbsBitmapL(aDataWrapper, aSectName, tempStore, aSpriteMember.iMaskBitmap) ) |
|
4719 { |
|
4720 aSpriteMember.iMaskBitmap=NULL; |
|
4721 } |
|
4722 |
|
4723 tempStore.Format(KFormatEntryField, &aKeyName, &KTagSpriteMemberInvertMask); |
|
4724 if ( !aDataWrapper.GetBoolFromConfig(aSectName, tempStore, aSpriteMember.iInvertMask) ) |
|
4725 { |
|
4726 aSpriteMember.iInvertMask=EFalse; |
|
4727 } |
|
4728 |
|
4729 tempStore.Format(KFormatEntryField, &aKeyName, &KTagSpriteMemberDrawMode); |
|
4730 if ( !CT_GraphicsUtil::ReadDrawMode(aDataWrapper, aSectName, tempStore, aSpriteMember.iDrawMode) ) |
|
4731 { |
|
4732 ret=EFalse; |
|
4733 } |
|
4734 |
|
4735 tempStore.Format(KFormatEntryField, &aKeyName, &KTagSpriteMemberOffset); |
|
4736 if ( !aDataWrapper.GetPointFromConfig(aSectName, tempStore, aSpriteMember.iOffset) ) |
|
4737 { |
|
4738 ret=EFalse; |
|
4739 } |
|
4740 |
|
4741 TInt interval; |
|
4742 tempStore.Format(KFormatEntryField, &aKeyName, &KTagSpriteMemberInterval); |
|
4743 if ( aDataWrapper.GetIntFromConfig(aSectName, tempStore, interval) ) |
|
4744 { |
|
4745 aSpriteMember.iInterval=interval; |
|
4746 } |
|
4747 return ret; |
|
4748 } |
|
4749 |
|
4750 |
|
4751 TBool CT_GraphicsUtil::GetSpriteMemberListL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, CArrayFix<TSpriteMember>& aResult) |
|
4752 { |
|
4753 TBuf<KMaxTestExecuteCommandLength> tempStore; |
|
4754 TSpriteMember spriteMember; |
|
4755 |
|
4756 aResult.Reset(); |
|
4757 TBool ok=ETrue; |
|
4758 for ( TInt index=0; ok; ) |
|
4759 { |
|
4760 tempStore.Format(KFormatFieldNumber, &aKeyName, ++index); |
|
4761 ok=CT_GraphicsUtil::GetSpriteMemberL(aDataWrapper, aSectName, tempStore, spriteMember); |
|
4762 if ( ok ) |
|
4763 { |
|
4764 aResult.AppendL(spriteMember); |
|
4765 } |
|
4766 } |
|
4767 |
|
4768 return aResult.Count()>0; |
|
4769 } |
|
4770 |
|
4771 TBool CT_GraphicsUtil::ReadTypefaceSupport(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TTypefaceSupport& aTypefaceSupport) |
|
4772 { |
|
4773 TTypefaceSupport typefaceSupport; |
|
4774 TBuf<KMaxTestExecuteCommandLength> tempStore; |
|
4775 TPtrC str; |
|
4776 tempStore.Format(KFormatEntryField, &aKeyName, &KTypefaceFontName); |
|
4777 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, tempStore, str); |
|
4778 if(ret) |
|
4779 { |
|
4780 typefaceSupport.iTypeface.iName = str; |
|
4781 |
|
4782 |
|
4783 TBool attri = EFalse; |
|
4784 tempStore.Format(KFormatEntryField, &aKeyName, &KProportional); |
|
4785 if(aDataWrapper.GetBoolFromConfig(aSectName, tempStore, attri)) |
|
4786 { |
|
4787 typefaceSupport.iTypeface.SetIsProportional(attri); |
|
4788 } |
|
4789 tempStore.Format(KFormatEntryField, &aKeyName, &KSerif); |
|
4790 if(aDataWrapper.GetBoolFromConfig(aSectName, tempStore, attri)) |
|
4791 { |
|
4792 typefaceSupport.iTypeface.SetIsSerif(attri); |
|
4793 } |
|
4794 tempStore.Format(KFormatEntryField, &aKeyName, &KSymbol); |
|
4795 if(aDataWrapper.GetBoolFromConfig(aSectName, tempStore, attri)) |
|
4796 { |
|
4797 typefaceSupport.iTypeface.SetIsSymbol(attri); |
|
4798 } |
|
4799 |
|
4800 tempStore.Format(KFormatEntryField, &aKeyName, &KNumHeights); |
|
4801 aDataWrapper.GetIntFromConfig(aSectName, tempStore, typefaceSupport.iNumHeights); |
|
4802 |
|
4803 tempStore.Format(KFormatEntryField, &aKeyName, &KIsScalable); |
|
4804 aDataWrapper.GetBoolFromConfig(aSectName, tempStore, typefaceSupport.iIsScalable); |
|
4805 |
|
4806 tempStore.Format(KFormatEntryField, &aKeyName, &KMaxHeightInTwips); |
|
4807 aDataWrapper.GetIntFromConfig(aSectName, tempStore, typefaceSupport.iMaxHeightInTwips); |
|
4808 |
|
4809 tempStore.Format(KFormatEntryField, &aKeyName, &KMinHeightInTwips); |
|
4810 aDataWrapper.GetIntFromConfig(aSectName, tempStore, typefaceSupport.iMinHeightInTwips); |
|
4811 |
|
4812 aTypefaceSupport = typefaceSupport; |
|
4813 } |
|
4814 return ret; |
|
4815 } |
|
4816 |
|
4817 TBool CT_GraphicsUtil::BringAppForegroundL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aSessionKeyName , const TDesC& aAppKeyName) |
|
4818 { |
|
4819 TBool result = ETrue; |
|
4820 RWsSession* iClient( NULL ); //Window Session Client |
|
4821 TPtrC objectName; |
|
4822 |
|
4823 if ( aDataWrapper.GetStringFromConfig(aSectName, aSessionKeyName, objectName) ) |
|
4824 { |
|
4825 iClient = static_cast<RWsSession*>(aDataWrapper.GetDataObjectL(objectName)); |
|
4826 } |
|
4827 else |
|
4828 { |
|
4829 result = EFalse; |
|
4830 } |
|
4831 |
|
4832 if( !aDataWrapper.GetStringFromConfig(aSectName, aAppKeyName, objectName)) |
|
4833 { |
|
4834 result = EFalse; |
|
4835 } |
|
4836 |
|
4837 if( result ) |
|
4838 { |
|
4839 TApaTaskList tasklist(*iClient); |
|
4840 TApaTask task(tasklist.FindApp(objectName)); |
|
4841 task.BringToForeground(); |
|
4842 } |
|
4843 return result; |
|
4844 } |
|
4845 |
|
4846 void CT_GraphicsUtil::EatupMemory(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName) |
|
4847 { |
|
4848 // read left size in memory from INI |
|
4849 TInt leftsize=0; |
|
4850 TBool ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, leftsize); |
|
4851 if ( !ret || leftsize==0) |
|
4852 return; |
|
4853 |
|
4854 // eat memory until fail to avaiable memory is less than is left size |
|
4855 TInt nTotalSize=User::Heap().Size(); |
|
4856 TAny* mem=User::AllocZ(nTotalSize); |
|
4857 |
|
4858 if (mem) |
|
4859 iMemArray.Append(mem); |
|
4860 |
|
4861 do { |
|
4862 mem=User::AllocZ(leftsize); |
|
4863 if(mem) |
|
4864 { |
|
4865 iMemArray.Append(mem); |
|
4866 } |
|
4867 } while(mem); |
|
4868 |
|
4869 // get avaiable memory, we can't log here, because no enough memory to write log |
|
4870 // so we have to write log after free memory |
|
4871 iAvaiableSpace=User::Available(iBiggestBlock); |
|
4872 } |
|
4873 |
|
4874 void CT_GraphicsUtil::FreeEatenMemory(CDataWrapperBase& aDataWrapper) |
|
4875 { |
|
4876 for (TInt i=0;i<iMemArray.Count();i++) |
|
4877 { |
|
4878 TAny* mem=iMemArray[i]; |
|
4879 User::Free(mem); |
|
4880 } |
|
4881 |
|
4882 iMemArray.Reset(); |
|
4883 |
|
4884 // write memory status after eat memory |
|
4885 aDataWrapper.INFO_PRINTF3(_L("CT_GraphicsUtil::FreeEatenMemory, before free memory, avaiable=%d byte biggestblock=%d byte"),iAvaiableSpace,iBiggestBlock); |
|
4886 } |
|
4887 |
|
4888 TBool CT_GraphicsUtil::GetFrameInfo(CDataWrapperBase& aDataWrapper,const TDesC& aSectName, TFrameInfo& frameinfo) |
|
4889 { |
|
4890 // get iFrameCoordsInPixels from parameters |
|
4891 aDataWrapper.GetRectFromConfig(aSectName, KFldFrameCoordsInPixels, frameinfo.iFrameCoordsInPixels); |
|
4892 |
|
4893 //get iFrameSizeInTwips from parameters |
|
4894 aDataWrapper.GetSizeFromConfig(aSectName,KFldFrameSizeInTwips,frameinfo.iFrameSizeInTwips); |
|
4895 |
|
4896 //get iBitsPerPixel from parameters |
|
4897 aDataWrapper.GetIntFromConfig(aSectName,KFldBitsPerPixel,frameinfo.iBitsPerPixel); |
|
4898 |
|
4899 //get iDelay from parameters |
|
4900 TInt delay=0; |
|
4901 TBool ret=aDataWrapper.GetIntFromConfig(aSectName,KFldDelay,delay); |
|
4902 |
|
4903 if(ret) |
|
4904 { |
|
4905 frameinfo.iDelay=TTimeIntervalMicroSeconds(delay); |
|
4906 } |
|
4907 |
|
4908 //get iFlags from parameters,when set frame info, must set flag. |
|
4909 ret=ReadFrameInfoFlags(aDataWrapper,aSectName,KFldFlags,frameinfo.iFlags); |
|
4910 |
|
4911 //get iOverallSizeInPixels from parameters |
|
4912 aDataWrapper.GetSizeFromConfig(aSectName,KFldOverallSizeInPixels,frameinfo.iOverallSizeInPixels); |
|
4913 |
|
4914 //get iFrameDisplayMode from parameters |
|
4915 ReadDisplayMode(aDataWrapper,aSectName,KFldFrameDisplayMode,frameinfo.iFrameDisplayMode); |
|
4916 |
|
4917 //get iBackgroundColor from parameters |
|
4918 aDataWrapper.GetRgbFromConfig(aSectName,KFldBackgroundColor,frameinfo.iBackgroundColor); |
|
4919 |
|
4920 //get iFrameSizeInPixels from parameters |
|
4921 aDataWrapper.GetSizeFromConfig(aSectName,KFldFrameSizeInPixels,frameinfo.iFrameSizeInPixels); |
|
4922 |
|
4923 //get FrameState from parameters |
|
4924 TFrameInfo::TFrameInfoState state; |
|
4925 |
|
4926 if(GetFrameInfoState(aDataWrapper,aSectName,KFldFrameInfoState,state)) |
|
4927 { |
|
4928 frameinfo.SetCurrentFrameState(state); |
|
4929 } |
|
4930 |
|
4931 //get current data offset from parameters |
|
4932 TInt offset; |
|
4933 |
|
4934 if(aDataWrapper.GetIntFromConfig(aSectName,KFldCurrentDataOffset,offset)) |
|
4935 { |
|
4936 frameinfo.SetCurrentDataOffset(offset); |
|
4937 } |
|
4938 |
|
4939 //get frame data offset from parameters |
|
4940 if(aDataWrapper.GetIntFromConfig(aSectName,KFldFrameDataOffset,offset)) |
|
4941 { |
|
4942 frameinfo.SetFrameDataOffset(offset); |
|
4943 } |
|
4944 |
|
4945 return ret; |
|
4946 } |
|
4947 |
|
4948 TBool CT_GraphicsUtil::ReadFrameInfoFlags(CDataWrapperBase& aDataWrapper,const TDesC& aSectName, const TDesC& aKeyName,TUint32& aFlags) |
|
4949 { |
|
4950 TPtrC str; |
|
4951 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
4952 if ( ret ) |
|
4953 { |
|
4954 ret=ConvertToFrameInfoFlags(str, aFlags); |
|
4955 } |
|
4956 |
|
4957 return ret; |
|
4958 } |
|
4959 |
|
4960 TBool CT_GraphicsUtil::GetShaperFactoryL(CDataWrapperBase & aDataWrapper, const TDesC & aSectName, const TDesC & aKeyName, CShaperFactory *& aData) |
|
4961 { |
|
4962 // get CShaperFactory data object from parameters |
|
4963 TPtrC name; |
|
4964 TBool ret = aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name); |
|
4965 if (ret) |
|
4966 { |
|
4967 // Data object found |
|
4968 aData = static_cast<CShaperFactory*> (aDataWrapper.GetDataObjectL(name)); |
|
4969 } |
|
4970 |
|
4971 return ret; |
|
4972 } |
|
4973 |
|
4974 TBool CT_GraphicsUtil::GetRasterizerL(CDataWrapperBase & aDataWrapper, const TDesC & aSectName, const TDesC & aKeyName, COpenFontRasterizer *& aData) |
|
4975 { |
|
4976 // get COpenFontRasterizer data object from parameters |
|
4977 TPtrC name; |
|
4978 TBool ret = aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name); |
|
4979 if (ret) |
|
4980 { |
|
4981 // Data object found |
|
4982 aData = static_cast<COpenFontRasterizer*> (aDataWrapper.GetDataObjectL(name)); |
|
4983 } |
|
4984 |
|
4985 return ret; |
|
4986 } |
|
4987 |
|
4988 TBool CT_GraphicsUtil::GetOpenFontGlyphDataL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TOpenFontGlyphData*& aData) |
|
4989 { |
|
4990 // get TOpenFontGlyphData data object from parameters |
|
4991 TPtrC name; |
|
4992 TBool ret = aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name); |
|
4993 if (ret) |
|
4994 { |
|
4995 // Data object found |
|
4996 aData = static_cast<TOpenFontGlyphData*> (aDataWrapper.GetDataObjectL(name)); |
|
4997 } |
|
4998 |
|
4999 return ret; |
|
5000 } |
|
5001 |
|
5002 TBool CT_GraphicsUtil::ConvertToFrameInfoFlags(const TDesC& aStr,TUint32& aFrameInfoFlags) |
|
5003 { |
|
5004 TBool ret=ETrue; |
|
5005 TInt location=aStr.Match(_L("*|*")); |
|
5006 if( location!=KErrNotFound ) |
|
5007 { |
|
5008 // Converting Left part of the data |
|
5009 TPtrC tempStr=aStr.Left(location); |
|
5010 ret=ConvertToFrameInfoFlags(tempStr, aFrameInfoFlags); |
|
5011 |
|
5012 // Converting right data can be with another "|" |
|
5013 tempStr.Set(aStr.Mid(location+1)); |
|
5014 |
|
5015 TUint32 temp; |
|
5016 if ( ConvertToFrameInfoFlags(tempStr, temp) ) |
|
5017 { |
|
5018 aFrameInfoFlags|=temp; |
|
5019 } |
|
5020 else |
|
5021 { |
|
5022 ret=EFalse; |
|
5023 } |
|
5024 } |
|
5025 else |
|
5026 { |
|
5027 if ( aStr==KEColor ) |
|
5028 { |
|
5029 aFrameInfoFlags=TFrameInfo::EColor; |
|
5030 } |
|
5031 else if ( aStr==KETransparencyPossible ) |
|
5032 { |
|
5033 aFrameInfoFlags=TFrameInfo::ETransparencyPossible; |
|
5034 } |
|
5035 else if ( aStr==KEFullyScaleable ) |
|
5036 { |
|
5037 aFrameInfoFlags=TFrameInfo::EFullyScaleable; |
|
5038 } |
|
5039 else if ( aStr==KEConstantAspectRatio ) |
|
5040 { |
|
5041 aFrameInfoFlags=TFrameInfo::EConstantAspectRatio; |
|
5042 } |
|
5043 else if ( aStr==KECanDither ) |
|
5044 { |
|
5045 aFrameInfoFlags=TFrameInfo::ECanDither; |
|
5046 } |
|
5047 else if ( aStr==KEAlphaChannel ) |
|
5048 { |
|
5049 aFrameInfoFlags=TFrameInfo::EAlphaChannel; |
|
5050 } |
|
5051 else if ( aStr==KELeaveInPlace ) |
|
5052 { |
|
5053 aFrameInfoFlags=TFrameInfo::ELeaveInPlace; |
|
5054 } |
|
5055 else if ( aStr==KERestoreToBackground ) |
|
5056 { |
|
5057 aFrameInfoFlags=TFrameInfo::ERestoreToBackground; |
|
5058 } |
|
5059 else if ( aStr==KERestoreToPrevious ) |
|
5060 { |
|
5061 aFrameInfoFlags=TFrameInfo::ERestoreToPrevious; |
|
5062 } |
|
5063 else if ( aStr==KEPartialDecodeInvalid ) |
|
5064 { |
|
5065 aFrameInfoFlags=TFrameInfo::EPartialDecodeInvalid; |
|
5066 } |
|
5067 else if ( aStr==KEMngMoreFramesToDecode ) |
|
5068 { |
|
5069 aFrameInfoFlags=TFrameInfo::EMngMoreFramesToDecode; |
|
5070 } |
|
5071 else if ( aStr==KEUsesFrameSizeInPixels ) |
|
5072 { |
|
5073 aFrameInfoFlags=TFrameInfo::EUsesFrameSizeInPixels; |
|
5074 } |
|
5075 else |
|
5076 { |
|
5077 TUint32 frameinfoFlag; |
|
5078 TLex lex(aStr); |
|
5079 ret=(lex.Val(frameinfoFlag, EHex)==KErrNone); |
|
5080 if ( ret ) |
|
5081 { |
|
5082 aFrameInfoFlags=frameinfoFlag; |
|
5083 } |
|
5084 } |
|
5085 } |
|
5086 return ret; |
|
5087 } |
|
5088 |
|
5089 TBool CT_GraphicsUtil::GetFrameInfoState(CDataWrapperBase& aDataWrapper,const TDesC& aSectName, const TDesC& aKeyName,TFrameInfo::TFrameInfoState& aState) |
|
5090 { |
|
5091 TPtrC str; |
|
5092 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
5093 if ( ret ) |
|
5094 { |
|
5095 if ( str==KEFrameInfoUninitialised ) |
|
5096 { |
|
5097 aState=TFrameInfo::EFrameInfoUninitialised; |
|
5098 } |
|
5099 else if ( str==KEFrameInfoProcessingFrameHeader ) |
|
5100 { |
|
5101 aState=TFrameInfo::EFrameInfoProcessingFrameHeader; |
|
5102 } |
|
5103 else if ( str==KEFrameInfoProcessingFrame ) |
|
5104 { |
|
5105 aState=TFrameInfo::EFrameInfoProcessingFrame; |
|
5106 } |
|
5107 else if ( str==KEFrameInfoProcessingComplete) |
|
5108 { |
|
5109 aState=TFrameInfo::EFrameInfoProcessingComplete; |
|
5110 } |
|
5111 else |
|
5112 { |
|
5113 TUint state; |
|
5114 TLex lex(str); |
|
5115 ret=(lex.Val(state, EHex)==KErrNone); |
|
5116 if ( ret ) |
|
5117 { |
|
5118 aState=(TFrameInfo::TFrameInfoState)state; |
|
5119 } |
|
5120 } |
|
5121 } |
|
5122 |
|
5123 return ret; |
|
5124 } |
|
5125 |
|
5126 |
|
5127 TBool CT_GraphicsUtil::GetWsGraphicAnimationL(CDataWrapperBase& aDataWrapper,const TDesC& aSectName, const TDesC& aKeyName, TWsGraphicAnimation*& aData) |
|
5128 { |
|
5129 // get TWsGraphicAnimation data object from parameters |
|
5130 TPtrC name; |
|
5131 TBool ret = aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name); |
|
5132 if ( ret ) |
|
5133 { |
|
5134 // Data object found |
|
5135 aData=static_cast<TWsGraphicAnimation*>(aDataWrapper.GetDataObjectL(name)); |
|
5136 } |
|
5137 |
|
5138 return ret; |
|
5139 } |
|
5140 |
|
5141 TBool CT_GraphicsUtil::StartAnimTesterClientL(CDataWrapperBase& aDataWrapper,const TDesC& aSectName) |
|
5142 { |
|
5143 TPtrC processName; |
|
5144 if( !aDataWrapper.GetStringFromConfig(aSectName, KFldProcessName, processName) ) |
|
5145 { |
|
5146 return EFalse; |
|
5147 } |
|
5148 TInt id; |
|
5149 if( !aDataWrapper.GetIntFromConfig(aSectName, KFldId, id) ) |
|
5150 { |
|
5151 return EFalse; |
|
5152 } |
|
5153 TRect rect; |
|
5154 if( !aDataWrapper.GetRectFromConfig(aSectName, KFldRect, rect) ) |
|
5155 { |
|
5156 return EFalse; |
|
5157 } |
|
5158 TPtrC objectName; |
|
5159 if ( !aDataWrapper.GetStringFromConfig(aSectName, KFldWsga, objectName) ) |
|
5160 { |
|
5161 return EFalse; |
|
5162 } |
|
5163 TWsGraphicAnimation* wsGraphAnim; |
|
5164 wsGraphAnim = static_cast<TWsGraphicAnimation*>(aDataWrapper.GetDataObjectL(objectName)); |
|
5165 |
|
5166 _LIT(KSpace, " "); |
|
5167 TBuf<128> args; |
|
5168 // Initialize arguments |
|
5169 args.Zero(); |
|
5170 args.Append(processName); |
|
5171 args.Append(KSpace); |
|
5172 args.AppendNum(0); // screen number |
|
5173 args.Append(KSpace); |
|
5174 args.AppendNum(id); |
|
5175 args.Append(KSpace); |
|
5176 args.AppendNum(rect.iTl.iX); |
|
5177 args.Append(KSpace); |
|
5178 args.AppendNum(rect.iTl.iY); |
|
5179 args.Append(KSpace); |
|
5180 args.AppendNum(rect.iBr.iX); |
|
5181 args.Append(KSpace); |
|
5182 args.AppendNum(rect.iBr.iY); |
|
5183 args.Append(KSpace); |
|
5184 TBuf<32> data; |
|
5185 data.Copy(wsGraphAnim->Pckg()); |
|
5186 args.Append(data); |
|
5187 |
|
5188 // Launch client process |
|
5189 RProcess process; |
|
5190 CleanupClosePushL(process); |
|
5191 User::LeaveIfError(process.Create(processName,args)); |
|
5192 process.Resume(); |
|
5193 |
|
5194 // Synchronize the process |
|
5195 RSemaphore semaphore; |
|
5196 CleanupClosePushL(semaphore); |
|
5197 TInt err = semaphore.OpenGlobal(processName); |
|
5198 if( KErrNotFound == err ) |
|
5199 { |
|
5200 User::LeaveIfError(semaphore.CreateGlobal(processName,0)); |
|
5201 // Wait until new process finish drawing |
|
5202 } |
|
5203 else if( KErrNone != err ) |
|
5204 { |
|
5205 User::LeaveIfError(err); |
|
5206 } |
|
5207 semaphore.Wait(); |
|
5208 CleanupStack::PopAndDestroy(2); |
|
5209 return ETrue; |
|
5210 } |
|
5211 |
|
5212 TBool CT_GraphicsUtil::CloseAnimTesterClientL(CDataWrapperBase& aDataWrapper,const TDesC& aSectName) |
|
5213 { |
|
5214 TPtrC processName; |
|
5215 if( !aDataWrapper.GetStringFromConfig(aSectName, KFldProcessName, processName) ) |
|
5216 { |
|
5217 return EFalse; |
|
5218 } |
|
5219 |
|
5220 RSemaphore semaphore; |
|
5221 CleanupClosePushL(semaphore); |
|
5222 User::LeaveIfError(semaphore.OpenGlobal(processName)); |
|
5223 // Waken waiting process |
|
5224 semaphore.Signal(); |
|
5225 CleanupStack::PopAndDestroy(); |
|
5226 return ETrue; |
|
5227 } |
|
5228 |
|
5229 TBool CT_GraphicsUtil::ReadAnimType(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TInt& aType) |
|
5230 { |
|
5231 TPtrC str; |
|
5232 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
5233 if ( ret ) |
|
5234 { |
|
5235 if ( str==KEAnimWindows) |
|
5236 { |
|
5237 aType=EKWindowAnim; |
|
5238 } |
|
5239 else if ( str==KEAnimSprite ) |
|
5240 { |
|
5241 aType=EKSpriteAnim; |
|
5242 } |
|
5243 else if ( str==KEAnimFreeTimer ) |
|
5244 { |
|
5245 aType=EKFreeTimerWindowAnim; |
|
5246 } |
|
5247 else |
|
5248 ret=EFalse; |
|
5249 } |
|
5250 |
|
5251 return ret; |
|
5252 } |
|
5253 |
|
5254 TBool CT_GraphicsUtil::ReadAnimCommand(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TInt& aCommand) |
|
5255 { |
|
5256 TPtrC str; |
|
5257 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
5258 if ( ret ) |
|
5259 { |
|
5260 if ( str==KEAnimCmdSync ) |
|
5261 { |
|
5262 aCommand=ECmdSync; |
|
5263 } |
|
5264 else if ( str==KEAnimCmdTestWithoutPara ) |
|
5265 { |
|
5266 aCommand=ECmdTestWithoutPara; |
|
5267 } |
|
5268 else if ( str==KEAnimCmdTestWithPara ) |
|
5269 { |
|
5270 aCommand=ECmdTestWithPara; |
|
5271 } |
|
5272 else if ( str==KEAnimCmdGetLast ) |
|
5273 { |
|
5274 aCommand=ECmdGetLast; |
|
5275 } |
|
5276 else if ( str==KEAnimCmdGetAnimInterval ) |
|
5277 { |
|
5278 aCommand=ECmdGetAnimInterval; |
|
5279 } |
|
5280 //MAnimGeneralFunctions |
|
5281 else if (str==KEMAnimECmdRetrieveResult) |
|
5282 { |
|
5283 aCommand=ECmdRetrieveResult; |
|
5284 } |
|
5285 else if(str==KEMAnimECmdUtilEatupMemory) |
|
5286 { |
|
5287 aCommand=ECmdUtilEatupMemory; |
|
5288 } |
|
5289 else if(str==KEMAnimECmdUtilFreeEatenMemory) |
|
5290 { |
|
5291 aCommand=ECmdUtilFreeEatenMemory; |
|
5292 } |
|
5293 else if (str==KEMAnimECmdGeneralAnimate) |
|
5294 { |
|
5295 aCommand=ECmdGeneralAnimate; |
|
5296 } |
|
5297 else if (str==KEMAnimECmdGeneralClient) |
|
5298 { |
|
5299 aCommand=ECmdGeneralClient; |
|
5300 } |
|
5301 else if (str==KEMAnimECmdGeneralFlashStateOn) |
|
5302 { |
|
5303 aCommand=ECmdGeneralFlashStateOn; |
|
5304 } |
|
5305 else if (str==KEMAnimECmdGeneralPanic) |
|
5306 { |
|
5307 aCommand=ECmdGeneralPanic; |
|
5308 } |
|
5309 else if (str==KEMAnimECmdGeneralScreenDevice) |
|
5310 { |
|
5311 aCommand=ECmdGeneralScreenDevice; |
|
5312 } |
|
5313 else if (str==KEMAnimECmdGeneralExtendedInterface) |
|
5314 { |
|
5315 aCommand=ECmdGeneralExtendedInterface; |
|
5316 } |
|
5317 else if (str==KEMAnimECmdGeneralWindowExtension) |
|
5318 { |
|
5319 aCommand=ECmdGeneralWindowExtension; |
|
5320 } |
|
5321 else if (str==KEMAnimECmdGeneralNumOfExtInterfaces) |
|
5322 { |
|
5323 aCommand=ECmdGeneralNumOfExtInterfaces; |
|
5324 } |
|
5325 else if (str==KEMAnimECmdGeneralEventExtension) |
|
5326 { |
|
5327 aCommand=ECmdGeneralEventExtension; |
|
5328 } |
|
5329 else if ( str==KEMAnimECmdGeneralGetRawEvents) |
|
5330 { |
|
5331 aCommand=ECmdGeneralGetRawEvents; |
|
5332 } |
|
5333 else if ( str==KEMAnimECmdGeneralPostRawEvent) |
|
5334 { |
|
5335 aCommand=ECmdGeneralPostRawEvent; |
|
5336 } |
|
5337 else if ( str==KEMAnimECmdGeneralPostKeyEvent) |
|
5338 { |
|
5339 aCommand=ECmdGeneralPostKeyEvent; |
|
5340 } |
|
5341 else if ( str==KEMAnimECmdGeneralSetSync) |
|
5342 { |
|
5343 aCommand=ECmdGeneralSetSync; |
|
5344 } |
|
5345 else if ( str==KEMAnimECmdGeneralSync) |
|
5346 { |
|
5347 aCommand=ECmdGeneralSync; |
|
5348 } |
|
5349 else if ( str==KEMAnimECmdGeneralSetInterval) |
|
5350 { |
|
5351 aCommand=ECmdGeneralSetInterval; |
|
5352 } |
|
5353 else if ( str==KEMAnimECmdGeneralSetNextInterval) |
|
5354 { |
|
5355 aCommand=ECmdGeneralSetNextInterval; |
|
5356 } |
|
5357 else if ( str==KEMAnimECmdGeneralSystemTime) |
|
5358 { |
|
5359 aCommand=ECmdGeneralSystemTime; |
|
5360 } |
|
5361 else if ( str==KEMAnimECmdGeneralRegisterForNotis) |
|
5362 { |
|
5363 aCommand=ECmdGeneralRegisterForNotis; |
|
5364 } |
|
5365 else if ( str==KEMAnimECmdGeneralMessage) |
|
5366 { |
|
5367 aCommand=ECmdGeneralMessage; |
|
5368 } |
|
5369 else if ( str==KEMAnimECmdGeneralDuplicateBitmapL) |
|
5370 { |
|
5371 aCommand=ECmdGeneralDuplicateBitmapL; |
|
5372 } |
|
5373 else if ( str==KEMAnimECmdGeneralDuplicateFontL) |
|
5374 { |
|
5375 aCommand=ECmdGeneralDuplicateFontL; |
|
5376 } |
|
5377 else if ( str==KEMAnimECmdGeneralCloseFont) |
|
5378 { |
|
5379 aCommand=ECmdGeneralCloseFont; |
|
5380 } |
|
5381 //Opcodes for MAnimSpriteFunctions |
|
5382 else if ( str==KEMAnimECmdSpriteGetSpriteMember) |
|
5383 { |
|
5384 aCommand=ECmdSpriteGetSpriteMember; |
|
5385 } |
|
5386 else if ( str==KEMAnimECmdSpriteUpdateMember) |
|
5387 { |
|
5388 aCommand=ECmdSpriteUpdateMember; |
|
5389 } |
|
5390 else if ( str==KEMAnimECmdSpriteActivate) |
|
5391 { |
|
5392 aCommand=ECmdSpriteActivate; |
|
5393 } |
|
5394 else if ( str==KEMAnimECmdSpriteSpriteCanBeSeen) |
|
5395 { |
|
5396 aCommand=ECmdSpriteSpriteCanBeSeen; |
|
5397 } |
|
5398 else if ( str==KEMAnimECmdSpriteSizeChangedL) |
|
5399 { |
|
5400 aCommand=ECmdSpriteSizeChangedL; |
|
5401 } |
|
5402 else if ( str==KEMAnimECmdSpriteSetPosition) |
|
5403 { |
|
5404 aCommand=ECmdSpriteSetPosition; |
|
5405 } |
|
5406 else if (str==KEMAnimECmdGeneralReplyBuf8) |
|
5407 { |
|
5408 aCommand=ECmdGeneralReplyBuf8; |
|
5409 } |
|
5410 else if (str==KEMAnimECmdGeneralReplyBuf16) |
|
5411 { |
|
5412 aCommand=ECmdGeneralReplyBuf16; |
|
5413 } |
|
5414 |
|
5415 //MAnimWindowFunctions |
|
5416 |
|
5417 else if (str==KEMAnimECmdWindowActivateGc) |
|
5418 { |
|
5419 aCommand=ECmdWindowActivateGc; |
|
5420 } |
|
5421 else if (str==KEMAnimECmdWindowSetRect) |
|
5422 { |
|
5423 aCommand=ECmdWindowSetRect; |
|
5424 } |
|
5425 else if (str==KEMAnimECmdWindowWindowSize) |
|
5426 { |
|
5427 aCommand=ECmdWindowWindowSize; |
|
5428 } |
|
5429 else if (str==KEMAnimECmdWindowIsHidden) |
|
5430 { |
|
5431 aCommand=ECmdWindowIsHidden; |
|
5432 } |
|
5433 else if (str==KEMAnimECmdWindowSetVisible) |
|
5434 { |
|
5435 aCommand=ECmdWindowSetVisible; |
|
5436 } |
|
5437 else if (str==KEMAnimECmdWindowInvalidate) |
|
5438 { |
|
5439 aCommand=ECmdWindowInvalidate; |
|
5440 } |
|
5441 else if (str==KEMAnimECmdWindowParameters) |
|
5442 { |
|
5443 aCommand=ECmdWindowParameters; |
|
5444 } |
|
5445 else if (str==KEMAnimECmdWindowVisibleRegion) |
|
5446 { |
|
5447 aCommand=ECmdWindowVisibleRegion; |
|
5448 } |
|
5449 else if (str==KEMAnimECmdWindowIsStarted) |
|
5450 { |
|
5451 aCommand=ECmdWindowIsStarted; |
|
5452 } |
|
5453 else if(str==KEMAnimECmdRetrieveResult) |
|
5454 { |
|
5455 aCommand=ECmdRetrieveResult; |
|
5456 } |
|
5457 //Add Opcodes covertion here for MAnimGeneralFunctionsWindowExtension |
|
5458 |
|
5459 else if (str==KEMAnimECmdGfweScreens) |
|
5460 { |
|
5461 aCommand=ECmdGfweScreens; |
|
5462 } |
|
5463 else if (str==KEMAnimECmdGfweFocusScreens) |
|
5464 { |
|
5465 aCommand=ECmdGfweFocusScreens; |
|
5466 } |
|
5467 else if (str==KEMAnimECmdGfweSetFocusScreen) |
|
5468 { |
|
5469 aCommand=ECmdGfweSetFocusScreen; |
|
5470 } |
|
5471 else if (str==KEMAnimECmdGfweWindowGroups) |
|
5472 { |
|
5473 aCommand=ECmdGfweWindowGroups; |
|
5474 } |
|
5475 else if (str==KEMAnimECmdGfweWindowGroupInfo) |
|
5476 { |
|
5477 aCommand=ECmdGfweWindowGroupInfo; |
|
5478 } |
|
5479 else if (str==KEMAnimECmdGfweWindowGroupName) |
|
5480 { |
|
5481 aCommand=ECmdGfweWindowGroupName; |
|
5482 } |
|
5483 else if (str==KEMAnimECmdGfweSetOrdinalPosition) |
|
5484 { |
|
5485 aCommand=ECmdGfweSetOrdinalPosition; |
|
5486 } |
|
5487 else if (str==KEMAnimECmdGfweIsFocusable) |
|
5488 { |
|
5489 aCommand=ECmdGfweIsFocusable; |
|
5490 } |
|
5491 //Add Opcodes covertion here for MAnimFreeTimerWindowFunctions |
|
5492 //* |
|
5493 ///* |
|
5494 else if (str==KEMAnimECmdFreeTimerWinDeactivateGc) |
|
5495 { |
|
5496 aCommand=ECmdFreeTimerWinDeactivateGc; |
|
5497 } |
|
5498 else if (str==KEMAnimECmdFreeTimerWinUpdate) |
|
5499 { |
|
5500 aCommand=ECmdFreeTimerWinUpdate; |
|
5501 } |
|
5502 else |
|
5503 ret=EFalse; |
|
5504 } |
|
5505 |
|
5506 return ret; |
|
5507 } |
|
5508 |
|
5509 TBool CT_GraphicsUtil::GetFbsBitGcL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, CFbsBitGc*& aData) |
|
5510 { |
|
5511 // get CFbsBitGc data object from parameters |
|
5512 TPtrC name; |
|
5513 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name); |
|
5514 if ( ret ) |
|
5515 { |
|
5516 // Data object found |
|
5517 aData=static_cast<CFbsBitGc*>(aDataWrapper.GetDataObjectL(name)); |
|
5518 } |
|
5519 |
|
5520 return ret; |
|
5521 } |
|
5522 |
|
5523 |
|
5524 TBool CT_GraphicsUtil::GetGraphicsOrientation(CDataWrapperBase& aDataWrapper,const TDesC& aSectName, const TDesC& aKeyName,CFbsBitGc::TGraphicsOrientation& aParam) |
|
5525 { |
|
5526 TPtrC str; |
|
5527 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str); |
|
5528 if (ret) |
|
5529 { |
|
5530 if ( str==KEGraphicsOrientationNormal ) |
|
5531 { |
|
5532 aParam=CFbsBitGc::EGraphicsOrientationNormal; |
|
5533 } |
|
5534 else if(str==KEGraphicsOrientationRotated90) |
|
5535 { |
|
5536 aParam=CFbsBitGc::EGraphicsOrientationRotated90; |
|
5537 } |
|
5538 else if(str==KEGraphicsOrientationRotated180) |
|
5539 { |
|
5540 aParam=CFbsBitGc::EGraphicsOrientationRotated180; |
|
5541 } |
|
5542 else if(str==KEGraphicsOrientationRotated270) |
|
5543 { |
|
5544 aParam=CFbsBitGc::EGraphicsOrientationRotated270; |
|
5545 } |
|
5546 else |
|
5547 { |
|
5548 ret=EFalse; |
|
5549 } |
|
5550 } |
|
5551 return ret; |
|
5552 } |
|
5553 |
|
5554 /** |
|
5555 * Utility method that fetches CLinkedTypefaceSpecification pointer by command parameter name from INI-file. |
|
5556 */ |
|
5557 TBool CT_GraphicsUtil::GetLinkedTypefaceSpecificationL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, CLinkedTypefaceSpecification*& aData) |
|
5558 { |
|
5559 // get CLinkedTypefaceSpecification data object from parameters |
|
5560 TPtrC name; |
|
5561 TBool ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name); |
|
5562 if ( ret ) |
|
5563 { |
|
5564 // Data object found |
|
5565 aData=static_cast<CLinkedTypefaceSpecification*>(aDataWrapper.GetDataObjectL(name)); |
|
5566 } |
|
5567 |
|
5568 return ret; |
|
5569 } |