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