|
1 /* |
|
2 * Copyright (c) 2006 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: Constant definitions |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef ALFCONSTANTS_H |
|
21 #define ALFCONSTANTS_H |
|
22 |
|
23 #include <alf/alfanchorlayout.h> |
|
24 #include <alf/alfgridlayout.h> |
|
25 #include <alf/alftimedvalue.h> |
|
26 #include <gdi.h> |
|
27 #include <w32std.h> |
|
28 #include <AknsItemID.h> |
|
29 #include <AknFontSpecification.h> |
|
30 #include <alf/alfmaterial.h> |
|
31 #include <alf/alfclientwindow.h> |
|
32 |
|
33 /** |
|
34 * Service UID which the Alfred Server implements. |
|
35 */ |
|
36 const TUid KAlfServiceUid = {0x10282847}; |
|
37 |
|
38 /** |
|
39 * HuiEnv action command UID to notify that a new TVOut display has been created. |
|
40 */ |
|
41 const TUid KHuiActionNewTVOutDisplayUid = {0x2000B5E6}; |
|
42 |
|
43 /** |
|
44 * IPC enums |
|
45 * |
|
46 * When adding new values, please obey the blocks and add new oppcodes at the end of suitable block |
|
47 * So that existing enumerations do not change. |
|
48 * |
|
49 * When implementing app specifc extension, define your opcodes so that they wont clash with system |
|
50 * enumerations i.e. chooose value above EAlfLastReservedOpCmd |
|
51 */ |
|
52 enum TAlfredServerIPC |
|
53 { |
|
54 // Env & basic session managenemt |
|
55 EAlfEnvSetRefreshMode, |
|
56 EAlfEnvSetMaxFrameRate, |
|
57 EAlfEnvContinueRefresh, |
|
58 EAlfEnvPauseRefresh, |
|
59 EAlfEnvRefreshCallBack, |
|
60 EAlfEnvSetIdleThreshold, |
|
61 EAlfEnvRenderer, |
|
62 EAlfGetPointerEvent, |
|
63 EAlfCancelPtrEvents, |
|
64 ESetFullScreenDrawing, |
|
65 EAlfGetSystemEvent, |
|
66 EAlfCancelSystemEvents, |
|
67 EAlfNotifyAppVisibility, |
|
68 EAlfDisplaySubSessionOpen, |
|
69 EAlfControlGroupSubSessionOpen, |
|
70 EAlfTransformationSubSessionOpen, |
|
71 EAlfCreateSubSession, |
|
72 EAlfCloseSubSession, |
|
73 EAlfDoSubSessionCmd, |
|
74 EAlfDoAsyncSubSessionCmd, |
|
75 EAlfSubSCancelAsynchRequest, |
|
76 EAlfSetWgParent, |
|
77 EAlfSBufAddObserver, |
|
78 EAlfSBufRemoveObserver, |
|
79 EAlfSBufRequestEvent, |
|
80 EAlfSBufRequestNextBuffer, |
|
81 EAlfDisplaySubSessionOpen2, |
|
82 EAlfDoSubSessionBatchCmd, |
|
83 EAlfConfigureBatchCmd, |
|
84 |
|
85 EAlfNotifyTextureInfo, |
|
86 EAlfCancelNotifyTextureInfo, |
|
87 EAlfSBufRequestBufferDraw, |
|
88 |
|
89 // Control |
|
90 EAlfCntrlCreate = 150, |
|
91 |
|
92 // Visual |
|
93 EAlfVisualCreate = 200, |
|
94 EAlfTextVisualCreate, |
|
95 EAlfVisualRemoveAndDestroyAll, |
|
96 EAlfVisualUpdateChildrenLayout, |
|
97 EAlfTextVisualSetText, |
|
98 EAlfTextVisualSetStyle, |
|
99 EAlfTextVisualSetTextStyle, |
|
100 EAlfTextVisualSetEffects, |
|
101 EAlfTextVisualSetAlign, |
|
102 EAlfTextVisualSetLineSpacing, |
|
103 EAlfTextVisualTextExtents, |
|
104 EAlfTextVisualSubstringExtents, |
|
105 EAlfTextVisualStyle, |
|
106 EAlfTextVisualSetMaxLineCount, |
|
107 EAlfTextVisualMaxLineCount, |
|
108 EAlfTextVisualWrapping, |
|
109 EAlfTextVisualSetWrapping, |
|
110 EAlfTextVisualShadowOpacity, // deprecated |
|
111 EAlfTextVisualSetShadowOpacity, // deprecated |
|
112 EAlfTextVisualSetColor, |
|
113 EAlfTextVisualEnableShadow, // deprecated |
|
114 EAlfVisualSetOpacity, |
|
115 EAlfVisualGetOpacity, |
|
116 EAlfVisualLocalToDisplay, |
|
117 EAlfVisualDisplayToLocal, |
|
118 EAlfVisualDisplayRectTarget, |
|
119 EAlfVisualPos, |
|
120 EAlfVisualSetPos, |
|
121 EAlfVisualMoveToFront, |
|
122 EAlfVisualSize, |
|
123 EAlfVisualSetSize, |
|
124 EAlfVisualBrushArrayReset, |
|
125 EAlfVisualBrushArrayAppend, |
|
126 EAlfVisualBrushArrayInsert, |
|
127 EAlfVisualBrushArrayRemove, |
|
128 EAlfVisualSetFlag, |
|
129 EAlfVisualSetFlags, |
|
130 EAlfVisualClearFlag, |
|
131 EAlfVisualClearFlags, |
|
132 EAlfVisualFlags, |
|
133 EAlfVisualSetPaddingInt, |
|
134 EAlfVisualSetPaddingPoint, |
|
135 EAlfVisualSetPaddingBox, |
|
136 EAlfVisualPaddingInPixels, |
|
137 EAlfVisualEnableTransformation, |
|
138 EAlfVisualDepthOffset, |
|
139 EAlfVisualSetDepthOffset, |
|
140 EAlfVisualSetMinSize, |
|
141 EAlfVisualSetMaxSize, |
|
142 EAlfVisualDisplayRect, |
|
143 EAlfVisualEffectiveOpacity, |
|
144 EAlfVisualSetPosTimed, |
|
145 EAlfVisualSetSizeTimed, |
|
146 EAlfVisualLayoutUpdatedNotification, |
|
147 EAlfVisualLayoutUpdatedNotificationCancel, |
|
148 EAlfVisualCopyValuesFromOtherVisual, |
|
149 EAlfVisualSetMinSizeInBaseUnits, |
|
150 EAlfVisualGetMinSize, |
|
151 EAlfVisualGetMinSizeInBaseUnits, |
|
152 EAlfVisualSetMaxSizeInBaseUnits, |
|
153 EAlfVisualGetMaxSize, |
|
154 EAlfVisualGetMaxSizeInBaseUnits, |
|
155 EAlfVisualMove, |
|
156 EAlfVisualSetCenteredPosAndSize, |
|
157 EAlfVisualSetTactileFeedback, |
|
158 EAlfVisualHasTactileFeedback, |
|
159 EAlfVisualRemoveTactileFeedback, |
|
160 EAlfVisualPauseProperties, |
|
161 EAlfVisualResumeProperties, |
|
162 EAlfVisualEnableDropShadow, |
|
163 |
|
164 EAlfTextVisualSetOffset, |
|
165 EAlfTextVisualOffset, |
|
166 |
|
167 EAlfTextVisualSetHighlightRange, |
|
168 |
|
169 // hip hop, slightly wrong context for these two but moving would break bc |
|
170 EAlfVisualSetEffect, |
|
171 EAlfVisualSetGroupEffect, |
|
172 EAlfVisualRemoveEffect, |
|
173 |
|
174 EAlfTextVisualSetRasterizedMesh, |
|
175 |
|
176 EAlfQtCommandBuffer = 450, |
|
177 EAlfDirectClientFPSCounterOn, |
|
178 EAlfDirectClientFPSCounterOff, |
|
179 |
|
180 // LCT Text Visual |
|
181 EAlfLCTTextVisualCreate = 500, |
|
182 EAlfLCTTextVisualSetTextPane, |
|
183 |
|
184 // Line visual |
|
185 EAlfLineVisualCreate = 600, |
|
186 EAlfLineVisualSetPath, |
|
187 EAlfLineVisualSetImage, |
|
188 EAlfLineVisualSetAlphaFunction, |
|
189 EAlfLineVisualSetWidthFunction, |
|
190 EAlfLineVisualGetThickness, |
|
191 EAlfLineVisualSetThickness, |
|
192 EAlfLineVisualGetShadowThickness, |
|
193 EAlfLineVisualSetShadowThickness, |
|
194 EAlfLineVisualGetStartPos, |
|
195 EAlfLineVisualSetStartPos, |
|
196 EAlfLineVisualGetEndPos, |
|
197 EAlfLineVisualSetEndPos, |
|
198 EAlfLineVisualSetColor, |
|
199 |
|
200 // Image visual |
|
201 EAlfImageVisualCreate = 700, |
|
202 EAlfImageVisualSetImage, |
|
203 EAlfImageVisualSetScaleMode, |
|
204 EAlfImageVisualSetSecondaryImage, |
|
205 EAlfImageVisualSetSecondaryAlpha, |
|
206 EAlfImageVisualSecondaryAlpha, |
|
207 EAlfImageVisualSetColor, |
|
208 EAlfImageVisualSetColorMode, |
|
209 EAlfImageVisualSetStretch, |
|
210 EAlfImageVisualSetStretchMode, |
|
211 EAlfImageVisualSetDropShadow, // deprecated |
|
212 EAlfImageVisualSetTurnAngle, |
|
213 EAlfImageVisualTurnAngle, |
|
214 EAlfImageVisualSetScale, |
|
215 EAlfImageVisualScale, |
|
216 EAlfImageVisualSetOffset, |
|
217 EAlfImageVisualOffset, |
|
218 EAlfImageVisualSetDropShadowMetric, // deprecated |
|
219 |
|
220 // Mesh visual |
|
221 EAlfMeshVisualCreate = 800, |
|
222 EAlfMeshVisualCreateMesh, |
|
223 EAlfMeshVisualSetImage, |
|
224 EAlfMeshVisualSetSecondaryImage, |
|
225 EAlfMeshVisualSetSpecularImage, |
|
226 EAlfMeshVisualSecondaryAlpha, |
|
227 EAlfMeshVisualSetSecondaryAlpha, |
|
228 EAlfMeshVisualYawAngle, |
|
229 EAlfMeshVisualSetYawAngle, |
|
230 EAlfMeshVisualPitchAngle, |
|
231 EAlfMeshVisualSetPitchAngle, |
|
232 EAlfMeshVisualScale, |
|
233 EAlfMeshVisualSetScale, |
|
234 EAlfMeshReset, |
|
235 EAlfMeshMakeCube, |
|
236 EAlfMeshMakeSphere, |
|
237 EAlfMeshMakeTorus, |
|
238 EAlfMeshStretchUniformly, |
|
239 EAlfMeshScaleUniformly, |
|
240 EAlfMeshAnimationControllerCount, |
|
241 EAlfMeshSetAnimationPosition, |
|
242 EAlfMeshStartAnimationController, |
|
243 EAlfMeshStopAnimationController, |
|
244 EAlfMeshMaterial, |
|
245 EAlfMeshSetMaterial, |
|
246 EAlfMeshLoadM3GScene, |
|
247 |
|
248 // canvas visual |
|
249 EAlfCanvasVisualCreate = 900, |
|
250 EAlfCanvasVisualSendbuffer, |
|
251 |
|
252 // Layout |
|
253 EAlfLayoutCreate = 1000, |
|
254 EAlfLayoutAppendVisual, |
|
255 EAlfLayoutRemoveVisual, |
|
256 EAlfLayoutVisualFromIndex, |
|
257 EAlfLayoutEnableScrolling, |
|
258 EAlfLayoutScrollOffset, |
|
259 EAlfLayoutSetScrollOffset, |
|
260 EAlfLayoutChildOrdinal, |
|
261 EAlfLayoutChildPos, |
|
262 EAlfLayoutChildSize, |
|
263 EAlfLayoutReorderVisual, |
|
264 EAlfLayoutSetTransitionTime, |
|
265 EAlfLayoutSetInnerPaddingPoint, |
|
266 EAlfLayoutSetInnerPaddingMetric, |
|
267 EAlfLayoutInnerPaddingInBaseUnits, |
|
268 EAlfLayoutVirtualSize, |
|
269 EAlfLayoutSetBaseUnit, |
|
270 EAlfLayoutSetBaseUnitXY, |
|
271 EAlfLayoutBaseUnit, |
|
272 EAlfLayoutSetLayoutModeFlags, |
|
273 EAlfLayoutLayoutModeFlags, |
|
274 EAlfLayoutClearLayoutModeFlags, |
|
275 |
|
276 // Anchor layout |
|
277 EAlfAnchorLayoutCreate = 1100, |
|
278 EAlfAnchorLayoutReset, |
|
279 EAlfAnchorLayoutSetAnchor, |
|
280 EAlfAnchorLayoutSetRelativeAnchorRect, |
|
281 EAlfAnchorLayoutRemoveAnchor, |
|
282 EAlfAnchorLayoutAttachEdge, |
|
283 EAlfAnchorLayoutAttachCorner, |
|
284 EAlfAnchorLayoutAttachBox, |
|
285 EAlfAnchorLayoutDetachAll, |
|
286 EAlfAnchorLayoutDetach, |
|
287 |
|
288 // LCT Anchor Layout |
|
289 EAlfLCTAnchorLayoutCreate = 1200, |
|
290 EAlfLCTAnchorLayoutSetAnchors, |
|
291 |
|
292 // Grid layout |
|
293 EAlfGridLayoutCreate = 1300, |
|
294 EAlfGridLayoutSetColumns, |
|
295 EAlfGridLayoutSetRows, |
|
296 EAlfGridLayoutSetColumnWeights, |
|
297 EAlfGridLayoutSetRowsWeights, |
|
298 EAlfGridLayoutSetExpanding, |
|
299 EAlfGridLayoutOrdinalToBlock, |
|
300 EAlfGridLayoutColumnCount, |
|
301 EAlfGridLayoutRowCount, |
|
302 EAlfGridLayoutFillWeights, |
|
303 EAlfGridLayoutAppendWeight, |
|
304 EAlfGridLayoutInsertWeight, |
|
305 EAlfGridLayoutReplaceWeight, |
|
306 EAlfGridLayoutRemoveWeight, |
|
307 EAlfGridLayoutWeight, |
|
308 EAlfGridLayoutCount, |
|
309 EAlfGridLayoutSetLayoutModeFlags, |
|
310 EAlfGridLayoutLayoutModeFlags, |
|
311 EAlfGridLayoutClearLayoutModeFlags, |
|
312 |
|
313 // LCT Grid Layout |
|
314 EAlfLCTGridLayoutCreate = 1400, |
|
315 EAlfLCTGridLayoutSetColsAndRows, |
|
316 |
|
317 // Deck layout |
|
318 EAlfDeckLayoutCreate = 1500, |
|
319 |
|
320 // Flow layout |
|
321 EAlfFlowLayoutCreate = 1600, |
|
322 EAlfFlowLayoutSetFlowDirection, |
|
323 EAlfFlowLayoutSetCentering, |
|
324 EAlfFlowLayoutSetMode, |
|
325 |
|
326 // Curve path layout |
|
327 EAlfCurvePathLayoutCreate = 1700, |
|
328 EAlfCurvePathLayoutMapValue, |
|
329 |
|
330 // Viewport layout |
|
331 EAlfViewportLayoutCreate = 1800, |
|
332 EAlfViewportLayoutSetVirtualSize, |
|
333 EAlfViewportLayoutSetViewportSize, |
|
334 EAlfViewportLayoutSetViewportPos, |
|
335 |
|
336 // Roster |
|
337 EAlfRosterShow = 2000, |
|
338 EAlfRosterHide, |
|
339 EAlfRosterShowVisual, |
|
340 EAlfRosterHideVisual, |
|
341 EAlfRosterMoveVisualToFront, |
|
342 EAlfRosterSetPointerEventFlags, |
|
343 EAlfRosterAddPointerEventObserver, |
|
344 EAlfRosterRemovePointerEventObserver, |
|
345 EAlfRosterSetPointerDragTreshold, |
|
346 EAlfRosterDisableLongTapEventsWhenDragging, |
|
347 |
|
348 // Texture |
|
349 EAlfTextureCreateAnimated = 2100, |
|
350 EAlfTextureStopAnimation, |
|
351 EAlfTextureStartAnimation, |
|
352 EAlfTextureCreate, |
|
353 EAlfTextureLoad, |
|
354 EAlfTextureUnload, |
|
355 EAlfTextureBlur, |
|
356 EAlfTextureHasContent, |
|
357 EAlfTextureDelete, |
|
358 EAlfTextureRelease, |
|
359 EAlfTextureRestore, |
|
360 EAlfTextureNotifySkinChanged, |
|
361 EAlfTextureUpdateOwnerId, |
|
362 EAlfTextureSetAutoSizeParams, |
|
363 |
|
364 // Display subsession functions |
|
365 EAlfDisplaySetClearBackground =2200, |
|
366 EAlfDisplaySetVisibleArea, |
|
367 EAlfDisplayForceSetVisibleArea, |
|
368 EAlfDisplayVisibleArea, |
|
369 EAlfDisplaySubSessionClose, |
|
370 EAlfDisplaySetDirty, |
|
371 EAlfDisplaySetQuality, |
|
372 EAlfDisplayQuality, |
|
373 EAlfDisplaySetUseDepth, |
|
374 EAlfDisplaySetUsage, |
|
375 EAlfDisplaySetBackgroundItems, |
|
376 EAlfDisplayHandlePointerEvent, |
|
377 EAlfDisplaySuppressAutomaticFading, |
|
378 EAlfDisplaySetClientWindowForDrawing, |
|
379 |
|
380 // Control group subsession functions |
|
381 EAlfControlGroupAppend = 2300, |
|
382 EAlfControlGroupRemove, |
|
383 EAlfControlGroupEnableTransformation, |
|
384 EAlfControlGroupSubSessionClose, |
|
385 |
|
386 // Brush |
|
387 EAlfBrushSetOpacity = 2500, |
|
388 EAlfBrushGetOpacity, |
|
389 EAlfBrushSetLayer, |
|
390 EAlfBorderBrushCreate, |
|
391 EAlfBorderBrushSetImage, |
|
392 EAlfBorderBrushSetColor, |
|
393 EAlfBorderBrushSetThickness, |
|
394 EAlfBorderBrushGetThickness, |
|
395 EAlfBorderBrushSetEdgeOffset, |
|
396 EAlfBorderBrushGetEdgeOffset, |
|
397 EAlfBorderBrushSetImageOffset, |
|
398 EAlfBorderBrushGetImageOffset, |
|
399 EAlfBorderBrushCreateMetric, |
|
400 EAlfBorderBrushSetThicknessMetric, |
|
401 EAlfBorderBrushSetEdgeOffsetMetric, |
|
402 EAlfBorderBrushSetImageOffsetMetric, |
|
403 EAlfBrushSetClipToVisual, |
|
404 EAlfBrushClipToVisual, |
|
405 |
|
406 // image brush |
|
407 EAlfImageBrushCreate = 2600, |
|
408 EAlfImageBrushSetBorders, |
|
409 EAlfImageBrushSetImage, |
|
410 EAlfImageBrushSetScaleMode, |
|
411 EAlfImageBrushSetScale, |
|
412 EAlfImageBrushScale, |
|
413 EAlfImageBrushSetOffset, |
|
414 EAlfImageBrushOffset, |
|
415 |
|
416 // shadow border brush |
|
417 EAlfShadowBorderBrushCreate = 2700, |
|
418 EAlfShadowBorderBrushGetWidth, |
|
419 EAlfShadowBorderBrushSetWidth, |
|
420 EAlfShadowBorderBrushCreateMetric, |
|
421 EAlfShadowBorderBrushGetWidthMetric, |
|
422 EAlfShadowBorderBrushSetWidthMetric, |
|
423 |
|
424 // drop shadow brush |
|
425 EAlfDropShadowBrushCreate = 2800, |
|
426 EAlfDropShadowBrushGetSoftness, |
|
427 EAlfDropShadowBrushSetSoftness, |
|
428 EAlfDropShadowBrushGetDepth, |
|
429 EAlfDropShadowBrushSetDepth, |
|
430 EAlfDropShadowBrushCreateMetric, |
|
431 EAlfDropShadowBrushSetDepthMetric, |
|
432 EAlfDropShadowBrushSetSoftnessMetric, |
|
433 EAlfDropShadowBrushSetColor, |
|
434 |
|
435 |
|
436 // gradient brush |
|
437 EAlfGradientBrushCreate = 2900, |
|
438 EAlfGradientBrushSetDirection, |
|
439 EAlfGradientBrushSetColor, |
|
440 EAlfGradientBrushSetImage, |
|
441 EAlfGradientBrushColor, |
|
442 EAlfGradientBrushOpacity, |
|
443 EAlfGradientBrushAppendColor, |
|
444 |
|
445 // Frame brush |
|
446 EAlfFrameBrushCreate = 3000, |
|
447 EAlfFrameBrushSetFrameRects, |
|
448 EAlfFrameBrushCreateMetric, |
|
449 EAlfFrameBrushSetEdgeOffsetMetric, |
|
450 EAlfFrameBrushCreateImage, |
|
451 EAlfFrameBrushSetImage, |
|
452 EAlfFrameBrushSetFramePartImage, |
|
453 |
|
454 // Transformation subsession functions |
|
455 EAlfTransformationLoadIdentity = 3300, |
|
456 EAlfTransformationTranslate, |
|
457 EAlfTransformationRotate, |
|
458 EAlfTransformationSubSessionClose, |
|
459 EAlfTransformationCount, |
|
460 EAlfTransformationNonIdentityCount, |
|
461 EAlfTransformationStep, |
|
462 EAlfTransformationReplaceStep, |
|
463 EAlfTransformationRotate3D, |
|
464 EAlfTransformationTranslate2D, |
|
465 EAlfTransformationScale, |
|
466 |
|
467 // mapping functions |
|
468 EAlfMappingFunctionAverageCreate = 3500, |
|
469 EAlfMappingFunctionMapValue, |
|
470 EAlfAverageMappingFunctionSetFunction1, |
|
471 EAlfAverageMappingFunctionSetFunction2, |
|
472 EAlfAverageMappingFunctionSetFunctions, |
|
473 EAlfAverageMappingFunctionSetWeight, |
|
474 EAlfMappingFunctionConstantCreate, |
|
475 EAlfConstantMappingFunctionSetValue, |
|
476 EAlfMappingFunctionLinearCreate, |
|
477 EAlfLinearMappingFunctionSetFactor, |
|
478 EAlfLinearMappingFunctionSetOffset, |
|
479 EAlfMappingFunctionSineCreate, |
|
480 EAlfSineMappingFunctionSetFactor, |
|
481 EAlfSineMappingFunctionSetOffset, |
|
482 EAlfMappingFunctionCosineCreate, |
|
483 EAlfCosineMappingFunctionSetFactor, |
|
484 EAlfCosineMappingFunctionSetOffset, |
|
485 EAlfMappingFunctionTableCreate, |
|
486 EAlfMappingFunctionTableSetValues, |
|
487 |
|
488 // curve path |
|
489 EAlfCurvePathCreate = 3700, |
|
490 EAlfCurvePathReset, |
|
491 EAlfCurvePathEnableLoop, |
|
492 EAlfCurvePathLoop, |
|
493 EAlfCurvePathSetOrigin, |
|
494 EAlfCurvePathAppendLine, |
|
495 EAlfCurvePathAppendArc, |
|
496 EAlfCurvePathLength, |
|
497 EAlfCurvePathEvaluate, |
|
498 EAlfCurvePathOffset, |
|
499 EAlfCurvePathSetOffset, |
|
500 EAlfCurvePathMapValue, |
|
501 EAlfCurvePathAppendLine2, |
|
502 EAlfCurvePathAppendArc2, |
|
503 |
|
504 // text styles |
|
505 EAlfPlatformTextStyleCreate = 3900, |
|
506 EAlfPreconfiguredTextStyleCreate, |
|
507 EAlfPlatformTextStyleCopy, |
|
508 EAlfTextStyleSetParent, |
|
509 EAlfTextStyleTextColor, |
|
510 EAlfTextStyleSizeInTwips, |
|
511 EAlfTextStyleSizeInPixels, |
|
512 EAlfTextStyleIsBold, |
|
513 EAlfTextStyleIsItalic, |
|
514 EAlfTextStyleIsUnderline, |
|
515 EAlfTextStyleIsStrikeThrough, |
|
516 EAlfTextStyleSetTextColor, |
|
517 EAlfTextStyleSetTextSizeInTwips, |
|
518 EAlfTextStyleSetTextSizeInPixels, |
|
519 EAlfTextStyleSetBold, |
|
520 EAlfTextStyleSetItalic, |
|
521 EAlfTextStyleSetUnderline, |
|
522 EAlfTextStyleSetStrikeThrough, |
|
523 EAlfTextStyleGetTypeface, |
|
524 EAlfTextStyleSetTextPaneHeightInPixels, |
|
525 EAlfTextStyleServerHandle, |
|
526 |
|
527 // Layout metrics |
|
528 EAlfLayoutMetricsTextStyleData = 4100, |
|
529 |
|
530 // Drop shadow handler |
|
531 EAlfDropShadowSetOffsetInPolar = 4200, |
|
532 EAlfDropShadowSetOffsetInXY, |
|
533 EAlfDropShadowSetColorRgb, |
|
534 EAlfDropShadowSetColorSkin, |
|
535 EAlfDropShadowSetOpacity, |
|
536 EAlfDropShadowSetBlurRadius, |
|
537 EAlfDropShadowSetScale, |
|
538 |
|
539 EAlfEnableLowMemoryState = 4300, |
|
540 EAlfForceSwRendering, |
|
541 |
|
542 EAlfLastReservedOpCmd = 10000 |
|
543 }; |
|
544 |
|
545 struct TAlfLayoutSetAnchorParams |
|
546 { |
|
547 TAlfAnchor iAnchor; |
|
548 TInt iOrdinal; |
|
549 TAlfAnchorOrigin iHorizOrigin; |
|
550 TAlfAnchorOrigin iVertOrigin; |
|
551 TAlfAnchorMetric iHorizMetric; |
|
552 TAlfAnchorMetric iVertMetric; |
|
553 TAlfTimedPoint iOffset; |
|
554 }; |
|
555 |
|
556 struct TAlfLayoutSetRelativeAnchorRectParams |
|
557 { |
|
558 TInt iOrdinal; |
|
559 TAlfAnchorOrigin iTlHorizOrigin; |
|
560 TAlfAnchorOrigin iTlVertOrigin; |
|
561 TAlfRealPoint iTopLeftOffset; |
|
562 TAlfAnchorOrigin iBrHorizOrigin; |
|
563 TAlfAnchorOrigin iBrVertOrigin; |
|
564 TAlfRealPoint iBottomRightOffset; |
|
565 }; |
|
566 |
|
567 struct TAlfLayoutAttachEdgeParams |
|
568 { |
|
569 TInt iOrdinal; |
|
570 TAlfAnchorType iType; |
|
571 TAlfMetric iOffset; |
|
572 TAlfAnchorAttachmentOrigin iAttachmentOrigin; |
|
573 TInt iAttachmentOrdinal; |
|
574 }; |
|
575 |
|
576 struct TAlfLayoutAttachCornerParams |
|
577 { |
|
578 TInt iOrdinal; |
|
579 TAlfAnchorType iType; |
|
580 TAlfXYMetric iOffset; |
|
581 TAlfAnchorAttachmentOrigin iAttachmentOrigin; |
|
582 TInt iAttachmentOrdinal; |
|
583 }; |
|
584 |
|
585 struct TAlfLayoutAttachBoxParams |
|
586 { |
|
587 TInt iOrdinal; |
|
588 TAlfBoxMetric iOffset; |
|
589 TAlfAnchorAttachmentOrigin iAttachmentOrigin; |
|
590 TInt iAttachmentOrdinal; |
|
591 }; |
|
592 |
|
593 struct TAlfLCTAnchorSetAnchorsParams |
|
594 { |
|
595 TInt iOrdinal; |
|
596 TInt iApiId; |
|
597 TInt iComponentId; |
|
598 TInt iOptionIndex; |
|
599 TInt iDrawingOrderIndex; |
|
600 TInt iVarietyIndex; |
|
601 TInt iColumn; |
|
602 TInt iRow; |
|
603 TAlfTimedPoint iOffset; |
|
604 }; |
|
605 |
|
606 struct TAlfLCTGridSetColsAndRowsParams |
|
607 { |
|
608 TInt iOrdinal; |
|
609 TInt iApiId; |
|
610 TInt iComponentId; |
|
611 TInt iOptionIndex; |
|
612 TInt iDrawingOrderIndex; |
|
613 TInt iVarietyIndex; |
|
614 TInt iColumn; |
|
615 TInt iRow; |
|
616 TAlfTimedPoint iOffset; |
|
617 }; |
|
618 |
|
619 struct TAlfCreateBorderBrushParams |
|
620 { |
|
621 TInt iThicknessWidth; |
|
622 TInt iThicknessHeight; |
|
623 TInt iEdgeOffsetX; |
|
624 TInt iEdgeOffsetY; |
|
625 }; |
|
626 |
|
627 struct TAlfCreateBorderBrushMetricParams |
|
628 { |
|
629 TAlfXYMetric iThickness; |
|
630 TAlfXYMetric iEdgeOffset; |
|
631 }; |
|
632 |
|
633 struct TAlfFrameBrushParams |
|
634 { |
|
635 TAknsItemID iFrameIID; |
|
636 TRect iInnerRect; |
|
637 TRect iOuterRect; |
|
638 TInt iEdgeOffsetX; |
|
639 TInt iEdgeOffsetY; |
|
640 }; |
|
641 |
|
642 struct TAlfFrameBrushMetricParams |
|
643 { |
|
644 TAknsItemID iFrameIID; |
|
645 TRect iInnerRect; |
|
646 TRect iOuterRect; |
|
647 TAlfXYMetric iEdgeOffset; |
|
648 }; |
|
649 |
|
650 struct TAlfImageBrushParams |
|
651 { |
|
652 TInt iTextureHandle; |
|
653 TAlfTimedPoint iTl; |
|
654 TAlfTimedPoint iBr; |
|
655 TInt iLeftBorderWidth; |
|
656 TInt iRightBorderWidth; |
|
657 TInt iTopBorderWidth; |
|
658 TInt iBottomBorderWidth; |
|
659 }; |
|
660 |
|
661 struct TAlfGradientBrushSetColorParams |
|
662 { |
|
663 TRgb iColor; |
|
664 TReal32 iOpacity; |
|
665 }; |
|
666 |
|
667 struct TAlfGradientBrushAppendColorParams |
|
668 { |
|
669 TReal32 iPosition; |
|
670 TRgb iColor; |
|
671 TReal32 iOpacity; |
|
672 }; |
|
673 |
|
674 struct TAlfCreateTextureAnimatedParams |
|
675 { |
|
676 TInt iId; |
|
677 TInt iBitmapHandle; |
|
678 TInt iMaskBitmapHandle; |
|
679 TInt iFlags; |
|
680 TInt iManagerId; |
|
681 TFileName iFilename; |
|
682 }; |
|
683 |
|
684 struct TAlfCreateTextureParams |
|
685 { |
|
686 TInt iId; |
|
687 TInt iBitmapHandle; |
|
688 TInt iMaskBitmapHandle; |
|
689 TInt iFlags; |
|
690 TInt iManagerId; |
|
691 }; |
|
692 |
|
693 struct TAlfLoadTextureParams |
|
694 { |
|
695 TInt iId; |
|
696 TInt iBitmapHandle; |
|
697 TInt iMaskBitmapHandle; |
|
698 TInt iFlags; |
|
699 TInt iManagerId; |
|
700 }; |
|
701 |
|
702 struct TAlfBlurTextureParams |
|
703 { |
|
704 TInt iServerSideSrcHandle; |
|
705 TInt iServerSideDstHandle; |
|
706 TInt iManagerId; |
|
707 TSize iPreferredSize; |
|
708 TInt iFilterSize; |
|
709 TInt iFlag; |
|
710 }; |
|
711 |
|
712 struct TAlfImageParams |
|
713 { |
|
714 TAlfImageParams():iTextureHandle(0){} |
|
715 TAlfImageParams(const TAlfImage& aImage) |
|
716 : iTextureHandle( aImage.HasTexture() ? aImage.Texture().ServerHandle() : 0 ), |
|
717 iTl(aImage.TimedTopLeft()), |
|
718 iBr(aImage.TimedBottomRight()) {} |
|
719 TInt iTextureHandle; |
|
720 TAlfTimedPoint iTl; |
|
721 TAlfTimedPoint iBr; |
|
722 }; |
|
723 |
|
724 struct TAlfMeshLoadM3GSceneParams |
|
725 { |
|
726 TFileName iFilename; |
|
727 }; |
|
728 |
|
729 struct TAlfMeshAnimationPositionParams |
|
730 { |
|
731 TInt iControllerId; |
|
732 TReal32 iTarget; |
|
733 TInt iTime; |
|
734 }; |
|
735 |
|
736 struct TAlfMaterialParams |
|
737 { |
|
738 TAlfMaterialPreset iPreset; |
|
739 TRgb iColor; |
|
740 TAlfImageParams iTextureImage; |
|
741 TAlfImageParams iSpecularImage; |
|
742 TAlfTimedValue iSpecular; |
|
743 }; |
|
744 |
|
745 struct TAlfPointerEventDragTreshold |
|
746 { |
|
747 TInt iControlHandle; |
|
748 TAlfXYMetric iXYMetric; |
|
749 TInt iDisplayHandle; |
|
750 }; |
|
751 |
|
752 /** |
|
753 * @deprecated |
|
754 */ |
|
755 struct TAlfCurvePathLineParams |
|
756 { |
|
757 TPoint iStart; |
|
758 TPoint iEnd; |
|
759 TReal32 iLength; |
|
760 }; |
|
761 |
|
762 struct TAlfCurvePathLineRealParams |
|
763 { |
|
764 TAlfRealPoint iStart; |
|
765 TAlfRealPoint iEnd; |
|
766 TReal32 iLength; |
|
767 }; |
|
768 |
|
769 /** |
|
770 * @deprecated |
|
771 */ |
|
772 struct TAlfCurvePathArcParams |
|
773 { |
|
774 TPoint iOrigin; |
|
775 TSize iSize; |
|
776 TReal32 iStartAngle; |
|
777 TReal32 iEndAngle; |
|
778 TReal32 iLength; |
|
779 }; |
|
780 |
|
781 struct TAlfCurvePathArcRealParams |
|
782 { |
|
783 TAlfRealPoint iOrigin; |
|
784 TAlfRealSize iSize; |
|
785 TReal32 iStartAngle; |
|
786 TReal32 iEndAngle; |
|
787 TReal32 iLength; |
|
788 }; |
|
789 |
|
790 |
|
791 struct TAlfTransformationRotateParams |
|
792 { |
|
793 TAlfTimedValue iAngle; |
|
794 TReal32 iAxisX; |
|
795 TReal32 iAxisY; |
|
796 TReal32 iAxisZ; |
|
797 }; |
|
798 |
|
799 struct TAlfTransformationTimedParams |
|
800 { |
|
801 TAlfTimedValue iX; |
|
802 TAlfTimedValue iY; |
|
803 TAlfTimedValue iZ; |
|
804 }; |
|
805 |
|
806 const TInt KAlfTableMappingNumberOfMappedValues = 100; |
|
807 struct TAlfTableMappingFunctionParams |
|
808 { |
|
809 TInt iComponent; |
|
810 TReal32 iValues[KAlfTableMappingNumberOfMappedValues]; |
|
811 TReal32 iMappedValues[KAlfTableMappingNumberOfMappedValues]; |
|
812 }; |
|
813 |
|
814 struct TAlfTextVisualFontColorParams |
|
815 { |
|
816 TRgb iColor; // If iId is KAknsIIDNone only then iColor is valid |
|
817 TAknsItemID iId; |
|
818 TInt iIndex; |
|
819 }; |
|
820 |
|
821 struct TAlfTextVisualSetHighlightRangeParams |
|
822 { |
|
823 TInt iStart; |
|
824 TInt iEnd; |
|
825 TRgb iHighlightColor; |
|
826 TRgb iHighlightTextColor; |
|
827 }; |
|
828 |
|
829 struct TAlfLCTTextVisualSetTextPaneParams |
|
830 { |
|
831 TInt iApiId; |
|
832 TInt iComponentId; |
|
833 TInt iOptionIndex; |
|
834 TInt iDrawingOrderIndex; |
|
835 TInt iVarietyIndex; |
|
836 TInt iColumn; |
|
837 TInt iRow; |
|
838 }; |
|
839 |
|
840 struct TAlfDisplayCreateParams |
|
841 { |
|
842 TInt iWindowGroupId; |
|
843 TInt iDisplayType; |
|
844 }; |
|
845 |
|
846 struct TAlfDisplayCreateParams2 |
|
847 { |
|
848 TInt iWindowGroupId; |
|
849 TInt iDisplayType; |
|
850 TUid iBufferUid; |
|
851 }; |
|
852 |
|
853 struct TAlfGridLayoutFillWeightsParams |
|
854 { |
|
855 TAlfGridDimension iDim; |
|
856 TInt iCount; |
|
857 TAlfMetric iWeight; |
|
858 }; |
|
859 |
|
860 struct TAlfGridLayoutAppendWeightParams |
|
861 { |
|
862 TAlfGridDimension iDim; |
|
863 TAlfMetric iWeight; |
|
864 }; |
|
865 |
|
866 struct TAlfGridLayoutInsertWeightParams |
|
867 { |
|
868 TAlfGridDimension iDim; |
|
869 TAlfMetric iWeight; |
|
870 TInt iPos; |
|
871 }; |
|
872 |
|
873 struct TAlfGridLayoutReplaceWeightParams |
|
874 { |
|
875 TAlfGridDimension iDim; |
|
876 TAlfMetric iWeight; |
|
877 TInt iPos; |
|
878 }; |
|
879 |
|
880 struct TAlfGridLayoutRemoveWeightParams |
|
881 { |
|
882 TAlfGridDimension iDim; |
|
883 TInt iPos; |
|
884 }; |
|
885 |
|
886 struct TAlfGridLayoutWeightParams |
|
887 { |
|
888 TAlfGridDimension iDim; |
|
889 TInt iPos; |
|
890 }; |
|
891 |
|
892 |
|
893 // todo: should rather use streaming |
|
894 struct TInt2 |
|
895 { |
|
896 TInt2(TInt a1, TInt a2):iInt1(a1),iInt2(a2){} |
|
897 TInt iInt1; |
|
898 TInt iInt2; |
|
899 }; |
|
900 |
|
901 struct TInt3 |
|
902 { |
|
903 TInt3(TInt a1, TInt a2, TInt a3):iInt1(a1),iInt2(a2),iInt3(a3){} |
|
904 TInt iInt1; |
|
905 TInt iInt2; |
|
906 TInt iInt3; |
|
907 }; |
|
908 |
|
909 struct TReal2 |
|
910 { |
|
911 TReal2(TReal32 a1, TReal32 a2):iReal1(a1),iReal2(a2){} |
|
912 TReal32 iReal1; |
|
913 TReal32 iReal2; |
|
914 }; |
|
915 |
|
916 struct TIntTReal |
|
917 { |
|
918 TIntTReal(TInt a1, TReal32 a2):iInt(a1),iReal(a2){} |
|
919 TInt iInt; |
|
920 TReal32 iReal; |
|
921 }; |
|
922 |
|
923 struct TAlfImplementationInformation |
|
924 { |
|
925 TAlfImplementationInformation(TInt aId = 0, TInt aImplUid = 0, TVersion aVersion = TVersion(0,0,0)) |
|
926 :iImplementationUid(aImplUid),iImplementationId(aId), iVersion(aVersion){} |
|
927 TInt iImplementationUid; |
|
928 TInt iImplementationId; |
|
929 TVersion iVersion; |
|
930 }; |
|
931 |
|
932 struct TAlfVisualPos |
|
933 { |
|
934 TAlfRealPoint iPoint; |
|
935 TInt iTime; |
|
936 }; |
|
937 |
|
938 struct TAlfVisualSize |
|
939 { |
|
940 TAlfRealSize iSize; |
|
941 TInt iTime; |
|
942 }; |
|
943 |
|
944 struct TAlfVisualPosSize |
|
945 { |
|
946 TAlfRealPoint iPoint; |
|
947 TAlfRealSize iSize; |
|
948 TInt iTime; |
|
949 }; |
|
950 |
|
951 struct TAlfPosInt |
|
952 { |
|
953 TPoint iPoint; |
|
954 TInt iInt; |
|
955 }; |
|
956 |
|
957 struct TAlfSizeInt |
|
958 { |
|
959 TSize iSize; |
|
960 TInt iInt; |
|
961 }; |
|
962 |
|
963 const TInt KAlfTouchEventControlCount = 10; |
|
964 |
|
965 struct TAlfTouchEvent |
|
966 { |
|
967 TAdvancedPointerEvent iEvent; |
|
968 TInt iControls[KAlfTouchEventControlCount]; // @todo, is it ok to make assumptions, about max amount of controls in client |
|
969 TInt iVisuals[KAlfTouchEventControlCount]; // @todo, same as above |
|
970 }; |
|
971 |
|
972 struct TAlfBackBufferUpdate |
|
973 { |
|
974 TUid iCommandUid; |
|
975 TUid iBackBufferUid; |
|
976 }; |
|
977 |
|
978 enum TAlfScreenBufferEventId |
|
979 { |
|
980 EAlfScreenBufferBufferComplete = 0, |
|
981 EAlfScreenBufferEvent = 1, |
|
982 }; |
|
983 |
|
984 struct TAlfScreenBufferEvent |
|
985 { |
|
986 // in |
|
987 TUid iBufferUid; |
|
988 // out |
|
989 TInt iEventId; |
|
990 TRect iDisplayRect; |
|
991 TRect iDirtyRect; |
|
992 }; |
|
993 |
|
994 struct TAlfScreenBufferBitmaps |
|
995 { |
|
996 // in |
|
997 TUid iBufferUid; |
|
998 TInt iPriority; |
|
999 TInt iFlags; |
|
1000 // out |
|
1001 TInt iBitmapHandle; |
|
1002 TInt iMaskHandle; |
|
1003 }; |
|
1004 |
|
1005 struct TAlfTextureInfoEvent |
|
1006 { |
|
1007 TInt iTextureId; |
|
1008 TSize iTextureSize; |
|
1009 }; |
|
1010 |
|
1011 struct TAlfFrameBrushImageParams |
|
1012 { |
|
1013 TAlfImageParams iImage; |
|
1014 TAlfXYMetric iEdgeOffset; |
|
1015 }; |
|
1016 |
|
1017 struct TAlfFrameBrushFramePartImageParams |
|
1018 { |
|
1019 TAlfImageParams iImage; |
|
1020 TInt iFramePart; |
|
1021 }; |
|
1022 |
|
1023 struct TAlfDropShadowOffsetPolarParams |
|
1024 { |
|
1025 TReal32 iAngle; |
|
1026 TAlfMetric iDistance; |
|
1027 TInt iTransitionTime; |
|
1028 }; |
|
1029 |
|
1030 struct TAlfDropShadowOffsetXYParams |
|
1031 { |
|
1032 TAlfTimedPoint iOffset; |
|
1033 TInt iOffsetUnit; |
|
1034 }; |
|
1035 |
|
1036 struct TAlfDropShadowColorRgbParams |
|
1037 { |
|
1038 TRgb iColor; |
|
1039 TInt iTransitionTime; |
|
1040 }; |
|
1041 |
|
1042 struct TAlfDropShadowColorSkinParams |
|
1043 { |
|
1044 TAknsItemID iID; |
|
1045 TInt iIndex; |
|
1046 TInt iTransitionTime; |
|
1047 }; |
|
1048 struct TAlfQtCommandBufferParams |
|
1049 { |
|
1050 TInt iWsClientId; |
|
1051 TInt iWsWgId; |
|
1052 TInt iVisualHandle; // return param |
|
1053 TInt iLength; |
|
1054 TAlfCommandBufferStatus iBufferStatus; |
|
1055 TAny* iPtr; |
|
1056 }; |
|
1057 struct TAlfVisualEffectParams |
|
1058 { |
|
1059 TFileName iFileName; |
|
1060 TInt iGroupHandle; |
|
1061 }; |
|
1062 /** |
|
1063 * Use the following functions to serialize the RArray<T> objects so |
|
1064 * that they can be sent to server. |
|
1065 * |
|
1066 * Client side should use ExternalizeLC function and the server side |
|
1067 * the InternalizeL function. |
|
1068 */ |
|
1069 const TUint KAlfArrayBufferSeparatorChar = ' '; |
|
1070 |
|
1071 template <class T> |
|
1072 HBufC8* ExternalizeLC( const RArray<T>& aArray ) |
|
1073 { |
|
1074 const TInt itemCount = aArray.Count(); |
|
1075 if ( !itemCount) |
|
1076 { |
|
1077 return HBufC8::NewLC(0); |
|
1078 } |
|
1079 |
|
1080 const T* firstItem = &aArray[0]; |
|
1081 |
|
1082 TPtrC8 arrayPtr( (TUint8*)firstItem, itemCount*sizeof(T) ); |
|
1083 |
|
1084 TBuf8<10> itemCountBuf; |
|
1085 itemCountBuf.AppendNum( itemCount ); |
|
1086 |
|
1087 TChar separator( KAlfArrayBufferSeparatorChar ); |
|
1088 |
|
1089 HBufC8* buffer = HBufC8::NewLC( itemCountBuf.Length() + 1 + arrayPtr.Length() ); |
|
1090 TPtr8 ptr = buffer->Des(); |
|
1091 |
|
1092 ptr.Append( itemCountBuf ); |
|
1093 ptr.Append( separator ); |
|
1094 ptr.Append( arrayPtr ); |
|
1095 |
|
1096 return buffer; |
|
1097 } |
|
1098 |
|
1099 template <class T> |
|
1100 void InternalizeL( const TDesC8& aDes, RArray<T>& aArray ) |
|
1101 { |
|
1102 aArray.Reset(); |
|
1103 if ( !aDes.Length() ) |
|
1104 { |
|
1105 return; |
|
1106 } |
|
1107 |
|
1108 const TInt separatorIndex = aDes.Locate( TChar( KAlfArrayBufferSeparatorChar ) ); |
|
1109 TInt itemCount = 0; |
|
1110 TLex8 lexer( aDes.Left( separatorIndex ) ); |
|
1111 User::LeaveIfError( lexer.Val( itemCount ) ); |
|
1112 |
|
1113 TPtrC8 buffer( &aDes[separatorIndex+1], itemCount*sizeof(T) ); |
|
1114 |
|
1115 for ( TInt i = 0 ; i < itemCount ; i++ ) |
|
1116 { |
|
1117 T* itemPtr = (T*)&buffer[i*sizeof(T)]; |
|
1118 T item = *itemPtr; |
|
1119 User::LeaveIfError( aArray.Append( item ) ); |
|
1120 } |
|
1121 } |
|
1122 |
|
1123 #endif // ALFCONSTANTS_H |