Update contrib.
1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Decodes data into text - platform independent
18 #include "../SERVER/w32cmd.h"
21 _LIT(LogCloseBracket,")");
24 _LIT(LogClose,"Close()");
27 void TDebugLogOverflow::Overflow(TDes &aDes)
29 if (!iError) //Should never be re-entrant but just in case
31 _LIT(OverflowThreeDots,"...");
32 const TInt LenThreeDots=3;
34 TInt length=aDes.MaxLength();
35 if (length>LenThreeDots)
38 if (aDes.Length()>length)
39 aDes.SetLength(length);
41 aDes.AppendFormat(OverflowThreeDots,this);
45 class TRawEventX : public TRawEvent
46 // For bypassing protected members of TRawEvent
52 inline TInt scanCode();
55 inline TUint TRawEventX::Ticks()
57 inline TInt TRawEventX::posx()
59 inline TInt TRawEventX::posy()
61 inline TInt TRawEventX::scanCode()
62 {return(iU.key.scanCode __REMOVE_WINS_CHARCODE);}
65 GLDEF_C TInt hHandleToValue(TUint32 handle)
67 return(handle&0xFFFF);
70 TDesC &TWsDecoder::CommandBuf(TInt aApp)
72 iText.Format(_L("[start of command buffer from app %d]"), aApp);
76 TDesC &TWsDecoder::Command(TInt aClass, TInt aOpcode, const TAny *aCmdData, TInt aHandle)
78 TPtrC details(commandDetails(aClass, aOpcode, aCmdData, aHandle));
80 if (details!=KNullDesC)
85 TDesC &TWsDecoder::NewClient(TUint aConnectionHandle)
87 iText.Format(_L("Client Connected %d"), aConnectionHandle);
88 iRequestFuncClass=ENewClientClass;
92 TDesC &TWsDecoder::CommandReply(TInt aData)
94 iText.Format(_L("returns %d (0x%x)"), aData, aData);
98 TDesC &TWsDecoder::CommandReplyBuf(const TDesC8 &aDes)
100 TPtrC details(replyBufDetails(iRequestFuncClass, iPrevOpcode, &aDes, NULL));
102 if (details!=KNullDesC)
105 TDebugLogTextHandler::Append(iText, details);
110 TDesC &TWsDecoder::CommandReplyBuf(const TDesC16 &aDes)
112 iOverflowHandler.Reset();
113 TPtrC details(replyBufDetails(iRequestFuncClass, iPrevOpcode, NULL, &aDes));
115 if (details!=KNullDesC)
118 TDebugLogTextHandler::Append(iText, details);
123 TDesC &TWsDecoder::SignalEvent(TInt aApp)
125 iText.Format(_L("Event signalled for App %d"),aApp);
129 TDesC &TWsDecoder::Panic(TInt aApp, TInt aReason)
131 if (aApp==CDebugLogBase::EDummyConnectionId)
132 iText.Format(_L("WSERV Internal Panic (%d)"), aReason);
134 iText.Format(_L("App %d, Paniced (%d)"),aApp, aReason);
138 void TWsDecoder::UnKnown()
142 void TWsDecoder::UnKnownOpcode(TBuf<LogTBufSize> &aText, TInt aOpcode)
144 aText.AppendFormat(_L("unknown function (opcode %u)"), aOpcode);
148 void TWsDecoder::UnKnownReplyBuf(TBuf<LogTBufSize> &aText, TInt aOpcode)
150 aText.AppendFormat(_L("unknown reply buffer (opcode %u)"), aOpcode);
154 TDesC &TWsDecoder::MiscMessage(const TDesC &aFormat,TInt aParam)
156 iText.Format(aFormat,aParam);
160 void TWsDecoder::AppendPoint(TBuf<LogTBufSize> &aText, const TDesC8 *aReplyDes8)
162 TShortBuf buf(TDebugLogTextHandler::FormatPoint(*((TPoint *)aReplyDes8->Ptr())));
163 aText.AppendFormat(LogString, &buf);
166 void TWsDecoder::AppendRect(TBuf<LogTBufSize> &aText, const TDesC8 *aReplyDes8)
168 TLongBuf buf(TDebugLogTextHandler::FormatRect(*((TRect *)aReplyDes8->Ptr())));
169 aText.AppendFormat(LogString, &buf);
172 void TWsDecoder::AppendDesc(TBuf<LogTBufSize> &aText, const TDesC8 *aReplyDes8)
174 TBuf<LogTBufSize> buf;
175 buf.Copy(*aReplyDes8);
176 aText.AppendFormat(LogString, &buf);
179 void TWsDecoder::AppendDesc(TBuf<LogTBufSize> &aText, const TDesC16 *aReplyDes16)
181 aText.AppendFormat(LogString, aReplyDes16);
184 void TWsDecoder::DecodeWindowGroup(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData, TInt aHandle)
186 aText.Format(_L("RWindowGroup[%d]::"),aHandle);
187 TWsWinCmdUnion pData;
191 case EWsWinOpReceiveFocus:
192 aText.AppendFormat(_L("ReceiveFocus(%d)"), *pData.Bool);
194 case EWsWinOpAutoForeground:
195 aText.AppendFormat(_L("AutoForeground(%d)"), *pData.Bool);
197 case EWsWinOpCancelCaptureKey:
198 aText.AppendFormat(_L("CancelCaptureKey(%d)"), *pData.UInt);
200 case EWsWinOpCaptureKey:
201 aText.AppendFormat(_L("CaptureKey(%u, 0x%04x, 0x%04x)"),
202 pData.CaptureKey->key,
203 pData.CaptureKey->modifiers,
204 pData.CaptureKey->modifierMask);
206 case EWsWinOpCancelCaptureKeyUpsAndDowns:
207 aText.AppendFormat(_L("CancelCaptureKeyUpsAndDowns(%d)"), *pData.UInt);
209 case EWsWinOpCaptureKeyUpsAndDowns:
210 aText.AppendFormat(_L("CaptureKeyUpsAndDowns(%u, 0x%04x, 0x%04x)"),
211 pData.CaptureKey->key,
212 pData.CaptureKey->modifiers,
213 pData.CaptureKey->modifierMask);
215 case EWsWinOpSetTextCursor:
217 TShortBuf buf(TDebugLogTextHandler::FormatPoint(pData.SetTextCursor->pos));
218 aText.AppendFormat(_L("SetTextCursor(%d, %S, {%u,%d,%d,%d,0x%08x})"),
219 hHandleToValue(pData.SetTextCursor->window), &buf,
220 pData.SetTextCursor->cursor.iType, pData.SetTextCursor->cursor.iHeight,
221 pData.SetTextCursor->cursor.iAscent, pData.SetTextCursor->cursor.iWidth,
222 pData.SetTextCursor->cursor.iFlags);
225 case EWsWinOpSetTextCursorClipped:
227 TShortBuf buf1(TDebugLogTextHandler::FormatPoint(pData.SetTextCursor->pos));
228 TLongBuf buf2(TDebugLogTextHandler::FormatRect(pData.SetTextCursor->rect));
229 aText.AppendFormat(_L("SetTextCursor(%d, %S, {%u,%d,%d,%d,0x%08x}, %S)"),
230 hHandleToValue(pData.SetTextCursor->window), &buf1,
231 pData.SetTextCursor->cursor.iType, pData.SetTextCursor->cursor.iHeight,
232 pData.SetTextCursor->cursor.iAscent, pData.SetTextCursor->cursor.iWidth,
233 pData.SetTextCursor->cursor.iFlags, &buf2);
236 case EWsWinOpCancelTextCursor:
237 aText.AppendFormat(_L("CancelTextCursor()"));
239 case EWsWinOpSetOrdinalPriorityAdjust:
240 aText.AppendFormat(_L("SetOrdinalPriorityAdjust(%d)"), *pData.Int);
242 case EWsWinOpAddPriorityKey:
243 aText.AppendFormat(_L("AddPriorityKey(0x%x,0x%x,%d)"), pData.PriorityKey->modifiers, pData.PriorityKey->modifierMask, pData.PriorityKey->keycode);
245 case EWsWinOpRemovePriorityKey:
246 aText.AppendFormat(_L("RemovePriorityKey(0x%x,0x%x,%d)"), pData.PriorityKey->modifiers, pData.PriorityKey->modifierMask, pData.PriorityKey->keycode);
248 case EWsWinOpSetOrdinalPositionErr:
249 aText.AppendFormat(_L("SetOrdinalPositionErr(%d, %d)"), pData.OrdinalPos->pos, pData.OrdinalPos->ordinalPriority);
251 case EWsWinOpDisableKeyClick:
252 aText.AppendFormat(_L("DisableKeyClick(%u)"), *pData.UInt);
254 case EWsWinOpCaptureLongKey:
255 aText.AppendFormat(_L("CaptureLongKey(TTimeIntervalMicroSeconds32(%d), %u, %u, %u, %u, %d, %u)"),
256 pData.CaptureLongKey->delay.Int(), pData.CaptureLongKey->inputKey, pData.CaptureLongKey->outputKey,
257 pData.CaptureLongKey->modifierMask, pData.CaptureLongKey->modifiers, pData.CaptureLongKey->priority, pData.CaptureLongKey->flags);
259 case EWsWinOpCancelCaptureLongKey:
260 aText.AppendFormat(_L("CancelCaptureLongKey(%d)"), pData.CaptureKey->key);
262 case EWsWinOpAllowChildWindowGroup:
263 aText.AppendFormat(_L("AllowProcessToCreateChildWindowGroup(%d)"), *pData.Int);
265 case EWsWinOpClearChildGroup:
266 aText.AppendFormat(_L("ClearChildGroup()"));
268 case EWsWinOpSetChildGroup:
269 aText.AppendFormat(_L("SetChildGroup(%d)"), *pData.Int);
271 case EWsWinOpEnableVisibilityChangeEvents:
272 aText.Append(_L("EnableVisibilityChangeEvents()"));
274 case EWsWinOpDisableVisibilityChangeEvents:
275 aText.Append(_L("DisableVisibilityChangeEvents()"));
277 case EWsWinOpWindowGroupId:
278 aText.Append(_L("WindowGroupId()"));
280 case EWsWinOpEnableFocusChangeEvents:
281 aText.Append(_L("EnableFocusChangeEvents()"));
283 case EWsWinOpDisableFocusChangeEvents:
284 aText.Append(_L("DisableFocusChangeEvents()"));
287 decodeWindow(aText,aOpcode,aCmdData);
292 void TWsDecoder::DecodeClient(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData, TInt aHandle)
296 aText.Format(_L("RWsSession[%d]::"),aHandle);
300 case EWsClOpDisconnect:
301 aText.AppendFormat(LogClose);
303 case EWsClOpSetHotKey:
304 aText.AppendFormat(_L("SetHotKey(%u, %u, 0x%04x, 0x%04x)"),
305 pData.SetHotKey->type,
306 pData.SetHotKey->keycode,
307 pData.SetHotKey->modifiers,
308 pData.SetHotKey->modifierMask);
310 case EWsClOpClearHotKeys:
311 aText.AppendFormat(_L("ClearHotKeys(%d)"),*pData.UInt);
313 case EWsClOpRestoreDefaultHotKey:
314 aText.AppendFormat(_L("ResetDefaultHotKey(%d)"),*pData.UInt);
316 case EWsClOpComputeMode:
317 aText.AppendFormat(_L("ComputeMode(%u)"),*pData.UInt);
319 case EWsClOpEventReady:
320 aText.AppendFormat(_L("EventReady(TInt *stat)"));
322 case EWsClOpRedrawReady:
323 aText.AppendFormat(_L("RedrawReady(TInt *stat)"));
325 case EWsClOpPriorityKeyReady:
326 aText.AppendFormat(_L("PriorityKeyReady(TInt *stat)"));
328 case EWsClOpEventReadyCancel:
329 aText.AppendFormat(_L("EventReadyCancel()"));
331 case EWsClOpRedrawReadyCancel:
332 aText.AppendFormat(_L("RedrawReadyCancel()"));
334 case EWsClOpPriorityKeyReadyCancel:
335 aText.AppendFormat(_L("PriorityKeyReadyCancel()"));
337 case EWsClOpGetEvent:
338 aText.AppendFormat(_L("GetEvent(TWsEvent *aEvent)"));
340 case EWsClOpGetRedraw:
341 aText.AppendFormat(_L("GetRedraw(TWsRedrawEvent *aEvent)"));
343 case EWsClOpGetPriorityKey:
344 aText.AppendFormat(_L("GetPriorityKey(TWsPriorityKeyEvent *aEvent)"));
346 case EWsClOpCreateWindow:
347 case EWsClOpCreateGc:
348 case EWsClOpCreateWindowGroup:
349 case EWsClOpCreateAnimDll:
350 case EWsClOpCreateScreenDevice:
351 case EWsClOpCreateSprite:
352 case EWsClOpCreatePointerCursor:
353 case EWsClOpCreateBitmap:
354 case EWsClOpCreateDirectScreenAccess:
355 case EWsClOpCreateClick:
358 case EWsClOpCreateWindow:
359 aText.AppendFormat(_L("CreateWindow(%d,%x)"),hHandleToValue(pData.CreateWindow->parent),pData.CreateWindow->clientHandle);
361 case EWsClOpCreateGc:
362 aText.AppendFormat(_L("CreateGc()"));
364 case EWsClOpCreateWindowGroup:
365 aText.AppendFormat(_L("CreateWindowGroup(%x)"),pData.CreateWindow->clientHandle);
367 case EWsClOpCreateAnimDll:
368 TDebugLogTextHandler::Append(aText, _L("LoadAnimDll(\""));
369 if (pData.LoadAnimDll && (pData.LoadAnimDll->length >= 0) && (pData.LoadAnimDll->length < LogTBufSize - 22))
370 TDebugLogTextHandler::Append(aText, TPtrC((TText *)(pData.LoadAnimDll+1), pData.LoadAnimDll->length));
372 TDebugLogTextHandler::Append(aText, _L("<INVALID DESCRIPTOR>"));
373 TDebugLogTextHandler::Append(aText, _L("\")"));
375 case EWsClOpCreateScreenDevice:
376 aText.AppendFormat(_L("CreateScreenDevice()"));
378 case EWsClOpCreateSprite:
379 aText.AppendFormat(_L("CreateSprite(...)"));
381 case EWsClOpCreatePointerCursor:
382 aText.AppendFormat(_L("CreatePointerCursor(...)"));
384 case EWsClOpCreateBitmap:
385 aText.AppendFormat(_L("CreateBitmap(...)"));
387 case EWsClOpCreateDirectScreenAccess:
388 aText.AppendFormat(_L("CreateDirectScreenAccess()"));
390 case EWsClOpCreateClick:
391 aText.AppendFormat(_L("CreateSoundPlugin()"));
395 case EWsClOpHeapCount:
396 aText.AppendFormat(_L("HeapCount()"));
398 case EWsClOpDebugInfo:
399 aText.AppendFormat(_L("DebugInfo(%d,%d)"), pData.DebugInfo->iFunction, pData.DebugInfo->iParam);
401 case EWsClOpDebugInfoReplyBuf:
402 aText.AppendFormat(_L("DebugInfo(%d,%d,...)"), pData.DebugInfo->iFunction, pData.DebugInfo->iParam);
404 case EWsClOpTestInvariant:
405 aText.AppendFormat(_L("unimplemented opcode 'EWsClOpTestInvariant' (%u)"), aOpcode);
407 case EWsClOpSetShadowVector:
409 TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
410 aText.AppendFormat(_L("SetShadowVector(%S)"), &buf);
413 case EWsClOpShadowVector:
414 aText.Append(_L("ShadowVector()"));
416 case EWsClOpResourceCount:
417 aText.Append(_L("ResourceCount()"));
419 case EWsClOpSetKeyboardRepeatRate:
420 aText.Append(_L("SetKeyboardRepeatRate(...,...)"));
422 case EWsClOpGetKeyboardRepeatRate:
423 aText.Append(_L("GetKeyboardRepeatRate(...,...)"));
425 case EWsClOpSetDoubleClick:
426 aText.AppendFormat(_L("SetDoubleClickSettings(...,%d)"), pData.SetDoubleClick->distance);
428 case EWsClOpGetDoubleClickSettings:
429 aText.Append(_L("GetDoubleClickSettings(...,...)"));
431 case EWsClOpHeapSetFail:
432 aText.AppendFormat(_L("HeapSetFail(%d, %d)"), pData.HeapSetFail->type, pData.HeapSetFail->value);
434 case EWsClOpNumWindowGroups:
435 aText.AppendFormat(_L("NumWindowGroups(%d)"),*pData.UInt);
437 case EWsClOpNumWindowGroupsAllPriorities:
438 aText.Append(_L("NumWindowGroups()"));
440 case EWsClOpWindowGroupList:
441 aText.AppendFormat(_L("WindowGroupList(...,%d,%d)"),pData.WindowGroupList->priority, pData.WindowGroupList->count);
443 case EWsClOpWindowGroupListAllPriorities:
444 aText.AppendFormat(_L("WindowGroupList(...,%d)"),pData.WindowGroupList->count);
446 case EWsClOpGetFocusWindowGroup:
447 aText.AppendFormat(_L("GetFocusWindowGroup(%d, ...)"), *pData.UInt);
449 case EWsClOpGetDefaultOwningWindow:
450 aText.Append(_L("GetDefaultOwningWindow()"));
452 case EWsClOpSetWindowGroupOrdinalPosition:
453 aText.AppendFormat(_L("SetWindowGroupOrdinalPosition(%d, %d)"),
454 pData.SetWindowGroupOrdinalPosition->identifier,
455 pData.SetWindowGroupOrdinalPosition->position);
457 case EWsClOpGetWindowGroupHandle:
458 aText.AppendFormat(_L("GetWindowGroupHandle(%d)"),*pData.Int);
460 case EWsClOpGetWindowGroupOrdinalPriority:
461 aText.AppendFormat(_L("GetWindowGroupOrdinalPriority(%d)"),*pData.Int);
463 case EWsClOpGetWindowGroupClientThreadId:
464 aText.AppendFormat(_L("GetWindowGroupClientThreadId(%d)"),*pData.Int);
466 case EWsClOpGetWindowGroupNameFromIdentifier:
467 aText.AppendFormat(_L("GetWindowGroupNameFromIdentifier(%d)"),pData.GetWindowGroupNameFromIdentifier->identifier);
469 case EWsClOpFindWindowGroupIdentifier:
470 aText.AppendFormat(_L("FindWindowGroupIdentifier(%d,...,%d)"),pData.FindWindowGroupIdentifier->identifier,
471 pData.FindWindowGroupIdentifier->offset);
473 case EWsClOpFindWindowGroupIdentifierThread:
474 aText.AppendFormat(_L("FindWindowGroupIdentifier(%d,0x%x)"),pData.FindWindowGroupIdentifierThread->identifier,
475 pData.FindWindowGroupIdentifierThread->threadId.Id());
477 case EWsClOpSendMessageToWindowGroup:
478 aText.AppendFormat(_L("SendMessageToWindowGroup(0x%x,0x%x,...)"),pData.SendMessageToWindowGroup->identifierOrPriority,
479 pData.SendMessageToWindowGroup->uid, pData.SendMessageToWindowGroup->dataLength);
481 case EWsClOpSendMessageToAllWindowGroups:
482 aText.AppendFormat(_L("SendMessageToAllWindowGroups(0x%x,...)"),pData.SendMessageToWindowGroup->uid, pData.SendMessageToWindowGroup->dataLength);
484 case EWsClOpSendMessageToAllWindowGroupsPriority:
485 aText.AppendFormat(_L("SendMessageToAllWindowGroups(%d,0x%x,...)"),pData.SendMessageToWindowGroup->identifierOrPriority,
486 pData.SendMessageToWindowGroup->uid, pData.SendMessageToWindowGroup->dataLength);
488 case EWsClOpFetchMessage:
489 aText.AppendFormat(_L("FetchMessage(...)"));
491 case EWsClOpSetSystemPointerCursor:
492 aText.AppendFormat(_L("SetSystemPointerCursor(...,%d)"), pData.SetSystemPointerCursor->number);
494 case EWsClOpClearSystemPointerCursor:
495 aText.AppendFormat(_L("ClearSystemPointerCursor(%d)"), *pData.UInt);
497 case EWsClOpClaimSystemPointerCursorList:
498 aText.Append(_L("ClaimSystemPointerCursorList()"));
500 case EWsClOpFreeSystemPointerCursorList:
501 aText.Append(_L("FreeSystemPointerCursorList()"));
503 case EWsClOpLogMessage:
504 aText.Append(_L("LogMessage(...)"));
506 case EWsClOpPasswordEntered:
507 aText.Append(_L("PasswordEntered()"));
509 case EWsClOpPurgePointerEvents:
510 aText.Append(_L("PurgePointerEvents()"));
512 case EWsClOpRawEvent:
513 aText.AppendFormat(_L("SimulateRawEvent(%d,%d,{{%d,%d},%d})"),((TRawEventX *)pData.RawEvent)->Type(),
514 ((TRawEventX *)pData.RawEvent)->Ticks(),((TRawEventX *)pData.RawEvent)->posx(),
515 ((TRawEventX *)pData.RawEvent)->posy(),((TRawEventX *)pData.RawEvent)->scanCode());
517 case EWsClOpSendEventToWindowGroup:
518 aText.AppendFormat(_L("SendEventToWindowGroup(%d,"),pData.SendEventToWindowGroup->parameter);
519 aText.Append(eventDetails(&pData.SendEventToWindowGroup->event));
520 aText.Append(LogCloseBracket);
522 case EWsClOpSetModifierState:
523 aText.AppendFormat(_L("SetModifierState(%d,%d)"), pData.SetModifierState->modifier, pData.SetModifierState->state);
525 case EWsClOpGetModifierState:
526 aText.Append(_L("GetModifierState()"));
528 case EWsClOpSendOffEventsToShell:
530 _LIT(LogClientSendOffEventsToShell,"RequestOffEvents(%u,%d)");
531 aText.AppendFormat(LogClientSendOffEventsToShell
532 ,pData.OffEventsToShell->on,hHandleToValue(pData.OffEventsToShell->window));
535 case EWsClOpGetDefModeMaxNumColors:
537 _LIT(LogClientGetDefModeMaxNumColors,"GetDefModeMaxNumColors()");
538 aText.Append(LogClientGetDefModeMaxNumColors);
541 case EWsClOpGetColorModeList:
543 _LIT(LogClientGetColorModeList,"GetColorModeList()");
544 aText.Append(LogClientGetColorModeList);
547 case EWsClOpKeyEvent:
549 _LIT(LogClientKeyEvent,"SimulateKeyEvent(%d)");
550 aText.AppendFormat(LogClientKeyEvent,pData.KeyEvent->iCode);
553 case EWsClOpSendEventToAllWindowGroup:
555 _LIT(LogClientSendEventToAllWindowGroups,"SendEventToAllWindowGroups(");
556 aText.Append(LogClientSendEventToAllWindowGroups);
557 aText.Append(eventDetails(&pData.SendEventToWindowGroup->event));
558 aText.Append(LogCloseBracket);
561 case EWsClOpSendEventToAllWindowGroupPriority:
563 _LIT(LogClientSendEventToAllWindowGroupPriority,"SendEventToAllWindowGroups(%d,");
564 aText.AppendFormat(LogClientSendEventToAllWindowGroupPriority,pData.SendEventToWindowGroup->parameter);
565 aText.Append(eventDetails(&pData.SendEventToWindowGroup->event));
566 aText.Append(LogCloseBracket);
569 case EWsClOpSetPointerCursorArea:
571 TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.SetPointerCursorArea->area));
572 _LIT(LogClientSetPointerCursorArea,"SetPointerCursorArea(%d,%S)");
573 aText.AppendFormat(LogClientSetPointerCursorArea,pData.SetPointerCursorArea->mode,&buf);
576 case EWsClOpPointerCursorArea:
578 _LIT(LogClientPointerCursorArea,"PointerCursorArea(%d)");
579 aText.AppendFormat(LogClientPointerCursorArea,*pData.Int);
582 case EWsClOpSetPointerCursorMode:
584 _LIT(LogClientSetPointerCursorMode,"SetPointerCursorMode(%d)");
585 aText.AppendFormat(LogClientSetPointerCursorMode,*pData.Mode);
588 case EWsClOpPointerCursorMode:
590 _LIT(LogClientPointerCursorMode,"PointerCursorMode()");
591 aText.Append(LogClientPointerCursorMode);
594 case EWsClOpSetDefaultSystemPointerCursor:
596 _LIT(LogClientSetDefaultSystemPointerCursor,"SetDefaultSystemPointerCursor(%d)");
597 aText.AppendFormat(LogClientSetDefaultSystemPointerCursor,*pData.Int);
600 case EWsClOpClearDefaultSystemPointerCursor:
602 _LIT(LogClientClearDefaultSystemPointerCursor,"ClearDefaultSystemPointerCursor()");
603 aText.Append(LogClientClearDefaultSystemPointerCursor);
606 case EWsClOpSetPointerCursorPosition:
608 TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
609 _LIT(LogClientSetPointerCursorPosition,"SetPointerCursorPosition(%S)");
610 aText.AppendFormat(LogClientSetPointerCursorPosition,&buf);
613 case EWsClOpPointerCursorPosition:
615 _LIT(LogClientPointerCursorPosition,"PointerCursorPosition()");
616 aText.Append(LogClientPointerCursorPosition);
619 case EWsClOpSetDefaultFadingParams:
621 _LIT(LogClientSetDefaultFadingParams,"SetDefaultFadingParameters(%d,%d)");
622 aText.AppendFormat(LogClientSetDefaultFadingParams
623 ,WservEncoding::ExtractFirst8BitValue(*pData.UInt),WservEncoding::ExtractSecond8BitValue(*pData.UInt));
626 case EWsClOpPrepareForSwitchOff:
628 _LIT(LogClientPrepareForSwitchOff,"PrepareForSwitchOff()");
629 aText.Append(LogClientPrepareForSwitchOff);
632 case EWsClOpSetFaded:
634 _LIT(LogWinSetFade,"SetSystemFade(%d");
635 aText.AppendFormat(LogWinSetFade,pData.SetSystemFaded->Faded());
636 if (!pData.SetSystemFaded->UseDefaultMap())
638 _LIT(LogWinSetFade2,",%d,%d");
641 pData.SetSystemFaded->GetFadingParams(blackMap,whiteMap);
642 aText.AppendFormat(LogWinSetFade2,blackMap,whiteMap);
644 aText.Append(LogCloseBracket);
647 case EWsClOpLogCommand:
649 _LIT(LogClientLogCommand,"LogCommand(%d)");
650 aText.AppendFormat(LogClientLogCommand,*pData.UInt);
653 case EWsClOpSendEventToOneWindowGroupPerClient:
655 _LIT(LogClientSendEventToOneWindowGroupPerClient,"SendEventToOneWindowGroupsPerClient(");
656 aText.Append(LogClientSendEventToOneWindowGroupPerClient);
657 aText.Append(eventDetails(&pData.SendEventToWindowGroup->event));
658 aText.Append(LogCloseBracket);
661 case EWsClOpStartSetCustomTextCursor:
663 _LIT(LogClientStartSetCustomTextCursor,"StartSetCustomTextCursorL(id=0x%08x, flags=0x%08x, align=%d)");
664 aText.AppendFormat(LogClientStartSetCustomTextCursor, pData.CustomTextCursorData->identifier, pData.CustomTextCursorData->flags, pData.CustomTextCursorData->alignment);
667 case EWsClOpCompleteSetCustomTextCursor:
669 _LIT(LogClientCompleteSetCustomTextCursor,"CompleteSetCustomTextCursorL(err=%d)");
670 aText.AppendFormat(LogClientCompleteSetCustomTextCursor, *pData.Int);
673 #if defined(__WINS__)
674 case EWsClOpRemoveKeyCode:
676 _LIT(LogClientRemoveKeyCode,"RemoveKeyCode(%d)");
677 aText.AppendFormat(LogClientRemoveKeyCode,*pData.UInt);
680 case EWsClOpSimulateXyInput:
682 _LIT(LogClientSimulateXyInput,"SimulateXyInputType(%d)");
683 aText.AppendFormat(LogClientSimulateXyInput,*pData.UInt);
687 case EWsClOpSetBackgroundColor:
689 TShortBuf buf(TDebugLogTextHandler::FormatRgb(*pData.rgb));
690 _LIT(LogClientSetBackgroundColor,"SetBackgroundColor(%S)");
691 aText.AppendFormat(LogClientSetBackgroundColor,&buf);
694 case EWsClOpGetBackgroundColor:
696 _LIT(LogClientGetBackgroundColor,"GetBackgroundColor()");
697 aText.AppendFormat(LogClientGetBackgroundColor);
700 case EWsClOpSystemInfo:
702 _LIT(LogClientSystemInfo,"SystemInfo(%d, SSystemInfo &aSystemInfo)");
703 aText.AppendFormat(LogClientSystemInfo, *pData.UInt);
706 case EWsClOpSetFocusScreen:
708 _LIT(LogClientSetFocusScreen,"SetFocusScreen(%d)");
709 aText.AppendFormat(LogClientSetFocusScreen, *pData.UInt);
712 case EWsClOpGetFocusScreen:
714 _LIT(LogClientGetFocusScreen,"GetFocusScreen()");
715 aText.AppendFormat(LogClientGetFocusScreen);
718 case EWsClOpWindowGroupListAndChain:
720 _LIT(LogClientWindowGroupListAndChain,"WindowGroupList(%d, RArray<TWindowGroupChainInfo>* aWindowList)");
721 aText.AppendFormat(LogClientWindowGroupListAndChain, *pData.UInt);
724 case EWsClOpWindowGroupListAndChainAllPriorities:
726 _LIT(LogClientWindowGroupListAndChainAllPriorities,"WindowGroupListAndChainAllPriorities(RArray<TWindowGroupChainInfo>* aWindowList)");
727 aText.AppendFormat(LogClientWindowGroupListAndChainAllPriorities);
730 case EWsClOpSetClientCursorMode:
732 _LIT(LogClientSetClientCursorMode,"SetClientCursorMode(%d)");
733 aText.AppendFormat(LogClientSetClientCursorMode, *pData.UInt);
736 case EWsClOpClearAllRedrawStores:
738 _LIT(LogClientClearAllRedrawStores,"ClearAllRedrawStores()");
739 aText.AppendFormat(LogClientClearAllRedrawStores);
742 case EWsClOpGraphicMessageReady:
744 _LIT(LogClientGraphicMessageReady,"GraphicMessageReady(%d)");
745 aText.AppendFormat(LogClientGraphicMessageReady, *pData.UInt);
748 case EWsClOpGetGraphicMessage:
750 _LIT(LogClientGraphicMessage,"GetGraphicMessage(%d)");
751 aText.AppendFormat(LogClientGraphicMessage, *pData.UInt);
754 case EWsClOpGraphicMessageCancel:
756 _LIT(LogClientGraphicMessageCancel,"GraphicMessageCancel()");
757 aText.AppendFormat(LogClientGraphicMessageCancel);
760 case EWsClOpNumWindowGroupsOnScreen:
762 _LIT(LogClientNumWindowGroupsOnScreen,"NumWindowGroups(%d, %d)");
763 aText.AppendFormat(LogClientNumWindowGroupsOnScreen, pData.NumWinGroups->screenNumber, pData.NumWinGroups->priority);
766 case EWsClOpGetNumberOfScreens:
768 _LIT(LogClientGetNumberOfScreens,"NumberOfScreens()");
769 aText.AppendFormat(LogClientGetNumberOfScreens);
772 case EWsClOpNoFlickerFree:
774 _LIT(LogNoFlickerFree,"EWsClOpNoFlickerFree enum");
775 aText.AppendFormat(LogNoFlickerFree);
778 case EWsClOpCreateGraphic:
780 _LIT(LogCreateGraphic,"EWsClOpCreateGraphic enum");
781 aText.AppendFormat(LogCreateGraphic);
784 case EWsClOpRegisterSurface:
786 TInt screenNumber = pData.SurfaceRegister->screenNumber;
787 const TSurfaceId& surfaceId = pData.SurfaceRegister->surfaceId;
789 _LIT(LogRegisterSurface,"RegisterSurface(aScreenNumber(%d), TSurfaceId{%x,%x,%x,%x})");
790 aText.AppendFormat(LogRegisterSurface, screenNumber, surfaceId.iInternal[0], surfaceId.iInternal[1], surfaceId.iInternal[2], surfaceId.iInternal[3]);
793 case EWsClOpUnregisterSurface:
795 TInt screenNumber = pData.SurfaceRegister->screenNumber;
796 const TSurfaceId& surfaceId = pData.SurfaceRegister->surfaceId;
798 _LIT(LogUnregisterSurface,"UnregisterSurface(aScreenNumber(%d), TSurfaceId{%x,%x,%x,%x})");
799 aText.AppendFormat(LogUnregisterSurface, screenNumber, surfaceId.iInternal[0], surfaceId.iInternal[1], surfaceId.iInternal[2], surfaceId.iInternal[3]);
802 case EWsClOpSetCloseProximityThresholds:
804 _LIT(LogSetCloseProximityThresholds,"SetCloseProximityThresholds(%d, %d)");
805 aText.AppendFormat(LogSetCloseProximityThresholds, pData.ZThresholdPair->enterThreshold, pData.ZThresholdPair->exitThreshold);
808 case EWsClOpSetHighPressureThresholds:
810 _LIT(LogSetHighPressureThresholds,"SetHighPressureThresholds(%d, %d)");
811 aText.AppendFormat(LogSetHighPressureThresholds, pData.ZThresholdPair->enterThreshold, pData.ZThresholdPair->exitThreshold);
814 case EWsClOpGetEnterCloseProximityThreshold:
816 _LIT(LogGetEnterCloseProximityThreshold,"EWsClOpGetEnterCloseProximityThreshold()");
817 aText.AppendFormat(LogGetEnterCloseProximityThreshold);
820 case EWsClOpGetExitCloseProximityThreshold:
822 _LIT(LogGetExitCloseProximityThreshold,"EWsClOpGetExitCloseProximityThreshold()");
823 aText.AppendFormat(LogGetExitCloseProximityThreshold);
826 case EWsClOpGetEnterHighPressureThreshold:
828 _LIT(LogGetEnterHighPressureThreshold,"EWsClOpGetEnterHighPressureThreshold()");
829 aText.AppendFormat(LogGetEnterHighPressureThreshold);
832 case EWsClOpGetExitHighPressureThreshold:
834 _LIT(LogGetExitHighPressureThreshold,"EWsClOpGetExitHighPressureThreshold()");
835 aText.AppendFormat(LogGetExitHighPressureThreshold);
838 case EWsClOpIndicateAppOrientation:
840 _LIT(LogIndicateAppOrientation,"EWsClOpIndicateAppOrientation(%d)");
841 aText.AppendFormat(LogIndicateAppOrientation, *pData.Orientation);
844 case EWsClOpLastEnumValue:
846 _LIT(LogLastEnumValue,"EWsClOpLastEnumValue enum");
847 aText.AppendFormat(LogLastEnumValue);
851 UnKnownOpcode(aText, aOpcode);
856 void TWsDecoder::DecodeWindow(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData, TInt aHandle)
858 _LIT(LogWindow,"RWindow[%d]::");
859 aText.Format(LogWindow,aHandle);
860 decodeWindow(aText,aOpcode,aCmdData);
863 void TWsDecoder::decodeWindow(TBuf<LogTBufSize> &aText,TInt aOpcode,const TAny *aData)
865 TWsWinCmdUnion pData;
870 aText.AppendFormat(LogClose);
872 case EWsWinOpSetExtent:
874 TShortBuf buf1(TDebugLogTextHandler::FormatPoint(pData.SetEx->pos));
875 TShortBuf buf2(TDebugLogTextHandler::FormatSize(pData.SetEx->size));
876 aText.AppendFormat(_L("SetExtent(%S, %S)"), &buf1, &buf2);
879 case EWsWinOpSetExtentErr:
881 TShortBuf buf1(TDebugLogTextHandler::FormatPoint(pData.SetEx->pos));
882 TShortBuf buf2(TDebugLogTextHandler::FormatSize(pData.SetEx->size));
883 aText.AppendFormat(_L("SetExtentError(%S, %S)"), &buf1, &buf2);
886 case EWsWinOpOrdinalPosition:
887 aText.AppendFormat(_L("OrdinalPosition()"));
889 case EWsWinOpFullOrdinalPosition:
890 aText.AppendFormat(_L("FullOrdinalPosition()"));
892 case EWsWinOpSetOrdinalPosition:
893 aText.AppendFormat(_L("SetOrdinalPosition(%d)"),*pData.Int);
895 case EWsWinOpSetOrdinalPositionPri:
896 aText.AppendFormat(_L("SetOrdinalPosition(%d,%d)"), pData.OrdinalPos->pos, pData.OrdinalPos->ordinalPriority);
900 TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.pos));
901 aText.AppendFormat(_L("SetPosition(%S)"),&buf);
904 case EWsWinOpSetSizeErr:
906 TShortBuf buf(TDebugLogTextHandler::FormatSize(*pData.size));
907 aText.AppendFormat(_L("SetSizeErr(%S)"), &buf);
910 case EWsWinOpSetSize:
912 TShortBuf buf(TDebugLogTextHandler::FormatSize(*pData.size));
913 aText.AppendFormat(_L("SetSize(%S)"), &buf);
916 case EWsWinOpPosition:
917 aText.AppendFormat(_L("Position()"));
919 case EWsWinOpAbsPosition:
920 aText.AppendFormat(_L("AbsPosition()"));
923 aText.AppendFormat(_L("Size()"));
925 case EWsWinOpActivate:
926 aText.AppendFormat(_L("Activate()"));
928 case EWsWinOpInvalidate:
930 TLongBuf buf(TDebugLogTextHandler::FormatRect(*pData.rect));
931 aText.AppendFormat(_L("Invalidate(%S)"), &buf);
934 case EWsWinOpInvalidateFull:
935 aText.AppendFormat(_L("Invalidate()"));
937 case EWsWinOpBeginRedraw:
939 TLongBuf buf(TDebugLogTextHandler::FormatRect(*pData.rect));
940 aText.AppendFormat(_L("BeginRedraw(%S)"), &buf);
943 case EWsWinOpBeginRedrawFull:
944 aText.AppendFormat(_L("BeginRedraw()"));
946 case EWsWinOpEndRedraw:
947 aText.AppendFormat(_L("EndRedraw()"));
949 case EWsWinOpTestInvariant:
950 aText.AppendFormat(_L("__TestInvariant()"));
953 aText.AppendFormat(_L("Parent()"));
955 case EWsWinOpNextSibling:
956 aText.AppendFormat(_L("NextSibling()"));
958 case EWsWinOpPrevSibling:
959 aText.AppendFormat(_L("PrevSibling()"));
962 aText.AppendFormat(_L("Child()"));
964 case EWsWinOpInquireOffset:
965 aText.AppendFormat(_L("InquireOffset(%d)"),hHandleToValue(*pData.UInt));
967 case EWsWinOpPointerFilter:
968 aText.AppendFormat(_L("PointerFilter(0x%08x)"), *pData.UInt);
970 case EWsWinOpSetPointerCapture:
971 aText.AppendFormat(_L("SetPointerCapture(%u)"), *pData.UInt);
973 case EWsWinOpSetPointerGrab:
974 aText.AppendFormat(_L("SetPointerGrab(%u)"), *pData.UInt);
976 case EWsWinOpSetNoBackgroundColor:
977 aText.Append(_L("SetBackgroundColor()"));
979 case EWsWinOpSetBackgroundColor:
981 TLongBuf buf(TDebugLogTextHandler::FormatRgb(*pData.rgb));
982 aText.AppendFormat(_L("SetBackgroundColor(%S)"), &buf);
985 case EWsWinOpSetColor:
987 TLongBuf buf(TDebugLogTextHandler::FormatRgb(*pData.rgb));
988 aText.AppendFormat(_L("SetColor(%S)"), &buf);
991 case EWsWinOpSetShadowHeight:
992 aText.AppendFormat(_L("SetShadowHeight(%d)"), *pData.Int);
994 case EWsWinOpShadowDisabled:
996 TShortBuf buf(TDebugLogTextHandler::FormatBool(*pData.Bool));
997 aText.AppendFormat(_L("SetShadowDisabled(%S)"), &buf);
1000 case EWsWinOpSetVisible:
1002 TShortBuf buf(TDebugLogTextHandler::FormatBool(*pData.Bool));
1003 aText.AppendFormat(_L("SetVisible(%S)"), &buf);
1006 case EWsWinOpUpdateScreen:
1007 aText.Append(_L("UpdateScreen()"));
1009 case EWsWinOpUpdateScreenRegion:
1010 aText.Append(_L("UpdateScreenRegion(TRegion(...))"));
1012 case EWsWinOpMaintainBackup:
1013 aText.Append(_L("MaintainBackup()"));
1015 case EWsWinOpGetInvalidRegion:
1016 aText.Append(_L("GetInvalidRegion(...)"));
1018 case EWsWinOpGetInvalidRegionCount:
1019 aText.Append(_L("GetInvalidRegionCount()"));
1021 case EWsWinOpScroll:
1023 TShortBuf buf(TDebugLogTextHandler::FormatPoint(pData.ScrollRect->offset));
1024 aText.AppendFormat(_L("Scroll(%S)"), &buf);
1027 case EWsWinOpScrollClip:
1029 TLongBuf buf1(TDebugLogTextHandler::FormatRect(pData.ScrollRect->clip));
1030 TShortBuf buf2(TDebugLogTextHandler::FormatPoint(pData.ScrollRect->offset));
1031 aText.AppendFormat(_L("Scroll(%S, %S)"), &buf1, &buf2);
1034 case EWsWinOpScrollRect:
1036 TShortBuf buf1(TDebugLogTextHandler::FormatPoint(pData.ScrollRect->offset));
1037 TLongBuf buf2(TDebugLogTextHandler::FormatRect(pData.ScrollRect->rect));
1038 aText.AppendFormat(_L("Scroll(%S, %S)"), &buf1, &buf2);
1041 case EWsWinOpScrollClipRect:
1043 TLongBuf buf1(TDebugLogTextHandler::FormatRect(pData.ScrollRect->clip));
1044 TShortBuf buf2(TDebugLogTextHandler::FormatPoint(pData.ScrollRect->offset));
1045 TLongBuf buf3(TDebugLogTextHandler::FormatRect(pData.ScrollRect->rect));
1046 aText.AppendFormat(_L("Scroll(%S, %S, %S)"), &buf1, &buf2, &buf3);
1049 case EWsWinOpBitmapHandle:
1050 aText.Append(_L("BitmapHandle()"));
1052 case EWsWinOpUpdateBackupBitmap:
1053 aText.Append(_L("UpdateBackupBitmap()"));
1055 case EWsWinOpRequiredDisplayMode:
1056 aText.AppendFormat(_L("SetRequiredDisplayMode(%d)"), *pData.UInt);
1058 case EWsWinOpSetCornerType:
1059 aText.AppendFormat(_L("SetCornerType(%d)"), *pData.UInt);
1061 case EWsWinOpSetShape:
1062 aText.AppendFormat(_L("SetWindowShape(%d rects)"), pData.SetShape->count);
1064 case EWsWinOpSetName:
1065 aText.Append(_L("SetName(\"...\")"));
1068 aText.Append(_L("Name()"));
1070 case EWsWinOpSetOwningWindowGroup:
1071 aText.AppendFormat(_L("SetOwningWindowGroup(%d)"),*pData.Int);
1073 case EWsWinOpDefaultOwningWindow:
1074 aText.Append(_L("DefaultOwningWindow()"));
1076 case EWsWinOpEnableOnEvents:
1077 aText.AppendFormat(_L("EnableOnEvents(%d)"),*pData.Int);
1079 case EWsWinOpDisableOnEvents:
1080 aText.Append(_L("DisableOnEvents()"));
1082 case EWsWinOpEnableErrorMessages:
1083 aText.AppendFormat(_L("EnableErrorMessages(%d)"),*pData.Int);
1085 case EWsWinOpDisableErrorMessages:
1086 aText.Append(_L("DisableErrorMessages()"));
1088 case EWsWinOpEnableModifierChangedEvents:
1089 aText.Append(_L("EnableModifierChangedEvents()"));
1091 case EWsWinOpDisableModifierChangedEvents:
1092 aText.Append(_L("DisableModifierChangedEvents()"));
1094 case EWsWinOpEnableGroupChangeEvents:
1095 aText.Append(_L("EnableGroupChangeEvents()"));
1097 case EWsWinOpDisableGroupChangeEvents:
1098 aText.Append(_L("DisableGroupChangeEvents()"));
1100 case EWsWinOpRequestPointerRepeatEvent:
1102 TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.RequestPointerRepeatEvent->rect));
1103 aText.AppendFormat(_L("RequestPointerRepeatEvent(TTimeIntervalMicroSeconds32(%d), %S)"),
1104 pData.RequestPointerRepeatEvent->time.Int(), &buf);
1107 case EWsWinOpCancelPointerRepeatEventRequest:
1108 aText.Append(_L("CancelPointerRepeatEventRequest()"));
1110 case EWsWinOpSetPointerCursor:
1111 aText.AppendFormat(_L("SetPointerCursor(%d)"),*pData.UInt);
1113 case EWsWinOpSetCustomPointerCursor:
1114 aText.AppendFormat(_L("SetCustomPointerCursor(%d)"),*pData.UInt);
1116 case EWsWinOpPasswordWindow:
1117 aText.AppendFormat(_L("PasswordWindow(%d)"),*pData.PasswordMode);
1119 case EWsWinOpAddKeyRect:
1121 TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.AddKeyRect->rect));
1122 aText.AppendFormat(_L("AddKeyRect(%S,%d,%d)"),&buf,pData.AddKeyRect->scanCode,pData.AddKeyRect->activatedByPointerSwitchOn);
1125 case EWsWinOpRemoveAllKeyRects:
1126 aText.Append(_L("RemoveAllKeyRects()"));
1128 case EWsWinOpAllocPointerMoveBuffer:
1129 aText.AppendFormat(_L("AllocPointerMoveBuffer(%d,%d)"),pData.AllocPointerMoveBuffer->maxNumPoints,pData.AllocPointerMoveBuffer->flags);
1131 case EWsWinOpFreePointerMoveBuffer:
1132 aText.Append(_L("FreePointerMoveBuffer()"));
1134 case EWsWinOpEnablePointerMoveBuffer:
1135 aText.Append(_L("EnablePointerMoveBuffer()"));
1137 case EWsWinOpDisablePointerMoveBuffer:
1138 aText.Append(_L("DisablePointerMoveBuffer()"));
1140 case EWsWinOpRetrievePointerMoveBuffer:
1141 aText.Append(_L("RetrievePointerMoveBuffer(...)"));
1143 case EWsWinOpDiscardPointerMoveBuffer:
1144 aText.Append(_L("DiscardPointerMoveBuffer()"));
1146 case EWsWinOpEnableBackup:
1147 aText.Append(_L("EnableBackup()"));
1149 case EWsWinOpClaimPointerGrab:
1150 aText.Append(_L("ClaimPointerGrab()"));
1152 case EWsWinOpIdentifier:
1153 aText.Append(_L("Identifier()"));
1155 case EWsWinOpSetFade:
1157 _LIT(LogWinSetFade,"SetFade(%d,%d");
1158 aText.AppendFormat(LogWinSetFade,pData.SetFaded->Faded(),pData.SetFaded->IncludeChildren());
1159 if (!pData.SetFaded->UseDefaultMap())
1161 _LIT(LogWinSetFade2,",%d,%d");
1164 pData.SetFaded->GetFadingParams(blackMap,whiteMap);
1165 aText.AppendFormat(LogWinSetFade2,blackMap,whiteMap);
1167 aText.Append(LogCloseBracket);
1170 case EWsWinOpSetNonFading:
1172 _LIT(LogWinSetNonFading,"SetNonFading(%d)");
1173 aText.AppendFormat(LogWinSetNonFading,*(pData.Bool));
1176 case EWsWinOpFadeBehind:
1178 _LIT(LogWinFadeBehind,"FadeBehind(%d)");
1179 aText.AppendFormat(LogWinFadeBehind,*(pData.Bool));
1182 case EWsWinOpEnableScreenChangeEvents:
1184 _LIT(LogWinEnableScreenChangeEvents,"EnableScreenChangeEvents()");
1185 aText.Append(LogWinEnableScreenChangeEvents);
1188 case EWsWinOpDisableScreenChangeEvents:
1190 _LIT(LogWinDisableScreenChangeEvents,"DisableScreenChangeEvents()");
1191 aText.Append(LogWinDisableScreenChangeEvents);
1194 case EWsWinOpSendPointerEvent:
1196 _LIT(LogWinSendPointerEvent,"SimulatePointerEvent(");
1197 aText.Append(LogWinSendPointerEvent);
1198 aText.Append(eventDetails(pData.RawEvent));
1199 aText.Append(LogCloseBracket);
1202 case EWsWinOpSendAdvancedPointerEvent:
1204 _LIT(LogWinSendPointerEvent,"SimulateAdvancedPointerEvent(");
1205 aText.Append(LogWinSendPointerEvent);
1206 aText.Append(eventDetails(pData.RawEvent));
1207 aText.Append(LogCloseBracket);
1210 case EWsWinOpGetDisplayMode:
1212 _LIT(LogWinGetDisplayMode,"GetDisplayMode()");
1213 aText.Append(LogWinGetDisplayMode);
1216 case EWsWinOpGetIsFaded:
1218 _LIT(LogWinIsFaded,"IsFaded()");
1219 aText.Append(LogWinIsFaded);
1222 case EWsWinOpGetIsNonFading:
1224 _LIT(LogWinIsNonFading,"IsNonFading()");
1225 aText.Append(LogWinIsNonFading);
1228 case EWsWinOpOrdinalPriority:
1230 _LIT(LogWinOrdinalPriority,"OrdinalPriority()");
1231 aText.Append(LogWinOrdinalPriority);
1234 case EWsWinOpClearPointerCursor:
1236 _LIT(LogWinClearPointerCursor,"ClearPointerCursor()");
1237 aText.Append(LogWinClearPointerCursor);
1240 case EWsWinOpEnableGroupListChangeEvents:
1242 _LIT(LogWinEnableGroupListChangeEvents,"EnableGroupListChangeEvents()");
1243 aText.Append(LogWinEnableGroupListChangeEvents);
1246 case EWsWinOpDisableGroupListChangeEvents:
1248 _LIT(LogWinDisableGroupListChangeEvents,"DisableGroupListChangeEvents()");
1249 aText.Append(LogWinDisableGroupListChangeEvents);
1252 case EWsWinOpHandleTransparencyUpdate:
1254 _LIT(LogWinHandleTransparencyUpdate,"HandleTransparencyUpdate()");
1255 aText.Append(LogWinHandleTransparencyUpdate);
1258 case EWsWinOpSetTransparencyFactor:
1260 _LIT(LogWinSetTransparencyFactor,"SetTransparencyFactor()");
1261 aText.Append(LogWinSetTransparencyFactor);
1264 case EWsWinOpSetTransparencyBitmap:
1266 _LIT(LogWinSetTransparencyBitmap,"SetTransparencyBitmap()");
1267 aText.Append(LogWinSetTransparencyBitmap);
1270 case EWsWinOpSetTransparencyBitmapCWs:
1272 _LIT(LogWinSetTransparencyWsBitmap,"SetTransparencyWsBitmap()");
1273 aText.Append(LogWinSetTransparencyWsBitmap);
1277 case EWsWinOpSetTransparencyAlphaChannel:
1279 _LIT(LogWinSetTransparencyAlphaChannel,"SetTransparencyAlphaChannel()");
1280 aText.Append(LogWinSetTransparencyAlphaChannel);
1283 case EWsWinOpMoveToGroup:
1285 _LIT(LogWinMoveToGroup,"MoveToGroup(%d)");
1286 aText.AppendFormat(LogWinMoveToGroup, *pData.Int);
1289 case EWsWinOpStoreDrawCommands:
1291 _LIT(LogWinStoreDrawCommands,"EnableRedrawStore(%u)");
1292 aText.AppendFormat(LogWinStoreDrawCommands, *pData.Bool);
1295 case EWsWinOpSetPointerCapturePriority:
1297 _LIT(LogWinSetPointerCapturePriority,"SetPointerCapturePriority(%d)");
1298 aText.AppendFormat(LogWinSetPointerCapturePriority, *pData.Int);
1301 case EWsWinOpGetPointerCapturePriority:
1303 _LIT(LogWinGetPointerCapturePriority,"GetPointerCapturePriority()");
1304 aText.Append(LogWinGetPointerCapturePriority);
1307 case EWsWinOpSetTransparentRegion:
1309 _LIT(LogWinSetTransparentRegion,"SetTransparentRegion(%d rects)");
1310 aText.AppendFormat(LogWinSetTransparentRegion, pData.SetShape->count);
1313 case EWsWinOpSetTransparencyPolicy:
1315 _LIT(LogWinSetTransparentPolicy,"SetTransparencyPolicy(TransparencyPolicy= %d)");
1316 aText.AppendFormat(LogWinSetTransparentPolicy, *pData.Int);
1319 case EWsWinOpIsRedrawStoreEnabled:
1321 _LIT(LogWinIsRedrawStoreEnabled,"IsRedrawStoreEnabled()");
1322 aText.Append(LogWinIsRedrawStoreEnabled);
1325 case EWsWinOpEnableOSB:
1327 _LIT(LogOSBEnabled,"EWsWinOpEnableOSB enum");
1328 aText.Append(LogOSBEnabled);
1331 case EWsWinOpDisableOSB:
1333 _LIT(LogOSBDisabled,"EWsWinOpDisableOSB enum");
1334 aText.Append(LogOSBDisabled);
1337 case EWsWinOpClientHandle:
1339 _LIT(LogClientHandle,"ClientHandle()");
1340 aText.AppendFormat(LogClientHandle);
1343 case EWsWinOpSetBackgroundSurface:
1345 _LIT(LogWinSetBackgroundSurface,"SetBackgroundSurface(TSurfaceId{%x,%x,%x,%x})");
1346 aText.AppendFormat(LogWinSetBackgroundSurface, pData.Surface->iInternal[0],pData.Surface->iInternal[1],pData.Surface->iInternal[2],pData.Surface->iInternal[3]);
1349 case EWsWinOpKeyColor:
1351 _LIT(LogWinKeyColor,"KeyColor()");
1352 aText.AppendFormat(LogWinKeyColor);
1355 case EWsWinOpSetBackgroundSurfaceConfig:
1357 TSurfaceConfiguration aSurfaceConfig = pData.SurfaceConfigurationAndTrigger->surfaceConfig;
1358 TSurfaceId surfaceid;
1359 aSurfaceConfig.GetSurfaceId(surfaceid);
1360 CFbsBitGc::TGraphicsOrientation orientation = aSurfaceConfig.Orientation();
1362 aSurfaceConfig.GetExtent(extent);
1364 aSurfaceConfig.GetViewport(viewport);
1365 TBool flip = aSurfaceConfig.Flip();
1366 TBool triggerRedraw = pData.SurfaceConfigurationAndTrigger->triggerRedraw;
1368 TLongBuf extentbuf(TDebugLogTextHandler::FormatRect(extent));
1369 TLongBuf viewportbuf(TDebugLogTextHandler::FormatRect(viewport));
1371 _LIT(LogWinSetBackgroundSurfaceConfig,"SetBackgroundSurface({%x,%x,%x,%x},%d,%S,%S,%d,%d)");
1372 aText.AppendFormat(LogWinSetBackgroundSurfaceConfig, surfaceid.iInternal[0],
1373 surfaceid.iInternal[1],
1374 surfaceid.iInternal[2],
1375 surfaceid.iInternal[3],
1383 case EWsWinOpRemoveBackgroundSurface:
1385 _LIT(LogWinRemoveBackgroundSurface,"RemoveBackgroundSurface(%d)");
1386 aText.AppendFormat(LogWinRemoveBackgroundSurface, *(pData.Bool));
1389 case EWsWinOpGetBackgroundSurfaceConfig:
1391 _LIT(LogWinGetBackgroundSurfaceConfig,"GetBackgroundSurface()");
1392 aText.AppendFormat(LogWinGetBackgroundSurfaceConfig);
1395 case EWsWinOpClearRedrawStore:
1397 _LIT(LogWinClearRedrawStore,"ClearRedrawStore()");
1398 aText.AppendFormat(LogWinClearRedrawStore);
1402 UnKnownOpcode(aText, aOpcode);
1407 //#pragma check_stack(on)
1408 void TWsDecoder::DecodeGc(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData, TInt aHandle)
1410 _LIT(LogGc,"RGc[%d]::");
1411 aText.Format(LogGc,aHandle);
1412 if (aOpcode<EWsGcOpGdiBlt2)
1414 if (aOpcode<EWsGcOpDrawPolyLineContinued)
1415 DecodeGc1(aText,aOpcode,aCmdData);
1417 DecodeGc2(aText,aOpcode,aCmdData);
1420 DecodeGc3(aText,aOpcode,aCmdData);
1423 void TWsDecoder::DecodeGc1(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData)
1425 TWsGcCmdUnion pData;
1431 aText.AppendFormat(LogClose);
1433 case EWsGcOpActivate:
1435 _LIT(LogGcActivate,"Activate(%d)");
1436 aText.AppendFormat(LogGcActivate,hHandleToValue(*pData.UInt));
1439 case EWsGcOpDeactivate:
1441 _LIT(LogGcDeactivate,"Deactivate()");
1442 aText.AppendFormat(LogGcDeactivate);
1445 case EWsGcOpDrawLine:
1447 TShortBuf buf1(TDebugLogTextHandler::FormatPoint(pData.DrawLine->pnt1));
1448 TShortBuf buf2(TDebugLogTextHandler::FormatPoint(pData.DrawLine->pnt2));
1449 _LIT(LogGcDrawLine,"DrawLine(%S, %S)");
1450 aText.AppendFormat(LogGcDrawLine, &buf1, &buf2);
1453 case EWsGcOpSetBrushStyle:
1455 _LIT(LogGcSetBrushStyle,"SetBrushStyle(%u)");
1456 aText.AppendFormat(LogGcSetBrushStyle,*pData.UInt);
1461 TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
1462 _LIT(LogGcPlot,"Plot(%S)");
1463 aText.AppendFormat(LogGcPlot, &buf);
1466 case EWsGcOpSetPenColor:
1468 TLongBuf buf(TDebugLogTextHandler::FormatRgb(*pData.rgb));
1469 _LIT(LogGcSetPenColor,"SetPenColor(%S)");
1470 aText.AppendFormat(LogGcSetPenColor,&buf);
1473 case EWsGcOpSetBrushColor:
1475 TLongBuf buf(TDebugLogTextHandler::FormatRgb(*pData.rgb));
1476 _LIT(LogGcSetBrushColor,"SetBrushColor(%S)");
1477 aText.AppendFormat(LogGcSetBrushColor,&buf);
1480 case EWsGcOpSetPenSize:
1482 TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
1483 _LIT(LogGcSetPenSize,"SetPenSize(%S)");
1484 aText.AppendFormat(LogGcSetPenSize,&buf);
1487 case EWsGcOpSetPenStyle:
1489 _LIT(LogGcSetPenStyle,"SetPenStyle(%d)");
1490 aText.AppendFormat(LogGcSetPenStyle,*pData.UInt);
1493 case EWsGcOpSetClippingRegion:
1495 _LIT(LogGcSetClippingRegion,"SetClippingRegion(...)");
1496 aText.Append(LogGcSetClippingRegion);
1499 case EWsGcOpCancelClippingRegion:
1501 _LIT(LogGcCancelClippingRegion,"CancelClippingRegion()");
1502 aText.Append(LogGcCancelClippingRegion);
1505 case EWsGcOpSetClippingRect:
1507 TLongBuf buf(TDebugLogTextHandler::FormatRect(*pData.Rect));
1508 _LIT(LogGcSetClippingRect,"SetClippingRect(%S)");
1509 aText.AppendFormat(LogGcSetClippingRect,&buf);
1512 case EWsGcOpCancelClippingRect:
1514 _LIT(LogGcCancelClippingRect,"CancelClippingRect()");
1515 aText.Append(LogGcCancelClippingRect);
1520 TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
1521 _LIT(LogGcDrawTo,"DrawTo(%S)");
1522 aText.AppendFormat(LogGcDrawTo,&buf);
1527 TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
1528 _LIT(LogGcDrawBy,"DrawBy(%S)");
1529 aText.AppendFormat(LogGcDrawBy,&buf);
1532 case EWsGcOpDrawPolyLine:
1534 _LIT(LogGcDrawPolyLine,"DrawPolyLine(%d...)");
1535 aText.AppendFormat(LogGcDrawPolyLine,pData.PolyLine->numPoints);
1538 case EWsGcOpDrawPolyLineContinued:
1540 _LIT(LogGcDrawPolyLineContinued,"DrawPolyLineContinued(%d...)");
1541 aText.AppendFormat(LogGcDrawPolyLineContinued,pData.PolyLine->numPoints);
1544 case EWsGcOpUseBrushPattern:
1546 _LIT(LogGcUseBrushPattern,"UseBrushPattern({0x%x})");
1547 aText.AppendFormat(LogGcUseBrushPattern,hHandleToValue(*pData.handle));
1550 case EWsGcOpDrawArc:
1552 TLongBuf buf1(TDebugLogTextHandler::FormatRect(pData.ArcOrPie->rect));
1553 TShortBuf buf2(TDebugLogTextHandler::FormatPoint(pData.ArcOrPie->start));
1554 TShortBuf buf3(TDebugLogTextHandler::FormatPoint(pData.ArcOrPie->end));
1555 _LIT(LogGcDrawArc,"DrawArc(%S,%S,%S)");
1556 aText.AppendFormat(LogGcDrawArc,&buf1,&buf2,&buf3);
1559 case EWsGcOpSetWordJustification:
1561 _LIT(LogGcSetWordJustification,"SetWordJustification(%d,%d)");
1562 aText.AppendFormat(LogGcSetWordJustification,pData.SetJustification->excessWidth,pData.SetJustification->numGaps);
1565 case EWsGcOpSetCharJustification:
1567 _LIT(LogGcSetCharJustification,"SetCharJustification(%d,%d)");
1568 aText.AppendFormat(LogGcSetCharJustification,pData.SetJustification->excessWidth,pData.SetJustification->numGaps);
1571 case EWsGcOpSetBrushOrigin:
1573 TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
1574 aText.AppendFormat(_L("SetBrushOrigin(%S)"), &buf);
1577 case EWsGcOpDiscardBrushPattern:
1579 _LIT(LogGcDiscardBrushPattern,"DiscardBrushPattern()");
1580 aText.Append(LogGcDiscardBrushPattern);
1584 UnKnownOpcode(aText, aOpcode);
1589 void TWsDecoder::DecodeGc2(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData)
1591 TWsGcCmdUnion pData;
1596 case EWsGcOpDrawText:
1598 TShortBuf buf(TDebugLogTextHandler::FormatPoint(pData.DrawText->pos));
1599 _LIT(LogGcDrawText1,"DrawText(\"");
1600 TDebugLogTextHandler::Append(aText, LogGcDrawText1);
1601 TDebugLogTextHandler::Append(aText, TPtrC((TText *)(pData.DrawText+1), pData.DrawText->length));
1602 _LIT(LogGcDrawText2,"\", %S)");
1603 aText.AppendFormat(LogGcDrawText2,&iOverflowHandler,&buf);
1606 case EWsGcOpDrawTextVertical:
1608 TShortBuf buf(TDebugLogTextHandler::FormatPoint(pData.DrawTextVertical->pos));
1609 _LIT(LogGcDrawTextVertical1,"DrawTextVertical(\"");
1610 TDebugLogTextHandler::Append(aText, LogGcDrawTextVertical1);
1611 TDebugLogTextHandler::Append(aText, TPtrC((TText *)(pData.DrawTextVertical+1), pData.DrawTextVertical->length));
1612 _LIT(LogGcDrawTextVertical2,"\", %S, %d)");
1613 aText.AppendFormat(LogGcDrawTextVertical2,&iOverflowHandler,&buf,pData.DrawTextVertical->up);
1616 case EWsGcOpDrawTextVerticalPtr:
1618 TShortBuf buf(TDebugLogTextHandler::FormatPoint(pData.DrawTextVertical->pos));
1619 _LIT(LogGcDrawTextVertical1,"DrawTextVertical(...");
1620 TDebugLogTextHandler::Append(aText, LogGcDrawTextVertical1);
1621 _LIT(LogGcDrawTextVertical2,", %S, %d)");
1622 aText.AppendFormat(LogGcDrawTextVertical2,&iOverflowHandler,&buf,pData.DrawTextVertical->up);
1625 case EWsGcOpDrawTextPtr:
1627 TShortBuf buf(TDebugLogTextHandler::FormatPoint(pData.DrawText->pos));
1628 _LIT(LogGcDrawText1,"DrawText(...");
1629 TDebugLogTextHandler::Append(aText, LogGcDrawText1);
1630 _LIT(LogGcDrawText2,",%S)");
1631 aText.AppendFormat(LogGcDrawText2,&iOverflowHandler,&buf);
1634 case EWsGcOpDrawBoxTextOptimised1:
1636 TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.BoxTextO1->box));
1637 _LIT(LogGcDrawText1,"DrawText(\"");
1638 aText.Append(LogGcDrawText1);
1639 TDebugLogTextHandler::Append(aText, TPtrC((TText *)(pData.BoxTextO1+1), pData.BoxTextO1->length));
1640 _LIT(LogGcDrawText2,"\", %S, %d, %d, 0)");
1641 aText.AppendFormat(LogGcDrawText2,&iOverflowHandler, &buf,
1642 pData.BoxTextO1->baselineOffset,CGraphicsContext::ELeft);
1645 case EWsGcOpDrawBoxTextOptimised2:
1647 TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.BoxTextO2->box));
1648 _LIT(LogGcDrawText1,"DrawText(\"");
1649 aText.Append(LogGcDrawText1);
1650 TDebugLogTextHandler::Append(aText, TPtrC((TText *)(pData.BoxTextO2+1), pData.BoxTextO2->length));
1651 _LIT(LogGcDrawText2,"\", %S, %d, %d, %d)");
1652 aText.AppendFormat(LogGcDrawText2,&iOverflowHandler, &buf, pData.BoxTextO2->baselineOffset,
1653 pData.BoxTextO2->horiz, pData.BoxTextO2->leftMrg);
1656 case EWsGcOpDrawBoxTextVertical:
1658 TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.DrawBoxTextVertical->box));
1659 _LIT(LogGcDrawTextVertical1,"DrawTextVertical(\"");
1660 aText.Append(LogGcDrawTextVertical1);
1661 TDebugLogTextHandler::Append(aText, TPtrC((TText *)(pData.DrawBoxTextVertical+1), pData.DrawBoxTextVertical->length));
1662 _LIT(LogGcDrawTextVertical2,"\", %S, %d, %d, %d, %d)");
1663 aText.AppendFormat(LogGcDrawTextVertical2,&iOverflowHandler, &buf,
1664 pData.DrawBoxTextVertical->baselineOffset, pData.DrawBoxTextVertical->up,
1665 pData.DrawBoxTextVertical->vert, pData.DrawBoxTextVertical->margin);
1668 case EWsGcOpDrawBoxTextPtr:
1670 TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.BoxText->box));
1671 _LIT(LogGcDrawText1,"DrawText(...");
1672 TDebugLogTextHandler::Append(aText, LogGcDrawText1);
1673 _LIT(LogGcDrawText2,", %S, %d, %d, %d)");
1674 aText.AppendFormat(LogGcDrawText2,&iOverflowHandler, &buf, pData.BoxText->baselineOffset,
1675 pData.BoxText->horiz, pData.BoxText->leftMrg);
1678 case EWsGcOpDrawBoxTextVerticalPtr:
1680 TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.DrawBoxTextVertical->box));
1681 _LIT(LogGcDrawTextVertical1,"DrawTextVertical(...");
1682 aText.Append(LogGcDrawTextVertical1);
1683 _LIT(LogGcDrawTextVertical2,", %S, %d, %d, %d, %d)");
1684 aText.AppendFormat(LogGcDrawTextVertical2,&iOverflowHandler,&buf,
1685 pData.DrawBoxTextVertical->baselineOffset, pData.DrawBoxTextVertical->up,
1686 pData.DrawBoxTextVertical->vert, pData.DrawBoxTextVertical->margin);
1689 case EWsGcOpCopyRect:
1691 TShortBuf buf1(TDebugLogTextHandler::FormatPoint(pData.CopyRect->pos));
1692 TLongBuf buf2(TDebugLogTextHandler::FormatRect(pData.CopyRect->rect));
1693 _LIT(LogGcCopyRect,"CopyRect(%S, %S)");
1694 aText.AppendFormat(LogGcCopyRect,&buf1,&buf2);
1697 case EWsGcOpDrawEllipse:
1699 TLongBuf buf(TDebugLogTextHandler::FormatRect(*pData.Rect));
1700 _LIT(LogGcDrawEllipse,"DrawEllipse(%S)");
1701 aText.AppendFormat(LogGcDrawEllipse,&buf);
1706 TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
1707 _LIT(LogGcMoveTo,"MoveTo(%S)");
1708 aText.AppendFormat(LogGcMoveTo,&buf);
1713 TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
1714 _LIT(LogGcMoveBy,"MoveBy(%S)");
1715 aText.AppendFormat(LogGcMoveBy,&buf);
1718 case EWsGcOpDrawPolygon:
1720 _LIT(LogGcDrawPolygon,"DrawPolygon(...)");
1721 aText.Append(LogGcDrawPolygon);
1724 case EWsGcOpDrawRoundRect:
1726 TLongBuf buf1(TDebugLogTextHandler::FormatRect(pData.RoundRect->rect));
1727 TShortBuf buf2(TDebugLogTextHandler::FormatSize(pData.RoundRect->ellipse));
1728 _LIT(LogGcDrawRoundRect,"DrawRoundRect(%S,%S)");
1729 aText.AppendFormat(LogGcDrawRoundRect,&buf1,&buf2);
1732 case EWsGcOpDrawPie:
1734 TLongBuf buf1(TDebugLogTextHandler::FormatRect(pData.ArcOrPie->rect));
1735 TShortBuf buf2(TDebugLogTextHandler::FormatPoint(pData.ArcOrPie->start));
1736 TShortBuf buf3(TDebugLogTextHandler::FormatPoint(pData.ArcOrPie->end));
1737 _LIT(LogGcDrawPie,"DrawPie(%S,%S,%S)");
1738 aText.AppendFormat(LogGcDrawPie,&buf1,&buf2,&buf3);
1741 case EWsGcOpSetOrigin:
1743 TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
1744 _LIT(LogGcSetOrigin,"SetOrigin(%S)");
1745 aText.AppendFormat(LogGcSetOrigin,&buf);
1748 case EWsGcOpStartSegmentedDrawPolygon:
1750 _LIT(LogGcStartSegmentedDrawPolygon,"StartSegmentedDrawPolygon(%d)");
1751 aText.AppendFormat(LogGcStartSegmentedDrawPolygon,*pData.StartSegmentedDrawPolygon);
1754 case EWsGcOpSegmentedDrawPolygonData:
1756 _LIT(LogGcSegmentedDrawPolygonData,"SegmentedDrawPolygonData(%d,%d,...)");
1757 aText.AppendFormat(LogGcSegmentedDrawPolygonData,pData.SegmentedDrawPolygonData->index,
1758 pData.SegmentedDrawPolygonData->numPoints);
1761 case EWsGcOpDrawSegmentedPolygon:
1763 _LIT(LogGcDrawSegmentedPolygon,"DrawSegmentedPolygon()");
1764 aText.AppendFormat(LogGcDrawSegmentedPolygon);
1767 case EWsGcOpDrawRect:
1769 TLongBuf buf(TDebugLogTextHandler::FormatRect(*pData.Rect));
1770 _LIT(LogGcDrawRect,"DrawRect(%S)");
1771 aText.AppendFormat(LogGcDrawRect,&buf);
1774 case EWsGcOpDrawBitmap:
1776 TShortBuf buf(TDebugLogTextHandler::FormatPoint(pData.Bitmap->pos));
1777 _LIT(KLitGcDrawBitmap, "DrawBitmap({%d}, %S)");
1778 aText.AppendFormat(KLitGcDrawBitmap, hHandleToValue(pData.Bitmap->handle), &buf);
1781 case EWsGcOpDrawBitmap2:
1783 TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.Bitmap2->rect));
1784 _LIT(KLitGcDrawBitmap2, "DrawBitmap2({%d}, %S)");
1785 aText.AppendFormat(KLitGcDrawBitmap2, hHandleToValue(pData.Bitmap2->handle), &buf);
1788 case EWsGcOpDrawBitmap3:
1790 TLongBuf buf1(TDebugLogTextHandler::FormatRect(pData.Bitmap3->rect));
1791 TLongBuf buf2(TDebugLogTextHandler::FormatRect(pData.Bitmap3->srcRect));
1792 _LIT(KLitGcDrawBitmap3, "DrawBitmap3({%d}, %S, %S)");
1793 aText.AppendFormat(KLitGcDrawBitmap3, hHandleToValue(pData.Bitmap3->handle), &buf1, &buf2);
1796 case EWsGcOpDrawBitmapMasked:
1797 case EWsGcOpWsDrawBitmapMasked:
1799 TLongBuf buf1(TDebugLogTextHandler::FormatRect(pData.iBitmapMasked->iRect));
1800 TLongBuf buf2(TDebugLogTextHandler::FormatRect(pData.iBitmapMasked->iSrcRect));
1801 _LIT(KLitGcDrawBitmapMasked, "DrawBitmapMasked(%S, {%d}, %S, {%d}, %d)");
1802 aText.AppendFormat(KLitGcDrawBitmapMasked, &buf1, hHandleToValue(pData.iBitmapMasked->iHandle),
1803 &buf2, hHandleToValue(pData.iBitmapMasked->iMaskHandle), pData.iBitmapMasked->iInvertMask);
1806 case EWsGcOpDrawBoxText:
1808 TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.BoxText->box));
1809 _LIT(LogGcDrawText1,"DrawText(\"");
1810 aText.Append(LogGcDrawText1);
1811 TDebugLogTextHandler::Append(aText, TPtrC((TText *)(pData.BoxText+1), pData.BoxText->length));
1812 _LIT(LogGcDrawText2,"\", %S, %d, %d, %d)");
1813 aText.AppendFormat(LogGcDrawText2,&iOverflowHandler, &buf, pData.BoxText->baselineOffset,
1814 pData.BoxText->horiz, pData.BoxText->leftMrg);
1818 UnKnownOpcode(aText, aOpcode);
1823 void TWsDecoder::DecodeGc3(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData)
1825 TWsGcCmdUnion pData;
1830 case EWsGcOpSetDrawMode:
1832 _LIT(LogGcSetDrawMode,"SetDrawMode(%u)");
1833 aText.AppendFormat(LogGcSetDrawMode,*pData.UInt);
1836 case EWsGcOpClearRect:
1838 TLongBuf buf(TDebugLogTextHandler::FormatRect(*pData.Rect));
1839 _LIT(LogGcClear,"Clear(%S)");
1840 aText.AppendFormat(LogGcClear, &buf);
1845 _LIT(LogGcClear,"Clear()");
1846 aText.AppendFormat(LogGcClear);
1849 case EWsGcOpGdiBlt2:
1850 case EWsGcOpGdiWsBlt2:
1852 TShortBuf buf(TDebugLogTextHandler::FormatPoint(pData.GdiBlt2->pos));
1853 _LIT(LogGcGdiBlt,"GdiBlt(%S, {%d})");
1854 aText.AppendFormat(LogGcGdiBlt,&buf,hHandleToValue(pData.GdiBlt2->handle));
1857 case EWsGcOpGdiBlt3:
1858 case EWsGcOpGdiWsBlt3:
1860 TShortBuf buf1(TDebugLogTextHandler::FormatPoint(pData.GdiBlt3->pos));
1861 TLongBuf buf2(TDebugLogTextHandler::FormatRect(pData.GdiBlt3->rect));
1862 _LIT(LogGcGdiBlt,"GdiBlt(%S, {%d}, %S)");
1863 aText.AppendFormat(LogGcGdiBlt,&buf1,hHandleToValue(pData.GdiBlt3->handle),&buf2);
1866 case EWsGcOpGdiBltMasked:
1867 case EWsGcOpGdiWsBltMasked:
1869 TShortBuf buf1(TDebugLogTextHandler::FormatPoint(pData.GdiBltMasked->destination));
1870 TLongBuf buf2(TDebugLogTextHandler::FormatRect(pData.GdiBltMasked->source));
1871 _LIT(LogGcBitBltMasked,"BitBltMasked(%S, {%d}, %S, {%d}, %d)");
1872 aText.AppendFormat(LogGcBitBltMasked, &buf1, hHandleToValue(pData.GdiBltMasked->handle),
1873 &buf2, hHandleToValue(pData.GdiBltMasked->maskHandle),
1874 pData.GdiBltMasked->invertMask);
1879 _LIT(LogGcSize,"Size()");
1880 aText.AppendFormat(LogGcSize);
1883 case EWsGcOpUseFont:
1885 _LIT(LogGcUseFont,"UseFont({0x%x})");
1886 aText.AppendFormat(LogGcUseFont,hHandleToValue(*pData.handle));
1889 case EWsGcOpDiscardFont:
1891 _LIT(LogGcDiscardFont,"DiscardFont()");
1892 aText.AppendFormat(LogGcDiscardFont);
1895 case EWsGcOpTestInvariant:
1897 _LIT(LogGcTestInvariant,"unimplemented opcode 'EWsGcOpTestInvariant' (%u)");
1898 aText.AppendFormat(LogGcTestInvariant, aOpcode);
1903 _LIT(LogGcReset,"Reset()");
1904 aText.Append(LogGcReset);
1907 case EWsGcOpSetDitherOrigin:
1909 TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
1910 _LIT(LogGcSetDitherOrigin,"SetDitherOrigin(%S)");
1911 aText.AppendFormat(LogGcSetDitherOrigin,&buf);
1914 case EWsGcOpMapColors:
1916 TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.MapColors->rect));
1917 _LIT(LogGcMapColors,"MapColors(%S,?,%d)");
1918 aText.AppendFormat(LogGcMapColors,&buf,pData.MapColors->numPairs);
1921 case EWsGcOpSetUnderlineStyle:
1923 _LIT(LogGcSetUnderlineStyle,"SetUnderlineStyle(%x)");
1924 aText.AppendFormat(LogGcSetUnderlineStyle,*pData.SetUnderlineStyle);
1927 case EWsGcOpSetStrikethroughStyle:
1929 _LIT(LogGcSetStrikethroughStyle,"SetStrikethroughStyle(%x)");
1930 aText.AppendFormat(LogGcSetStrikethroughStyle,*pData.SetStrikethroughStyle);
1933 case EWsGcOpDrawWsGraphic:
1934 case EWsGcOpDrawWsGraphicPtr:
1936 TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.WsGraphic->iRect));
1937 _LIT(KLitGcDrawWsGraphic,"DrawWsGraphic(%x, %d, %S, %d)");
1938 aText.AppendFormat(KLitGcDrawWsGraphic, pData.WsGraphic->iFlags, pData.WsGraphic->iId, &buf, pData.WsGraphic->iDataLen);
1941 case EWsGcOpSetFaded:
1943 _LIT(KLitGcSetFaded, "SetFaded(%d)");
1944 aText.AppendFormat(KLitGcSetFaded, *pData.Bool);
1947 case EWsGcOpSetFadeParams:
1949 _LIT(KLitGcSetFadeParams, "SetFadeParams(BlackMap %d, WhiteMap %d)");
1950 const unsigned char *bytePtr = (const unsigned char*)(pData.UInt);
1951 aText.AppendFormat(KLitGcSetFadeParams, bytePtr[0], bytePtr[1]);
1954 case EWsGcOpGdiAlphaBlendBitmaps:
1955 case EWsGcOpGdiWsAlphaBlendBitmaps:
1957 TShortBuf buf1(TDebugLogTextHandler::FormatPoint(pData.AlphaBlendBitmaps->point));
1958 TLongBuf buf2(TDebugLogTextHandler::FormatRect(pData.AlphaBlendBitmaps->source));
1959 TShortBuf buf3(TDebugLogTextHandler::FormatPoint(pData.AlphaBlendBitmaps->alphaPoint));
1960 _LIT(KLitGcAlphaBlendBitmaps,"AlphaBlendBitmaps(%S, {%d}, %S, {%d}, %S)");
1961 aText.AppendFormat(KLitGcAlphaBlendBitmaps, &buf1, hHandleToValue(pData.AlphaBlendBitmaps->bitmapHandle),
1962 &buf2, hHandleToValue(pData.AlphaBlendBitmaps->alphaHandle),
1966 case EWsGcOpSetOpaque:
1968 _LIT(KLitGcOpSetOpaque, "SetOpaque(%d)");
1969 aText.AppendFormat(KLitGcOpSetOpaque, *pData.Bool);
1973 UnKnownOpcode(aText, aOpcode);
1978 void TWsDecoder::DecodeScreenDevice(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData, TInt aHandle)
1980 TWsSdCmdUnion pData;
1981 _LIT(LogScreenDevice,"CWsScreenDevice[%d]::");
1983 aText.Format(LogScreenDevice,aHandle);
1989 _LIT(LogScreenDeviceDelete,"~CWsScreenDevice()");
1990 aText.Append(LogScreenDeviceDelete);
1995 _LIT(LogScreenDevicePixel,"Pixel(%S)");
1996 TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
1997 aText.AppendFormat(LogScreenDevicePixel,&buf);
2000 case EWsSdOpGetScanLine:
2001 { //This fills up the log two much for test code
2003 /*_LIT(LogScreenDeviceGetScanLine,"GetScanLine(TRgb *aScanLine, %d, %S)");
2004 TShortBuf buf(TDebugLogTextHandler::FormatPoint(pData.GetScanLine->pos));
2005 aText.AppendFormat(LogScreenDeviceGetScanLine,pData.GetScanLine->len,&buf);*/
2008 case EWsSdOpHorizontalTwipsToPixels:
2010 _LIT(LogScreenDeviceHorizontalTwipsToPixels,"HorizontalTwipsToPixels()");
2011 aText.Append(LogScreenDeviceHorizontalTwipsToPixels);
2014 case EWsSdOpVerticalTwipsToPixels:
2016 _LIT(LogScreenDeviceVerticalTwipsToPixels,"VerticalTwipsToPixels()");
2017 aText.Append(LogScreenDeviceVerticalTwipsToPixels);
2020 case EWsSdOpHorizontalPixelsToTwips:
2022 _LIT(LogScreenDeviceHorizontalPixelsToTwips,"HorizontalPixelsToTwips()");
2023 aText.Append(LogScreenDeviceHorizontalPixelsToTwips);
2026 case EWsSdOpVerticalPixelsToTwips:
2028 _LIT(LogScreenDeviceVerticalPixelsToTwips,"VerticalPixelsToTwips()");
2029 aText.Append(LogScreenDeviceVerticalPixelsToTwips);
2032 case EWsSdOpPixelSize:
2034 _LIT(LogScreenDeviceSizeInPixels,"SizeInPixels()");
2035 aText.Append(LogScreenDeviceSizeInPixels);
2038 case EWsSdOpTwipsSize:
2040 _LIT(LogScreenDeviceSizeInTwips,"SizeInTwips()");
2041 aText.Append(LogScreenDeviceSizeInTwips);
2044 case EWsSdOpDisplayMode:
2046 _LIT(LogScreenDeviceDisplayMode,"DisplayMode()");
2047 aText.Append(LogScreenDeviceDisplayMode);
2050 case EWsSdOpRectCompare:
2052 _LIT(LogScreenDeviceRectCompare,"RectCompare(%S, %S)");
2053 TLongBuf buf1(TDebugLogTextHandler::FormatRect(pData.RectCompare->rect1));
2054 TLongBuf buf2(TDebugLogTextHandler::FormatRect(pData.RectCompare->rect2));
2055 aText.AppendFormat(LogScreenDeviceRectCompare,&buf1,&buf2);
2058 case EWsSdOpPointerRect:
2060 _LIT(LogScreenDevicePointerRect,"PointerRect()");
2061 aText.Append(LogScreenDevicePointerRect);
2064 case EWsSdOpCopyScreenToBitmap:
2066 _LIT(LogScreenDeviceCopyScreenToBitmap,"CopyScreenToBitmap(%d)");
2067 aText.AppendFormat(LogScreenDeviceCopyScreenToBitmap,pData.CopyScreenToBitmap->handle);
2070 case EWsSdOpCopyScreenToBitmap2:
2072 _LIT(LogScreenDeviceCopyScreenToBitmap2,"CopyScreenToBitmap(%d,%S)");
2073 TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.CopyScreenToBitmap2->rect));
2074 aText.AppendFormat(LogScreenDeviceCopyScreenToBitmap2,pData.CopyScreenToBitmap2->handle,&buf);
2077 case EWsSdOpSetScreenSizeAndRotation:
2079 _LIT(LogScreenDeviceSetScreenSizeAndRotation,"SetScreenSizeAndRotation({%S, %S, %d})");
2080 TShortBuf buf1(TDebugLogTextHandler::FormatSize(pData.PixelsTwipsAndRotation->iPixelSize));
2081 TShortBuf buf2(TDebugLogTextHandler::FormatSize(pData.PixelsTwipsAndRotation->iTwipsSize));
2082 aText.AppendFormat(LogScreenDeviceSetScreenSizeAndRotation,&buf1,&buf2,pData.PixelsTwipsAndRotation->iRotation);
2085 case EWsSdOpSetScreenSizeAndRotation2:
2087 _LIT(LogScreenDeviceSetScreenSizeAndRotation,"SetScreenSizeAndRotation({%S, %d})");
2088 TShortBuf buf(TDebugLogTextHandler::FormatSize(pData.PixelsAndRotation->iPixelSize));
2089 aText.AppendFormat(LogScreenDeviceSetScreenSizeAndRotation,&buf,pData.PixelsAndRotation->iRotation);
2092 case EWsSdOpGetDefaultScreenSizeAndRotation:
2093 case EWsSdOpGetDefaultScreenSizeAndRotation2:
2095 _LIT(LogScreenDeviceGetDefaultScreenSizeAndRotation,"GetDefaultScreenSizeAndRotation(...)");
2096 aText.Append(LogScreenDeviceGetDefaultScreenSizeAndRotation);
2099 case EWsSdOpGetNumScreenModes:
2101 _LIT(LogScreenDeviceNumScreenModes,"NumScreenModes");
2102 aText.Append(LogScreenDeviceNumScreenModes);
2105 case EWsSdOpSetScreenMode:
2107 _LIT(LogScreenDeviceSetScreenMode,"ScreenMode(%d)");
2108 aText.AppendFormat(LogScreenDeviceSetScreenMode,*pData.Int);
2111 case EWsSdOpGetScreenModeSizeAndRotation:
2112 case EWsSdOpGetScreenModeSizeAndRotation2:
2114 _LIT(LogScreenDeviceGetScreenModeSizeAndRotation,"GetScreenModeSizeAndRotation(%d)");
2115 aText.AppendFormat(LogScreenDeviceGetScreenModeSizeAndRotation,*pData.Int);
2118 case EWsSdOpSetScreenModeEnforcement:
2120 _LIT(LogScreenDeviceSetScreenModeEnforcement,"SetScreenModeEnforcement(%d)");
2121 aText.AppendFormat(LogScreenDeviceSetScreenModeEnforcement,*pData.Int);
2124 case EWsSdOpScreenModeEnforcement:
2126 _LIT(LogScreenDeviceScreenModeEnforcement,"ScreenModeEnforcement");
2127 aText.Append(LogScreenDeviceScreenModeEnforcement);
2130 case EWsSdOpSetModeRotation:
2132 _LIT(LogScreenDeviceSetModeRotation,"SetModeRotation(%d,%d)");
2133 aText.AppendFormat(LogScreenDeviceSetModeRotation,pData.SetScreenRotation->mode,pData.SetScreenRotation->rotation);
2136 case EWsSdOpGetRotationList:
2138 _LIT(LogScreenDeviceGetRotationList,"GetRotationList(%d)");
2139 aText.AppendFormat(LogScreenDeviceGetRotationList,*pData.Int);
2142 case EWsSdOpPaletteAttributes:
2144 _LIT(LogScreenDevicePaletteAttributes,"PaletteAttributes(...)");
2145 aText.Append(LogScreenDevicePaletteAttributes);
2148 case EWsSdOpSetPalette:
2150 _LIT(LogScreenDeviceSetPalette,"SetPalette(...)");
2151 aText.Append(LogScreenDeviceSetPalette);
2154 case EWsSdOpGetPalette:
2156 _LIT(LogScreenDeviceGetPalette,"GetPalette()");
2157 aText.Append(LogScreenDeviceGetPalette);
2160 case EWsSdOpGetScreenMode:
2162 _LIT(LogScreenDeviceGetScreenMode,"CurrentScreenMode()");
2163 aText.Append(LogScreenDeviceGetScreenMode);
2166 case EWsSdOpGetDefaultScreenModeOrigin:
2168 _LIT(LogScreenDeviceGetDefaultScreenModeOrigin,"GetDefaultScreenModeOrigin()");
2169 aText.Append(LogScreenDeviceGetDefaultScreenModeOrigin);
2172 case EWsSdOpGetScreenModeOrigin:
2174 _LIT(LogScreenDeviceGetScreenModeOrigin,"GetScreenModeOrigin(%d)");
2175 aText.AppendFormat(LogScreenDeviceGetScreenModeOrigin, *pData.Int);
2178 case EWsSdOpGetScreenModeScale:
2180 _LIT(LogScreenDeviceGetScreenModeScale,"GetScreenModeScale(%d)");
2181 aText.AppendFormat(LogScreenDeviceGetScreenModeScale, *pData.Int);
2184 case EWsSdOpGetCurrentScreenModeScale:
2186 _LIT(LogScreenDeviceGetCurrentScreenModeScale,"GetCurrentScreenModeScale()");
2187 aText.Append(LogScreenDeviceGetCurrentScreenModeScale);
2190 case EWsSdOpSetAppScreenMode:
2192 _LIT(LogScreenDeviceSetAppScreenMode,"SetAppScreenMode(%d)");
2193 aText.AppendFormat(LogScreenDeviceSetAppScreenMode, *pData.Int);
2196 case EWsSdOpGetScreenModeScaledOrigin:
2198 _LIT(LogScreenDeviceGetScreenModeScaledOrigin,"GetScreenModeScaledOrigin(%d)");
2199 aText.AppendFormat(LogScreenDeviceGetScreenModeScaledOrigin, *pData.Int);
2202 case EWsSdOpGetCurrentScreenModeScaledOrigin:
2204 _LIT(LogScreenDeviceGetCurrentScreenModeScaledOrigin,"GetCurrentScreenModeScaledOrigin()");
2205 aText.Append(LogScreenDeviceGetCurrentScreenModeScaledOrigin);
2208 case EWsSdOpSetCurrentScreenModeAttributes:
2210 _LIT(LogScreenDeviceSetCurrentScreenModeAttributes,"SetCurrentScreenModeAttributes(%S)");
2211 TShortBuf buf(TDebugLogTextHandler::FormatSize(pData.ScreenSizeMode->iScreenSize));
2212 aText.AppendFormat(LogScreenDeviceSetCurrentScreenModeAttributes,&buf);
2215 case EWsSdOpGetCurrentScreenModeAttributes:
2217 _LIT(LogScreenDeviceGetCurrentScreenModeOrigin,"GetCurrentScreenModeAttributes()");
2218 aText.Append(LogScreenDeviceGetCurrentScreenModeOrigin);
2221 case EWsSdOpGetScreenNumber:
2223 _LIT(LogScreenDeviceGetScreenNumber,"GetScreenNumber()");
2224 aText.Append(LogScreenDeviceGetScreenNumber);
2227 case EWsSdOpGetScreenSizeModeList:
2229 _LIT(LogScreenDeviceGetScreenSizeModeList,"GetScreenSizeModeList(RArray<TInt>* aModeList)");
2230 aText.Append(LogScreenDeviceGetScreenSizeModeList);
2233 case EWsSdOpGetScreenModeDisplayMode:
2235 _LIT(LogScreenDeviceGetScreenModeDisplayMode,"GetScreenModeDisplayMode(%d)");
2236 aText.AppendFormat(LogScreenDeviceGetScreenModeDisplayMode, *pData.Int);
2239 case EWsClOpSetBackLight:
2241 _LIT(LogScreenDeviceSetBackLight,"SetBackLight(%u)");
2242 aText.AppendFormat(LogScreenDeviceSetBackLight, *pData.UInt);
2246 UnKnownOpcode(aText, aOpcode);
2251 void TWsDecoder::DecodeAnimDll(TBuf<LogTBufSize>& aText,TInt aOpcode,const TAny* /*aCmdData*/,TInt aHandle)
2253 aText.Format(_L("CAnimDll[%d]::"),aHandle);
2256 case EWsAnimDllOpCreateInstance:
2257 TDebugLogTextHandler::Append(aText, _L("CreateInstance(...)"));
2259 case EWsAnimDllOpDestroyInstance:
2260 TDebugLogTextHandler::Append(aText, LogClose);
2262 case EWsAnimDllOpCommandReply:
2263 TDebugLogTextHandler::Append(aText, _L("CommandReply(...)"));
2265 case EWsAnimDllOpCommand:
2266 TDebugLogTextHandler::Append(aText, _L("Command(...)"));
2268 case EWsAnimDllOpFree:
2269 aText.Append(_L("~CAnimDll()"));
2271 case EWsAnimDllOpCreateInstanceSprite:
2272 aText.Append(_L("EWsAnimDllOpCreateInstanceSprite enum"));
2275 UnKnownOpcode(aText, aOpcode);
2280 void TWsDecoder::DecodeSpriteBase(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData, TInt aHandle)
2282 TWsSpriteCmdUnion pData;
2284 aText.Format(_L("RWsSpriteBase[%d]::"),aHandle);
2288 case EWsSpriteOpFree:
2289 aText.Append(LogClose);
2291 case EWsSpriteOpSetPosition:
2292 aText.Append(_L("SetPosition(...)"));
2294 case EWsSpriteOpUpdateMember:
2295 aText.AppendFormat(_L("UpdateMember(%d)"),pData.UpdateMember->index);
2297 case EWsSpriteOpUpdateMember2:
2298 aText.AppendFormat(_L("UpdateMember(%d,{%d,%d,%d,%d,{%d,%d},%d})"),pData.UpdateMember->index,
2299 pData.UpdateMember->data.iBitmap,pData.UpdateMember->data.iMaskBitmap,
2300 pData.UpdateMember->data.iInvertMask,pData.UpdateMember->data.iDrawMode,
2301 pData.UpdateMember->data.iOffset.iX,pData.UpdateMember->data.iOffset.iY,
2302 pData.UpdateMember->data.iInterval.Int());
2304 case EWsSpriteOpAppendMember:
2305 aText.Append(_L("AppendMember(...)"));
2307 case EWsSpriteOpActivate:
2308 aText.Append(_L("Activate()"));
2311 UnKnownOpcode(aText, aOpcode);
2316 void TWsDecoder::DecodeBitmap(TBuf<LogTBufSize>& aText,TInt aOpcode,const TAny* /*aCmdData*/,TInt aHandle)
2318 aText.Format(_L("CWsBitmap[%d]::"),aHandle);
2321 case EWsBitmapOpFree:
2322 aText.Append(LogClose);
2325 UnKnownOpcode(aText, aOpcode);
2330 void TWsDecoder::DecodeDirect(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData, TInt aHandle)
2332 TWsDirectCmdUnion pData;
2334 _LIT(KClassName,"RDirectScreenAccess[%d]::");
2335 aText.Format(KClassName,aHandle);
2339 case EWsDirectOpFree:
2340 aText.Append(LogClose);
2342 case EWsDirectOpRequest:
2344 _LIT(LogDirectRequest,"Request(TInt *stat,%d)");
2345 aText.AppendFormat(LogDirectRequest,hHandleToValue(*pData.Int));
2348 case EWsDirectOpInitFailed:
2350 _LIT(LogDirectInitFailed,"InitFailed()");
2351 aText.Append(LogDirectInitFailed);
2354 case EWsDirectOpGetRegion:
2356 _LIT(LogDirectGetRegion,"GetRegion(%d)");
2357 aText.AppendFormat(LogDirectGetRegion,*pData.Int);
2360 case EWsDirectOpCancel:
2362 _LIT(LogDirectCancel,"Cancel()");
2363 aText.Append(LogDirectCancel);
2366 case EWsDirectOpGetSendQueue:
2368 _LIT(LogGetSendQueue,"EWsDirectOpGetSendQueue enum");
2369 aText.Append(LogGetSendQueue);
2372 case EWsDirectOpGetRecQueue:
2374 _LIT(LogGetRecQueue,"EWsDirectOpGetRecQueue enum");
2375 aText.Append(LogGetRecQueue);
2379 UnKnownOpcode(aText, aOpcode);
2384 void TWsDecoder::DecodeClick(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData, TInt aHandle)
2386 TWsClickCmdUnion pData;
2388 _LIT(KClassName,"RSoundPlugIn[%d]::");
2389 aText.Format(KClassName,aHandle);
2393 case EWsClickOpFree:
2394 aText.Append(LogClose);
2396 case EWsClickOpIsLoaded:
2398 _LIT(LogClickIsLoaded,"IsLoaded()");
2399 aText.Append(LogClickIsLoaded);
2402 case EWsClickOpUnLoad:
2404 _LIT(LogClickUnLoad,"UnLoad()");
2405 aText.Append(LogClickUnLoad);
2408 case EWsClickOpLoad:
2410 _LIT(LogClickLoad1,"Load(\"");
2411 _LIT(LogClickLoad2,"\")");
2412 TDebugLogTextHandler::Append(aText, LogClickLoad1);
2413 TDebugLogTextHandler::Append(aText, TPtrC((TText *)(pData.Int+1), *pData.Int));
2414 TDebugLogTextHandler::Append(aText, LogClickLoad2);
2417 case EWsClickOpCommandReply:
2419 _LIT(LogClickCommandReply,"CommandReply(...)");
2420 aText.Append(LogClickCommandReply);
2423 case EWsClickOpSetKeyClick:
2425 _LIT(LogSetKeyClick,"SetKeyClick(%u)");
2426 aText.AppendFormat(LogSetKeyClick, *pData.Bool);
2429 case EWsClickOpSetPenClick:
2431 _LIT(LogSetPenClick,"SetPenClick(%u)");
2432 aText.AppendFormat(LogSetPenClick, *pData.Bool);
2435 case EWsClickOpKeyClickEnabled:
2437 _LIT(LogKeyClickEnabled,"KeyClickEnabled()");
2438 aText.Append(LogKeyClickEnabled);
2441 case EWsClickOpPenClickEnabled:
2443 _LIT(LogPenClickEnabled,"PenClickEnabled()");
2444 aText.Append(LogPenClickEnabled);
2448 UnKnownOpcode(aText, aOpcode);
2453 TDesC &TWsDecoder::replyBufDetails(TInt aClass, TInt aOpcode, const TDesC8 *aReplyDes8, const TDesC *aReplyDesText)
2455 iCommandDetailsText.Format(_L("Reply Buffer: "));
2458 case WS_HANDLE_GROUP_WINDOW:
2459 ReplyBufWindowGroup(iCommandDetailsText, aOpcode, aReplyDes8, aReplyDesText);
2461 case WS_HANDLE_CLIENT:
2462 ReplyBufClient(iCommandDetailsText, aOpcode, aReplyDes8, aReplyDesText);
2464 case WS_HANDLE_WINDOW:
2465 ReplyBufWindow(iCommandDetailsText, aOpcode, aReplyDes8, aReplyDesText);
2467 case WS_HANDLE_SCREEN_DEVICE:
2468 ReplyBufScreenDevice(iCommandDetailsText, aOpcode, aReplyDes8, aReplyDesText);
2471 iCommandDetailsText.Format(_L("Reply buffer not handled (%u)"), aClass);
2475 return iCommandDetailsText;
2478 TDesC &TWsDecoder::commandDetails(TInt aClass, TInt aOpcode, const TAny *aCmdData, TInt aHandle)
2482 case WS_HANDLE_ROOT_WINDOW:
2483 iCommandDetailsText.Format(_L("invalid class"));
2485 case WS_HANDLE_GROUP_WINDOW:
2486 DecodeWindowGroup(iCommandDetailsText, aOpcode, aCmdData, aHandle);
2488 case WS_HANDLE_CLIENT:
2489 DecodeClient(iCommandDetailsText, aOpcode, aCmdData, aHandle);
2491 case WS_HANDLE_WINDOW:
2492 DecodeWindow(iCommandDetailsText, aOpcode, aCmdData, aHandle);
2495 DecodeGc(iCommandDetailsText, aOpcode, aCmdData, aHandle);
2497 case WS_HANDLE_SCREEN_DEVICE:
2498 DecodeScreenDevice(iCommandDetailsText, aOpcode, aCmdData, aHandle);
2500 case WS_HANDLE_ANIM_DLL:
2501 DecodeAnimDll(iCommandDetailsText, aOpcode, aCmdData, aHandle);
2503 case WS_HANDLE_SPRITE:
2504 case WS_HANDLE_POINTER_CURSOR:
2505 case WS_HANDLE_TEXT_CURSOR:
2506 DecodeSpriteBase(iCommandDetailsText, aOpcode, aCmdData, aHandle);
2508 case WS_HANDLE_BITMAP:
2509 DecodeBitmap(iCommandDetailsText, aOpcode, aCmdData, aHandle);
2511 case WS_HANDLE_DIRECT:
2512 DecodeDirect(iCommandDetailsText, aOpcode, aCmdData, aHandle);
2514 case WS_HANDLE_CLICK:
2515 DecodeClick(iCommandDetailsText, aOpcode, aCmdData, aHandle);
2518 iCommandDetailsText.Format(_L("unknown class (%u)"), aClass);
2522 iRequestFuncClass=aClass;
2523 iPrevOpcode=aOpcode;
2524 return iCommandDetailsText;
2527 TDesC &TWsDecoder::eventDetails(const TWsEvent *aWsEvent)
2529 switch (aWsEvent->Type())
2532 iEventDetailsText.Format(_L("EEventKey (code %u, scanCode %u, mdfs 0x%04x, repeats %u)"),
2533 aWsEvent->Key()->iCode,
2534 aWsEvent->Key()->iScanCode,
2535 aWsEvent->Key()->iModifiers,
2536 aWsEvent->Key()->iRepeats);
2539 iEventDetailsText.Format(_L("EEventKeyUp (scanCode %u, mdfs 0x%04x)"),
2540 aWsEvent->Key()->iScanCode,
2541 aWsEvent->Key()->iModifiers);
2544 iEventDetailsText.Format(_L("EEventKeyDown (scanCode %u, mdfs 0x%04x)"),
2545 aWsEvent->Key()->iScanCode,
2546 aWsEvent->Key()->iModifiers);
2550 TShortBuf buf1(TDebugLogTextHandler::PointerEventType(aWsEvent->Pointer()->iType));
2551 TShortBuf buf2(TDebugLogTextHandler::FormatPoint(aWsEvent->Pointer()->iPosition));
2552 TShortBuf buf3(TDebugLogTextHandler::FormatPoint(aWsEvent->Pointer()->iParentPosition));
2553 iEventDetailsText.Format(_L("EEventPointer (type %S, modifiers 0x%x, pos %S, global-pos %S)"),
2554 &buf1,aWsEvent->Pointer()->iModifiers,&buf2,&buf3);
2557 case EEventDragDrop:
2559 TShortBuf buf1(TDebugLogTextHandler::PointerEventType(aWsEvent->Pointer()->iType));
2560 TShortBuf buf2(TDebugLogTextHandler::FormatPoint(aWsEvent->Pointer()->iPosition));
2561 TShortBuf buf3(TDebugLogTextHandler::FormatPoint(aWsEvent->Pointer()->iParentPosition));
2562 iEventDetailsText.Format(_L("EEventDragDrop (type %S, modifiers 0x%x, pos %S, global-pos %S)"),
2563 &buf1,aWsEvent->Pointer()->iModifiers,&buf2,&buf3);
2566 case EEventPointerEnter:
2567 iEventDetailsText.Format(_L("EEventPointerEnter"));
2569 case EEventPointerExit:
2570 iEventDetailsText.Format(_L("EEventPointerExit"));
2572 case EEventFocusLost:
2573 iEventDetailsText.Format(_L("EEventFocusLost"));
2575 case EEventFocusGained:
2576 iEventDetailsText.Format(_L("EEventFocusGained"));
2578 case EEventModifiersChanged:
2579 iEventDetailsText.Format(_L("EEventModifiersChanged"));
2581 case EEventSwitchOn:
2582 iEventDetailsText.Format(_L("EEventSwitchOn"));
2584 case EEventPassword:
2585 iEventDetailsText.Format(_L("EEventPassword"));
2587 case EEventWindowGroupsChanged:
2588 iEventDetailsText.Format(_L("EEventWindowGroupsChanged"));
2590 case EEventErrorMessage:
2591 iEventDetailsText.Format(_L("EEventErrorMessage (%d,%d)"),aWsEvent->ErrorMessage()->iErrorCategory,aWsEvent->ErrorMessage()->iError);
2593 case EEventMessageReady:
2594 iEventDetailsText.Format(_L("EEventMessageReady"));
2596 case EEventScreenDeviceChanged:
2597 iEventDetailsText.Format(_L("EEventScreenDeviceChanged"));
2599 case EEventSwitchOff:
2601 _LIT(LogEventSwitchOff,"EEventSwitchOff");
2602 iEventDetailsText.Format(LogEventSwitchOff);
2605 case EEventKeySwitchOff:
2607 _LIT(LogEventKeySwitchOff,"EEventKeySwitchOff");
2608 iEventDetailsText.Format(LogEventKeySwitchOff);
2611 case EEventFocusGroupChanged:
2613 _LIT(LogEventFocusGroupChanged,"EEventFocusGroupChanged");
2614 iEventDetailsText.Format(LogEventFocusGroupChanged);
2617 case EEventCaseOpened:
2619 _LIT(LogEventCaseOpened,"EEventCaseOpened");
2620 iEventDetailsText.Format(LogEventCaseOpened);
2623 case EEventCaseClosed:
2625 _LIT(LogEventCaseClosed,"EEventCaseClosed");
2626 iEventDetailsText.Format(LogEventCaseClosed);
2630 if (aWsEvent->Type()>=EEventUser)
2631 iEventDetailsText.Format(_L("EEventUser[%d]"), aWsEvent->Type()-EEventUser);
2635 iEventDetailsText.Format(_L("Unknown event type=%d "), aWsEvent->Type());
2639 return iEventDetailsText;
2642 TDesC &TWsDecoder::eventDetails(const TRawEvent *aEvent)
2644 iEventDetailsText.Zero();
2645 switch (aEvent->Type())
2647 case TRawEvent::ENone:
2649 _LIT(LogEventDetailsNone,"ENone");
2650 iEventDetailsText.Append(LogEventDetailsNone);
2653 case TRawEvent::EPointerMove:
2655 _LIT(LogEventDetailsPointerMove,"EPointerMove(");
2656 TShortBuf buf(TDebugLogTextHandler::FormatPoint(aEvent->Pos()));
2657 iEventDetailsText.Append(LogEventDetailsPointerMove);
2658 iEventDetailsText.Append(buf);
2659 iEventDetailsText.Append(LogCloseBracket);
2662 case TRawEvent::EPointerSwitchOn:
2664 _LIT(LogEventDetailsPointerSwitchOn,"EPointerSwitchOn(");
2665 TShortBuf buf(TDebugLogTextHandler::FormatPoint(aEvent->Pos()));
2666 iEventDetailsText.Append(LogEventDetailsPointerSwitchOn);
2667 iEventDetailsText.Append(buf);
2668 iEventDetailsText.Append(LogCloseBracket);
2671 case TRawEvent::EKeyDown:
2673 _LIT(LogEventDetailsKeyDown,"EKeyDown(%d)");
2674 iEventDetailsText.Format(LogEventDetailsKeyDown,aEvent->ScanCode());
2677 case TRawEvent::EKeyUp:
2679 _LIT(LogEventDetailsKeyUp,"EKeyUp(%d)");
2680 iEventDetailsText.Format(LogEventDetailsKeyUp,aEvent->ScanCode());
2683 case TRawEvent::ERedraw:
2685 _LIT(LogEventDetailsRedraw,"ERedraw");
2686 iEventDetailsText.Append(LogEventDetailsRedraw);
2689 case TRawEvent::ESwitchOn:
2691 _LIT(LogEventDetailsSwitchOn,"ESwitchOn");
2692 iEventDetailsText.Append(LogEventDetailsSwitchOn);
2695 case TRawEvent::EActive:
2697 _LIT(LogEventDetailsActive,"EActive");
2698 iEventDetailsText.Append(LogEventDetailsActive);
2701 case TRawEvent::EInactive:
2703 _LIT(LogEventDetailsInactive,"EInactive");
2704 iEventDetailsText.Append(LogEventDetailsInactive);
2707 case TRawEvent::EUpdateModifiers:
2709 _LIT(LogEventDetailsModifiers,"EUpdateModifiers(%d)");
2710 iEventDetailsText.Format(LogEventDetailsModifiers,aEvent->Modifiers());
2713 case TRawEvent::EButton1Down:
2715 _LIT(LogEventDetailsButton1Down,"EButton1Down(");
2716 TShortBuf buf(TDebugLogTextHandler::FormatPoint(aEvent->Pos()));
2717 iEventDetailsText.Append(LogEventDetailsButton1Down);
2718 iEventDetailsText.Append(buf);
2719 iEventDetailsText.Append(LogCloseBracket);
2722 case TRawEvent::EButton1Up:
2724 _LIT(LogEventDetailsButton1Up,"EButton1Up(");
2725 TShortBuf buf(TDebugLogTextHandler::FormatPoint(aEvent->Pos()));
2726 iEventDetailsText.Append(LogEventDetailsButton1Up);
2727 iEventDetailsText.Append(buf);
2728 iEventDetailsText.Append(LogCloseBracket);
2731 case TRawEvent::EButton2Down:
2733 _LIT(LogEventDetailsButton2Down,"EButton2Down(");
2734 TShortBuf buf(TDebugLogTextHandler::FormatPoint(aEvent->Pos()));
2735 iEventDetailsText.Append(LogEventDetailsButton2Down);
2736 iEventDetailsText.Append(buf);
2737 iEventDetailsText.Append(LogCloseBracket);
2740 case TRawEvent::EButton2Up:
2742 _LIT(LogEventDetailsButton2Up,"EButton2Up(");
2743 TShortBuf buf(TDebugLogTextHandler::FormatPoint(aEvent->Pos()));
2744 iEventDetailsText.Append(LogEventDetailsButton2Up);
2745 iEventDetailsText.Append(buf);
2746 iEventDetailsText.Append(LogCloseBracket);
2749 case TRawEvent::EButton3Down:
2751 _LIT(LogEventDetailsButton3Down,"EButton3Down(");
2752 TShortBuf buf(TDebugLogTextHandler::FormatPoint(aEvent->Pos()));
2753 iEventDetailsText.Append(LogEventDetailsButton3Down);
2754 iEventDetailsText.Append(buf);
2755 iEventDetailsText.Append(LogCloseBracket);
2758 case TRawEvent::EButton3Up:
2760 _LIT(LogEventDetailsButton3Up,"EButton3Up(");
2761 TShortBuf buf(TDebugLogTextHandler::FormatPoint(aEvent->Pos()));
2762 iEventDetailsText.Append(LogEventDetailsButton3Up);
2763 iEventDetailsText.Append(buf);
2764 iEventDetailsText.Append(LogCloseBracket);
2767 case TRawEvent::ESwitchOff:
2769 _LIT(LogEventDetailsSwitchOff,"ESwitchOff");
2770 iEventDetailsText.Append(LogEventDetailsSwitchOff);
2773 case TRawEvent::EKeyRepeat:
2775 _LIT(LogEventDetailsKeyRepeat,"ERepeatKey(scancode=%d,repeat=%d");
2776 iEventDetailsText.Format(LogEventDetailsKeyRepeat,aEvent->ScanCode(),aEvent->Repeats());
2779 case TRawEvent::EPointer3DOutOfRange:
2781 _LIT(LogEventDetailsOutOfRange,"EPointer3DOutOfRange");
2782 iEventDetailsText.Format(LogEventDetailsOutOfRange);
2787 _LIT(LogEventDetailsUnknown,"Unknown event type: %d");
2788 iEventDetailsText.Format(LogEventDetailsUnknown,aEvent->Type());
2793 return iEventDetailsText;
2796 void TWsDecoder::ReplyBufWindowGroup(TBuf<LogTBufSize> &aText, TInt aOpcode, const TDesC8 *aReplyDes8, const TDesC *aReplyDesText)
2798 ReplyBufWindow(aText, aOpcode, aReplyDes8, aReplyDesText);
2801 void TWsDecoder::ReplyBufWindow(TBuf<LogTBufSize> &aText, TInt aOpcode, const TDesC8 *aReplyDes8, const TDesC *aReplyDesText)
2805 case EWsWinOpPosition:
2806 AppendPoint(aText,aReplyDes8);
2808 case EWsWinOpAbsPosition:
2809 AppendPoint(aText,aReplyDes8);
2812 AppendPoint(aText,aReplyDes8);
2814 case EWsWinOpInquireOffset:
2815 AppendPoint(aText,aReplyDes8);
2818 AppendDesc(aText, aReplyDesText);
2820 case EWsWinOpRetrievePointerMoveBuffer:
2821 aText.Append(_L("..."));
2823 case EWsWinOpGetInvalidRegion:
2825 TRect *rect=(TRect *)aReplyDes8->Ptr();
2826 TInt count=aReplyDes8->Size()/sizeof(TRect);
2828 _LIT(LogTwoStrings,"%S%S");
2829 for(TInt index=0;index<count && !iOverflowHandler.IsError();index++)
2831 TLongBuf buf(TDebugLogTextHandler::FormatRect(*rect++));
2832 aText.AppendFormat(LogTwoStrings,&iOverflowHandler,&comma,&buf);
2839 UnKnownReplyBuf(aText, aOpcode);
2844 void TWsDecoder::ReplyBufClient(TBuf<LogTBufSize> &aText, TInt aOpcode, const TDesC8 *aReplyDes8, const TDesC *aReplyDesText)
2848 case EWsClOpGetEvent:
2850 const TWsEvent *wsEvent=(TWsEvent *)aReplyDes8->Ptr();
2851 TPtrC details(eventDetails(wsEvent));
2853 if (details!=KNullDesC)
2855 TDebugLogTextHandler::Append(aText, details);
2857 _LIT(LogReplyClientDestTime,"(dest %d, time ");
2858 _LIT(LogReplyClientTime,"%D%M%Y%/0%1%/1%2%/2%3%/3 %:0%H%:1%T%:2%S%.%*C2%:3)");
2859 buf.Format(LogReplyClientDestTime, wsEvent->Handle());
2860 TDebugLogTextHandler::Append(aText, buf);
2861 TRAPD(err,wsEvent->Time().FormatL(buf,LogReplyClientTime));
2863 TDebugLogTextHandler::Append(aText, buf);
2866 _LIT(LogReplyClientTimeErr,"######)");
2867 TDebugLogTextHandler::Append(aText,LogReplyClientTimeErr);
2872 case EWsClOpGetRedraw:
2874 const TWsRedrawEvent *redrawEvent=(TWsRedrawEvent *)aReplyDes8->Ptr();
2875 TLongBuf buf(TDebugLogTextHandler::FormatRect(redrawEvent->Rect()));
2876 aText.Format(_L("Redraw (handle %d): "), redrawEvent->Handle());
2877 aText.AppendFormat(_L("rect %S"), &buf);
2880 case EWsClOpGetPriorityKey:
2882 const TWsPriorityKeyEvent *abortEvent=(TWsPriorityKeyEvent *)aReplyDes8->Ptr();
2883 aText.Format(_L("Abort key handle %d"), abortEvent->Handle());
2886 case EWsClOpShadowVector:
2887 AppendPoint(aText,aReplyDes8);
2889 case EWsClOpGetWindowGroupClientThreadId:
2891 const TThreadId *threadId=(TThreadId *)aReplyDes8->Ptr();
2892 aText.Format(_L("TThreadId=%d"), *(TInt *)threadId);
2895 case EWsClOpGetWindowGroupNameFromIdentifier:
2896 AppendDesc(aText, aReplyDesText);
2898 case EWsClOpWindowGroupList:
2899 case EWsClOpWindowGroupListAndChain:
2900 case EWsClOpWindowGroupListAllPriorities:
2902 TInt *handlPtr=(TInt *)aReplyDes8->Ptr();
2903 TInt count=aReplyDes8->Size()/sizeof(TInt);
2905 _LIT(LogStringInt,"%S%d");
2906 for(TInt index=0;index<count && !iOverflowHandler.IsError();index++)
2908 aText.AppendFormat(LogStringInt,&iOverflowHandler,&comma,*handlPtr++);
2914 case EWsClOpGetKeyboardRepeatRate:
2916 SKeyRepeatSettings *settings=(SKeyRepeatSettings *)aReplyDes8->Ptr();
2917 aText.AppendFormat(_L("initial=%d,normal=%d"),settings->iInitialTime.Int(),settings->iTime.Int());
2920 case EWsClOpGetDoubleClickSettings:
2922 SDoubleClickSettings *settings=(SDoubleClickSettings *)aReplyDes8->Ptr();
2923 aText.AppendFormat(_L("interval=%d,distance=%d"),settings->iInterval.Int(),settings->iDistance);
2926 case EWsClOpFetchMessage:
2928 _LIT(LogClientRetFetchMessage,"FetchMessage");
2929 aText.Append(LogClientRetFetchMessage);
2932 case EWsClOpCreateGraphic:
2933 aText.AppendFormat(_L("Creating graphic: %s"), aReplyDes8);
2935 case EWsClOpGetGraphicMessage:
2936 aText.AppendFormat(_L("Graphic message: %s"), aReplyDes8);
2938 case EWsClOpPointerCursorPosition:
2940 TWsClCmdSetPointerCursorArea *settings=(TWsClCmdSetPointerCursorArea*)aReplyDes8->Ptr();
2941 TLongBuf buf1(TDebugLogTextHandler::FormatRect(settings->area));
2942 aText.AppendFormat(_L("Cursor position area=%S"), &buf1);
2945 case EWsClOpPointerCursorArea:
2947 TWsClCmdSetPointerCursorArea *settings=(TWsClCmdSetPointerCursorArea*)aReplyDes8->Ptr();
2948 TLongBuf buf1(TDebugLogTextHandler::FormatRect(settings->area));
2949 aText.AppendFormat(_L("Cursor area=%S"), &buf1);
2952 case EWsClOpGetDefModeMaxNumColors:
2954 SDefModeMaxNumColors *settings=(SDefModeMaxNumColors*)aReplyDes8->Ptr();
2955 aText.AppendFormat(_L("Num of colors=%d, num of grays=%d, display mode=%d"),settings->iColors, settings->iGrays, settings->iDisplayMode);
2959 UnKnownReplyBuf(aText, aOpcode);
2964 void TWsDecoder::ReplyBufScreenDevice(TBuf<LogTBufSize> &aText, TInt aOpcode, const TDesC8 *aReplyDes8, const TDesC *)
2968 case EWsSdOpGetScanLine:
2969 { //This fills up the log two much for test code
2971 //Alternate code that would log this information.
2972 /*_LIT(LogScreenDeviceReplyBufGetScanLine,"aScanLine set to ...");
2973 aText=LogScreenDeviceReplyBufGetScanLine;*/
2974 /*TDebugLogTextHandler::Append(aText, TDebugLogTextHandler::FormatArray(TDebugLogTextHandler::ERgb,
2975 ((TDesC8 *)aReplyData)->Ptr(),((TDesC8 *)aReplyData)->Length()*sizeof(TRgb)));*/
2978 case EWsSdOpHorizontalTwipsToPixels:
2979 case EWsSdOpVerticalTwipsToPixels:
2980 case EWsSdOpHorizontalPixelsToTwips:
2981 case EWsSdOpVerticalPixelsToTwips:
2982 case EWsSdOpPixelSize:
2983 case EWsSdOpTwipsSize:
2984 AppendPoint(aText,aReplyDes8);
2986 case EWsSdOpPointerRect:
2987 AppendRect(aText,aReplyDes8);
2989 case EWsSdOpGetDefaultScreenSizeAndRotation:
2990 case EWsSdOpGetScreenModeSizeAndRotation:
2992 _LIT(LogScreenDeviceReplyBufPTR,"%S %S %d");
2993 const TPixelsTwipsAndRotation *sar=(TPixelsTwipsAndRotation *)aReplyDes8->Ptr();
2994 TShortBuf buf1(TDebugLogTextHandler::FormatSize(sar->iPixelSize));
2995 TShortBuf buf2(TDebugLogTextHandler::FormatSize(sar->iTwipsSize));
2996 aText.AppendFormat(LogScreenDeviceReplyBufPTR,&buf1,&buf2,sar->iRotation);
2999 case EWsSdOpGetDefaultScreenSizeAndRotation2:
3000 case EWsSdOpGetScreenModeSizeAndRotation2:
3002 _LIT(LogScreenDeviceReplyBufPR,"%S %d");
3003 const TPixelsAndRotation *sar=(TPixelsAndRotation *)aReplyDes8->Ptr();
3004 TShortBuf buf(TDebugLogTextHandler::FormatSize(sar->iPixelSize));
3005 aText.AppendFormat(LogScreenDeviceReplyBufPR,&buf,sar->iRotation);
3008 case EWsSdOpGetPalette:
3010 _LIT(LogScreenDeviceReplyBufGetPalette,"Palette returned ...");
3011 aText.Append(LogScreenDeviceReplyBufGetPalette);
3014 case EWsSdOpGetDefaultScreenModeOrigin:
3016 const TPoint *point = reinterpret_cast<const TPoint*>(aReplyDes8->Ptr());
3017 TShortBuf buf1(TDebugLogTextHandler::FormatPoint(*point));
3018 _LIT(LogScreenDeviceReplyBufGetDefaultScreenModeOrigin,"Default screen mode origin=%S");
3019 aText.AppendFormat(LogScreenDeviceReplyBufGetDefaultScreenModeOrigin, &buf1);
3022 case EWsSdOpGetScreenModeOrigin:
3024 const TPoint *point = reinterpret_cast<const TPoint*>(aReplyDes8->Ptr());
3025 TShortBuf buf1(TDebugLogTextHandler::FormatPoint(*point));
3026 _LIT(LogScreenDeviceReplyBufGetScreenModeOrigin,"Screen mode origin=%S");
3027 aText.AppendFormat(LogScreenDeviceReplyBufGetScreenModeOrigin, &buf1);
3030 case EWsSdOpGetScreenModeScale:
3031 case EWsSdOpGetCurrentScreenModeScale:
3033 const TSize *size = reinterpret_cast<const TSize*>(aReplyDes8->Ptr());
3034 TShortBuf buf1(TDebugLogTextHandler::FormatSize(*size));
3035 _LIT(LogScreenDeviceReplyBufGetScreenScale,"Screen scale=%S");
3036 aText.AppendFormat(LogScreenDeviceReplyBufGetScreenScale, &buf1);
3039 case EWsSdOpGetScreenModeScaledOrigin:
3041 const TPoint *point = reinterpret_cast<const TPoint*>(aReplyDes8->Ptr());
3042 TShortBuf buf1(TDebugLogTextHandler::FormatPoint(*point));
3043 _LIT(LogScreenDeviceReplyBufGetScreenModeScaledOrigin,"Screen mode scaled origin=%S");
3044 aText.AppendFormat(LogScreenDeviceReplyBufGetScreenModeScaledOrigin, &buf1);
3047 case EWsSdOpGetCurrentScreenModeAttributes:
3049 TSizeMode *settings=(TSizeMode*)aReplyDes8->Ptr();
3050 TShortBuf origin(TDebugLogTextHandler ::FormatPoint(settings->iOrigin));
3051 TShortBuf size(TDebugLogTextHandler ::FormatSize(settings->iScreenSize));
3052 TShortBuf area(TDebugLogTextHandler ::FormatRect(settings->iPointerCursorArea));
3053 aText.AppendFormat(_L("Screen attribute: origin=%S, size=%s, rotation=%d, area=$s, display mode = %d"),
3054 &origin, &size, settings->iAlternativeRotations, &area, settings->iDefaultDisplayMode);
3057 case EWsSdOpGetScreenSizeModeList:
3058 AppendDesc(aText, aReplyDes8);
3061 UnKnownReplyBuf(aText, aOpcode);