os/graphics/windowing/windowserver/debuglog/DECODER.CPP
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// Decodes data into text - platform independent
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
#include "../SERVER/w32cmd.h"
sl@0
    19
#include "DEBUGLOG.H"
sl@0
    20
sl@0
    21
_LIT(LogCloseBracket,")");
sl@0
    22
_LIT(LogComma,", ");
sl@0
    23
_LIT(LogString,"%S");
sl@0
    24
_LIT(LogClose,"Close()");
sl@0
    25
_LIT(LogSpaces,"  ");
sl@0
    26
sl@0
    27
void TDebugLogOverflow::Overflow(TDes &aDes)
sl@0
    28
	{
sl@0
    29
	if (!iError)		//Should never be re-entrant but just in case
sl@0
    30
		{
sl@0
    31
		_LIT(OverflowThreeDots,"...");
sl@0
    32
		const TInt LenThreeDots=3;
sl@0
    33
		iError=ETrue;
sl@0
    34
		TInt length=aDes.MaxLength();
sl@0
    35
		if (length>LenThreeDots)
sl@0
    36
			{
sl@0
    37
			length-=LenThreeDots;
sl@0
    38
			if (aDes.Length()>length)
sl@0
    39
				aDes.SetLength(length);
sl@0
    40
			}
sl@0
    41
		aDes.AppendFormat(OverflowThreeDots,this);
sl@0
    42
		}
sl@0
    43
	}
sl@0
    44
sl@0
    45
class TRawEventX : public TRawEvent
sl@0
    46
// For bypassing protected members of TRawEvent
sl@0
    47
	{
sl@0
    48
public:
sl@0
    49
	inline TUint Ticks();
sl@0
    50
	inline TInt posx();
sl@0
    51
	inline TInt posy();
sl@0
    52
	inline TInt scanCode();
sl@0
    53
	};
sl@0
    54
sl@0
    55
inline TUint TRawEventX::Ticks()
sl@0
    56
	{return(iTicks);}
sl@0
    57
inline TInt TRawEventX::posx()
sl@0
    58
	{return(iU.pos.x);}
sl@0
    59
inline TInt TRawEventX::posy()
sl@0
    60
	{return(iU.pos.y);}
sl@0
    61
inline TInt TRawEventX::scanCode()
sl@0
    62
	{return(iU.key.scanCode __REMOVE_WINS_CHARCODE);}
sl@0
    63
sl@0
    64
sl@0
    65
GLDEF_C TInt hHandleToValue(TUint32 handle)
sl@0
    66
	{
sl@0
    67
	return(handle&0xFFFF);
sl@0
    68
	}
sl@0
    69
sl@0
    70
TDesC &TWsDecoder::CommandBuf(TInt aApp)
sl@0
    71
	{
sl@0
    72
	iText.Format(_L("[start of command buffer from app %d]"), aApp);
sl@0
    73
	return iText;
sl@0
    74
	}
sl@0
    75
sl@0
    76
TDesC &TWsDecoder::Command(TInt aClass, TInt aOpcode, const TAny *aCmdData, TInt aHandle)
sl@0
    77
	{
sl@0
    78
	TPtrC details(commandDetails(aClass, aOpcode, aCmdData, aHandle));
sl@0
    79
	iText=KNullDesC;
sl@0
    80
	if (details!=KNullDesC)
sl@0
    81
		iText=details;
sl@0
    82
	return iText;
sl@0
    83
	}
sl@0
    84
sl@0
    85
TDesC &TWsDecoder::NewClient(TUint aConnectionHandle)
sl@0
    86
	{
sl@0
    87
	iText.Format(_L("Client Connected %d"), aConnectionHandle);
sl@0
    88
	iRequestFuncClass=ENewClientClass;
sl@0
    89
	return iText;
sl@0
    90
	}
sl@0
    91
sl@0
    92
TDesC &TWsDecoder::CommandReply(TInt aData)
sl@0
    93
	{
sl@0
    94
	iText.Format(_L("returns %d (0x%x)"), aData, aData);
sl@0
    95
	return iText;
sl@0
    96
	}
sl@0
    97
sl@0
    98
TDesC &TWsDecoder::CommandReplyBuf(const TDesC8 &aDes)
sl@0
    99
	{
sl@0
   100
	TPtrC details(replyBufDetails(iRequestFuncClass, iPrevOpcode, &aDes, NULL));
sl@0
   101
	iText=KNullDesC;
sl@0
   102
	if (details!=KNullDesC)
sl@0
   103
		{
sl@0
   104
		iText=LogSpaces;
sl@0
   105
		TDebugLogTextHandler::Append(iText, details);
sl@0
   106
		}
sl@0
   107
	return iText;
sl@0
   108
	}
sl@0
   109
sl@0
   110
TDesC &TWsDecoder::CommandReplyBuf(const TDesC16 &aDes)
sl@0
   111
	{
sl@0
   112
	iOverflowHandler.Reset();
sl@0
   113
	TPtrC details(replyBufDetails(iRequestFuncClass, iPrevOpcode, NULL, &aDes));
sl@0
   114
	iText=KNullDesC;
sl@0
   115
	if (details!=KNullDesC)
sl@0
   116
		{
sl@0
   117
		iText=LogSpaces;
sl@0
   118
		TDebugLogTextHandler::Append(iText, details);
sl@0
   119
		}
sl@0
   120
	return iText;
sl@0
   121
	}
sl@0
   122
sl@0
   123
TDesC &TWsDecoder::SignalEvent(TInt aApp)
sl@0
   124
	{
sl@0
   125
	iText.Format(_L("Event signalled for App %d"),aApp);
sl@0
   126
	return iText;
sl@0
   127
	}
sl@0
   128
sl@0
   129
TDesC &TWsDecoder::Panic(TInt aApp, TInt aReason)
sl@0
   130
	{
sl@0
   131
	if (aApp==CDebugLogBase::EDummyConnectionId)
sl@0
   132
		iText.Format(_L("WSERV Internal Panic (%d)"), aReason);
sl@0
   133
	else
sl@0
   134
		iText.Format(_L("App %d, Paniced (%d)"),aApp, aReason);
sl@0
   135
	return iText;
sl@0
   136
	}
sl@0
   137
sl@0
   138
void TWsDecoder::UnKnown()
sl@0
   139
	{
sl@0
   140
	}
sl@0
   141
sl@0
   142
void TWsDecoder::UnKnownOpcode(TBuf<LogTBufSize> &aText, TInt aOpcode)
sl@0
   143
	{
sl@0
   144
	aText.AppendFormat(_L("unknown function (opcode %u)"), aOpcode);
sl@0
   145
	UnKnown();
sl@0
   146
	}
sl@0
   147
sl@0
   148
void TWsDecoder::UnKnownReplyBuf(TBuf<LogTBufSize> &aText, TInt aOpcode)
sl@0
   149
	{
sl@0
   150
	aText.AppendFormat(_L("unknown reply buffer (opcode %u)"), aOpcode);
sl@0
   151
	UnKnown();
sl@0
   152
	}
sl@0
   153
sl@0
   154
TDesC &TWsDecoder::MiscMessage(const TDesC &aFormat,TInt aParam)
sl@0
   155
	{
sl@0
   156
	iText.Format(aFormat,aParam);
sl@0
   157
	return iText;
sl@0
   158
	}
sl@0
   159
sl@0
   160
void TWsDecoder::AppendPoint(TBuf<LogTBufSize> &aText, const TDesC8 *aReplyDes8)
sl@0
   161
	{
sl@0
   162
	TShortBuf buf(TDebugLogTextHandler::FormatPoint(*((TPoint *)aReplyDes8->Ptr())));
sl@0
   163
	aText.AppendFormat(LogString, &buf);
sl@0
   164
	}
sl@0
   165
sl@0
   166
void TWsDecoder::AppendRect(TBuf<LogTBufSize> &aText, const TDesC8 *aReplyDes8)
sl@0
   167
	{
sl@0
   168
	TLongBuf buf(TDebugLogTextHandler::FormatRect(*((TRect *)aReplyDes8->Ptr())));
sl@0
   169
	aText.AppendFormat(LogString, &buf);
sl@0
   170
	}
sl@0
   171
sl@0
   172
void TWsDecoder::AppendDesc(TBuf<LogTBufSize> &aText, const TDesC8 *aReplyDes8)
sl@0
   173
	{
sl@0
   174
	TBuf<LogTBufSize> buf;
sl@0
   175
	buf.Copy(*aReplyDes8);
sl@0
   176
	aText.AppendFormat(LogString, &buf);
sl@0
   177
	}
sl@0
   178
sl@0
   179
void TWsDecoder::AppendDesc(TBuf<LogTBufSize> &aText, const TDesC16 *aReplyDes16)
sl@0
   180
	{
sl@0
   181
	aText.AppendFormat(LogString, aReplyDes16);
sl@0
   182
	}
sl@0
   183
sl@0
   184
void TWsDecoder::DecodeWindowGroup(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData, TInt aHandle)
sl@0
   185
	{
sl@0
   186
	aText.Format(_L("RWindowGroup[%d]::"),aHandle);
sl@0
   187
	TWsWinCmdUnion pData;
sl@0
   188
	pData.any=aCmdData;
sl@0
   189
	switch (aOpcode)
sl@0
   190
		{
sl@0
   191
	case EWsWinOpReceiveFocus:
sl@0
   192
		aText.AppendFormat(_L("ReceiveFocus(%d)"), *pData.Bool);
sl@0
   193
		break;
sl@0
   194
	case EWsWinOpAutoForeground:
sl@0
   195
		aText.AppendFormat(_L("AutoForeground(%d)"), *pData.Bool);
sl@0
   196
		break;
sl@0
   197
	case EWsWinOpCancelCaptureKey:
sl@0
   198
		aText.AppendFormat(_L("CancelCaptureKey(%d)"), *pData.UInt);
sl@0
   199
		break;
sl@0
   200
	case EWsWinOpCaptureKey:
sl@0
   201
		aText.AppendFormat(_L("CaptureKey(%u, 0x%04x, 0x%04x)"),
sl@0
   202
									pData.CaptureKey->key,
sl@0
   203
									pData.CaptureKey->modifiers,
sl@0
   204
									pData.CaptureKey->modifierMask);
sl@0
   205
		break;
sl@0
   206
	case EWsWinOpCancelCaptureKeyUpsAndDowns:
sl@0
   207
		aText.AppendFormat(_L("CancelCaptureKeyUpsAndDowns(%d)"), *pData.UInt);
sl@0
   208
		break;
sl@0
   209
	case EWsWinOpCaptureKeyUpsAndDowns:
sl@0
   210
		aText.AppendFormat(_L("CaptureKeyUpsAndDowns(%u, 0x%04x, 0x%04x)"),
sl@0
   211
									pData.CaptureKey->key,
sl@0
   212
									pData.CaptureKey->modifiers,
sl@0
   213
									pData.CaptureKey->modifierMask);
sl@0
   214
		break;
sl@0
   215
	case EWsWinOpSetTextCursor:
sl@0
   216
		{
sl@0
   217
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(pData.SetTextCursor->pos));
sl@0
   218
		aText.AppendFormat(_L("SetTextCursor(%d, %S, {%u,%d,%d,%d,0x%08x})"),
sl@0
   219
										hHandleToValue(pData.SetTextCursor->window), &buf,
sl@0
   220
										pData.SetTextCursor->cursor.iType, pData.SetTextCursor->cursor.iHeight,
sl@0
   221
										pData.SetTextCursor->cursor.iAscent, pData.SetTextCursor->cursor.iWidth,
sl@0
   222
										pData.SetTextCursor->cursor.iFlags);
sl@0
   223
		}
sl@0
   224
		break;
sl@0
   225
	case EWsWinOpSetTextCursorClipped:
sl@0
   226
		{
sl@0
   227
		TShortBuf buf1(TDebugLogTextHandler::FormatPoint(pData.SetTextCursor->pos));
sl@0
   228
		TLongBuf buf2(TDebugLogTextHandler::FormatRect(pData.SetTextCursor->rect));
sl@0
   229
		aText.AppendFormat(_L("SetTextCursor(%d, %S, {%u,%d,%d,%d,0x%08x}, %S)"),
sl@0
   230
										hHandleToValue(pData.SetTextCursor->window), &buf1,
sl@0
   231
										pData.SetTextCursor->cursor.iType, pData.SetTextCursor->cursor.iHeight,
sl@0
   232
										pData.SetTextCursor->cursor.iAscent, pData.SetTextCursor->cursor.iWidth,
sl@0
   233
										pData.SetTextCursor->cursor.iFlags, &buf2);
sl@0
   234
		}
sl@0
   235
		break;
sl@0
   236
	case EWsWinOpCancelTextCursor:
sl@0
   237
		aText.AppendFormat(_L("CancelTextCursor()"));
sl@0
   238
		break;
sl@0
   239
	case EWsWinOpSetOrdinalPriorityAdjust:
sl@0
   240
		aText.AppendFormat(_L("SetOrdinalPriorityAdjust(%d)"), *pData.Int);
sl@0
   241
		break;
sl@0
   242
	case EWsWinOpAddPriorityKey:
sl@0
   243
		aText.AppendFormat(_L("AddPriorityKey(0x%x,0x%x,%d)"), pData.PriorityKey->modifiers, pData.PriorityKey->modifierMask, pData.PriorityKey->keycode);
sl@0
   244
		break;
sl@0
   245
	case EWsWinOpRemovePriorityKey:
sl@0
   246
		aText.AppendFormat(_L("RemovePriorityKey(0x%x,0x%x,%d)"), pData.PriorityKey->modifiers, pData.PriorityKey->modifierMask, pData.PriorityKey->keycode);
sl@0
   247
		break;
sl@0
   248
	case EWsWinOpSetOrdinalPositionErr:
sl@0
   249
		aText.AppendFormat(_L("SetOrdinalPositionErr(%d, %d)"), pData.OrdinalPos->pos, pData.OrdinalPos->ordinalPriority);	
sl@0
   250
		break;
sl@0
   251
	case EWsWinOpDisableKeyClick:
sl@0
   252
		aText.AppendFormat(_L("DisableKeyClick(%u)"), *pData.UInt);	
sl@0
   253
		break;
sl@0
   254
	case EWsWinOpCaptureLongKey:
sl@0
   255
		aText.AppendFormat(_L("CaptureLongKey(TTimeIntervalMicroSeconds32(%d), %u, %u, %u, %u, %d, %u)"), 
sl@0
   256
								pData.CaptureLongKey->delay.Int(), pData.CaptureLongKey->inputKey, pData.CaptureLongKey->outputKey, 
sl@0
   257
								pData.CaptureLongKey->modifierMask, pData.CaptureLongKey->modifiers, pData.CaptureLongKey->priority, pData.CaptureLongKey->flags);	
sl@0
   258
		break;
sl@0
   259
	case EWsWinOpCancelCaptureLongKey:
sl@0
   260
		aText.AppendFormat(_L("CancelCaptureLongKey(%d)"), pData.CaptureKey->key);	
sl@0
   261
		break;
sl@0
   262
	case EWsWinOpAllowChildWindowGroup:
sl@0
   263
		aText.AppendFormat(_L("AllowProcessToCreateChildWindowGroup(%d)"), *pData.Int);	
sl@0
   264
		break;
sl@0
   265
	case EWsWinOpClearChildGroup:
sl@0
   266
		aText.AppendFormat(_L("ClearChildGroup()"));	
sl@0
   267
		break;
sl@0
   268
	case EWsWinOpSetChildGroup:
sl@0
   269
		aText.AppendFormat(_L("SetChildGroup(%d)"), *pData.Int); 	
sl@0
   270
		break;
sl@0
   271
	case EWsWinOpEnableVisibilityChangeEvents:
sl@0
   272
		aText.Append(_L("EnableVisibilityChangeEvents()")); 	
sl@0
   273
		break;
sl@0
   274
	case EWsWinOpDisableVisibilityChangeEvents:
sl@0
   275
		aText.Append(_L("DisableVisibilityChangeEvents()")); 	
sl@0
   276
		break;
sl@0
   277
	case EWsWinOpWindowGroupId:
sl@0
   278
		aText.Append(_L("WindowGroupId()")); 	
sl@0
   279
		break;
sl@0
   280
	case EWsWinOpEnableFocusChangeEvents:
sl@0
   281
		aText.Append(_L("EnableFocusChangeEvents()")); 	
sl@0
   282
		break;
sl@0
   283
	case EWsWinOpDisableFocusChangeEvents:
sl@0
   284
		aText.Append(_L("DisableFocusChangeEvents()")); 	
sl@0
   285
		break;
sl@0
   286
	default:
sl@0
   287
		decodeWindow(aText,aOpcode,aCmdData);
sl@0
   288
		break;
sl@0
   289
		}
sl@0
   290
	}
sl@0
   291
sl@0
   292
void TWsDecoder::DecodeClient(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData, TInt aHandle)
sl@0
   293
	{
sl@0
   294
	TWsClCmdUnion pData;
sl@0
   295
sl@0
   296
	aText.Format(_L("RWsSession[%d]::"),aHandle);
sl@0
   297
	pData.any=aCmdData;
sl@0
   298
	switch (aOpcode)
sl@0
   299
		{
sl@0
   300
	case EWsClOpDisconnect:
sl@0
   301
		aText.AppendFormat(LogClose);
sl@0
   302
		break;
sl@0
   303
	case EWsClOpSetHotKey:
sl@0
   304
		aText.AppendFormat(_L("SetHotKey(%u, %u, 0x%04x, 0x%04x)"),
sl@0
   305
										pData.SetHotKey->type,
sl@0
   306
										pData.SetHotKey->keycode,
sl@0
   307
										pData.SetHotKey->modifiers,
sl@0
   308
										pData.SetHotKey->modifierMask);
sl@0
   309
		break;
sl@0
   310
	case EWsClOpClearHotKeys:
sl@0
   311
		aText.AppendFormat(_L("ClearHotKeys(%d)"),*pData.UInt);
sl@0
   312
		break;
sl@0
   313
	case EWsClOpRestoreDefaultHotKey:
sl@0
   314
		aText.AppendFormat(_L("ResetDefaultHotKey(%d)"),*pData.UInt);
sl@0
   315
		break;
sl@0
   316
	case EWsClOpComputeMode:
sl@0
   317
		aText.AppendFormat(_L("ComputeMode(%u)"),*pData.UInt);
sl@0
   318
		break;
sl@0
   319
	case EWsClOpEventReady:
sl@0
   320
		aText.AppendFormat(_L("EventReady(TInt *stat)"));
sl@0
   321
		break;
sl@0
   322
	case EWsClOpRedrawReady:
sl@0
   323
		aText.AppendFormat(_L("RedrawReady(TInt *stat)"));
sl@0
   324
		break;
sl@0
   325
	case EWsClOpPriorityKeyReady:
sl@0
   326
		aText.AppendFormat(_L("PriorityKeyReady(TInt *stat)"));
sl@0
   327
		break;
sl@0
   328
	case EWsClOpEventReadyCancel:
sl@0
   329
		aText.AppendFormat(_L("EventReadyCancel()"));
sl@0
   330
		break;
sl@0
   331
	case EWsClOpRedrawReadyCancel:
sl@0
   332
		aText.AppendFormat(_L("RedrawReadyCancel()"));
sl@0
   333
		break;
sl@0
   334
	case EWsClOpPriorityKeyReadyCancel:
sl@0
   335
		aText.AppendFormat(_L("PriorityKeyReadyCancel()"));
sl@0
   336
		break;
sl@0
   337
	case EWsClOpGetEvent:
sl@0
   338
		aText.AppendFormat(_L("GetEvent(TWsEvent *aEvent)"));
sl@0
   339
		break;
sl@0
   340
	case EWsClOpGetRedraw:
sl@0
   341
		aText.AppendFormat(_L("GetRedraw(TWsRedrawEvent *aEvent)"));
sl@0
   342
		break;
sl@0
   343
	case EWsClOpGetPriorityKey:
sl@0
   344
		aText.AppendFormat(_L("GetPriorityKey(TWsPriorityKeyEvent *aEvent)"));
sl@0
   345
		break;
sl@0
   346
	case EWsClOpCreateWindow:
sl@0
   347
	case EWsClOpCreateGc:
sl@0
   348
	case EWsClOpCreateWindowGroup:
sl@0
   349
	case EWsClOpCreateAnimDll:
sl@0
   350
	case EWsClOpCreateScreenDevice:
sl@0
   351
	case EWsClOpCreateSprite:
sl@0
   352
	case EWsClOpCreatePointerCursor:
sl@0
   353
	case EWsClOpCreateBitmap:
sl@0
   354
	case EWsClOpCreateDirectScreenAccess:
sl@0
   355
	case EWsClOpCreateClick:
sl@0
   356
		switch(aOpcode)
sl@0
   357
			{
sl@0
   358
			case EWsClOpCreateWindow:
sl@0
   359
				aText.AppendFormat(_L("CreateWindow(%d,%x)"),hHandleToValue(pData.CreateWindow->parent),pData.CreateWindow->clientHandle);
sl@0
   360
				break;
sl@0
   361
			case EWsClOpCreateGc:
sl@0
   362
				aText.AppendFormat(_L("CreateGc()"));
sl@0
   363
				break;
sl@0
   364
			case EWsClOpCreateWindowGroup:
sl@0
   365
				aText.AppendFormat(_L("CreateWindowGroup(%x)"),pData.CreateWindow->clientHandle);
sl@0
   366
				break;
sl@0
   367
			case EWsClOpCreateAnimDll:
sl@0
   368
				TDebugLogTextHandler::Append(aText, _L("LoadAnimDll(\""));
sl@0
   369
				if (pData.LoadAnimDll && (pData.LoadAnimDll->length >= 0) && (pData.LoadAnimDll->length < LogTBufSize - 22))
sl@0
   370
					TDebugLogTextHandler::Append(aText, TPtrC((TText *)(pData.LoadAnimDll+1), pData.LoadAnimDll->length));
sl@0
   371
				else
sl@0
   372
					TDebugLogTextHandler::Append(aText, _L("<INVALID DESCRIPTOR>"));
sl@0
   373
				TDebugLogTextHandler::Append(aText, _L("\")"));
sl@0
   374
				break;
sl@0
   375
			case EWsClOpCreateScreenDevice:
sl@0
   376
				aText.AppendFormat(_L("CreateScreenDevice()"));
sl@0
   377
				break;
sl@0
   378
			case EWsClOpCreateSprite:
sl@0
   379
				aText.AppendFormat(_L("CreateSprite(...)"));
sl@0
   380
				break;
sl@0
   381
			case EWsClOpCreatePointerCursor:
sl@0
   382
				aText.AppendFormat(_L("CreatePointerCursor(...)"));
sl@0
   383
				break;
sl@0
   384
			case EWsClOpCreateBitmap:
sl@0
   385
				aText.AppendFormat(_L("CreateBitmap(...)"));
sl@0
   386
				break;
sl@0
   387
			case EWsClOpCreateDirectScreenAccess:
sl@0
   388
				aText.AppendFormat(_L("CreateDirectScreenAccess()"));
sl@0
   389
				break;
sl@0
   390
			case EWsClOpCreateClick:
sl@0
   391
				aText.AppendFormat(_L("CreateSoundPlugin()"));
sl@0
   392
				break;
sl@0
   393
			}
sl@0
   394
		break;
sl@0
   395
	case EWsClOpHeapCount:
sl@0
   396
		aText.AppendFormat(_L("HeapCount()"));
sl@0
   397
		break;
sl@0
   398
	case EWsClOpDebugInfo:
sl@0
   399
		aText.AppendFormat(_L("DebugInfo(%d,%d)"), pData.DebugInfo->iFunction, pData.DebugInfo->iParam);
sl@0
   400
		break;
sl@0
   401
	case EWsClOpDebugInfoReplyBuf:
sl@0
   402
		aText.AppendFormat(_L("DebugInfo(%d,%d,...)"), pData.DebugInfo->iFunction, pData.DebugInfo->iParam);
sl@0
   403
		break;
sl@0
   404
	case EWsClOpTestInvariant:
sl@0
   405
		aText.AppendFormat(_L("unimplemented opcode 'EWsClOpTestInvariant' (%u)"), aOpcode);
sl@0
   406
		break;
sl@0
   407
	case EWsClOpSetShadowVector:
sl@0
   408
		{
sl@0
   409
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
sl@0
   410
		aText.AppendFormat(_L("SetShadowVector(%S)"), &buf);
sl@0
   411
		break;
sl@0
   412
		}
sl@0
   413
	case EWsClOpShadowVector:
sl@0
   414
		aText.Append(_L("ShadowVector()"));
sl@0
   415
		break;
sl@0
   416
	case EWsClOpResourceCount:
sl@0
   417
		aText.Append(_L("ResourceCount()"));
sl@0
   418
		break;
sl@0
   419
	case EWsClOpSetKeyboardRepeatRate:
sl@0
   420
		aText.Append(_L("SetKeyboardRepeatRate(...,...)"));
sl@0
   421
		break;
sl@0
   422
	case EWsClOpGetKeyboardRepeatRate:
sl@0
   423
		aText.Append(_L("GetKeyboardRepeatRate(...,...)"));
sl@0
   424
		break;
sl@0
   425
	case EWsClOpSetDoubleClick:
sl@0
   426
		aText.AppendFormat(_L("SetDoubleClickSettings(...,%d)"), pData.SetDoubleClick->distance);
sl@0
   427
		break;
sl@0
   428
	case EWsClOpGetDoubleClickSettings:
sl@0
   429
		aText.Append(_L("GetDoubleClickSettings(...,...)"));
sl@0
   430
		break;
sl@0
   431
	case EWsClOpHeapSetFail:
sl@0
   432
		aText.AppendFormat(_L("HeapSetFail(%d, %d)"), pData.HeapSetFail->type, pData.HeapSetFail->value);
sl@0
   433
		break;
sl@0
   434
	case EWsClOpNumWindowGroups:
sl@0
   435
		aText.AppendFormat(_L("NumWindowGroups(%d)"),*pData.UInt);
sl@0
   436
		break;
sl@0
   437
	case EWsClOpNumWindowGroupsAllPriorities:
sl@0
   438
		aText.Append(_L("NumWindowGroups()"));
sl@0
   439
		break;
sl@0
   440
	case EWsClOpWindowGroupList:
sl@0
   441
		aText.AppendFormat(_L("WindowGroupList(...,%d,%d)"),pData.WindowGroupList->priority, pData.WindowGroupList->count);
sl@0
   442
		break;
sl@0
   443
	case EWsClOpWindowGroupListAllPriorities:
sl@0
   444
		aText.AppendFormat(_L("WindowGroupList(...,%d)"),pData.WindowGroupList->count);
sl@0
   445
		break;
sl@0
   446
	case EWsClOpGetFocusWindowGroup:
sl@0
   447
		aText.AppendFormat(_L("GetFocusWindowGroup(%d, ...)"), *pData.UInt);
sl@0
   448
		break;
sl@0
   449
	case EWsClOpGetDefaultOwningWindow:
sl@0
   450
		aText.Append(_L("GetDefaultOwningWindow()"));
sl@0
   451
		break;
sl@0
   452
	case EWsClOpSetWindowGroupOrdinalPosition:
sl@0
   453
		aText.AppendFormat(_L("SetWindowGroupOrdinalPosition(%d, %d)"),
sl@0
   454
							pData.SetWindowGroupOrdinalPosition->identifier,
sl@0
   455
							pData.SetWindowGroupOrdinalPosition->position);
sl@0
   456
		break;
sl@0
   457
	case EWsClOpGetWindowGroupHandle:
sl@0
   458
		aText.AppendFormat(_L("GetWindowGroupHandle(%d)"),*pData.Int);
sl@0
   459
		break;
sl@0
   460
	case EWsClOpGetWindowGroupOrdinalPriority:
sl@0
   461
		aText.AppendFormat(_L("GetWindowGroupOrdinalPriority(%d)"),*pData.Int);
sl@0
   462
		break;
sl@0
   463
	case EWsClOpGetWindowGroupClientThreadId:
sl@0
   464
		aText.AppendFormat(_L("GetWindowGroupClientThreadId(%d)"),*pData.Int);
sl@0
   465
		break;
sl@0
   466
	case EWsClOpGetWindowGroupNameFromIdentifier:
sl@0
   467
		aText.AppendFormat(_L("GetWindowGroupNameFromIdentifier(%d)"),pData.GetWindowGroupNameFromIdentifier->identifier);
sl@0
   468
		break;
sl@0
   469
	case EWsClOpFindWindowGroupIdentifier:
sl@0
   470
		aText.AppendFormat(_L("FindWindowGroupIdentifier(%d,...,%d)"),pData.FindWindowGroupIdentifier->identifier,
sl@0
   471
						pData.FindWindowGroupIdentifier->offset);
sl@0
   472
		break;
sl@0
   473
	case EWsClOpFindWindowGroupIdentifierThread:
sl@0
   474
		aText.AppendFormat(_L("FindWindowGroupIdentifier(%d,0x%x)"),pData.FindWindowGroupIdentifierThread->identifier,
sl@0
   475
						pData.FindWindowGroupIdentifierThread->threadId.Id());
sl@0
   476
		break;
sl@0
   477
	case EWsClOpSendMessageToWindowGroup:
sl@0
   478
		aText.AppendFormat(_L("SendMessageToWindowGroup(0x%x,0x%x,...)"),pData.SendMessageToWindowGroup->identifierOrPriority,
sl@0
   479
						pData.SendMessageToWindowGroup->uid, pData.SendMessageToWindowGroup->dataLength);
sl@0
   480
		break;
sl@0
   481
	case EWsClOpSendMessageToAllWindowGroups:
sl@0
   482
		aText.AppendFormat(_L("SendMessageToAllWindowGroups(0x%x,...)"),pData.SendMessageToWindowGroup->uid, pData.SendMessageToWindowGroup->dataLength);
sl@0
   483
		break;
sl@0
   484
	case EWsClOpSendMessageToAllWindowGroupsPriority:
sl@0
   485
		aText.AppendFormat(_L("SendMessageToAllWindowGroups(%d,0x%x,...)"),pData.SendMessageToWindowGroup->identifierOrPriority,
sl@0
   486
						pData.SendMessageToWindowGroup->uid, pData.SendMessageToWindowGroup->dataLength);
sl@0
   487
		break;
sl@0
   488
	case EWsClOpFetchMessage:
sl@0
   489
		aText.AppendFormat(_L("FetchMessage(...)"));
sl@0
   490
		break;
sl@0
   491
	case EWsClOpSetSystemPointerCursor:
sl@0
   492
		aText.AppendFormat(_L("SetSystemPointerCursor(...,%d)"), pData.SetSystemPointerCursor->number);
sl@0
   493
		break;
sl@0
   494
	case EWsClOpClearSystemPointerCursor:
sl@0
   495
		aText.AppendFormat(_L("ClearSystemPointerCursor(%d)"), *pData.UInt);
sl@0
   496
		break;
sl@0
   497
	case EWsClOpClaimSystemPointerCursorList:
sl@0
   498
		aText.Append(_L("ClaimSystemPointerCursorList()"));
sl@0
   499
		break;
sl@0
   500
	case EWsClOpFreeSystemPointerCursorList:
sl@0
   501
		aText.Append(_L("FreeSystemPointerCursorList()"));
sl@0
   502
		break;
sl@0
   503
	case EWsClOpLogMessage:
sl@0
   504
		aText.Append(_L("LogMessage(...)"));
sl@0
   505
		break;
sl@0
   506
	case EWsClOpPasswordEntered:
sl@0
   507
		aText.Append(_L("PasswordEntered()"));
sl@0
   508
		break;
sl@0
   509
	case EWsClOpPurgePointerEvents:
sl@0
   510
		aText.Append(_L("PurgePointerEvents()"));
sl@0
   511
		break;
sl@0
   512
	case EWsClOpRawEvent:
sl@0
   513
		aText.AppendFormat(_L("SimulateRawEvent(%d,%d,{{%d,%d},%d})"),((TRawEventX *)pData.RawEvent)->Type(),
sl@0
   514
								((TRawEventX *)pData.RawEvent)->Ticks(),((TRawEventX *)pData.RawEvent)->posx(),
sl@0
   515
								((TRawEventX *)pData.RawEvent)->posy(),((TRawEventX *)pData.RawEvent)->scanCode());
sl@0
   516
		break;
sl@0
   517
	case EWsClOpSendEventToWindowGroup:
sl@0
   518
		aText.AppendFormat(_L("SendEventToWindowGroup(%d,"),pData.SendEventToWindowGroup->parameter);
sl@0
   519
		aText.Append(eventDetails(&pData.SendEventToWindowGroup->event));
sl@0
   520
		aText.Append(LogCloseBracket);
sl@0
   521
		break;
sl@0
   522
	case EWsClOpSetModifierState:
sl@0
   523
		aText.AppendFormat(_L("SetModifierState(%d,%d)"), pData.SetModifierState->modifier, pData.SetModifierState->state);
sl@0
   524
		break;
sl@0
   525
	case EWsClOpGetModifierState:
sl@0
   526
		aText.Append(_L("GetModifierState()"));
sl@0
   527
		break;
sl@0
   528
	case EWsClOpSendOffEventsToShell:
sl@0
   529
		{
sl@0
   530
		_LIT(LogClientSendOffEventsToShell,"RequestOffEvents(%u,%d)");
sl@0
   531
		aText.AppendFormat(LogClientSendOffEventsToShell
sl@0
   532
										,pData.OffEventsToShell->on,hHandleToValue(pData.OffEventsToShell->window));
sl@0
   533
		}
sl@0
   534
		break;
sl@0
   535
	case EWsClOpGetDefModeMaxNumColors:
sl@0
   536
		{
sl@0
   537
		_LIT(LogClientGetDefModeMaxNumColors,"GetDefModeMaxNumColors()");
sl@0
   538
		aText.Append(LogClientGetDefModeMaxNumColors);
sl@0
   539
		}
sl@0
   540
		break;
sl@0
   541
	case EWsClOpGetColorModeList:
sl@0
   542
		{
sl@0
   543
		_LIT(LogClientGetColorModeList,"GetColorModeList()");
sl@0
   544
		aText.Append(LogClientGetColorModeList);
sl@0
   545
		}
sl@0
   546
		break;
sl@0
   547
	case EWsClOpKeyEvent:
sl@0
   548
		{
sl@0
   549
		_LIT(LogClientKeyEvent,"SimulateKeyEvent(%d)");
sl@0
   550
		aText.AppendFormat(LogClientKeyEvent,pData.KeyEvent->iCode);
sl@0
   551
		}
sl@0
   552
		break;
sl@0
   553
	case EWsClOpSendEventToAllWindowGroup:
sl@0
   554
		{
sl@0
   555
		_LIT(LogClientSendEventToAllWindowGroups,"SendEventToAllWindowGroups(");
sl@0
   556
		aText.Append(LogClientSendEventToAllWindowGroups);
sl@0
   557
		aText.Append(eventDetails(&pData.SendEventToWindowGroup->event));
sl@0
   558
		aText.Append(LogCloseBracket);
sl@0
   559
		}
sl@0
   560
		break;
sl@0
   561
	case EWsClOpSendEventToAllWindowGroupPriority:
sl@0
   562
		{
sl@0
   563
		_LIT(LogClientSendEventToAllWindowGroupPriority,"SendEventToAllWindowGroups(%d,");
sl@0
   564
		aText.AppendFormat(LogClientSendEventToAllWindowGroupPriority,pData.SendEventToWindowGroup->parameter);
sl@0
   565
		aText.Append(eventDetails(&pData.SendEventToWindowGroup->event));
sl@0
   566
		aText.Append(LogCloseBracket);
sl@0
   567
		}
sl@0
   568
		break;
sl@0
   569
	case EWsClOpSetPointerCursorArea:
sl@0
   570
		{
sl@0
   571
		TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.SetPointerCursorArea->area));
sl@0
   572
		_LIT(LogClientSetPointerCursorArea,"SetPointerCursorArea(%d,%S)");
sl@0
   573
		aText.AppendFormat(LogClientSetPointerCursorArea,pData.SetPointerCursorArea->mode,&buf);
sl@0
   574
		}
sl@0
   575
		break;
sl@0
   576
	case EWsClOpPointerCursorArea:
sl@0
   577
		{
sl@0
   578
		_LIT(LogClientPointerCursorArea,"PointerCursorArea(%d)");
sl@0
   579
		aText.AppendFormat(LogClientPointerCursorArea,*pData.Int);
sl@0
   580
		}
sl@0
   581
		break;
sl@0
   582
	case EWsClOpSetPointerCursorMode:
sl@0
   583
		{
sl@0
   584
		_LIT(LogClientSetPointerCursorMode,"SetPointerCursorMode(%d)");
sl@0
   585
		aText.AppendFormat(LogClientSetPointerCursorMode,*pData.Mode);
sl@0
   586
		}
sl@0
   587
		break;
sl@0
   588
	case EWsClOpPointerCursorMode:
sl@0
   589
		{
sl@0
   590
		_LIT(LogClientPointerCursorMode,"PointerCursorMode()");
sl@0
   591
		aText.Append(LogClientPointerCursorMode);
sl@0
   592
		}
sl@0
   593
		break;
sl@0
   594
	case EWsClOpSetDefaultSystemPointerCursor:
sl@0
   595
		{
sl@0
   596
		_LIT(LogClientSetDefaultSystemPointerCursor,"SetDefaultSystemPointerCursor(%d)");
sl@0
   597
		aText.AppendFormat(LogClientSetDefaultSystemPointerCursor,*pData.Int);
sl@0
   598
		}
sl@0
   599
		break;
sl@0
   600
	case EWsClOpClearDefaultSystemPointerCursor:
sl@0
   601
		{
sl@0
   602
		_LIT(LogClientClearDefaultSystemPointerCursor,"ClearDefaultSystemPointerCursor()");
sl@0
   603
		aText.Append(LogClientClearDefaultSystemPointerCursor);
sl@0
   604
		}
sl@0
   605
		break;
sl@0
   606
	case EWsClOpSetPointerCursorPosition:
sl@0
   607
		{
sl@0
   608
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
sl@0
   609
		_LIT(LogClientSetPointerCursorPosition,"SetPointerCursorPosition(%S)");
sl@0
   610
		aText.AppendFormat(LogClientSetPointerCursorPosition,&buf);
sl@0
   611
		}
sl@0
   612
		break;
sl@0
   613
	case EWsClOpPointerCursorPosition:
sl@0
   614
		{
sl@0
   615
		_LIT(LogClientPointerCursorPosition,"PointerCursorPosition()");
sl@0
   616
		aText.Append(LogClientPointerCursorPosition);
sl@0
   617
		}
sl@0
   618
		break;
sl@0
   619
	case EWsClOpSetDefaultFadingParams:
sl@0
   620
		{
sl@0
   621
		_LIT(LogClientSetDefaultFadingParams,"SetDefaultFadingParameters(%d,%d)");
sl@0
   622
		aText.AppendFormat(LogClientSetDefaultFadingParams
sl@0
   623
								,WservEncoding::ExtractFirst8BitValue(*pData.UInt),WservEncoding::ExtractSecond8BitValue(*pData.UInt));
sl@0
   624
		}
sl@0
   625
		break;
sl@0
   626
	case EWsClOpPrepareForSwitchOff:
sl@0
   627
		{
sl@0
   628
		_LIT(LogClientPrepareForSwitchOff,"PrepareForSwitchOff()");
sl@0
   629
		aText.Append(LogClientPrepareForSwitchOff);
sl@0
   630
		}
sl@0
   631
		break;
sl@0
   632
	case EWsClOpSetFaded:
sl@0
   633
		{
sl@0
   634
		_LIT(LogWinSetFade,"SetSystemFade(%d");
sl@0
   635
		aText.AppendFormat(LogWinSetFade,pData.SetSystemFaded->Faded());
sl@0
   636
		if (!pData.SetSystemFaded->UseDefaultMap())
sl@0
   637
			{
sl@0
   638
			_LIT(LogWinSetFade2,",%d,%d");
sl@0
   639
			TUint8 blackMap;
sl@0
   640
			TUint8 whiteMap;
sl@0
   641
			pData.SetSystemFaded->GetFadingParams(blackMap,whiteMap);
sl@0
   642
			aText.AppendFormat(LogWinSetFade2,blackMap,whiteMap);
sl@0
   643
			}
sl@0
   644
		aText.Append(LogCloseBracket);
sl@0
   645
		}
sl@0
   646
		break;
sl@0
   647
	case EWsClOpLogCommand:
sl@0
   648
		{
sl@0
   649
		_LIT(LogClientLogCommand,"LogCommand(%d)");
sl@0
   650
		aText.AppendFormat(LogClientLogCommand,*pData.UInt);
sl@0
   651
		}
sl@0
   652
		break;
sl@0
   653
	case EWsClOpSendEventToOneWindowGroupPerClient:
sl@0
   654
		{
sl@0
   655
		_LIT(LogClientSendEventToOneWindowGroupPerClient,"SendEventToOneWindowGroupsPerClient(");
sl@0
   656
		aText.Append(LogClientSendEventToOneWindowGroupPerClient);
sl@0
   657
		aText.Append(eventDetails(&pData.SendEventToWindowGroup->event));
sl@0
   658
		aText.Append(LogCloseBracket);
sl@0
   659
		}
sl@0
   660
		break;
sl@0
   661
	case EWsClOpStartSetCustomTextCursor:
sl@0
   662
		{
sl@0
   663
		_LIT(LogClientStartSetCustomTextCursor,"StartSetCustomTextCursorL(id=0x%08x, flags=0x%08x, align=%d)");
sl@0
   664
		aText.AppendFormat(LogClientStartSetCustomTextCursor, pData.CustomTextCursorData->identifier, pData.CustomTextCursorData->flags, pData.CustomTextCursorData->alignment);
sl@0
   665
		}
sl@0
   666
		break;
sl@0
   667
	case EWsClOpCompleteSetCustomTextCursor:
sl@0
   668
		{
sl@0
   669
		_LIT(LogClientCompleteSetCustomTextCursor,"CompleteSetCustomTextCursorL(err=%d)");
sl@0
   670
		aText.AppendFormat(LogClientCompleteSetCustomTextCursor, *pData.Int);
sl@0
   671
		}
sl@0
   672
		break;
sl@0
   673
#if defined(__WINS__)
sl@0
   674
	case EWsClOpRemoveKeyCode:
sl@0
   675
		{
sl@0
   676
		_LIT(LogClientRemoveKeyCode,"RemoveKeyCode(%d)");
sl@0
   677
		aText.AppendFormat(LogClientRemoveKeyCode,*pData.UInt);
sl@0
   678
		}
sl@0
   679
		break;
sl@0
   680
	case EWsClOpSimulateXyInput:
sl@0
   681
		{
sl@0
   682
		_LIT(LogClientSimulateXyInput,"SimulateXyInputType(%d)");
sl@0
   683
		aText.AppendFormat(LogClientSimulateXyInput,*pData.UInt);
sl@0
   684
		}
sl@0
   685
		break;
sl@0
   686
#endif
sl@0
   687
	case EWsClOpSetBackgroundColor:
sl@0
   688
		{		
sl@0
   689
		TShortBuf buf(TDebugLogTextHandler::FormatRgb(*pData.rgb));
sl@0
   690
		_LIT(LogClientSetBackgroundColor,"SetBackgroundColor(%S)");
sl@0
   691
		aText.AppendFormat(LogClientSetBackgroundColor,&buf);
sl@0
   692
		}
sl@0
   693
		break;
sl@0
   694
	case EWsClOpGetBackgroundColor:
sl@0
   695
		{		
sl@0
   696
		_LIT(LogClientGetBackgroundColor,"GetBackgroundColor()");
sl@0
   697
		aText.AppendFormat(LogClientGetBackgroundColor);
sl@0
   698
		}
sl@0
   699
		break;
sl@0
   700
	case EWsClOpSystemInfo:
sl@0
   701
		{		
sl@0
   702
		_LIT(LogClientSystemInfo,"SystemInfo(%d, SSystemInfo &aSystemInfo)");
sl@0
   703
		aText.AppendFormat(LogClientSystemInfo, *pData.UInt);
sl@0
   704
		}
sl@0
   705
		break;
sl@0
   706
	case EWsClOpSetFocusScreen:
sl@0
   707
		{		
sl@0
   708
		_LIT(LogClientSetFocusScreen,"SetFocusScreen(%d)");
sl@0
   709
		aText.AppendFormat(LogClientSetFocusScreen, *pData.UInt);
sl@0
   710
		}
sl@0
   711
		break;
sl@0
   712
	case EWsClOpGetFocusScreen:
sl@0
   713
		{		
sl@0
   714
		_LIT(LogClientGetFocusScreen,"GetFocusScreen()");
sl@0
   715
		aText.AppendFormat(LogClientGetFocusScreen);
sl@0
   716
		}
sl@0
   717
		break;
sl@0
   718
	case EWsClOpWindowGroupListAndChain:
sl@0
   719
		{		
sl@0
   720
		_LIT(LogClientWindowGroupListAndChain,"WindowGroupList(%d, RArray<TWindowGroupChainInfo>* aWindowList)");
sl@0
   721
		aText.AppendFormat(LogClientWindowGroupListAndChain, *pData.UInt);
sl@0
   722
		}
sl@0
   723
		break;
sl@0
   724
	case EWsClOpWindowGroupListAndChainAllPriorities:
sl@0
   725
		{		
sl@0
   726
		_LIT(LogClientWindowGroupListAndChainAllPriorities,"WindowGroupListAndChainAllPriorities(RArray<TWindowGroupChainInfo>* aWindowList)");
sl@0
   727
		aText.AppendFormat(LogClientWindowGroupListAndChainAllPriorities);
sl@0
   728
		}
sl@0
   729
		break;
sl@0
   730
	case EWsClOpSetClientCursorMode:
sl@0
   731
		{		
sl@0
   732
		_LIT(LogClientSetClientCursorMode,"SetClientCursorMode(%d)");
sl@0
   733
		aText.AppendFormat(LogClientSetClientCursorMode, *pData.UInt);
sl@0
   734
		}
sl@0
   735
		break;
sl@0
   736
	case EWsClOpClearAllRedrawStores:
sl@0
   737
		{		
sl@0
   738
		_LIT(LogClientClearAllRedrawStores,"ClearAllRedrawStores()");
sl@0
   739
		aText.AppendFormat(LogClientClearAllRedrawStores);
sl@0
   740
		}
sl@0
   741
		break;
sl@0
   742
	case EWsClOpGraphicMessageReady:
sl@0
   743
		{		
sl@0
   744
		_LIT(LogClientGraphicMessageReady,"GraphicMessageReady(%d)");
sl@0
   745
		aText.AppendFormat(LogClientGraphicMessageReady, *pData.UInt);	
sl@0
   746
		}
sl@0
   747
		break;
sl@0
   748
	case EWsClOpGetGraphicMessage:
sl@0
   749
		{		
sl@0
   750
		_LIT(LogClientGraphicMessage,"GetGraphicMessage(%d)");
sl@0
   751
		aText.AppendFormat(LogClientGraphicMessage, *pData.UInt);	
sl@0
   752
		}
sl@0
   753
		break;
sl@0
   754
	case EWsClOpGraphicMessageCancel:
sl@0
   755
		{		
sl@0
   756
		_LIT(LogClientGraphicMessageCancel,"GraphicMessageCancel()");
sl@0
   757
		aText.AppendFormat(LogClientGraphicMessageCancel);	
sl@0
   758
		}
sl@0
   759
		break;		
sl@0
   760
	case EWsClOpNumWindowGroupsOnScreen:
sl@0
   761
		{		
sl@0
   762
		_LIT(LogClientNumWindowGroupsOnScreen,"NumWindowGroups(%d, %d)");
sl@0
   763
		aText.AppendFormat(LogClientNumWindowGroupsOnScreen, pData.NumWinGroups->screenNumber, pData.NumWinGroups->priority);
sl@0
   764
		}
sl@0
   765
		break;
sl@0
   766
	case EWsClOpGetNumberOfScreens:
sl@0
   767
		{		
sl@0
   768
		_LIT(LogClientGetNumberOfScreens,"NumberOfScreens()");
sl@0
   769
		aText.AppendFormat(LogClientGetNumberOfScreens);		
sl@0
   770
		}
sl@0
   771
		break;
sl@0
   772
	case EWsClOpNoFlickerFree:
sl@0
   773
		{		
sl@0
   774
		_LIT(LogNoFlickerFree,"EWsClOpNoFlickerFree enum");
sl@0
   775
		aText.AppendFormat(LogNoFlickerFree);		
sl@0
   776
		}
sl@0
   777
		break;
sl@0
   778
	case EWsClOpCreateGraphic:
sl@0
   779
		{		
sl@0
   780
		_LIT(LogCreateGraphic,"EWsClOpCreateGraphic enum");
sl@0
   781
		aText.AppendFormat(LogCreateGraphic);		
sl@0
   782
		}
sl@0
   783
		break;
sl@0
   784
	case EWsClOpRegisterSurface:
sl@0
   785
		{
sl@0
   786
		TInt screenNumber = pData.SurfaceRegister->screenNumber;
sl@0
   787
		const TSurfaceId& surfaceId = pData.SurfaceRegister->surfaceId;
sl@0
   788
		
sl@0
   789
		_LIT(LogRegisterSurface,"RegisterSurface(aScreenNumber(%d), TSurfaceId{%x,%x,%x,%x})");
sl@0
   790
		aText.AppendFormat(LogRegisterSurface, screenNumber, surfaceId.iInternal[0], surfaceId.iInternal[1], surfaceId.iInternal[2], surfaceId.iInternal[3]);
sl@0
   791
		}
sl@0
   792
		break;
sl@0
   793
	case EWsClOpUnregisterSurface:
sl@0
   794
		{
sl@0
   795
		TInt screenNumber = pData.SurfaceRegister->screenNumber;
sl@0
   796
		const TSurfaceId& surfaceId = pData.SurfaceRegister->surfaceId;
sl@0
   797
		
sl@0
   798
		_LIT(LogUnregisterSurface,"UnregisterSurface(aScreenNumber(%d), TSurfaceId{%x,%x,%x,%x})");
sl@0
   799
		aText.AppendFormat(LogUnregisterSurface, screenNumber, surfaceId.iInternal[0], surfaceId.iInternal[1], surfaceId.iInternal[2], surfaceId.iInternal[3]);
sl@0
   800
		}
sl@0
   801
		break;
sl@0
   802
	case EWsClOpSetCloseProximityThresholds:
sl@0
   803
		{
sl@0
   804
		_LIT(LogSetCloseProximityThresholds,"SetCloseProximityThresholds(%d, %d)");
sl@0
   805
		aText.AppendFormat(LogSetCloseProximityThresholds, pData.ZThresholdPair->enterThreshold, pData.ZThresholdPair->exitThreshold);
sl@0
   806
		}
sl@0
   807
		break;	
sl@0
   808
	case EWsClOpSetHighPressureThresholds:
sl@0
   809
		{
sl@0
   810
		_LIT(LogSetHighPressureThresholds,"SetHighPressureThresholds(%d, %d)");
sl@0
   811
		aText.AppendFormat(LogSetHighPressureThresholds, pData.ZThresholdPair->enterThreshold, pData.ZThresholdPair->exitThreshold);	
sl@0
   812
		}
sl@0
   813
		break;
sl@0
   814
	case EWsClOpGetEnterCloseProximityThreshold:
sl@0
   815
		{		
sl@0
   816
		_LIT(LogGetEnterCloseProximityThreshold,"EWsClOpGetEnterCloseProximityThreshold()");
sl@0
   817
		aText.AppendFormat(LogGetEnterCloseProximityThreshold);		
sl@0
   818
		}
sl@0
   819
		break;	
sl@0
   820
	case EWsClOpGetExitCloseProximityThreshold:
sl@0
   821
		{		
sl@0
   822
		_LIT(LogGetExitCloseProximityThreshold,"EWsClOpGetExitCloseProximityThreshold()");
sl@0
   823
		aText.AppendFormat(LogGetExitCloseProximityThreshold);		
sl@0
   824
		}
sl@0
   825
		break;
sl@0
   826
	case EWsClOpGetEnterHighPressureThreshold:
sl@0
   827
		{		
sl@0
   828
		_LIT(LogGetEnterHighPressureThreshold,"EWsClOpGetEnterHighPressureThreshold()");
sl@0
   829
		aText.AppendFormat(LogGetEnterHighPressureThreshold);		
sl@0
   830
		}
sl@0
   831
		break;	
sl@0
   832
	case EWsClOpGetExitHighPressureThreshold:
sl@0
   833
		{		
sl@0
   834
		_LIT(LogGetExitHighPressureThreshold,"EWsClOpGetExitHighPressureThreshold()");
sl@0
   835
		aText.AppendFormat(LogGetExitHighPressureThreshold);		
sl@0
   836
		}
sl@0
   837
		break;
sl@0
   838
	case EWsClOpIndicateAppOrientation:
sl@0
   839
	    {
sl@0
   840
        _LIT(LogIndicateAppOrientation,"EWsClOpIndicateAppOrientation(%d)");
sl@0
   841
        aText.AppendFormat(LogIndicateAppOrientation, *pData.Orientation);       	    
sl@0
   842
	    }
sl@0
   843
	    break;
sl@0
   844
	case EWsClOpLastEnumValue:
sl@0
   845
		{		
sl@0
   846
		_LIT(LogLastEnumValue,"EWsClOpLastEnumValue enum");
sl@0
   847
		aText.AppendFormat(LogLastEnumValue);		
sl@0
   848
		}
sl@0
   849
		break;
sl@0
   850
	default:
sl@0
   851
		UnKnownOpcode(aText, aOpcode);
sl@0
   852
		break;
sl@0
   853
		}
sl@0
   854
	}
sl@0
   855
sl@0
   856
void TWsDecoder::DecodeWindow(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData, TInt aHandle)
sl@0
   857
	{
sl@0
   858
	_LIT(LogWindow,"RWindow[%d]::");
sl@0
   859
	aText.Format(LogWindow,aHandle);
sl@0
   860
	decodeWindow(aText,aOpcode,aCmdData);
sl@0
   861
	}
sl@0
   862
sl@0
   863
void TWsDecoder::decodeWindow(TBuf<LogTBufSize> &aText,TInt aOpcode,const TAny *aData)
sl@0
   864
	{
sl@0
   865
	TWsWinCmdUnion pData;
sl@0
   866
	pData.any=aData;
sl@0
   867
	switch (aOpcode)
sl@0
   868
		{
sl@0
   869
	case EWsWinOpFree:
sl@0
   870
		aText.AppendFormat(LogClose);
sl@0
   871
		break;
sl@0
   872
	case EWsWinOpSetExtent:
sl@0
   873
		{
sl@0
   874
		TShortBuf buf1(TDebugLogTextHandler::FormatPoint(pData.SetEx->pos));
sl@0
   875
		TShortBuf buf2(TDebugLogTextHandler::FormatSize(pData.SetEx->size));
sl@0
   876
		aText.AppendFormat(_L("SetExtent(%S, %S)"), &buf1, &buf2);
sl@0
   877
		}
sl@0
   878
		break;
sl@0
   879
	case EWsWinOpSetExtentErr:
sl@0
   880
		{
sl@0
   881
		TShortBuf buf1(TDebugLogTextHandler::FormatPoint(pData.SetEx->pos));
sl@0
   882
		TShortBuf buf2(TDebugLogTextHandler::FormatSize(pData.SetEx->size));
sl@0
   883
		aText.AppendFormat(_L("SetExtentError(%S, %S)"), &buf1, &buf2);
sl@0
   884
		}
sl@0
   885
		break;
sl@0
   886
	case EWsWinOpOrdinalPosition:
sl@0
   887
		aText.AppendFormat(_L("OrdinalPosition()"));
sl@0
   888
		break;
sl@0
   889
	case EWsWinOpFullOrdinalPosition:
sl@0
   890
		aText.AppendFormat(_L("FullOrdinalPosition()"));
sl@0
   891
		break;
sl@0
   892
	case EWsWinOpSetOrdinalPosition:
sl@0
   893
		aText.AppendFormat(_L("SetOrdinalPosition(%d)"),*pData.Int);
sl@0
   894
		break;
sl@0
   895
	case EWsWinOpSetOrdinalPositionPri:
sl@0
   896
		aText.AppendFormat(_L("SetOrdinalPosition(%d,%d)"), pData.OrdinalPos->pos, pData.OrdinalPos->ordinalPriority);
sl@0
   897
		break;
sl@0
   898
	case EWsWinOpSetPos:
sl@0
   899
		{
sl@0
   900
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.pos));
sl@0
   901
		aText.AppendFormat(_L("SetPosition(%S)"),&buf);
sl@0
   902
		}
sl@0
   903
		break;
sl@0
   904
	case EWsWinOpSetSizeErr:
sl@0
   905
		{
sl@0
   906
		TShortBuf buf(TDebugLogTextHandler::FormatSize(*pData.size));
sl@0
   907
		aText.AppendFormat(_L("SetSizeErr(%S)"), &buf);
sl@0
   908
		}
sl@0
   909
		break;
sl@0
   910
	case EWsWinOpSetSize:
sl@0
   911
		{
sl@0
   912
		TShortBuf buf(TDebugLogTextHandler::FormatSize(*pData.size));
sl@0
   913
		aText.AppendFormat(_L("SetSize(%S)"), &buf);
sl@0
   914
		}
sl@0
   915
		break;
sl@0
   916
	case EWsWinOpPosition:
sl@0
   917
		aText.AppendFormat(_L("Position()"));
sl@0
   918
		break;
sl@0
   919
	case EWsWinOpAbsPosition:
sl@0
   920
		aText.AppendFormat(_L("AbsPosition()"));
sl@0
   921
		break;
sl@0
   922
	case EWsWinOpSize:
sl@0
   923
		aText.AppendFormat(_L("Size()"));
sl@0
   924
		break;
sl@0
   925
	case EWsWinOpActivate:
sl@0
   926
		aText.AppendFormat(_L("Activate()"));
sl@0
   927
		break;
sl@0
   928
	case EWsWinOpInvalidate:
sl@0
   929
		{
sl@0
   930
		TLongBuf buf(TDebugLogTextHandler::FormatRect(*pData.rect));
sl@0
   931
		aText.AppendFormat(_L("Invalidate(%S)"), &buf);
sl@0
   932
		}
sl@0
   933
		break;
sl@0
   934
	case EWsWinOpInvalidateFull:
sl@0
   935
		aText.AppendFormat(_L("Invalidate()"));
sl@0
   936
		break;
sl@0
   937
	case EWsWinOpBeginRedraw:
sl@0
   938
		{
sl@0
   939
		TLongBuf buf(TDebugLogTextHandler::FormatRect(*pData.rect));
sl@0
   940
		aText.AppendFormat(_L("BeginRedraw(%S)"), &buf);
sl@0
   941
		}
sl@0
   942
		break;
sl@0
   943
	case EWsWinOpBeginRedrawFull:
sl@0
   944
		aText.AppendFormat(_L("BeginRedraw()"));
sl@0
   945
		break;
sl@0
   946
	case EWsWinOpEndRedraw:
sl@0
   947
		aText.AppendFormat(_L("EndRedraw()"));
sl@0
   948
		break;
sl@0
   949
	case EWsWinOpTestInvariant:
sl@0
   950
		aText.AppendFormat(_L("__TestInvariant()"));
sl@0
   951
		break;
sl@0
   952
	case EWsWinOpParent:
sl@0
   953
		aText.AppendFormat(_L("Parent()"));
sl@0
   954
		break;
sl@0
   955
	case EWsWinOpNextSibling:
sl@0
   956
		aText.AppendFormat(_L("NextSibling()"));
sl@0
   957
		break;
sl@0
   958
	case EWsWinOpPrevSibling:
sl@0
   959
		aText.AppendFormat(_L("PrevSibling()"));
sl@0
   960
		break;
sl@0
   961
	case EWsWinOpChild:
sl@0
   962
		aText.AppendFormat(_L("Child()"));
sl@0
   963
		break;
sl@0
   964
	case EWsWinOpInquireOffset:
sl@0
   965
		aText.AppendFormat(_L("InquireOffset(%d)"),hHandleToValue(*pData.UInt));
sl@0
   966
		break;
sl@0
   967
	case EWsWinOpPointerFilter:
sl@0
   968
		aText.AppendFormat(_L("PointerFilter(0x%08x)"), *pData.UInt);
sl@0
   969
		break;
sl@0
   970
	case EWsWinOpSetPointerCapture:
sl@0
   971
		aText.AppendFormat(_L("SetPointerCapture(%u)"), *pData.UInt);
sl@0
   972
		break;
sl@0
   973
	case EWsWinOpSetPointerGrab:
sl@0
   974
		aText.AppendFormat(_L("SetPointerGrab(%u)"), *pData.UInt);
sl@0
   975
		break;
sl@0
   976
	case EWsWinOpSetNoBackgroundColor:
sl@0
   977
		aText.Append(_L("SetBackgroundColor()"));
sl@0
   978
		break;
sl@0
   979
	case EWsWinOpSetBackgroundColor:
sl@0
   980
		{
sl@0
   981
		TLongBuf buf(TDebugLogTextHandler::FormatRgb(*pData.rgb));
sl@0
   982
		aText.AppendFormat(_L("SetBackgroundColor(%S)"), &buf);
sl@0
   983
		}
sl@0
   984
		break;
sl@0
   985
	case EWsWinOpSetColor:
sl@0
   986
		{
sl@0
   987
		TLongBuf buf(TDebugLogTextHandler::FormatRgb(*pData.rgb));
sl@0
   988
		aText.AppendFormat(_L("SetColor(%S)"), &buf);
sl@0
   989
		}
sl@0
   990
		break;
sl@0
   991
	case EWsWinOpSetShadowHeight:
sl@0
   992
		aText.AppendFormat(_L("SetShadowHeight(%d)"), *pData.Int);
sl@0
   993
		break;
sl@0
   994
	case EWsWinOpShadowDisabled:
sl@0
   995
		{
sl@0
   996
		TShortBuf buf(TDebugLogTextHandler::FormatBool(*pData.Bool));
sl@0
   997
		aText.AppendFormat(_L("SetShadowDisabled(%S)"), &buf);
sl@0
   998
		}
sl@0
   999
		break;
sl@0
  1000
	case EWsWinOpSetVisible:
sl@0
  1001
		{
sl@0
  1002
		TShortBuf buf(TDebugLogTextHandler::FormatBool(*pData.Bool));
sl@0
  1003
		aText.AppendFormat(_L("SetVisible(%S)"), &buf);
sl@0
  1004
		}
sl@0
  1005
		break;
sl@0
  1006
	case EWsWinOpUpdateScreen:
sl@0
  1007
		aText.Append(_L("UpdateScreen()"));
sl@0
  1008
		break;
sl@0
  1009
	case EWsWinOpUpdateScreenRegion:
sl@0
  1010
		aText.Append(_L("UpdateScreenRegion(TRegion(...))"));
sl@0
  1011
		break;
sl@0
  1012
	case EWsWinOpMaintainBackup:
sl@0
  1013
		aText.Append(_L("MaintainBackup()"));
sl@0
  1014
		break;
sl@0
  1015
	case EWsWinOpGetInvalidRegion:
sl@0
  1016
		aText.Append(_L("GetInvalidRegion(...)"));
sl@0
  1017
		break;
sl@0
  1018
	case EWsWinOpGetInvalidRegionCount:
sl@0
  1019
		aText.Append(_L("GetInvalidRegionCount()"));
sl@0
  1020
		break;
sl@0
  1021
	case EWsWinOpScroll:
sl@0
  1022
		{
sl@0
  1023
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(pData.ScrollRect->offset));
sl@0
  1024
		aText.AppendFormat(_L("Scroll(%S)"), &buf);
sl@0
  1025
		}
sl@0
  1026
		break;
sl@0
  1027
	case EWsWinOpScrollClip:
sl@0
  1028
		{
sl@0
  1029
		TLongBuf buf1(TDebugLogTextHandler::FormatRect(pData.ScrollRect->clip));
sl@0
  1030
		TShortBuf buf2(TDebugLogTextHandler::FormatPoint(pData.ScrollRect->offset));
sl@0
  1031
		aText.AppendFormat(_L("Scroll(%S, %S)"), &buf1, &buf2);
sl@0
  1032
		}
sl@0
  1033
		break;
sl@0
  1034
	case EWsWinOpScrollRect:
sl@0
  1035
		{
sl@0
  1036
		TShortBuf buf1(TDebugLogTextHandler::FormatPoint(pData.ScrollRect->offset));
sl@0
  1037
		TLongBuf buf2(TDebugLogTextHandler::FormatRect(pData.ScrollRect->rect));
sl@0
  1038
		aText.AppendFormat(_L("Scroll(%S, %S)"), &buf1, &buf2);
sl@0
  1039
		}
sl@0
  1040
		break;
sl@0
  1041
	case EWsWinOpScrollClipRect:
sl@0
  1042
		{
sl@0
  1043
		TLongBuf buf1(TDebugLogTextHandler::FormatRect(pData.ScrollRect->clip));
sl@0
  1044
		TShortBuf buf2(TDebugLogTextHandler::FormatPoint(pData.ScrollRect->offset));
sl@0
  1045
		TLongBuf buf3(TDebugLogTextHandler::FormatRect(pData.ScrollRect->rect));
sl@0
  1046
		aText.AppendFormat(_L("Scroll(%S, %S, %S)"), &buf1, &buf2, &buf3);
sl@0
  1047
		}
sl@0
  1048
		break;
sl@0
  1049
	case EWsWinOpBitmapHandle:
sl@0
  1050
		aText.Append(_L("BitmapHandle()"));
sl@0
  1051
		break;
sl@0
  1052
	case EWsWinOpUpdateBackupBitmap:
sl@0
  1053
		aText.Append(_L("UpdateBackupBitmap()"));
sl@0
  1054
		break;
sl@0
  1055
	case EWsWinOpRequiredDisplayMode:
sl@0
  1056
		aText.AppendFormat(_L("SetRequiredDisplayMode(%d)"), *pData.UInt);
sl@0
  1057
		break;
sl@0
  1058
	case EWsWinOpSetCornerType:
sl@0
  1059
		aText.AppendFormat(_L("SetCornerType(%d)"), *pData.UInt);
sl@0
  1060
		break;
sl@0
  1061
	case EWsWinOpSetShape:
sl@0
  1062
		aText.AppendFormat(_L("SetWindowShape(%d rects)"), pData.SetShape->count);
sl@0
  1063
		break;
sl@0
  1064
	case EWsWinOpSetName:
sl@0
  1065
		aText.Append(_L("SetName(\"...\")"));
sl@0
  1066
		break;
sl@0
  1067
	case EWsWinOpName:
sl@0
  1068
		aText.Append(_L("Name()"));
sl@0
  1069
		break;
sl@0
  1070
	case EWsWinOpSetOwningWindowGroup:
sl@0
  1071
		aText.AppendFormat(_L("SetOwningWindowGroup(%d)"),*pData.Int);
sl@0
  1072
		break;
sl@0
  1073
	case EWsWinOpDefaultOwningWindow:
sl@0
  1074
		aText.Append(_L("DefaultOwningWindow()"));
sl@0
  1075
		break;
sl@0
  1076
	case EWsWinOpEnableOnEvents:
sl@0
  1077
		aText.AppendFormat(_L("EnableOnEvents(%d)"),*pData.Int);
sl@0
  1078
		break;
sl@0
  1079
	case EWsWinOpDisableOnEvents:
sl@0
  1080
		aText.Append(_L("DisableOnEvents()"));
sl@0
  1081
		break;
sl@0
  1082
	case EWsWinOpEnableErrorMessages:
sl@0
  1083
		aText.AppendFormat(_L("EnableErrorMessages(%d)"),*pData.Int);
sl@0
  1084
		break;
sl@0
  1085
	case EWsWinOpDisableErrorMessages:
sl@0
  1086
		aText.Append(_L("DisableErrorMessages()"));
sl@0
  1087
		break;
sl@0
  1088
	case EWsWinOpEnableModifierChangedEvents:
sl@0
  1089
		aText.Append(_L("EnableModifierChangedEvents()"));
sl@0
  1090
		break;
sl@0
  1091
	case EWsWinOpDisableModifierChangedEvents:
sl@0
  1092
		aText.Append(_L("DisableModifierChangedEvents()"));
sl@0
  1093
		break;
sl@0
  1094
	case EWsWinOpEnableGroupChangeEvents:
sl@0
  1095
		aText.Append(_L("EnableGroupChangeEvents()"));
sl@0
  1096
		break;
sl@0
  1097
	case EWsWinOpDisableGroupChangeEvents:
sl@0
  1098
		aText.Append(_L("DisableGroupChangeEvents()"));
sl@0
  1099
		break;
sl@0
  1100
	case EWsWinOpRequestPointerRepeatEvent:
sl@0
  1101
		{
sl@0
  1102
		TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.RequestPointerRepeatEvent->rect));
sl@0
  1103
		aText.AppendFormat(_L("RequestPointerRepeatEvent(TTimeIntervalMicroSeconds32(%d), %S)"), 
sl@0
  1104
								pData.RequestPointerRepeatEvent->time.Int(), &buf);
sl@0
  1105
		}
sl@0
  1106
		break;
sl@0
  1107
	case EWsWinOpCancelPointerRepeatEventRequest:
sl@0
  1108
		aText.Append(_L("CancelPointerRepeatEventRequest()"));
sl@0
  1109
		break;
sl@0
  1110
	case EWsWinOpSetPointerCursor:
sl@0
  1111
		aText.AppendFormat(_L("SetPointerCursor(%d)"),*pData.UInt);
sl@0
  1112
		break;
sl@0
  1113
	case EWsWinOpSetCustomPointerCursor:
sl@0
  1114
		aText.AppendFormat(_L("SetCustomPointerCursor(%d)"),*pData.UInt);
sl@0
  1115
		break;
sl@0
  1116
	case EWsWinOpPasswordWindow:
sl@0
  1117
		aText.AppendFormat(_L("PasswordWindow(%d)"),*pData.PasswordMode);
sl@0
  1118
		break;
sl@0
  1119
	case EWsWinOpAddKeyRect:
sl@0
  1120
		{
sl@0
  1121
		TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.AddKeyRect->rect));
sl@0
  1122
		aText.AppendFormat(_L("AddKeyRect(%S,%d,%d)"),&buf,pData.AddKeyRect->scanCode,pData.AddKeyRect->activatedByPointerSwitchOn);
sl@0
  1123
		}
sl@0
  1124
		break;
sl@0
  1125
	case EWsWinOpRemoveAllKeyRects:
sl@0
  1126
		aText.Append(_L("RemoveAllKeyRects()"));
sl@0
  1127
		break;
sl@0
  1128
	case EWsWinOpAllocPointerMoveBuffer:
sl@0
  1129
		aText.AppendFormat(_L("AllocPointerMoveBuffer(%d,%d)"),pData.AllocPointerMoveBuffer->maxNumPoints,pData.AllocPointerMoveBuffer->flags);
sl@0
  1130
		break;
sl@0
  1131
	case EWsWinOpFreePointerMoveBuffer:
sl@0
  1132
		aText.Append(_L("FreePointerMoveBuffer()"));
sl@0
  1133
		break;
sl@0
  1134
	case EWsWinOpEnablePointerMoveBuffer:
sl@0
  1135
		aText.Append(_L("EnablePointerMoveBuffer()"));
sl@0
  1136
		break;
sl@0
  1137
	case EWsWinOpDisablePointerMoveBuffer:
sl@0
  1138
		aText.Append(_L("DisablePointerMoveBuffer()"));
sl@0
  1139
		break;
sl@0
  1140
	case EWsWinOpRetrievePointerMoveBuffer:
sl@0
  1141
		aText.Append(_L("RetrievePointerMoveBuffer(...)"));
sl@0
  1142
		break;
sl@0
  1143
	case EWsWinOpDiscardPointerMoveBuffer:
sl@0
  1144
		aText.Append(_L("DiscardPointerMoveBuffer()"));
sl@0
  1145
		break;
sl@0
  1146
	case EWsWinOpEnableBackup:
sl@0
  1147
		aText.Append(_L("EnableBackup()"));
sl@0
  1148
		break;
sl@0
  1149
	case EWsWinOpClaimPointerGrab:
sl@0
  1150
		aText.Append(_L("ClaimPointerGrab()"));
sl@0
  1151
		break;
sl@0
  1152
	case EWsWinOpIdentifier:
sl@0
  1153
		aText.Append(_L("Identifier()"));
sl@0
  1154
		break;
sl@0
  1155
	case EWsWinOpSetFade:
sl@0
  1156
		{
sl@0
  1157
		_LIT(LogWinSetFade,"SetFade(%d,%d");
sl@0
  1158
		aText.AppendFormat(LogWinSetFade,pData.SetFaded->Faded(),pData.SetFaded->IncludeChildren());
sl@0
  1159
		if (!pData.SetFaded->UseDefaultMap())
sl@0
  1160
			{
sl@0
  1161
			_LIT(LogWinSetFade2,",%d,%d");
sl@0
  1162
			TUint8 blackMap;
sl@0
  1163
			TUint8 whiteMap;
sl@0
  1164
			pData.SetFaded->GetFadingParams(blackMap,whiteMap);
sl@0
  1165
			aText.AppendFormat(LogWinSetFade2,blackMap,whiteMap);
sl@0
  1166
			}
sl@0
  1167
		aText.Append(LogCloseBracket);
sl@0
  1168
		}
sl@0
  1169
		break;
sl@0
  1170
	case EWsWinOpSetNonFading:
sl@0
  1171
		{
sl@0
  1172
		_LIT(LogWinSetNonFading,"SetNonFading(%d)");
sl@0
  1173
		aText.AppendFormat(LogWinSetNonFading,*(pData.Bool));
sl@0
  1174
		}
sl@0
  1175
		break;
sl@0
  1176
	case EWsWinOpFadeBehind:
sl@0
  1177
		{
sl@0
  1178
		_LIT(LogWinFadeBehind,"FadeBehind(%d)");
sl@0
  1179
		aText.AppendFormat(LogWinFadeBehind,*(pData.Bool));
sl@0
  1180
		}
sl@0
  1181
		break;
sl@0
  1182
	case EWsWinOpEnableScreenChangeEvents:
sl@0
  1183
		{
sl@0
  1184
		_LIT(LogWinEnableScreenChangeEvents,"EnableScreenChangeEvents()");
sl@0
  1185
		aText.Append(LogWinEnableScreenChangeEvents);
sl@0
  1186
		}
sl@0
  1187
		break;
sl@0
  1188
	case EWsWinOpDisableScreenChangeEvents:
sl@0
  1189
		{
sl@0
  1190
		_LIT(LogWinDisableScreenChangeEvents,"DisableScreenChangeEvents()");
sl@0
  1191
		aText.Append(LogWinDisableScreenChangeEvents);
sl@0
  1192
		}
sl@0
  1193
		break;
sl@0
  1194
	case EWsWinOpSendPointerEvent:
sl@0
  1195
		{
sl@0
  1196
		_LIT(LogWinSendPointerEvent,"SimulatePointerEvent(");
sl@0
  1197
		aText.Append(LogWinSendPointerEvent);
sl@0
  1198
		aText.Append(eventDetails(pData.RawEvent));
sl@0
  1199
		aText.Append(LogCloseBracket);
sl@0
  1200
		}
sl@0
  1201
		break;
sl@0
  1202
	case EWsWinOpSendAdvancedPointerEvent:
sl@0
  1203
		{
sl@0
  1204
		_LIT(LogWinSendPointerEvent,"SimulateAdvancedPointerEvent(");
sl@0
  1205
		aText.Append(LogWinSendPointerEvent);
sl@0
  1206
		aText.Append(eventDetails(pData.RawEvent));
sl@0
  1207
		aText.Append(LogCloseBracket);
sl@0
  1208
		}
sl@0
  1209
		break;
sl@0
  1210
	case EWsWinOpGetDisplayMode:
sl@0
  1211
		{
sl@0
  1212
		_LIT(LogWinGetDisplayMode,"GetDisplayMode()");
sl@0
  1213
		aText.Append(LogWinGetDisplayMode);
sl@0
  1214
		}
sl@0
  1215
		break;
sl@0
  1216
	case EWsWinOpGetIsFaded:
sl@0
  1217
		{
sl@0
  1218
		_LIT(LogWinIsFaded,"IsFaded()");
sl@0
  1219
		aText.Append(LogWinIsFaded);
sl@0
  1220
		}
sl@0
  1221
		break;
sl@0
  1222
	case EWsWinOpGetIsNonFading:
sl@0
  1223
		{
sl@0
  1224
		_LIT(LogWinIsNonFading,"IsNonFading()");
sl@0
  1225
		aText.Append(LogWinIsNonFading);
sl@0
  1226
		}
sl@0
  1227
		break;
sl@0
  1228
	case EWsWinOpOrdinalPriority:
sl@0
  1229
		{
sl@0
  1230
		_LIT(LogWinOrdinalPriority,"OrdinalPriority()");
sl@0
  1231
		aText.Append(LogWinOrdinalPriority);
sl@0
  1232
		}
sl@0
  1233
		break;
sl@0
  1234
	case EWsWinOpClearPointerCursor:
sl@0
  1235
		{
sl@0
  1236
		_LIT(LogWinClearPointerCursor,"ClearPointerCursor()");
sl@0
  1237
		aText.Append(LogWinClearPointerCursor);
sl@0
  1238
		}
sl@0
  1239
		break;
sl@0
  1240
	case EWsWinOpEnableGroupListChangeEvents:
sl@0
  1241
		{
sl@0
  1242
		_LIT(LogWinEnableGroupListChangeEvents,"EnableGroupListChangeEvents()");
sl@0
  1243
		aText.Append(LogWinEnableGroupListChangeEvents);
sl@0
  1244
		}
sl@0
  1245
		break;
sl@0
  1246
	case EWsWinOpDisableGroupListChangeEvents:
sl@0
  1247
		{
sl@0
  1248
		_LIT(LogWinDisableGroupListChangeEvents,"DisableGroupListChangeEvents()");
sl@0
  1249
		aText.Append(LogWinDisableGroupListChangeEvents);
sl@0
  1250
		}
sl@0
  1251
		break;
sl@0
  1252
	case EWsWinOpHandleTransparencyUpdate:
sl@0
  1253
		{
sl@0
  1254
		_LIT(LogWinHandleTransparencyUpdate,"HandleTransparencyUpdate()");
sl@0
  1255
		aText.Append(LogWinHandleTransparencyUpdate);
sl@0
  1256
		}
sl@0
  1257
		break;
sl@0
  1258
	case EWsWinOpSetTransparencyFactor:
sl@0
  1259
		{
sl@0
  1260
		_LIT(LogWinSetTransparencyFactor,"SetTransparencyFactor()");
sl@0
  1261
		aText.Append(LogWinSetTransparencyFactor);
sl@0
  1262
		}
sl@0
  1263
		break;
sl@0
  1264
	case EWsWinOpSetTransparencyBitmap:
sl@0
  1265
		{
sl@0
  1266
		_LIT(LogWinSetTransparencyBitmap,"SetTransparencyBitmap()");
sl@0
  1267
		aText.Append(LogWinSetTransparencyBitmap);
sl@0
  1268
		}
sl@0
  1269
		break;
sl@0
  1270
	case EWsWinOpSetTransparencyBitmapCWs:
sl@0
  1271
		{
sl@0
  1272
		_LIT(LogWinSetTransparencyWsBitmap,"SetTransparencyWsBitmap()");
sl@0
  1273
		aText.Append(LogWinSetTransparencyWsBitmap);
sl@0
  1274
		}
sl@0
  1275
		break;	
sl@0
  1276
sl@0
  1277
	case EWsWinOpSetTransparencyAlphaChannel:
sl@0
  1278
		{
sl@0
  1279
		_LIT(LogWinSetTransparencyAlphaChannel,"SetTransparencyAlphaChannel()");
sl@0
  1280
		aText.Append(LogWinSetTransparencyAlphaChannel);
sl@0
  1281
		}
sl@0
  1282
		break;	
sl@0
  1283
	case EWsWinOpMoveToGroup:
sl@0
  1284
		{
sl@0
  1285
		_LIT(LogWinMoveToGroup,"MoveToGroup(%d)");
sl@0
  1286
		aText.AppendFormat(LogWinMoveToGroup, *pData.Int);
sl@0
  1287
		}
sl@0
  1288
		break;	
sl@0
  1289
	case EWsWinOpStoreDrawCommands:
sl@0
  1290
		{
sl@0
  1291
		_LIT(LogWinStoreDrawCommands,"EnableRedrawStore(%u)");
sl@0
  1292
		aText.AppendFormat(LogWinStoreDrawCommands, *pData.Bool);
sl@0
  1293
		}
sl@0
  1294
		break;	
sl@0
  1295
	case EWsWinOpSetPointerCapturePriority:
sl@0
  1296
		{
sl@0
  1297
		_LIT(LogWinSetPointerCapturePriority,"SetPointerCapturePriority(%d)");
sl@0
  1298
		aText.AppendFormat(LogWinSetPointerCapturePriority, *pData.Int);
sl@0
  1299
		}
sl@0
  1300
		break;	
sl@0
  1301
	case EWsWinOpGetPointerCapturePriority:
sl@0
  1302
		{
sl@0
  1303
		_LIT(LogWinGetPointerCapturePriority,"GetPointerCapturePriority()");
sl@0
  1304
		aText.Append(LogWinGetPointerCapturePriority);
sl@0
  1305
		}
sl@0
  1306
		break;	
sl@0
  1307
	case EWsWinOpSetTransparentRegion:
sl@0
  1308
		{
sl@0
  1309
		_LIT(LogWinSetTransparentRegion,"SetTransparentRegion(%d rects)");
sl@0
  1310
		aText.AppendFormat(LogWinSetTransparentRegion, pData.SetShape->count);
sl@0
  1311
		}
sl@0
  1312
		break;	
sl@0
  1313
	case EWsWinOpSetTransparencyPolicy:
sl@0
  1314
		{
sl@0
  1315
		_LIT(LogWinSetTransparentPolicy,"SetTransparencyPolicy(TransparencyPolicy= %d)");
sl@0
  1316
		aText.AppendFormat(LogWinSetTransparentPolicy, *pData.Int);
sl@0
  1317
		}
sl@0
  1318
		break;	
sl@0
  1319
	case EWsWinOpIsRedrawStoreEnabled:
sl@0
  1320
		{
sl@0
  1321
		_LIT(LogWinIsRedrawStoreEnabled,"IsRedrawStoreEnabled()");
sl@0
  1322
		aText.Append(LogWinIsRedrawStoreEnabled);
sl@0
  1323
		}
sl@0
  1324
		break;		
sl@0
  1325
	case EWsWinOpEnableOSB:
sl@0
  1326
		{
sl@0
  1327
		_LIT(LogOSBEnabled,"EWsWinOpEnableOSB enum");
sl@0
  1328
		aText.Append(LogOSBEnabled);
sl@0
  1329
		}
sl@0
  1330
		break;		
sl@0
  1331
	case EWsWinOpDisableOSB:
sl@0
  1332
		{
sl@0
  1333
		_LIT(LogOSBDisabled,"EWsWinOpDisableOSB enum");
sl@0
  1334
		aText.Append(LogOSBDisabled);
sl@0
  1335
		}
sl@0
  1336
		break;
sl@0
  1337
	case EWsWinOpClientHandle:
sl@0
  1338
		{
sl@0
  1339
		_LIT(LogClientHandle,"ClientHandle()");
sl@0
  1340
		aText.AppendFormat(LogClientHandle);
sl@0
  1341
		}
sl@0
  1342
		break;
sl@0
  1343
    case EWsWinOpSetBackgroundSurface:
sl@0
  1344
        {
sl@0
  1345
        _LIT(LogWinSetBackgroundSurface,"SetBackgroundSurface(TSurfaceId{%x,%x,%x,%x})");
sl@0
  1346
        aText.AppendFormat(LogWinSetBackgroundSurface, pData.Surface->iInternal[0],pData.Surface->iInternal[1],pData.Surface->iInternal[2],pData.Surface->iInternal[3]);
sl@0
  1347
        }
sl@0
  1348
        break;
sl@0
  1349
    case EWsWinOpKeyColor:
sl@0
  1350
        {
sl@0
  1351
        _LIT(LogWinKeyColor,"KeyColor()");
sl@0
  1352
        aText.AppendFormat(LogWinKeyColor);
sl@0
  1353
        }
sl@0
  1354
        break;          
sl@0
  1355
    case EWsWinOpSetBackgroundSurfaceConfig:
sl@0
  1356
        {        
sl@0
  1357
        TSurfaceConfiguration aSurfaceConfig = pData.SurfaceConfigurationAndTrigger->surfaceConfig;
sl@0
  1358
        TSurfaceId surfaceid;
sl@0
  1359
        aSurfaceConfig.GetSurfaceId(surfaceid);
sl@0
  1360
        CFbsBitGc::TGraphicsOrientation orientation = aSurfaceConfig.Orientation();
sl@0
  1361
        TRect extent;
sl@0
  1362
        aSurfaceConfig.GetExtent(extent);
sl@0
  1363
        TRect viewport;
sl@0
  1364
        aSurfaceConfig.GetViewport(viewport);
sl@0
  1365
        TBool flip = aSurfaceConfig.Flip();
sl@0
  1366
        TBool triggerRedraw = pData.SurfaceConfigurationAndTrigger->triggerRedraw;
sl@0
  1367
        
sl@0
  1368
        TLongBuf extentbuf(TDebugLogTextHandler::FormatRect(extent));
sl@0
  1369
        TLongBuf viewportbuf(TDebugLogTextHandler::FormatRect(viewport));
sl@0
  1370
        
sl@0
  1371
        _LIT(LogWinSetBackgroundSurfaceConfig,"SetBackgroundSurface({%x,%x,%x,%x},%d,%S,%S,%d,%d)");
sl@0
  1372
        aText.AppendFormat(LogWinSetBackgroundSurfaceConfig, surfaceid.iInternal[0],
sl@0
  1373
                                                             surfaceid.iInternal[1],
sl@0
  1374
                                                             surfaceid.iInternal[2],
sl@0
  1375
                                                             surfaceid.iInternal[3],
sl@0
  1376
                                                             orientation,
sl@0
  1377
                                                             &extentbuf, 
sl@0
  1378
                                                             &viewportbuf,
sl@0
  1379
                                                             flip,
sl@0
  1380
                                                             triggerRedraw);
sl@0
  1381
        }
sl@0
  1382
        break;
sl@0
  1383
    case EWsWinOpRemoveBackgroundSurface:
sl@0
  1384
        {
sl@0
  1385
        _LIT(LogWinRemoveBackgroundSurface,"RemoveBackgroundSurface(%d)");
sl@0
  1386
        aText.AppendFormat(LogWinRemoveBackgroundSurface, *(pData.Bool));
sl@0
  1387
        }
sl@0
  1388
        break;
sl@0
  1389
    case EWsWinOpGetBackgroundSurfaceConfig:
sl@0
  1390
        {
sl@0
  1391
        _LIT(LogWinGetBackgroundSurfaceConfig,"GetBackgroundSurface()");
sl@0
  1392
        aText.AppendFormat(LogWinGetBackgroundSurfaceConfig);
sl@0
  1393
        }
sl@0
  1394
        break;
sl@0
  1395
    case EWsWinOpClearRedrawStore:
sl@0
  1396
        {
sl@0
  1397
        _LIT(LogWinClearRedrawStore,"ClearRedrawStore()");
sl@0
  1398
        aText.AppendFormat(LogWinClearRedrawStore);
sl@0
  1399
        }
sl@0
  1400
        break;
sl@0
  1401
	default:
sl@0
  1402
		UnKnownOpcode(aText, aOpcode);
sl@0
  1403
		break;
sl@0
  1404
		}
sl@0
  1405
	}
sl@0
  1406
sl@0
  1407
//#pragma check_stack(on)
sl@0
  1408
void TWsDecoder::DecodeGc(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData, TInt aHandle)
sl@0
  1409
	{
sl@0
  1410
	_LIT(LogGc,"RGc[%d]::");
sl@0
  1411
	aText.Format(LogGc,aHandle);
sl@0
  1412
    if (aOpcode<EWsGcOpGdiBlt2)
sl@0
  1413
        {
sl@0
  1414
        if (aOpcode<EWsGcOpDrawPolyLineContinued)
sl@0
  1415
            DecodeGc1(aText,aOpcode,aCmdData);
sl@0
  1416
        else
sl@0
  1417
            DecodeGc2(aText,aOpcode,aCmdData);
sl@0
  1418
        }
sl@0
  1419
    else
sl@0
  1420
        DecodeGc3(aText,aOpcode,aCmdData);
sl@0
  1421
    }
sl@0
  1422
    
sl@0
  1423
void TWsDecoder::DecodeGc1(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData)
sl@0
  1424
	{
sl@0
  1425
	TWsGcCmdUnion pData;
sl@0
  1426
sl@0
  1427
	pData.any=aCmdData;
sl@0
  1428
	switch (aOpcode)
sl@0
  1429
		{
sl@0
  1430
	case EWsGcOpFree:
sl@0
  1431
		aText.AppendFormat(LogClose);
sl@0
  1432
		break;
sl@0
  1433
	case EWsGcOpActivate:
sl@0
  1434
		{
sl@0
  1435
		_LIT(LogGcActivate,"Activate(%d)");
sl@0
  1436
		aText.AppendFormat(LogGcActivate,hHandleToValue(*pData.UInt));
sl@0
  1437
		}
sl@0
  1438
		break;
sl@0
  1439
	case EWsGcOpDeactivate:
sl@0
  1440
		{
sl@0
  1441
		_LIT(LogGcDeactivate,"Deactivate()");
sl@0
  1442
		aText.AppendFormat(LogGcDeactivate);
sl@0
  1443
		}
sl@0
  1444
		break;
sl@0
  1445
	case EWsGcOpDrawLine:
sl@0
  1446
		{
sl@0
  1447
		TShortBuf buf1(TDebugLogTextHandler::FormatPoint(pData.DrawLine->pnt1));
sl@0
  1448
		TShortBuf buf2(TDebugLogTextHandler::FormatPoint(pData.DrawLine->pnt2));
sl@0
  1449
		_LIT(LogGcDrawLine,"DrawLine(%S, %S)");
sl@0
  1450
		aText.AppendFormat(LogGcDrawLine, &buf1, &buf2);
sl@0
  1451
		}
sl@0
  1452
		break;
sl@0
  1453
	case EWsGcOpSetBrushStyle:
sl@0
  1454
		{
sl@0
  1455
		_LIT(LogGcSetBrushStyle,"SetBrushStyle(%u)");
sl@0
  1456
		aText.AppendFormat(LogGcSetBrushStyle,*pData.UInt);
sl@0
  1457
		}
sl@0
  1458
		break;
sl@0
  1459
	case EWsGcOpPlot:
sl@0
  1460
		{
sl@0
  1461
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
sl@0
  1462
		_LIT(LogGcPlot,"Plot(%S)");
sl@0
  1463
		aText.AppendFormat(LogGcPlot, &buf);
sl@0
  1464
		}
sl@0
  1465
		break;
sl@0
  1466
	case EWsGcOpSetPenColor:
sl@0
  1467
		{
sl@0
  1468
		TLongBuf buf(TDebugLogTextHandler::FormatRgb(*pData.rgb));
sl@0
  1469
		_LIT(LogGcSetPenColor,"SetPenColor(%S)");
sl@0
  1470
		aText.AppendFormat(LogGcSetPenColor,&buf);
sl@0
  1471
		}
sl@0
  1472
		break;
sl@0
  1473
	case EWsGcOpSetBrushColor:
sl@0
  1474
		{
sl@0
  1475
		TLongBuf buf(TDebugLogTextHandler::FormatRgb(*pData.rgb));
sl@0
  1476
		_LIT(LogGcSetBrushColor,"SetBrushColor(%S)");
sl@0
  1477
		aText.AppendFormat(LogGcSetBrushColor,&buf);
sl@0
  1478
		}
sl@0
  1479
		break;
sl@0
  1480
	case EWsGcOpSetPenSize:
sl@0
  1481
		{
sl@0
  1482
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
sl@0
  1483
		_LIT(LogGcSetPenSize,"SetPenSize(%S)");
sl@0
  1484
		aText.AppendFormat(LogGcSetPenSize,&buf);
sl@0
  1485
		}
sl@0
  1486
		break;
sl@0
  1487
	case EWsGcOpSetPenStyle:
sl@0
  1488
		{
sl@0
  1489
		_LIT(LogGcSetPenStyle,"SetPenStyle(%d)");
sl@0
  1490
		aText.AppendFormat(LogGcSetPenStyle,*pData.UInt);
sl@0
  1491
		}
sl@0
  1492
		break;
sl@0
  1493
	case EWsGcOpSetClippingRegion:
sl@0
  1494
		{
sl@0
  1495
		_LIT(LogGcSetClippingRegion,"SetClippingRegion(...)");
sl@0
  1496
		aText.Append(LogGcSetClippingRegion);
sl@0
  1497
		}
sl@0
  1498
		break;
sl@0
  1499
	case EWsGcOpCancelClippingRegion:
sl@0
  1500
		{
sl@0
  1501
		_LIT(LogGcCancelClippingRegion,"CancelClippingRegion()");
sl@0
  1502
		aText.Append(LogGcCancelClippingRegion);
sl@0
  1503
		}
sl@0
  1504
		break;
sl@0
  1505
	case EWsGcOpSetClippingRect:
sl@0
  1506
		{
sl@0
  1507
		TLongBuf buf(TDebugLogTextHandler::FormatRect(*pData.Rect));
sl@0
  1508
		_LIT(LogGcSetClippingRect,"SetClippingRect(%S)");
sl@0
  1509
		aText.AppendFormat(LogGcSetClippingRect,&buf);
sl@0
  1510
		}
sl@0
  1511
		break;
sl@0
  1512
	case EWsGcOpCancelClippingRect:
sl@0
  1513
		{
sl@0
  1514
		_LIT(LogGcCancelClippingRect,"CancelClippingRect()");
sl@0
  1515
		aText.Append(LogGcCancelClippingRect);
sl@0
  1516
		}
sl@0
  1517
		break;
sl@0
  1518
	case EWsGcOpDrawTo:
sl@0
  1519
		{
sl@0
  1520
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
sl@0
  1521
		_LIT(LogGcDrawTo,"DrawTo(%S)");
sl@0
  1522
		aText.AppendFormat(LogGcDrawTo,&buf);
sl@0
  1523
		}
sl@0
  1524
		break;
sl@0
  1525
	case EWsGcOpDrawBy:
sl@0
  1526
		{
sl@0
  1527
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
sl@0
  1528
		_LIT(LogGcDrawBy,"DrawBy(%S)");
sl@0
  1529
		aText.AppendFormat(LogGcDrawBy,&buf);
sl@0
  1530
		}
sl@0
  1531
		break;
sl@0
  1532
	case EWsGcOpDrawPolyLine:
sl@0
  1533
		{
sl@0
  1534
		_LIT(LogGcDrawPolyLine,"DrawPolyLine(%d...)");
sl@0
  1535
		aText.AppendFormat(LogGcDrawPolyLine,pData.PolyLine->numPoints);
sl@0
  1536
		}
sl@0
  1537
		break;
sl@0
  1538
	case EWsGcOpDrawPolyLineContinued:
sl@0
  1539
		{
sl@0
  1540
		_LIT(LogGcDrawPolyLineContinued,"DrawPolyLineContinued(%d...)");
sl@0
  1541
		aText.AppendFormat(LogGcDrawPolyLineContinued,pData.PolyLine->numPoints);
sl@0
  1542
		}
sl@0
  1543
		break;
sl@0
  1544
	case EWsGcOpUseBrushPattern:
sl@0
  1545
		{
sl@0
  1546
		_LIT(LogGcUseBrushPattern,"UseBrushPattern({0x%x})");
sl@0
  1547
		aText.AppendFormat(LogGcUseBrushPattern,hHandleToValue(*pData.handle));
sl@0
  1548
		}
sl@0
  1549
		break;
sl@0
  1550
	case EWsGcOpDrawArc:
sl@0
  1551
		{
sl@0
  1552
		TLongBuf buf1(TDebugLogTextHandler::FormatRect(pData.ArcOrPie->rect));
sl@0
  1553
		TShortBuf buf2(TDebugLogTextHandler::FormatPoint(pData.ArcOrPie->start));
sl@0
  1554
		TShortBuf buf3(TDebugLogTextHandler::FormatPoint(pData.ArcOrPie->end));
sl@0
  1555
		_LIT(LogGcDrawArc,"DrawArc(%S,%S,%S)");
sl@0
  1556
		aText.AppendFormat(LogGcDrawArc,&buf1,&buf2,&buf3);
sl@0
  1557
		}
sl@0
  1558
		break;
sl@0
  1559
	case EWsGcOpSetWordJustification:
sl@0
  1560
		{
sl@0
  1561
		_LIT(LogGcSetWordJustification,"SetWordJustification(%d,%d)");
sl@0
  1562
		aText.AppendFormat(LogGcSetWordJustification,pData.SetJustification->excessWidth,pData.SetJustification->numGaps);
sl@0
  1563
		}
sl@0
  1564
		break;
sl@0
  1565
	case EWsGcOpSetCharJustification:
sl@0
  1566
		{
sl@0
  1567
		_LIT(LogGcSetCharJustification,"SetCharJustification(%d,%d)");
sl@0
  1568
		aText.AppendFormat(LogGcSetCharJustification,pData.SetJustification->excessWidth,pData.SetJustification->numGaps);
sl@0
  1569
		}
sl@0
  1570
		break;
sl@0
  1571
	case EWsGcOpSetBrushOrigin:
sl@0
  1572
		{
sl@0
  1573
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
sl@0
  1574
		aText.AppendFormat(_L("SetBrushOrigin(%S)"), &buf);		
sl@0
  1575
		}
sl@0
  1576
		break;
sl@0
  1577
	case EWsGcOpDiscardBrushPattern:
sl@0
  1578
		{
sl@0
  1579
		_LIT(LogGcDiscardBrushPattern,"DiscardBrushPattern()");
sl@0
  1580
		aText.Append(LogGcDiscardBrushPattern);
sl@0
  1581
		}	
sl@0
  1582
		break;	
sl@0
  1583
 	default:
sl@0
  1584
		UnKnownOpcode(aText, aOpcode);
sl@0
  1585
		break;
sl@0
  1586
		}
sl@0
  1587
	}
sl@0
  1588
sl@0
  1589
void TWsDecoder::DecodeGc2(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData)
sl@0
  1590
	{
sl@0
  1591
	TWsGcCmdUnion pData;
sl@0
  1592
sl@0
  1593
	pData.any=aCmdData;
sl@0
  1594
	switch (aOpcode)
sl@0
  1595
		{
sl@0
  1596
	case EWsGcOpDrawText:
sl@0
  1597
		{
sl@0
  1598
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(pData.DrawText->pos));
sl@0
  1599
		_LIT(LogGcDrawText1,"DrawText(\"");
sl@0
  1600
		TDebugLogTextHandler::Append(aText, LogGcDrawText1);
sl@0
  1601
		TDebugLogTextHandler::Append(aText, TPtrC((TText *)(pData.DrawText+1), pData.DrawText->length));
sl@0
  1602
		_LIT(LogGcDrawText2,"\", %S)");
sl@0
  1603
		aText.AppendFormat(LogGcDrawText2,&iOverflowHandler,&buf);
sl@0
  1604
		}
sl@0
  1605
		break;
sl@0
  1606
	case EWsGcOpDrawTextVertical:
sl@0
  1607
		{
sl@0
  1608
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(pData.DrawTextVertical->pos));
sl@0
  1609
		_LIT(LogGcDrawTextVertical1,"DrawTextVertical(\"");
sl@0
  1610
		TDebugLogTextHandler::Append(aText, LogGcDrawTextVertical1);
sl@0
  1611
		TDebugLogTextHandler::Append(aText, TPtrC((TText *)(pData.DrawTextVertical+1), pData.DrawTextVertical->length));
sl@0
  1612
		_LIT(LogGcDrawTextVertical2,"\", %S, %d)");
sl@0
  1613
		aText.AppendFormat(LogGcDrawTextVertical2,&iOverflowHandler,&buf,pData.DrawTextVertical->up);
sl@0
  1614
		}
sl@0
  1615
		break;
sl@0
  1616
	case EWsGcOpDrawTextVerticalPtr:
sl@0
  1617
		{
sl@0
  1618
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(pData.DrawTextVertical->pos));
sl@0
  1619
		_LIT(LogGcDrawTextVertical1,"DrawTextVertical(...");
sl@0
  1620
		TDebugLogTextHandler::Append(aText, LogGcDrawTextVertical1);
sl@0
  1621
		_LIT(LogGcDrawTextVertical2,", %S, %d)");
sl@0
  1622
		aText.AppendFormat(LogGcDrawTextVertical2,&iOverflowHandler,&buf,pData.DrawTextVertical->up);
sl@0
  1623
		}
sl@0
  1624
		break;
sl@0
  1625
	case EWsGcOpDrawTextPtr:
sl@0
  1626
		{
sl@0
  1627
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(pData.DrawText->pos));
sl@0
  1628
		_LIT(LogGcDrawText1,"DrawText(...");
sl@0
  1629
		TDebugLogTextHandler::Append(aText, LogGcDrawText1);
sl@0
  1630
		_LIT(LogGcDrawText2,",%S)");
sl@0
  1631
		aText.AppendFormat(LogGcDrawText2,&iOverflowHandler,&buf);
sl@0
  1632
		}
sl@0
  1633
		break;
sl@0
  1634
	case EWsGcOpDrawBoxTextOptimised1:
sl@0
  1635
		{
sl@0
  1636
		TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.BoxTextO1->box));
sl@0
  1637
		_LIT(LogGcDrawText1,"DrawText(\"");
sl@0
  1638
		aText.Append(LogGcDrawText1);
sl@0
  1639
		TDebugLogTextHandler::Append(aText, TPtrC((TText *)(pData.BoxTextO1+1), pData.BoxTextO1->length));
sl@0
  1640
		_LIT(LogGcDrawText2,"\", %S, %d, %d, 0)");
sl@0
  1641
		aText.AppendFormat(LogGcDrawText2,&iOverflowHandler, &buf,
sl@0
  1642
										pData.BoxTextO1->baselineOffset,CGraphicsContext::ELeft);
sl@0
  1643
		}
sl@0
  1644
		break;
sl@0
  1645
	case EWsGcOpDrawBoxTextOptimised2:
sl@0
  1646
		{
sl@0
  1647
		TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.BoxTextO2->box));
sl@0
  1648
		_LIT(LogGcDrawText1,"DrawText(\"");
sl@0
  1649
		aText.Append(LogGcDrawText1);
sl@0
  1650
		TDebugLogTextHandler::Append(aText, TPtrC((TText *)(pData.BoxTextO2+1), pData.BoxTextO2->length));
sl@0
  1651
		_LIT(LogGcDrawText2,"\", %S, %d, %d, %d)");
sl@0
  1652
		aText.AppendFormat(LogGcDrawText2,&iOverflowHandler, &buf, pData.BoxTextO2->baselineOffset, 
sl@0
  1653
										pData.BoxTextO2->horiz, pData.BoxTextO2->leftMrg);
sl@0
  1654
		}
sl@0
  1655
		break;
sl@0
  1656
	case EWsGcOpDrawBoxTextVertical:
sl@0
  1657
		{
sl@0
  1658
		TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.DrawBoxTextVertical->box));
sl@0
  1659
		_LIT(LogGcDrawTextVertical1,"DrawTextVertical(\"");
sl@0
  1660
		aText.Append(LogGcDrawTextVertical1);
sl@0
  1661
		TDebugLogTextHandler::Append(aText, TPtrC((TText *)(pData.DrawBoxTextVertical+1), pData.DrawBoxTextVertical->length));
sl@0
  1662
		_LIT(LogGcDrawTextVertical2,"\", %S, %d, %d, %d, %d)");
sl@0
  1663
		aText.AppendFormat(LogGcDrawTextVertical2,&iOverflowHandler, &buf,
sl@0
  1664
										pData.DrawBoxTextVertical->baselineOffset, pData.DrawBoxTextVertical->up,
sl@0
  1665
										pData.DrawBoxTextVertical->vert, pData.DrawBoxTextVertical->margin);
sl@0
  1666
		}
sl@0
  1667
		break;
sl@0
  1668
	case EWsGcOpDrawBoxTextPtr:
sl@0
  1669
		{
sl@0
  1670
		TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.BoxText->box));
sl@0
  1671
		_LIT(LogGcDrawText1,"DrawText(...");
sl@0
  1672
		TDebugLogTextHandler::Append(aText, LogGcDrawText1);
sl@0
  1673
		_LIT(LogGcDrawText2,", %S, %d, %d, %d)");
sl@0
  1674
		aText.AppendFormat(LogGcDrawText2,&iOverflowHandler, &buf, pData.BoxText->baselineOffset,
sl@0
  1675
										pData.BoxText->horiz, pData.BoxText->leftMrg);
sl@0
  1676
		}
sl@0
  1677
		break;
sl@0
  1678
	case EWsGcOpDrawBoxTextVerticalPtr:
sl@0
  1679
		{
sl@0
  1680
		TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.DrawBoxTextVertical->box));
sl@0
  1681
		_LIT(LogGcDrawTextVertical1,"DrawTextVertical(...");
sl@0
  1682
		aText.Append(LogGcDrawTextVertical1);
sl@0
  1683
		_LIT(LogGcDrawTextVertical2,", %S, %d, %d, %d, %d)");
sl@0
  1684
		aText.AppendFormat(LogGcDrawTextVertical2,&iOverflowHandler,&buf,
sl@0
  1685
										pData.DrawBoxTextVertical->baselineOffset, pData.DrawBoxTextVertical->up,
sl@0
  1686
										pData.DrawBoxTextVertical->vert, pData.DrawBoxTextVertical->margin);
sl@0
  1687
		}
sl@0
  1688
		break;
sl@0
  1689
	case EWsGcOpCopyRect:
sl@0
  1690
		{
sl@0
  1691
		TShortBuf buf1(TDebugLogTextHandler::FormatPoint(pData.CopyRect->pos));
sl@0
  1692
		TLongBuf buf2(TDebugLogTextHandler::FormatRect(pData.CopyRect->rect));
sl@0
  1693
		_LIT(LogGcCopyRect,"CopyRect(%S, %S)");
sl@0
  1694
		aText.AppendFormat(LogGcCopyRect,&buf1,&buf2);
sl@0
  1695
		}
sl@0
  1696
		break;
sl@0
  1697
	case EWsGcOpDrawEllipse:
sl@0
  1698
		{
sl@0
  1699
		TLongBuf buf(TDebugLogTextHandler::FormatRect(*pData.Rect));
sl@0
  1700
		_LIT(LogGcDrawEllipse,"DrawEllipse(%S)");
sl@0
  1701
		aText.AppendFormat(LogGcDrawEllipse,&buf);
sl@0
  1702
		}
sl@0
  1703
		break;
sl@0
  1704
	case EWsGcOpMoveTo:
sl@0
  1705
		{
sl@0
  1706
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
sl@0
  1707
		_LIT(LogGcMoveTo,"MoveTo(%S)");
sl@0
  1708
		aText.AppendFormat(LogGcMoveTo,&buf);
sl@0
  1709
		}
sl@0
  1710
		break;
sl@0
  1711
	case EWsGcOpMoveBy:
sl@0
  1712
		{
sl@0
  1713
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
sl@0
  1714
		_LIT(LogGcMoveBy,"MoveBy(%S)");
sl@0
  1715
		aText.AppendFormat(LogGcMoveBy,&buf);
sl@0
  1716
		}
sl@0
  1717
		break;
sl@0
  1718
	case EWsGcOpDrawPolygon:
sl@0
  1719
		{
sl@0
  1720
		_LIT(LogGcDrawPolygon,"DrawPolygon(...)");
sl@0
  1721
		aText.Append(LogGcDrawPolygon);
sl@0
  1722
		}
sl@0
  1723
		break;
sl@0
  1724
	case EWsGcOpDrawRoundRect:
sl@0
  1725
		{
sl@0
  1726
		TLongBuf buf1(TDebugLogTextHandler::FormatRect(pData.RoundRect->rect));
sl@0
  1727
		TShortBuf buf2(TDebugLogTextHandler::FormatSize(pData.RoundRect->ellipse));
sl@0
  1728
		_LIT(LogGcDrawRoundRect,"DrawRoundRect(%S,%S)");
sl@0
  1729
		aText.AppendFormat(LogGcDrawRoundRect,&buf1,&buf2);
sl@0
  1730
		}
sl@0
  1731
		break;
sl@0
  1732
	case EWsGcOpDrawPie:
sl@0
  1733
		{
sl@0
  1734
		TLongBuf buf1(TDebugLogTextHandler::FormatRect(pData.ArcOrPie->rect));
sl@0
  1735
		TShortBuf buf2(TDebugLogTextHandler::FormatPoint(pData.ArcOrPie->start));
sl@0
  1736
		TShortBuf buf3(TDebugLogTextHandler::FormatPoint(pData.ArcOrPie->end));
sl@0
  1737
		_LIT(LogGcDrawPie,"DrawPie(%S,%S,%S)");
sl@0
  1738
		aText.AppendFormat(LogGcDrawPie,&buf1,&buf2,&buf3);
sl@0
  1739
		}
sl@0
  1740
		break;
sl@0
  1741
	case EWsGcOpSetOrigin:
sl@0
  1742
		{
sl@0
  1743
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
sl@0
  1744
		_LIT(LogGcSetOrigin,"SetOrigin(%S)");
sl@0
  1745
		aText.AppendFormat(LogGcSetOrigin,&buf);
sl@0
  1746
		}
sl@0
  1747
		break;
sl@0
  1748
	case EWsGcOpStartSegmentedDrawPolygon:
sl@0
  1749
		{
sl@0
  1750
		_LIT(LogGcStartSegmentedDrawPolygon,"StartSegmentedDrawPolygon(%d)");
sl@0
  1751
		aText.AppendFormat(LogGcStartSegmentedDrawPolygon,*pData.StartSegmentedDrawPolygon);
sl@0
  1752
		}
sl@0
  1753
		break;
sl@0
  1754
	case EWsGcOpSegmentedDrawPolygonData:
sl@0
  1755
		{
sl@0
  1756
		_LIT(LogGcSegmentedDrawPolygonData,"SegmentedDrawPolygonData(%d,%d,...)");
sl@0
  1757
		aText.AppendFormat(LogGcSegmentedDrawPolygonData,pData.SegmentedDrawPolygonData->index,
sl@0
  1758
									pData.SegmentedDrawPolygonData->numPoints);
sl@0
  1759
		}
sl@0
  1760
		break;
sl@0
  1761
	case EWsGcOpDrawSegmentedPolygon:
sl@0
  1762
		{
sl@0
  1763
		_LIT(LogGcDrawSegmentedPolygon,"DrawSegmentedPolygon()");
sl@0
  1764
		aText.AppendFormat(LogGcDrawSegmentedPolygon);
sl@0
  1765
		}
sl@0
  1766
		break;
sl@0
  1767
	case EWsGcOpDrawRect:
sl@0
  1768
		{
sl@0
  1769
		TLongBuf buf(TDebugLogTextHandler::FormatRect(*pData.Rect));
sl@0
  1770
		_LIT(LogGcDrawRect,"DrawRect(%S)");
sl@0
  1771
		aText.AppendFormat(LogGcDrawRect,&buf);
sl@0
  1772
		}
sl@0
  1773
		break;
sl@0
  1774
	case EWsGcOpDrawBitmap:
sl@0
  1775
		{
sl@0
  1776
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(pData.Bitmap->pos));
sl@0
  1777
		_LIT(KLitGcDrawBitmap, "DrawBitmap({%d}, %S)");
sl@0
  1778
		aText.AppendFormat(KLitGcDrawBitmap, hHandleToValue(pData.Bitmap->handle), &buf);
sl@0
  1779
		}
sl@0
  1780
		break;
sl@0
  1781
	case EWsGcOpDrawBitmap2:
sl@0
  1782
		{
sl@0
  1783
		TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.Bitmap2->rect));
sl@0
  1784
		_LIT(KLitGcDrawBitmap2, "DrawBitmap2({%d}, %S)");
sl@0
  1785
		aText.AppendFormat(KLitGcDrawBitmap2, hHandleToValue(pData.Bitmap2->handle), &buf);
sl@0
  1786
		}
sl@0
  1787
		break;
sl@0
  1788
	case EWsGcOpDrawBitmap3:
sl@0
  1789
		{
sl@0
  1790
		TLongBuf buf1(TDebugLogTextHandler::FormatRect(pData.Bitmap3->rect));
sl@0
  1791
		TLongBuf buf2(TDebugLogTextHandler::FormatRect(pData.Bitmap3->srcRect));
sl@0
  1792
		_LIT(KLitGcDrawBitmap3, "DrawBitmap3({%d}, %S, %S)");
sl@0
  1793
		aText.AppendFormat(KLitGcDrawBitmap3, hHandleToValue(pData.Bitmap3->handle), &buf1, &buf2);
sl@0
  1794
		}
sl@0
  1795
		break;
sl@0
  1796
	case EWsGcOpDrawBitmapMasked:
sl@0
  1797
	case EWsGcOpWsDrawBitmapMasked:
sl@0
  1798
		{
sl@0
  1799
		TLongBuf buf1(TDebugLogTextHandler::FormatRect(pData.iBitmapMasked->iRect));
sl@0
  1800
		TLongBuf buf2(TDebugLogTextHandler::FormatRect(pData.iBitmapMasked->iSrcRect));
sl@0
  1801
		_LIT(KLitGcDrawBitmapMasked, "DrawBitmapMasked(%S, {%d}, %S, {%d}, %d)");
sl@0
  1802
		aText.AppendFormat(KLitGcDrawBitmapMasked, &buf1, hHandleToValue(pData.iBitmapMasked->iHandle), 
sl@0
  1803
			&buf2, hHandleToValue(pData.iBitmapMasked->iMaskHandle), pData.iBitmapMasked->iInvertMask);
sl@0
  1804
		}
sl@0
  1805
		break;
sl@0
  1806
	case EWsGcOpDrawBoxText:
sl@0
  1807
		{
sl@0
  1808
		TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.BoxText->box));
sl@0
  1809
		_LIT(LogGcDrawText1,"DrawText(\"");
sl@0
  1810
		aText.Append(LogGcDrawText1);
sl@0
  1811
		TDebugLogTextHandler::Append(aText, TPtrC((TText *)(pData.BoxText+1), pData.BoxText->length));
sl@0
  1812
		_LIT(LogGcDrawText2,"\", %S, %d, %d, %d)");
sl@0
  1813
		aText.AppendFormat(LogGcDrawText2,&iOverflowHandler, &buf, pData.BoxText->baselineOffset, 
sl@0
  1814
										pData.BoxText->horiz, pData.BoxText->leftMrg);
sl@0
  1815
		}
sl@0
  1816
		break;		
sl@0
  1817
	default:
sl@0
  1818
		UnKnownOpcode(aText, aOpcode);
sl@0
  1819
		break;
sl@0
  1820
		}
sl@0
  1821
	}
sl@0
  1822
sl@0
  1823
void TWsDecoder::DecodeGc3(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData)
sl@0
  1824
	{
sl@0
  1825
	TWsGcCmdUnion pData;
sl@0
  1826
sl@0
  1827
	pData.any=aCmdData;
sl@0
  1828
	switch (aOpcode)
sl@0
  1829
		{
sl@0
  1830
	case EWsGcOpSetDrawMode:
sl@0
  1831
		{
sl@0
  1832
		_LIT(LogGcSetDrawMode,"SetDrawMode(%u)");
sl@0
  1833
		aText.AppendFormat(LogGcSetDrawMode,*pData.UInt);
sl@0
  1834
		}
sl@0
  1835
		break;
sl@0
  1836
	case EWsGcOpClearRect:
sl@0
  1837
		{
sl@0
  1838
		TLongBuf buf(TDebugLogTextHandler::FormatRect(*pData.Rect));
sl@0
  1839
		_LIT(LogGcClear,"Clear(%S)");
sl@0
  1840
		aText.AppendFormat(LogGcClear, &buf);
sl@0
  1841
		}
sl@0
  1842
		break;
sl@0
  1843
	case EWsGcOpClear:
sl@0
  1844
		{
sl@0
  1845
		_LIT(LogGcClear,"Clear()");
sl@0
  1846
		aText.AppendFormat(LogGcClear);
sl@0
  1847
		}
sl@0
  1848
		break;
sl@0
  1849
	case EWsGcOpGdiBlt2:
sl@0
  1850
	case EWsGcOpGdiWsBlt2:
sl@0
  1851
		{
sl@0
  1852
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(pData.GdiBlt2->pos));
sl@0
  1853
		_LIT(LogGcGdiBlt,"GdiBlt(%S, {%d})");
sl@0
  1854
		aText.AppendFormat(LogGcGdiBlt,&buf,hHandleToValue(pData.GdiBlt2->handle));
sl@0
  1855
		}
sl@0
  1856
		break;
sl@0
  1857
	case EWsGcOpGdiBlt3:
sl@0
  1858
	case EWsGcOpGdiWsBlt3:
sl@0
  1859
		{
sl@0
  1860
		TShortBuf buf1(TDebugLogTextHandler::FormatPoint(pData.GdiBlt3->pos));
sl@0
  1861
		TLongBuf buf2(TDebugLogTextHandler::FormatRect(pData.GdiBlt3->rect));
sl@0
  1862
		_LIT(LogGcGdiBlt,"GdiBlt(%S, {%d}, %S)");
sl@0
  1863
		aText.AppendFormat(LogGcGdiBlt,&buf1,hHandleToValue(pData.GdiBlt3->handle),&buf2);
sl@0
  1864
		}
sl@0
  1865
		break;
sl@0
  1866
	case EWsGcOpGdiBltMasked:
sl@0
  1867
	case EWsGcOpGdiWsBltMasked:
sl@0
  1868
		{
sl@0
  1869
		TShortBuf buf1(TDebugLogTextHandler::FormatPoint(pData.GdiBltMasked->destination));
sl@0
  1870
		TLongBuf buf2(TDebugLogTextHandler::FormatRect(pData.GdiBltMasked->source));
sl@0
  1871
		_LIT(LogGcBitBltMasked,"BitBltMasked(%S, {%d}, %S, {%d}, %d)");
sl@0
  1872
		aText.AppendFormat(LogGcBitBltMasked, &buf1, hHandleToValue(pData.GdiBltMasked->handle),
sl@0
  1873
										&buf2, hHandleToValue(pData.GdiBltMasked->maskHandle),
sl@0
  1874
										pData.GdiBltMasked->invertMask);
sl@0
  1875
		}
sl@0
  1876
		break;
sl@0
  1877
	case EWsGcOpSize:
sl@0
  1878
		{
sl@0
  1879
		_LIT(LogGcSize,"Size()");
sl@0
  1880
		aText.AppendFormat(LogGcSize);
sl@0
  1881
		}
sl@0
  1882
		break;
sl@0
  1883
	case EWsGcOpUseFont:
sl@0
  1884
		{
sl@0
  1885
		_LIT(LogGcUseFont,"UseFont({0x%x})");
sl@0
  1886
		aText.AppendFormat(LogGcUseFont,hHandleToValue(*pData.handle));
sl@0
  1887
		}
sl@0
  1888
		break;
sl@0
  1889
	case EWsGcOpDiscardFont:
sl@0
  1890
		{
sl@0
  1891
		_LIT(LogGcDiscardFont,"DiscardFont()");
sl@0
  1892
		aText.AppendFormat(LogGcDiscardFont);
sl@0
  1893
		}
sl@0
  1894
		break;
sl@0
  1895
	case EWsGcOpTestInvariant:
sl@0
  1896
		{
sl@0
  1897
		_LIT(LogGcTestInvariant,"unimplemented opcode 'EWsGcOpTestInvariant' (%u)");
sl@0
  1898
		aText.AppendFormat(LogGcTestInvariant, aOpcode);
sl@0
  1899
		}
sl@0
  1900
		break;
sl@0
  1901
	case EWsGcOpReset:
sl@0
  1902
		{
sl@0
  1903
		_LIT(LogGcReset,"Reset()");
sl@0
  1904
		aText.Append(LogGcReset);
sl@0
  1905
		}
sl@0
  1906
		break;
sl@0
  1907
	case EWsGcOpSetDitherOrigin:
sl@0
  1908
		{
sl@0
  1909
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
sl@0
  1910
		_LIT(LogGcSetDitherOrigin,"SetDitherOrigin(%S)");
sl@0
  1911
		aText.AppendFormat(LogGcSetDitherOrigin,&buf);
sl@0
  1912
		}
sl@0
  1913
		break;
sl@0
  1914
	case EWsGcOpMapColors:
sl@0
  1915
		{
sl@0
  1916
		TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.MapColors->rect));
sl@0
  1917
		_LIT(LogGcMapColors,"MapColors(%S,?,%d)");
sl@0
  1918
		aText.AppendFormat(LogGcMapColors,&buf,pData.MapColors->numPairs);
sl@0
  1919
		}
sl@0
  1920
		break;
sl@0
  1921
	case EWsGcOpSetUnderlineStyle:
sl@0
  1922
		{
sl@0
  1923
		_LIT(LogGcSetUnderlineStyle,"SetUnderlineStyle(%x)");
sl@0
  1924
		aText.AppendFormat(LogGcSetUnderlineStyle,*pData.SetUnderlineStyle);
sl@0
  1925
		}
sl@0
  1926
		break;
sl@0
  1927
	case EWsGcOpSetStrikethroughStyle:
sl@0
  1928
		{
sl@0
  1929
		_LIT(LogGcSetStrikethroughStyle,"SetStrikethroughStyle(%x)");
sl@0
  1930
		aText.AppendFormat(LogGcSetStrikethroughStyle,*pData.SetStrikethroughStyle);
sl@0
  1931
		}
sl@0
  1932
		break;
sl@0
  1933
	case EWsGcOpDrawWsGraphic:
sl@0
  1934
	case EWsGcOpDrawWsGraphicPtr:
sl@0
  1935
		{
sl@0
  1936
		TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.WsGraphic->iRect));
sl@0
  1937
		_LIT(KLitGcDrawWsGraphic,"DrawWsGraphic(%x, %d, %S, %d)");
sl@0
  1938
		aText.AppendFormat(KLitGcDrawWsGraphic, pData.WsGraphic->iFlags, pData.WsGraphic->iId, &buf, pData.WsGraphic->iDataLen);
sl@0
  1939
		}
sl@0
  1940
		break;
sl@0
  1941
	case EWsGcOpSetFaded:
sl@0
  1942
		{
sl@0
  1943
		_LIT(KLitGcSetFaded, "SetFaded(%d)");
sl@0
  1944
		aText.AppendFormat(KLitGcSetFaded, *pData.Bool);
sl@0
  1945
		}
sl@0
  1946
		break;
sl@0
  1947
	case EWsGcOpSetFadeParams:
sl@0
  1948
		{
sl@0
  1949
		_LIT(KLitGcSetFadeParams, "SetFadeParams(BlackMap %d, WhiteMap %d)");
sl@0
  1950
		const unsigned char *bytePtr = (const unsigned char*)(pData.UInt);
sl@0
  1951
		aText.AppendFormat(KLitGcSetFadeParams, bytePtr[0], bytePtr[1]);
sl@0
  1952
		}
sl@0
  1953
		break;
sl@0
  1954
	case EWsGcOpGdiAlphaBlendBitmaps:
sl@0
  1955
	case EWsGcOpGdiWsAlphaBlendBitmaps:
sl@0
  1956
		{
sl@0
  1957
		TShortBuf buf1(TDebugLogTextHandler::FormatPoint(pData.AlphaBlendBitmaps->point));
sl@0
  1958
		TLongBuf buf2(TDebugLogTextHandler::FormatRect(pData.AlphaBlendBitmaps->source));
sl@0
  1959
		TShortBuf buf3(TDebugLogTextHandler::FormatPoint(pData.AlphaBlendBitmaps->alphaPoint));
sl@0
  1960
		_LIT(KLitGcAlphaBlendBitmaps,"AlphaBlendBitmaps(%S, {%d}, %S, {%d}, %S)");
sl@0
  1961
		aText.AppendFormat(KLitGcAlphaBlendBitmaps, &buf1, hHandleToValue(pData.AlphaBlendBitmaps->bitmapHandle),
sl@0
  1962
										&buf2, hHandleToValue(pData.AlphaBlendBitmaps->alphaHandle),
sl@0
  1963
										&buf3);
sl@0
  1964
		}
sl@0
  1965
		break;
sl@0
  1966
	case EWsGcOpSetOpaque:
sl@0
  1967
		{
sl@0
  1968
		_LIT(KLitGcOpSetOpaque, "SetOpaque(%d)");
sl@0
  1969
		aText.AppendFormat(KLitGcOpSetOpaque, *pData.Bool);
sl@0
  1970
		}
sl@0
  1971
		break;
sl@0
  1972
	default:
sl@0
  1973
		UnKnownOpcode(aText, aOpcode);
sl@0
  1974
		break;
sl@0
  1975
		}
sl@0
  1976
	}
sl@0
  1977
sl@0
  1978
void TWsDecoder::DecodeScreenDevice(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData, TInt aHandle)
sl@0
  1979
	{
sl@0
  1980
	TWsSdCmdUnion pData;
sl@0
  1981
	_LIT(LogScreenDevice,"CWsScreenDevice[%d]::");
sl@0
  1982
sl@0
  1983
	aText.Format(LogScreenDevice,aHandle);
sl@0
  1984
	pData.any=aCmdData;
sl@0
  1985
	switch (aOpcode)
sl@0
  1986
		{
sl@0
  1987
	case EWsSdOpFree:
sl@0
  1988
		{
sl@0
  1989
		_LIT(LogScreenDeviceDelete,"~CWsScreenDevice()");
sl@0
  1990
		aText.Append(LogScreenDeviceDelete);
sl@0
  1991
		}
sl@0
  1992
		break;
sl@0
  1993
	case EWsSdOpPixel:
sl@0
  1994
		{
sl@0
  1995
		_LIT(LogScreenDevicePixel,"Pixel(%S)");
sl@0
  1996
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(*pData.Point));
sl@0
  1997
		aText.AppendFormat(LogScreenDevicePixel,&buf);
sl@0
  1998
		}
sl@0
  1999
		break;
sl@0
  2000
	case EWsSdOpGetScanLine:
sl@0
  2001
		{		//This fills up the log two much for test code
sl@0
  2002
		aText=KNullDesC;
sl@0
  2003
		/*_LIT(LogScreenDeviceGetScanLine,"GetScanLine(TRgb *aScanLine, %d, %S)");
sl@0
  2004
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(pData.GetScanLine->pos));
sl@0
  2005
		aText.AppendFormat(LogScreenDeviceGetScanLine,pData.GetScanLine->len,&buf);*/
sl@0
  2006
		}
sl@0
  2007
		break;
sl@0
  2008
	case EWsSdOpHorizontalTwipsToPixels:
sl@0
  2009
		{
sl@0
  2010
		_LIT(LogScreenDeviceHorizontalTwipsToPixels,"HorizontalTwipsToPixels()");
sl@0
  2011
		aText.Append(LogScreenDeviceHorizontalTwipsToPixels);
sl@0
  2012
		}
sl@0
  2013
		break;
sl@0
  2014
	case EWsSdOpVerticalTwipsToPixels:
sl@0
  2015
		{
sl@0
  2016
		_LIT(LogScreenDeviceVerticalTwipsToPixels,"VerticalTwipsToPixels()");
sl@0
  2017
		aText.Append(LogScreenDeviceVerticalTwipsToPixels);
sl@0
  2018
		}
sl@0
  2019
		break;
sl@0
  2020
	case EWsSdOpHorizontalPixelsToTwips:
sl@0
  2021
		{
sl@0
  2022
		_LIT(LogScreenDeviceHorizontalPixelsToTwips,"HorizontalPixelsToTwips()");
sl@0
  2023
		aText.Append(LogScreenDeviceHorizontalPixelsToTwips);
sl@0
  2024
		}
sl@0
  2025
		break;
sl@0
  2026
	case EWsSdOpVerticalPixelsToTwips:
sl@0
  2027
		{
sl@0
  2028
		_LIT(LogScreenDeviceVerticalPixelsToTwips,"VerticalPixelsToTwips()");
sl@0
  2029
		aText.Append(LogScreenDeviceVerticalPixelsToTwips);
sl@0
  2030
		}
sl@0
  2031
		break;
sl@0
  2032
	case EWsSdOpPixelSize:
sl@0
  2033
		{
sl@0
  2034
		_LIT(LogScreenDeviceSizeInPixels,"SizeInPixels()");
sl@0
  2035
		aText.Append(LogScreenDeviceSizeInPixels);
sl@0
  2036
		}
sl@0
  2037
		break;
sl@0
  2038
	case EWsSdOpTwipsSize:
sl@0
  2039
		{
sl@0
  2040
		_LIT(LogScreenDeviceSizeInTwips,"SizeInTwips()");
sl@0
  2041
		aText.Append(LogScreenDeviceSizeInTwips);
sl@0
  2042
		}
sl@0
  2043
		break;
sl@0
  2044
	case EWsSdOpDisplayMode:
sl@0
  2045
		{
sl@0
  2046
		_LIT(LogScreenDeviceDisplayMode,"DisplayMode()");
sl@0
  2047
		aText.Append(LogScreenDeviceDisplayMode);
sl@0
  2048
		}
sl@0
  2049
		break;
sl@0
  2050
	case EWsSdOpRectCompare:
sl@0
  2051
		{
sl@0
  2052
		_LIT(LogScreenDeviceRectCompare,"RectCompare(%S, %S)");
sl@0
  2053
		TLongBuf buf1(TDebugLogTextHandler::FormatRect(pData.RectCompare->rect1));
sl@0
  2054
		TLongBuf buf2(TDebugLogTextHandler::FormatRect(pData.RectCompare->rect2));
sl@0
  2055
		aText.AppendFormat(LogScreenDeviceRectCompare,&buf1,&buf2);
sl@0
  2056
		}
sl@0
  2057
		break;
sl@0
  2058
	case EWsSdOpPointerRect:
sl@0
  2059
		{
sl@0
  2060
		_LIT(LogScreenDevicePointerRect,"PointerRect()");
sl@0
  2061
		aText.Append(LogScreenDevicePointerRect);
sl@0
  2062
		}
sl@0
  2063
		break;
sl@0
  2064
	case EWsSdOpCopyScreenToBitmap:
sl@0
  2065
		{
sl@0
  2066
		_LIT(LogScreenDeviceCopyScreenToBitmap,"CopyScreenToBitmap(%d)");
sl@0
  2067
		aText.AppendFormat(LogScreenDeviceCopyScreenToBitmap,pData.CopyScreenToBitmap->handle);
sl@0
  2068
		}
sl@0
  2069
		break;
sl@0
  2070
	case EWsSdOpCopyScreenToBitmap2:
sl@0
  2071
		{
sl@0
  2072
		_LIT(LogScreenDeviceCopyScreenToBitmap2,"CopyScreenToBitmap(%d,%S)");
sl@0
  2073
		TLongBuf buf(TDebugLogTextHandler::FormatRect(pData.CopyScreenToBitmap2->rect));
sl@0
  2074
		aText.AppendFormat(LogScreenDeviceCopyScreenToBitmap2,pData.CopyScreenToBitmap2->handle,&buf);
sl@0
  2075
		}
sl@0
  2076
		break;
sl@0
  2077
	case EWsSdOpSetScreenSizeAndRotation:
sl@0
  2078
		{
sl@0
  2079
		_LIT(LogScreenDeviceSetScreenSizeAndRotation,"SetScreenSizeAndRotation({%S, %S, %d})");
sl@0
  2080
		TShortBuf buf1(TDebugLogTextHandler::FormatSize(pData.PixelsTwipsAndRotation->iPixelSize));
sl@0
  2081
		TShortBuf buf2(TDebugLogTextHandler::FormatSize(pData.PixelsTwipsAndRotation->iTwipsSize));
sl@0
  2082
		aText.AppendFormat(LogScreenDeviceSetScreenSizeAndRotation,&buf1,&buf2,pData.PixelsTwipsAndRotation->iRotation);
sl@0
  2083
		}
sl@0
  2084
		break;
sl@0
  2085
	case EWsSdOpSetScreenSizeAndRotation2:
sl@0
  2086
		{
sl@0
  2087
		_LIT(LogScreenDeviceSetScreenSizeAndRotation,"SetScreenSizeAndRotation({%S, %d})");
sl@0
  2088
		TShortBuf buf(TDebugLogTextHandler::FormatSize(pData.PixelsAndRotation->iPixelSize));
sl@0
  2089
		aText.AppendFormat(LogScreenDeviceSetScreenSizeAndRotation,&buf,pData.PixelsAndRotation->iRotation);
sl@0
  2090
		}
sl@0
  2091
		break;
sl@0
  2092
	case EWsSdOpGetDefaultScreenSizeAndRotation:
sl@0
  2093
	case EWsSdOpGetDefaultScreenSizeAndRotation2:
sl@0
  2094
		{
sl@0
  2095
		_LIT(LogScreenDeviceGetDefaultScreenSizeAndRotation,"GetDefaultScreenSizeAndRotation(...)");
sl@0
  2096
		aText.Append(LogScreenDeviceGetDefaultScreenSizeAndRotation);
sl@0
  2097
		}
sl@0
  2098
		break;
sl@0
  2099
	case EWsSdOpGetNumScreenModes:
sl@0
  2100
		{
sl@0
  2101
		_LIT(LogScreenDeviceNumScreenModes,"NumScreenModes");
sl@0
  2102
		aText.Append(LogScreenDeviceNumScreenModes);
sl@0
  2103
		}
sl@0
  2104
		break;
sl@0
  2105
	case EWsSdOpSetScreenMode:
sl@0
  2106
		{
sl@0
  2107
		_LIT(LogScreenDeviceSetScreenMode,"ScreenMode(%d)");
sl@0
  2108
		aText.AppendFormat(LogScreenDeviceSetScreenMode,*pData.Int);
sl@0
  2109
		}
sl@0
  2110
		break;
sl@0
  2111
	case EWsSdOpGetScreenModeSizeAndRotation:
sl@0
  2112
	case EWsSdOpGetScreenModeSizeAndRotation2:
sl@0
  2113
		{
sl@0
  2114
		_LIT(LogScreenDeviceGetScreenModeSizeAndRotation,"GetScreenModeSizeAndRotation(%d)");
sl@0
  2115
		aText.AppendFormat(LogScreenDeviceGetScreenModeSizeAndRotation,*pData.Int);
sl@0
  2116
		}
sl@0
  2117
		break;
sl@0
  2118
	case EWsSdOpSetScreenModeEnforcement:
sl@0
  2119
		{
sl@0
  2120
		_LIT(LogScreenDeviceSetScreenModeEnforcement,"SetScreenModeEnforcement(%d)");
sl@0
  2121
		aText.AppendFormat(LogScreenDeviceSetScreenModeEnforcement,*pData.Int);
sl@0
  2122
		}
sl@0
  2123
		break;
sl@0
  2124
	case EWsSdOpScreenModeEnforcement:
sl@0
  2125
		{
sl@0
  2126
		_LIT(LogScreenDeviceScreenModeEnforcement,"ScreenModeEnforcement");
sl@0
  2127
		aText.Append(LogScreenDeviceScreenModeEnforcement);
sl@0
  2128
		}
sl@0
  2129
		break;
sl@0
  2130
	case EWsSdOpSetModeRotation:
sl@0
  2131
		{
sl@0
  2132
		_LIT(LogScreenDeviceSetModeRotation,"SetModeRotation(%d,%d)");
sl@0
  2133
		aText.AppendFormat(LogScreenDeviceSetModeRotation,pData.SetScreenRotation->mode,pData.SetScreenRotation->rotation);
sl@0
  2134
		}
sl@0
  2135
		break;
sl@0
  2136
	case EWsSdOpGetRotationList:
sl@0
  2137
		{
sl@0
  2138
		_LIT(LogScreenDeviceGetRotationList,"GetRotationList(%d)");
sl@0
  2139
		aText.AppendFormat(LogScreenDeviceGetRotationList,*pData.Int);
sl@0
  2140
		}
sl@0
  2141
		break;
sl@0
  2142
	case EWsSdOpPaletteAttributes:
sl@0
  2143
		{
sl@0
  2144
		_LIT(LogScreenDevicePaletteAttributes,"PaletteAttributes(...)");
sl@0
  2145
		aText.Append(LogScreenDevicePaletteAttributes);
sl@0
  2146
		}
sl@0
  2147
		break;
sl@0
  2148
	case EWsSdOpSetPalette:
sl@0
  2149
		{
sl@0
  2150
		_LIT(LogScreenDeviceSetPalette,"SetPalette(...)");
sl@0
  2151
		aText.Append(LogScreenDeviceSetPalette);
sl@0
  2152
		}
sl@0
  2153
		break;
sl@0
  2154
	case EWsSdOpGetPalette:
sl@0
  2155
		{
sl@0
  2156
		_LIT(LogScreenDeviceGetPalette,"GetPalette()");
sl@0
  2157
		aText.Append(LogScreenDeviceGetPalette);
sl@0
  2158
		}
sl@0
  2159
		break;
sl@0
  2160
	case EWsSdOpGetScreenMode:
sl@0
  2161
		{
sl@0
  2162
		_LIT(LogScreenDeviceGetScreenMode,"CurrentScreenMode()");
sl@0
  2163
		aText.Append(LogScreenDeviceGetScreenMode);
sl@0
  2164
		}
sl@0
  2165
		break;
sl@0
  2166
	case EWsSdOpGetDefaultScreenModeOrigin:
sl@0
  2167
		{
sl@0
  2168
		_LIT(LogScreenDeviceGetDefaultScreenModeOrigin,"GetDefaultScreenModeOrigin()");
sl@0
  2169
		aText.Append(LogScreenDeviceGetDefaultScreenModeOrigin);
sl@0
  2170
		}	
sl@0
  2171
		break;
sl@0
  2172
	case EWsSdOpGetScreenModeOrigin:
sl@0
  2173
		{
sl@0
  2174
		_LIT(LogScreenDeviceGetScreenModeOrigin,"GetScreenModeOrigin(%d)");
sl@0
  2175
		aText.AppendFormat(LogScreenDeviceGetScreenModeOrigin, *pData.Int);
sl@0
  2176
		}	
sl@0
  2177
		break;
sl@0
  2178
	case EWsSdOpGetScreenModeScale:
sl@0
  2179
		{
sl@0
  2180
		_LIT(LogScreenDeviceGetScreenModeScale,"GetScreenModeScale(%d)");
sl@0
  2181
		aText.AppendFormat(LogScreenDeviceGetScreenModeScale, *pData.Int);
sl@0
  2182
		}	
sl@0
  2183
		break;
sl@0
  2184
	case EWsSdOpGetCurrentScreenModeScale:
sl@0
  2185
		{
sl@0
  2186
		_LIT(LogScreenDeviceGetCurrentScreenModeScale,"GetCurrentScreenModeScale()");
sl@0
  2187
		aText.Append(LogScreenDeviceGetCurrentScreenModeScale);
sl@0
  2188
		}	
sl@0
  2189
		break;		
sl@0
  2190
	case EWsSdOpSetAppScreenMode:
sl@0
  2191
		{
sl@0
  2192
		_LIT(LogScreenDeviceSetAppScreenMode,"SetAppScreenMode(%d)");
sl@0
  2193
		aText.AppendFormat(LogScreenDeviceSetAppScreenMode, *pData.Int);
sl@0
  2194
		}	
sl@0
  2195
		break;		
sl@0
  2196
	case EWsSdOpGetScreenModeScaledOrigin:
sl@0
  2197
		{
sl@0
  2198
		_LIT(LogScreenDeviceGetScreenModeScaledOrigin,"GetScreenModeScaledOrigin(%d)");
sl@0
  2199
		aText.AppendFormat(LogScreenDeviceGetScreenModeScaledOrigin, *pData.Int);
sl@0
  2200
		}	
sl@0
  2201
		break;		
sl@0
  2202
	case EWsSdOpGetCurrentScreenModeScaledOrigin:
sl@0
  2203
		{
sl@0
  2204
		_LIT(LogScreenDeviceGetCurrentScreenModeScaledOrigin,"GetCurrentScreenModeScaledOrigin()");
sl@0
  2205
		aText.Append(LogScreenDeviceGetCurrentScreenModeScaledOrigin);
sl@0
  2206
		}	
sl@0
  2207
		break;		
sl@0
  2208
	case EWsSdOpSetCurrentScreenModeAttributes:
sl@0
  2209
		{
sl@0
  2210
		_LIT(LogScreenDeviceSetCurrentScreenModeAttributes,"SetCurrentScreenModeAttributes(%S)");
sl@0
  2211
		TShortBuf buf(TDebugLogTextHandler::FormatSize(pData.ScreenSizeMode->iScreenSize));
sl@0
  2212
		aText.AppendFormat(LogScreenDeviceSetCurrentScreenModeAttributes,&buf);
sl@0
  2213
		}	
sl@0
  2214
		break;		
sl@0
  2215
	case EWsSdOpGetCurrentScreenModeAttributes:
sl@0
  2216
		{
sl@0
  2217
		_LIT(LogScreenDeviceGetCurrentScreenModeOrigin,"GetCurrentScreenModeAttributes()");
sl@0
  2218
		aText.Append(LogScreenDeviceGetCurrentScreenModeOrigin);
sl@0
  2219
		}	
sl@0
  2220
		break;		
sl@0
  2221
	case EWsSdOpGetScreenNumber:
sl@0
  2222
		{
sl@0
  2223
		_LIT(LogScreenDeviceGetScreenNumber,"GetScreenNumber()");
sl@0
  2224
		aText.Append(LogScreenDeviceGetScreenNumber);
sl@0
  2225
		}	
sl@0
  2226
		break;		
sl@0
  2227
	case EWsSdOpGetScreenSizeModeList:
sl@0
  2228
		{
sl@0
  2229
		_LIT(LogScreenDeviceGetScreenSizeModeList,"GetScreenSizeModeList(RArray<TInt>* aModeList)");
sl@0
  2230
		aText.Append(LogScreenDeviceGetScreenSizeModeList);
sl@0
  2231
		}	
sl@0
  2232
		break;		
sl@0
  2233
	case EWsSdOpGetScreenModeDisplayMode:
sl@0
  2234
		{
sl@0
  2235
		_LIT(LogScreenDeviceGetScreenModeDisplayMode,"GetScreenModeDisplayMode(%d)");
sl@0
  2236
		aText.AppendFormat(LogScreenDeviceGetScreenModeDisplayMode, *pData.Int);
sl@0
  2237
		}	
sl@0
  2238
		break;		
sl@0
  2239
	case EWsClOpSetBackLight:
sl@0
  2240
		{
sl@0
  2241
		_LIT(LogScreenDeviceSetBackLight,"SetBackLight(%u)");
sl@0
  2242
		aText.AppendFormat(LogScreenDeviceSetBackLight, *pData.UInt);
sl@0
  2243
		}	
sl@0
  2244
		break;		
sl@0
  2245
	default:
sl@0
  2246
		UnKnownOpcode(aText, aOpcode);
sl@0
  2247
		break;
sl@0
  2248
		}
sl@0
  2249
	}
sl@0
  2250
sl@0
  2251
void TWsDecoder::DecodeAnimDll(TBuf<LogTBufSize>& aText,TInt aOpcode,const TAny* /*aCmdData*/,TInt aHandle)
sl@0
  2252
	{
sl@0
  2253
	aText.Format(_L("CAnimDll[%d]::"),aHandle);
sl@0
  2254
	switch (aOpcode)
sl@0
  2255
		{
sl@0
  2256
	case EWsAnimDllOpCreateInstance:
sl@0
  2257
		TDebugLogTextHandler::Append(aText, _L("CreateInstance(...)"));
sl@0
  2258
		break;
sl@0
  2259
	case EWsAnimDllOpDestroyInstance:
sl@0
  2260
		TDebugLogTextHandler::Append(aText, LogClose);
sl@0
  2261
		break;
sl@0
  2262
	case EWsAnimDllOpCommandReply:
sl@0
  2263
		TDebugLogTextHandler::Append(aText, _L("CommandReply(...)"));
sl@0
  2264
		break;
sl@0
  2265
	case EWsAnimDllOpCommand:
sl@0
  2266
		TDebugLogTextHandler::Append(aText, _L("Command(...)"));
sl@0
  2267
		break;
sl@0
  2268
	case EWsAnimDllOpFree:
sl@0
  2269
		aText.Append(_L("~CAnimDll()"));
sl@0
  2270
		break;
sl@0
  2271
	case EWsAnimDllOpCreateInstanceSprite:
sl@0
  2272
		aText.Append(_L("EWsAnimDllOpCreateInstanceSprite enum"));
sl@0
  2273
		break;
sl@0
  2274
	default:
sl@0
  2275
		UnKnownOpcode(aText, aOpcode);
sl@0
  2276
		break;
sl@0
  2277
		}
sl@0
  2278
	}
sl@0
  2279
sl@0
  2280
void TWsDecoder::DecodeSpriteBase(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData, TInt aHandle)
sl@0
  2281
	{
sl@0
  2282
	TWsSpriteCmdUnion pData;
sl@0
  2283
sl@0
  2284
	aText.Format(_L("RWsSpriteBase[%d]::"),aHandle);
sl@0
  2285
	pData.any=aCmdData;
sl@0
  2286
	switch (aOpcode)
sl@0
  2287
		{
sl@0
  2288
	case EWsSpriteOpFree:
sl@0
  2289
		aText.Append(LogClose);
sl@0
  2290
		break;
sl@0
  2291
	case EWsSpriteOpSetPosition:
sl@0
  2292
		aText.Append(_L("SetPosition(...)"));
sl@0
  2293
		break;
sl@0
  2294
	case EWsSpriteOpUpdateMember:
sl@0
  2295
		aText.AppendFormat(_L("UpdateMember(%d)"),pData.UpdateMember->index);
sl@0
  2296
		break;
sl@0
  2297
	case EWsSpriteOpUpdateMember2:
sl@0
  2298
		aText.AppendFormat(_L("UpdateMember(%d,{%d,%d,%d,%d,{%d,%d},%d})"),pData.UpdateMember->index,
sl@0
  2299
								pData.UpdateMember->data.iBitmap,pData.UpdateMember->data.iMaskBitmap,
sl@0
  2300
								pData.UpdateMember->data.iInvertMask,pData.UpdateMember->data.iDrawMode,
sl@0
  2301
								pData.UpdateMember->data.iOffset.iX,pData.UpdateMember->data.iOffset.iY,
sl@0
  2302
								pData.UpdateMember->data.iInterval.Int());
sl@0
  2303
		break;
sl@0
  2304
	case EWsSpriteOpAppendMember:
sl@0
  2305
		aText.Append(_L("AppendMember(...)"));
sl@0
  2306
		break;
sl@0
  2307
	case EWsSpriteOpActivate:
sl@0
  2308
		aText.Append(_L("Activate()"));
sl@0
  2309
		break;
sl@0
  2310
	default:
sl@0
  2311
		UnKnownOpcode(aText, aOpcode);
sl@0
  2312
		break;
sl@0
  2313
		}
sl@0
  2314
	}
sl@0
  2315
sl@0
  2316
void TWsDecoder::DecodeBitmap(TBuf<LogTBufSize>& aText,TInt aOpcode,const TAny* /*aCmdData*/,TInt aHandle)
sl@0
  2317
	{
sl@0
  2318
	aText.Format(_L("CWsBitmap[%d]::"),aHandle);
sl@0
  2319
	switch (aOpcode)
sl@0
  2320
		{
sl@0
  2321
	case EWsBitmapOpFree:
sl@0
  2322
		aText.Append(LogClose);
sl@0
  2323
		break;
sl@0
  2324
	default:
sl@0
  2325
		UnKnownOpcode(aText, aOpcode);
sl@0
  2326
		break;
sl@0
  2327
		}
sl@0
  2328
	}
sl@0
  2329
sl@0
  2330
void TWsDecoder::DecodeDirect(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData, TInt aHandle)
sl@0
  2331
	{
sl@0
  2332
	TWsDirectCmdUnion pData;
sl@0
  2333
	
sl@0
  2334
	_LIT(KClassName,"RDirectScreenAccess[%d]::");
sl@0
  2335
	aText.Format(KClassName,aHandle);
sl@0
  2336
	pData.any=aCmdData;
sl@0
  2337
	switch (aOpcode)
sl@0
  2338
		{
sl@0
  2339
	case EWsDirectOpFree:
sl@0
  2340
		aText.Append(LogClose);
sl@0
  2341
		break;
sl@0
  2342
	case EWsDirectOpRequest:
sl@0
  2343
		{
sl@0
  2344
		_LIT(LogDirectRequest,"Request(TInt *stat,%d)");
sl@0
  2345
		aText.AppendFormat(LogDirectRequest,hHandleToValue(*pData.Int));
sl@0
  2346
		}
sl@0
  2347
		break;
sl@0
  2348
	case EWsDirectOpInitFailed:
sl@0
  2349
		{
sl@0
  2350
		_LIT(LogDirectInitFailed,"InitFailed()");
sl@0
  2351
		aText.Append(LogDirectInitFailed);
sl@0
  2352
		}
sl@0
  2353
		break;
sl@0
  2354
	case EWsDirectOpGetRegion:
sl@0
  2355
		{
sl@0
  2356
		_LIT(LogDirectGetRegion,"GetRegion(%d)");
sl@0
  2357
		aText.AppendFormat(LogDirectGetRegion,*pData.Int);
sl@0
  2358
		}
sl@0
  2359
		break;
sl@0
  2360
	case EWsDirectOpCancel:
sl@0
  2361
		{
sl@0
  2362
		_LIT(LogDirectCancel,"Cancel()");
sl@0
  2363
		aText.Append(LogDirectCancel);
sl@0
  2364
		}
sl@0
  2365
		break;
sl@0
  2366
	case EWsDirectOpGetSendQueue:
sl@0
  2367
		{
sl@0
  2368
		_LIT(LogGetSendQueue,"EWsDirectOpGetSendQueue enum");
sl@0
  2369
		aText.Append(LogGetSendQueue);
sl@0
  2370
		}
sl@0
  2371
		break;	
sl@0
  2372
	case EWsDirectOpGetRecQueue:
sl@0
  2373
		{
sl@0
  2374
		_LIT(LogGetRecQueue,"EWsDirectOpGetRecQueue enum");
sl@0
  2375
		aText.Append(LogGetRecQueue);
sl@0
  2376
		}
sl@0
  2377
		break;	
sl@0
  2378
	default:
sl@0
  2379
		UnKnownOpcode(aText, aOpcode);
sl@0
  2380
		break;
sl@0
  2381
		}
sl@0
  2382
	}
sl@0
  2383
sl@0
  2384
void TWsDecoder::DecodeClick(TBuf<LogTBufSize> &aText, TInt aOpcode, const TAny *aCmdData, TInt aHandle)
sl@0
  2385
	{
sl@0
  2386
	TWsClickCmdUnion pData;
sl@0
  2387
sl@0
  2388
	_LIT(KClassName,"RSoundPlugIn[%d]::");
sl@0
  2389
	aText.Format(KClassName,aHandle);
sl@0
  2390
	pData.any=aCmdData;
sl@0
  2391
	switch (aOpcode)
sl@0
  2392
		{
sl@0
  2393
	case EWsClickOpFree:
sl@0
  2394
		aText.Append(LogClose);
sl@0
  2395
		break;
sl@0
  2396
	case EWsClickOpIsLoaded:
sl@0
  2397
		{
sl@0
  2398
		_LIT(LogClickIsLoaded,"IsLoaded()");
sl@0
  2399
		aText.Append(LogClickIsLoaded);
sl@0
  2400
		}
sl@0
  2401
		break;
sl@0
  2402
	case EWsClickOpUnLoad:
sl@0
  2403
		{
sl@0
  2404
		_LIT(LogClickUnLoad,"UnLoad()");
sl@0
  2405
		aText.Append(LogClickUnLoad);
sl@0
  2406
		}
sl@0
  2407
		break;
sl@0
  2408
	case EWsClickOpLoad:
sl@0
  2409
		{
sl@0
  2410
		_LIT(LogClickLoad1,"Load(\"");
sl@0
  2411
		_LIT(LogClickLoad2,"\")");
sl@0
  2412
		TDebugLogTextHandler::Append(aText, LogClickLoad1);
sl@0
  2413
		TDebugLogTextHandler::Append(aText, TPtrC((TText *)(pData.Int+1), *pData.Int));
sl@0
  2414
		TDebugLogTextHandler::Append(aText, LogClickLoad2);
sl@0
  2415
		}
sl@0
  2416
		break;
sl@0
  2417
	case EWsClickOpCommandReply:
sl@0
  2418
		{
sl@0
  2419
		_LIT(LogClickCommandReply,"CommandReply(...)");
sl@0
  2420
		aText.Append(LogClickCommandReply);
sl@0
  2421
		}
sl@0
  2422
		break;
sl@0
  2423
	case EWsClickOpSetKeyClick:
sl@0
  2424
		{			
sl@0
  2425
		_LIT(LogSetKeyClick,"SetKeyClick(%u)");
sl@0
  2426
		aText.AppendFormat(LogSetKeyClick, *pData.Bool);
sl@0
  2427
		}
sl@0
  2428
		break;
sl@0
  2429
	case EWsClickOpSetPenClick:
sl@0
  2430
		{			
sl@0
  2431
		_LIT(LogSetPenClick,"SetPenClick(%u)");
sl@0
  2432
		aText.AppendFormat(LogSetPenClick, *pData.Bool);
sl@0
  2433
		}	
sl@0
  2434
		break;
sl@0
  2435
	case EWsClickOpKeyClickEnabled:
sl@0
  2436
		{
sl@0
  2437
		_LIT(LogKeyClickEnabled,"KeyClickEnabled()");
sl@0
  2438
		aText.Append(LogKeyClickEnabled);
sl@0
  2439
		}
sl@0
  2440
		break;
sl@0
  2441
	case EWsClickOpPenClickEnabled:
sl@0
  2442
		{
sl@0
  2443
		_LIT(LogPenClickEnabled,"PenClickEnabled()");
sl@0
  2444
		aText.Append(LogPenClickEnabled);
sl@0
  2445
		}
sl@0
  2446
		break;
sl@0
  2447
	default:
sl@0
  2448
		UnKnownOpcode(aText, aOpcode);
sl@0
  2449
		break;
sl@0
  2450
		}
sl@0
  2451
	}
sl@0
  2452
sl@0
  2453
TDesC &TWsDecoder::replyBufDetails(TInt aClass, TInt aOpcode, const TDesC8 *aReplyDes8, const TDesC *aReplyDesText)
sl@0
  2454
	{
sl@0
  2455
	iCommandDetailsText.Format(_L("Reply Buffer: "));
sl@0
  2456
	switch (aClass)
sl@0
  2457
		{
sl@0
  2458
	case WS_HANDLE_GROUP_WINDOW:
sl@0
  2459
		ReplyBufWindowGroup(iCommandDetailsText, aOpcode, aReplyDes8, aReplyDesText);
sl@0
  2460
		break;
sl@0
  2461
	case WS_HANDLE_CLIENT:
sl@0
  2462
		ReplyBufClient(iCommandDetailsText, aOpcode, aReplyDes8, aReplyDesText);
sl@0
  2463
		break;
sl@0
  2464
	case WS_HANDLE_WINDOW:
sl@0
  2465
		ReplyBufWindow(iCommandDetailsText, aOpcode, aReplyDes8, aReplyDesText);
sl@0
  2466
		break;
sl@0
  2467
	case WS_HANDLE_SCREEN_DEVICE:
sl@0
  2468
		ReplyBufScreenDevice(iCommandDetailsText, aOpcode, aReplyDes8, aReplyDesText);
sl@0
  2469
		break;
sl@0
  2470
	default:
sl@0
  2471
		iCommandDetailsText.Format(_L("Reply buffer not handled (%u)"), aClass);
sl@0
  2472
		UnKnown();
sl@0
  2473
		break;
sl@0
  2474
		}
sl@0
  2475
	return iCommandDetailsText;
sl@0
  2476
	}
sl@0
  2477
sl@0
  2478
TDesC &TWsDecoder::commandDetails(TInt aClass, TInt aOpcode, const TAny *aCmdData, TInt aHandle)
sl@0
  2479
	{
sl@0
  2480
	switch (aClass)
sl@0
  2481
		{
sl@0
  2482
	case WS_HANDLE_ROOT_WINDOW:
sl@0
  2483
		iCommandDetailsText.Format(_L("invalid class"));
sl@0
  2484
		break;
sl@0
  2485
	case WS_HANDLE_GROUP_WINDOW:
sl@0
  2486
		DecodeWindowGroup(iCommandDetailsText, aOpcode, aCmdData, aHandle);
sl@0
  2487
		break;
sl@0
  2488
	case WS_HANDLE_CLIENT:
sl@0
  2489
		DecodeClient(iCommandDetailsText, aOpcode, aCmdData, aHandle);
sl@0
  2490
		break;
sl@0
  2491
	case WS_HANDLE_WINDOW:
sl@0
  2492
		DecodeWindow(iCommandDetailsText, aOpcode, aCmdData, aHandle);
sl@0
  2493
		break;
sl@0
  2494
	case WS_HANDLE_GC:
sl@0
  2495
		DecodeGc(iCommandDetailsText, aOpcode, aCmdData, aHandle);
sl@0
  2496
		break;
sl@0
  2497
	case WS_HANDLE_SCREEN_DEVICE:
sl@0
  2498
		DecodeScreenDevice(iCommandDetailsText, aOpcode, aCmdData, aHandle);
sl@0
  2499
		break;
sl@0
  2500
	case WS_HANDLE_ANIM_DLL:
sl@0
  2501
		DecodeAnimDll(iCommandDetailsText, aOpcode, aCmdData, aHandle);
sl@0
  2502
		break;
sl@0
  2503
	case WS_HANDLE_SPRITE:
sl@0
  2504
	case WS_HANDLE_POINTER_CURSOR:
sl@0
  2505
	case WS_HANDLE_TEXT_CURSOR:
sl@0
  2506
		DecodeSpriteBase(iCommandDetailsText, aOpcode, aCmdData, aHandle);
sl@0
  2507
		break;
sl@0
  2508
	case WS_HANDLE_BITMAP:
sl@0
  2509
		DecodeBitmap(iCommandDetailsText, aOpcode, aCmdData, aHandle);
sl@0
  2510
		break;
sl@0
  2511
	case WS_HANDLE_DIRECT:
sl@0
  2512
		DecodeDirect(iCommandDetailsText, aOpcode, aCmdData, aHandle);
sl@0
  2513
		break;
sl@0
  2514
	case WS_HANDLE_CLICK:
sl@0
  2515
		DecodeClick(iCommandDetailsText, aOpcode, aCmdData, aHandle);
sl@0
  2516
		break;
sl@0
  2517
	default:
sl@0
  2518
		iCommandDetailsText.Format(_L("unknown class (%u)"), aClass);
sl@0
  2519
		UnKnown();
sl@0
  2520
		break;
sl@0
  2521
		}
sl@0
  2522
	iRequestFuncClass=aClass;
sl@0
  2523
	iPrevOpcode=aOpcode;
sl@0
  2524
	return iCommandDetailsText;
sl@0
  2525
	}
sl@0
  2526
sl@0
  2527
TDesC &TWsDecoder::eventDetails(const TWsEvent *aWsEvent)
sl@0
  2528
	{
sl@0
  2529
	switch (aWsEvent->Type())
sl@0
  2530
		{
sl@0
  2531
	case EEventKey:
sl@0
  2532
		iEventDetailsText.Format(_L("EEventKey (code %u, scanCode %u, mdfs 0x%04x, repeats %u)"),
sl@0
  2533
											aWsEvent->Key()->iCode,
sl@0
  2534
											aWsEvent->Key()->iScanCode,
sl@0
  2535
											aWsEvent->Key()->iModifiers,
sl@0
  2536
											aWsEvent->Key()->iRepeats);
sl@0
  2537
		break;
sl@0
  2538
	case EEventKeyUp:
sl@0
  2539
		iEventDetailsText.Format(_L("EEventKeyUp (scanCode %u, mdfs 0x%04x)"),
sl@0
  2540
											aWsEvent->Key()->iScanCode,
sl@0
  2541
											aWsEvent->Key()->iModifiers);
sl@0
  2542
		break;
sl@0
  2543
	case EEventKeyDown:
sl@0
  2544
		iEventDetailsText.Format(_L("EEventKeyDown (scanCode %u, mdfs 0x%04x)"),
sl@0
  2545
											aWsEvent->Key()->iScanCode,
sl@0
  2546
											aWsEvent->Key()->iModifiers);
sl@0
  2547
		break;
sl@0
  2548
	case EEventPointer:
sl@0
  2549
		{
sl@0
  2550
		TShortBuf buf1(TDebugLogTextHandler::PointerEventType(aWsEvent->Pointer()->iType));
sl@0
  2551
		TShortBuf buf2(TDebugLogTextHandler::FormatPoint(aWsEvent->Pointer()->iPosition));
sl@0
  2552
		TShortBuf buf3(TDebugLogTextHandler::FormatPoint(aWsEvent->Pointer()->iParentPosition));
sl@0
  2553
		iEventDetailsText.Format(_L("EEventPointer (type %S, modifiers 0x%x, pos %S, global-pos %S)"),
sl@0
  2554
											&buf1,aWsEvent->Pointer()->iModifiers,&buf2,&buf3);
sl@0
  2555
		}
sl@0
  2556
		break;
sl@0
  2557
	case EEventDragDrop:
sl@0
  2558
		{
sl@0
  2559
		TShortBuf buf1(TDebugLogTextHandler::PointerEventType(aWsEvent->Pointer()->iType));
sl@0
  2560
		TShortBuf buf2(TDebugLogTextHandler::FormatPoint(aWsEvent->Pointer()->iPosition));
sl@0
  2561
		TShortBuf buf3(TDebugLogTextHandler::FormatPoint(aWsEvent->Pointer()->iParentPosition));
sl@0
  2562
		iEventDetailsText.Format(_L("EEventDragDrop (type %S, modifiers 0x%x, pos %S, global-pos %S)"),
sl@0
  2563
											&buf1,aWsEvent->Pointer()->iModifiers,&buf2,&buf3);
sl@0
  2564
		}
sl@0
  2565
		break;
sl@0
  2566
	case EEventPointerEnter:
sl@0
  2567
		iEventDetailsText.Format(_L("EEventPointerEnter"));
sl@0
  2568
		break;
sl@0
  2569
	case EEventPointerExit:
sl@0
  2570
		iEventDetailsText.Format(_L("EEventPointerExit"));
sl@0
  2571
		break;
sl@0
  2572
	case EEventFocusLost:
sl@0
  2573
		iEventDetailsText.Format(_L("EEventFocusLost"));
sl@0
  2574
		break;
sl@0
  2575
	case EEventFocusGained:
sl@0
  2576
		iEventDetailsText.Format(_L("EEventFocusGained"));
sl@0
  2577
		break;
sl@0
  2578
	case EEventModifiersChanged:
sl@0
  2579
		iEventDetailsText.Format(_L("EEventModifiersChanged"));
sl@0
  2580
		break;
sl@0
  2581
	case EEventSwitchOn:
sl@0
  2582
		iEventDetailsText.Format(_L("EEventSwitchOn"));
sl@0
  2583
		break;
sl@0
  2584
	case EEventPassword:
sl@0
  2585
		iEventDetailsText.Format(_L("EEventPassword"));
sl@0
  2586
		break;
sl@0
  2587
	case EEventWindowGroupsChanged:
sl@0
  2588
		iEventDetailsText.Format(_L("EEventWindowGroupsChanged"));
sl@0
  2589
		break;
sl@0
  2590
	case EEventErrorMessage:
sl@0
  2591
		iEventDetailsText.Format(_L("EEventErrorMessage (%d,%d)"),aWsEvent->ErrorMessage()->iErrorCategory,aWsEvent->ErrorMessage()->iError);
sl@0
  2592
		break;
sl@0
  2593
	case EEventMessageReady:
sl@0
  2594
		iEventDetailsText.Format(_L("EEventMessageReady"));
sl@0
  2595
		break;
sl@0
  2596
	case EEventScreenDeviceChanged:
sl@0
  2597
		iEventDetailsText.Format(_L("EEventScreenDeviceChanged"));
sl@0
  2598
		break;
sl@0
  2599
	case EEventSwitchOff:
sl@0
  2600
		{
sl@0
  2601
		_LIT(LogEventSwitchOff,"EEventSwitchOff");
sl@0
  2602
		iEventDetailsText.Format(LogEventSwitchOff);
sl@0
  2603
		}
sl@0
  2604
		break;
sl@0
  2605
	case EEventKeySwitchOff:
sl@0
  2606
		{
sl@0
  2607
		_LIT(LogEventKeySwitchOff,"EEventKeySwitchOff");
sl@0
  2608
		iEventDetailsText.Format(LogEventKeySwitchOff);
sl@0
  2609
		}
sl@0
  2610
		break;
sl@0
  2611
	case EEventFocusGroupChanged:
sl@0
  2612
		{
sl@0
  2613
		_LIT(LogEventFocusGroupChanged,"EEventFocusGroupChanged");
sl@0
  2614
		iEventDetailsText.Format(LogEventFocusGroupChanged);
sl@0
  2615
		}
sl@0
  2616
		break;
sl@0
  2617
	case EEventCaseOpened:
sl@0
  2618
		{
sl@0
  2619
		_LIT(LogEventCaseOpened,"EEventCaseOpened");
sl@0
  2620
		iEventDetailsText.Format(LogEventCaseOpened);
sl@0
  2621
		}
sl@0
  2622
		break;
sl@0
  2623
	case EEventCaseClosed:
sl@0
  2624
		{
sl@0
  2625
		_LIT(LogEventCaseClosed,"EEventCaseClosed");
sl@0
  2626
		iEventDetailsText.Format(LogEventCaseClosed);
sl@0
  2627
		}
sl@0
  2628
		break;
sl@0
  2629
	default:
sl@0
  2630
		if (aWsEvent->Type()>=EEventUser)
sl@0
  2631
			iEventDetailsText.Format(_L("EEventUser[%d]"), aWsEvent->Type()-EEventUser);
sl@0
  2632
		else
sl@0
  2633
			{
sl@0
  2634
			UnKnown();
sl@0
  2635
			iEventDetailsText.Format(_L("Unknown event type=%d "), aWsEvent->Type());
sl@0
  2636
			}
sl@0
  2637
		break;
sl@0
  2638
		}
sl@0
  2639
	return iEventDetailsText;
sl@0
  2640
	}
sl@0
  2641
sl@0
  2642
TDesC &TWsDecoder::eventDetails(const TRawEvent *aEvent)
sl@0
  2643
	{
sl@0
  2644
	iEventDetailsText.Zero();
sl@0
  2645
	switch (aEvent->Type())
sl@0
  2646
		{
sl@0
  2647
	case TRawEvent::ENone:
sl@0
  2648
		{
sl@0
  2649
		_LIT(LogEventDetailsNone,"ENone");
sl@0
  2650
		iEventDetailsText.Append(LogEventDetailsNone);
sl@0
  2651
		}
sl@0
  2652
		break;
sl@0
  2653
	case TRawEvent::EPointerMove:
sl@0
  2654
		{
sl@0
  2655
		_LIT(LogEventDetailsPointerMove,"EPointerMove(");
sl@0
  2656
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(aEvent->Pos()));
sl@0
  2657
		iEventDetailsText.Append(LogEventDetailsPointerMove);
sl@0
  2658
		iEventDetailsText.Append(buf);
sl@0
  2659
		iEventDetailsText.Append(LogCloseBracket);
sl@0
  2660
		}
sl@0
  2661
		break;
sl@0
  2662
    case TRawEvent::EPointerSwitchOn:
sl@0
  2663
		{
sl@0
  2664
		_LIT(LogEventDetailsPointerSwitchOn,"EPointerSwitchOn(");
sl@0
  2665
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(aEvent->Pos()));
sl@0
  2666
		iEventDetailsText.Append(LogEventDetailsPointerSwitchOn);
sl@0
  2667
		iEventDetailsText.Append(buf);
sl@0
  2668
		iEventDetailsText.Append(LogCloseBracket);
sl@0
  2669
		}
sl@0
  2670
		break;
sl@0
  2671
	case TRawEvent::EKeyDown:
sl@0
  2672
		{
sl@0
  2673
		_LIT(LogEventDetailsKeyDown,"EKeyDown(%d)");
sl@0
  2674
		iEventDetailsText.Format(LogEventDetailsKeyDown,aEvent->ScanCode());
sl@0
  2675
		}
sl@0
  2676
		break;
sl@0
  2677
	case TRawEvent::EKeyUp:
sl@0
  2678
		{
sl@0
  2679
		_LIT(LogEventDetailsKeyUp,"EKeyUp(%d)");
sl@0
  2680
		iEventDetailsText.Format(LogEventDetailsKeyUp,aEvent->ScanCode());
sl@0
  2681
		}
sl@0
  2682
		break;
sl@0
  2683
	case TRawEvent::ERedraw:
sl@0
  2684
		{
sl@0
  2685
		_LIT(LogEventDetailsRedraw,"ERedraw");
sl@0
  2686
		iEventDetailsText.Append(LogEventDetailsRedraw);
sl@0
  2687
		}
sl@0
  2688
		break;
sl@0
  2689
	case TRawEvent::ESwitchOn:
sl@0
  2690
 		{
sl@0
  2691
		_LIT(LogEventDetailsSwitchOn,"ESwitchOn");
sl@0
  2692
		iEventDetailsText.Append(LogEventDetailsSwitchOn);
sl@0
  2693
		}
sl@0
  2694
		break;
sl@0
  2695
	case TRawEvent::EActive:
sl@0
  2696
		{
sl@0
  2697
		_LIT(LogEventDetailsActive,"EActive");
sl@0
  2698
		iEventDetailsText.Append(LogEventDetailsActive);
sl@0
  2699
		}
sl@0
  2700
		break;
sl@0
  2701
	case TRawEvent::EInactive:
sl@0
  2702
		{
sl@0
  2703
		_LIT(LogEventDetailsInactive,"EInactive");
sl@0
  2704
		iEventDetailsText.Append(LogEventDetailsInactive);
sl@0
  2705
		}
sl@0
  2706
		break;
sl@0
  2707
	case TRawEvent::EUpdateModifiers:
sl@0
  2708
		{
sl@0
  2709
		_LIT(LogEventDetailsModifiers,"EUpdateModifiers(%d)");
sl@0
  2710
		iEventDetailsText.Format(LogEventDetailsModifiers,aEvent->Modifiers());
sl@0
  2711
		}
sl@0
  2712
		break;
sl@0
  2713
	case TRawEvent::EButton1Down:
sl@0
  2714
		{
sl@0
  2715
		_LIT(LogEventDetailsButton1Down,"EButton1Down(");
sl@0
  2716
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(aEvent->Pos()));
sl@0
  2717
		iEventDetailsText.Append(LogEventDetailsButton1Down);
sl@0
  2718
		iEventDetailsText.Append(buf);
sl@0
  2719
		iEventDetailsText.Append(LogCloseBracket);
sl@0
  2720
		}
sl@0
  2721
		break;
sl@0
  2722
	case TRawEvent::EButton1Up:
sl@0
  2723
		{
sl@0
  2724
		_LIT(LogEventDetailsButton1Up,"EButton1Up(");
sl@0
  2725
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(aEvent->Pos()));
sl@0
  2726
		iEventDetailsText.Append(LogEventDetailsButton1Up);
sl@0
  2727
		iEventDetailsText.Append(buf);
sl@0
  2728
		iEventDetailsText.Append(LogCloseBracket);
sl@0
  2729
		}
sl@0
  2730
		break;
sl@0
  2731
	case TRawEvent::EButton2Down:
sl@0
  2732
		{
sl@0
  2733
		_LIT(LogEventDetailsButton2Down,"EButton2Down(");
sl@0
  2734
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(aEvent->Pos()));
sl@0
  2735
		iEventDetailsText.Append(LogEventDetailsButton2Down);
sl@0
  2736
		iEventDetailsText.Append(buf);
sl@0
  2737
		iEventDetailsText.Append(LogCloseBracket);
sl@0
  2738
		}
sl@0
  2739
		break;
sl@0
  2740
	case TRawEvent::EButton2Up:
sl@0
  2741
		{
sl@0
  2742
		_LIT(LogEventDetailsButton2Up,"EButton2Up(");
sl@0
  2743
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(aEvent->Pos()));
sl@0
  2744
		iEventDetailsText.Append(LogEventDetailsButton2Up);
sl@0
  2745
		iEventDetailsText.Append(buf);
sl@0
  2746
		iEventDetailsText.Append(LogCloseBracket);
sl@0
  2747
		}
sl@0
  2748
		break;
sl@0
  2749
	case TRawEvent::EButton3Down:
sl@0
  2750
		{
sl@0
  2751
		_LIT(LogEventDetailsButton3Down,"EButton3Down(");
sl@0
  2752
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(aEvent->Pos()));
sl@0
  2753
		iEventDetailsText.Append(LogEventDetailsButton3Down);
sl@0
  2754
		iEventDetailsText.Append(buf);
sl@0
  2755
		iEventDetailsText.Append(LogCloseBracket);
sl@0
  2756
		}
sl@0
  2757
		break;
sl@0
  2758
	case TRawEvent::EButton3Up:
sl@0
  2759
		{
sl@0
  2760
		_LIT(LogEventDetailsButton3Up,"EButton3Up(");
sl@0
  2761
		TShortBuf buf(TDebugLogTextHandler::FormatPoint(aEvent->Pos()));
sl@0
  2762
		iEventDetailsText.Append(LogEventDetailsButton3Up);
sl@0
  2763
		iEventDetailsText.Append(buf);
sl@0
  2764
		iEventDetailsText.Append(LogCloseBracket);
sl@0
  2765
		}
sl@0
  2766
		break;
sl@0
  2767
	case TRawEvent::ESwitchOff:
sl@0
  2768
		{
sl@0
  2769
		_LIT(LogEventDetailsSwitchOff,"ESwitchOff");
sl@0
  2770
		iEventDetailsText.Append(LogEventDetailsSwitchOff);
sl@0
  2771
		}
sl@0
  2772
		break;
sl@0
  2773
	case TRawEvent::EKeyRepeat:
sl@0
  2774
 		{
sl@0
  2775
  		_LIT(LogEventDetailsKeyRepeat,"ERepeatKey(scancode=%d,repeat=%d");
sl@0
  2776
 		iEventDetailsText.Format(LogEventDetailsKeyRepeat,aEvent->ScanCode(),aEvent->Repeats());
sl@0
  2777
 		}
sl@0
  2778
		break;
sl@0
  2779
	case TRawEvent::EPointer3DOutOfRange:
sl@0
  2780
 		{
sl@0
  2781
  		_LIT(LogEventDetailsOutOfRange,"EPointer3DOutOfRange");
sl@0
  2782
 		iEventDetailsText.Format(LogEventDetailsOutOfRange);
sl@0
  2783
 		}
sl@0
  2784
		break;
sl@0
  2785
	default:
sl@0
  2786
		{
sl@0
  2787
		_LIT(LogEventDetailsUnknown,"Unknown event type: %d");
sl@0
  2788
		iEventDetailsText.Format(LogEventDetailsUnknown,aEvent->Type());
sl@0
  2789
		UnKnown();
sl@0
  2790
		}
sl@0
  2791
		break;
sl@0
  2792
		}
sl@0
  2793
	return iEventDetailsText;
sl@0
  2794
	}
sl@0
  2795
sl@0
  2796
void TWsDecoder::ReplyBufWindowGroup(TBuf<LogTBufSize> &aText, TInt aOpcode, const TDesC8 *aReplyDes8, const TDesC *aReplyDesText)
sl@0
  2797
	{
sl@0
  2798
	ReplyBufWindow(aText, aOpcode, aReplyDes8, aReplyDesText);
sl@0
  2799
	}
sl@0
  2800
sl@0
  2801
void TWsDecoder::ReplyBufWindow(TBuf<LogTBufSize> &aText, TInt aOpcode, const TDesC8 *aReplyDes8, const TDesC *aReplyDesText)
sl@0
  2802
	{
sl@0
  2803
	switch (aOpcode)
sl@0
  2804
		{
sl@0
  2805
	case EWsWinOpPosition:
sl@0
  2806
		AppendPoint(aText,aReplyDes8);
sl@0
  2807
		break;
sl@0
  2808
	case EWsWinOpAbsPosition:
sl@0
  2809
		AppendPoint(aText,aReplyDes8);
sl@0
  2810
		break;
sl@0
  2811
	case EWsWinOpSize:
sl@0
  2812
		AppendPoint(aText,aReplyDes8);
sl@0
  2813
		break;
sl@0
  2814
	case EWsWinOpInquireOffset:
sl@0
  2815
		AppendPoint(aText,aReplyDes8);
sl@0
  2816
		break;
sl@0
  2817
	case EWsWinOpName:
sl@0
  2818
		AppendDesc(aText, aReplyDesText);
sl@0
  2819
		break;
sl@0
  2820
	case EWsWinOpRetrievePointerMoveBuffer:
sl@0
  2821
		aText.Append(_L("..."));
sl@0
  2822
		break;
sl@0
  2823
	case EWsWinOpGetInvalidRegion:
sl@0
  2824
		{
sl@0
  2825
		TRect *rect=(TRect *)aReplyDes8->Ptr();
sl@0
  2826
		TInt count=aReplyDes8->Size()/sizeof(TRect);
sl@0
  2827
		TBuf<2> comma;
sl@0
  2828
		_LIT(LogTwoStrings,"%S%S");
sl@0
  2829
		for(TInt index=0;index<count && !iOverflowHandler.IsError();index++)
sl@0
  2830
			{
sl@0
  2831
			TLongBuf buf(TDebugLogTextHandler::FormatRect(*rect++));
sl@0
  2832
			aText.AppendFormat(LogTwoStrings,&iOverflowHandler,&comma,&buf);
sl@0
  2833
			if (index==0)
sl@0
  2834
				comma=LogComma;
sl@0
  2835
			}
sl@0
  2836
		break;
sl@0
  2837
		}
sl@0
  2838
	default:
sl@0
  2839
		UnKnownReplyBuf(aText, aOpcode);
sl@0
  2840
		break;
sl@0
  2841
		}
sl@0
  2842
	}
sl@0
  2843
sl@0
  2844
void TWsDecoder::ReplyBufClient(TBuf<LogTBufSize> &aText, TInt aOpcode, const TDesC8 *aReplyDes8, const TDesC *aReplyDesText)
sl@0
  2845
	{
sl@0
  2846
	switch (aOpcode)
sl@0
  2847
		{
sl@0
  2848
	case EWsClOpGetEvent:
sl@0
  2849
		{
sl@0
  2850
		const TWsEvent *wsEvent=(TWsEvent *)aReplyDes8->Ptr();
sl@0
  2851
		TPtrC details(eventDetails(wsEvent));
sl@0
  2852
		aText=KNullDesC;
sl@0
  2853
		if (details!=KNullDesC)
sl@0
  2854
			{
sl@0
  2855
			TDebugLogTextHandler::Append(aText, details);
sl@0
  2856
			TBuf<128> buf;
sl@0
  2857
			_LIT(LogReplyClientDestTime,"(dest %d, time ");
sl@0
  2858
			_LIT(LogReplyClientTime,"%D%M%Y%/0%1%/1%2%/2%3%/3 %:0%H%:1%T%:2%S%.%*C2%:3)");
sl@0
  2859
			buf.Format(LogReplyClientDestTime, wsEvent->Handle());
sl@0
  2860
			TDebugLogTextHandler::Append(aText, buf);
sl@0
  2861
			TRAPD(err,wsEvent->Time().FormatL(buf,LogReplyClientTime));
sl@0
  2862
			if (err==KErrNone)
sl@0
  2863
				TDebugLogTextHandler::Append(aText, buf);
sl@0
  2864
			else
sl@0
  2865
				{
sl@0
  2866
				_LIT(LogReplyClientTimeErr,"######)");
sl@0
  2867
				TDebugLogTextHandler::Append(aText,LogReplyClientTimeErr);
sl@0
  2868
				}
sl@0
  2869
			}
sl@0
  2870
		}
sl@0
  2871
		break;
sl@0
  2872
	case EWsClOpGetRedraw:
sl@0
  2873
		{
sl@0
  2874
		const TWsRedrawEvent *redrawEvent=(TWsRedrawEvent *)aReplyDes8->Ptr();
sl@0
  2875
		TLongBuf buf(TDebugLogTextHandler::FormatRect(redrawEvent->Rect()));
sl@0
  2876
		aText.Format(_L("Redraw (handle %d): "), redrawEvent->Handle());
sl@0
  2877
		aText.AppendFormat(_L("rect %S"), &buf);
sl@0
  2878
		}
sl@0
  2879
		break;
sl@0
  2880
	case EWsClOpGetPriorityKey:
sl@0
  2881
		{
sl@0
  2882
		const TWsPriorityKeyEvent *abortEvent=(TWsPriorityKeyEvent *)aReplyDes8->Ptr();
sl@0
  2883
		aText.Format(_L("Abort key handle %d"), abortEvent->Handle());
sl@0
  2884
		}
sl@0
  2885
		break;
sl@0
  2886
	case EWsClOpShadowVector:
sl@0
  2887
		AppendPoint(aText,aReplyDes8);
sl@0
  2888
		break;
sl@0
  2889
	case EWsClOpGetWindowGroupClientThreadId:
sl@0
  2890
		{
sl@0
  2891
		const TThreadId *threadId=(TThreadId *)aReplyDes8->Ptr();
sl@0
  2892
		aText.Format(_L("TThreadId=%d"), *(TInt *)threadId);
sl@0
  2893
		}
sl@0
  2894
		break;
sl@0
  2895
	case EWsClOpGetWindowGroupNameFromIdentifier:
sl@0
  2896
		AppendDesc(aText, aReplyDesText);
sl@0
  2897
		break;
sl@0
  2898
	case EWsClOpWindowGroupList:
sl@0
  2899
	case EWsClOpWindowGroupListAndChain: 
sl@0
  2900
	case EWsClOpWindowGroupListAllPriorities:
sl@0
  2901
		{
sl@0
  2902
		TInt *handlPtr=(TInt *)aReplyDes8->Ptr();
sl@0
  2903
		TInt count=aReplyDes8->Size()/sizeof(TInt);
sl@0
  2904
		TBuf<2> comma;
sl@0
  2905
		_LIT(LogStringInt,"%S%d");
sl@0
  2906
		for(TInt index=0;index<count && !iOverflowHandler.IsError();index++)
sl@0
  2907
			{
sl@0
  2908
			aText.AppendFormat(LogStringInt,&iOverflowHandler,&comma,*handlPtr++);
sl@0
  2909
			if (index==0)
sl@0
  2910
				comma=LogComma;
sl@0
  2911
			}
sl@0
  2912
		}
sl@0
  2913
		break;
sl@0
  2914
	case EWsClOpGetKeyboardRepeatRate:
sl@0
  2915
		{
sl@0
  2916
		SKeyRepeatSettings *settings=(SKeyRepeatSettings *)aReplyDes8->Ptr();
sl@0
  2917
		aText.AppendFormat(_L("initial=%d,normal=%d"),settings->iInitialTime.Int(),settings->iTime.Int());
sl@0
  2918
		}
sl@0
  2919
		break;
sl@0
  2920
	case EWsClOpGetDoubleClickSettings:
sl@0
  2921
		{
sl@0
  2922
		SDoubleClickSettings *settings=(SDoubleClickSettings *)aReplyDes8->Ptr();
sl@0
  2923
		aText.AppendFormat(_L("interval=%d,distance=%d"),settings->iInterval.Int(),settings->iDistance);
sl@0
  2924
		}
sl@0
  2925
		break;
sl@0
  2926
	case EWsClOpFetchMessage:
sl@0
  2927
		{
sl@0
  2928
		_LIT(LogClientRetFetchMessage,"FetchMessage");
sl@0
  2929
		aText.Append(LogClientRetFetchMessage);
sl@0
  2930
		}
sl@0
  2931
		break;
sl@0
  2932
	case EWsClOpCreateGraphic:
sl@0
  2933
		aText.AppendFormat(_L("Creating graphic: %s"), aReplyDes8);
sl@0
  2934
		break;
sl@0
  2935
	case EWsClOpGetGraphicMessage: 
sl@0
  2936
		aText.AppendFormat(_L("Graphic message: %s"), aReplyDes8);
sl@0
  2937
		break;
sl@0
  2938
	case EWsClOpPointerCursorPosition:
sl@0
  2939
		{
sl@0
  2940
		TWsClCmdSetPointerCursorArea *settings=(TWsClCmdSetPointerCursorArea*)aReplyDes8->Ptr();
sl@0
  2941
		TLongBuf buf1(TDebugLogTextHandler::FormatRect(settings->area));
sl@0
  2942
		aText.AppendFormat(_L("Cursor position area=%S"), &buf1);
sl@0
  2943
		}
sl@0
  2944
		break;
sl@0
  2945
	case EWsClOpPointerCursorArea:
sl@0
  2946
		{
sl@0
  2947
		TWsClCmdSetPointerCursorArea *settings=(TWsClCmdSetPointerCursorArea*)aReplyDes8->Ptr();
sl@0
  2948
		TLongBuf buf1(TDebugLogTextHandler::FormatRect(settings->area));
sl@0
  2949
		aText.AppendFormat(_L("Cursor area=%S"), &buf1);
sl@0
  2950
		}
sl@0
  2951
		break;
sl@0
  2952
	case EWsClOpGetDefModeMaxNumColors:
sl@0
  2953
		{
sl@0
  2954
		SDefModeMaxNumColors *settings=(SDefModeMaxNumColors*)aReplyDes8->Ptr();
sl@0
  2955
		aText.AppendFormat(_L("Num of colors=%d, num of grays=%d, display mode=%d"),settings->iColors, settings->iGrays, settings->iDisplayMode);
sl@0
  2956
		}
sl@0
  2957
		break;
sl@0
  2958
	default:
sl@0
  2959
		UnKnownReplyBuf(aText, aOpcode);
sl@0
  2960
		break;
sl@0
  2961
		}
sl@0
  2962
	}
sl@0
  2963
sl@0
  2964
void TWsDecoder::ReplyBufScreenDevice(TBuf<LogTBufSize> &aText, TInt aOpcode, const TDesC8 *aReplyDes8, const TDesC *)
sl@0
  2965
	{
sl@0
  2966
	switch (aOpcode)
sl@0
  2967
		{
sl@0
  2968
	case EWsSdOpGetScanLine:
sl@0
  2969
		{			//This fills up the log two much for test code
sl@0
  2970
		aText=KNullDesC;
sl@0
  2971
		//Alternate code that would log this information.
sl@0
  2972
		/*_LIT(LogScreenDeviceReplyBufGetScanLine,"aScanLine set to ...");
sl@0
  2973
		aText=LogScreenDeviceReplyBufGetScanLine;*/
sl@0
  2974
		/*TDebugLogTextHandler::Append(aText, TDebugLogTextHandler::FormatArray(TDebugLogTextHandler::ERgb,
sl@0
  2975
														((TDesC8 *)aReplyData)->Ptr(),((TDesC8 *)aReplyData)->Length()*sizeof(TRgb)));*/
sl@0
  2976
		}
sl@0
  2977
		break;
sl@0
  2978
	case EWsSdOpHorizontalTwipsToPixels:
sl@0
  2979
	case EWsSdOpVerticalTwipsToPixels:
sl@0
  2980
	case EWsSdOpHorizontalPixelsToTwips:
sl@0
  2981
	case EWsSdOpVerticalPixelsToTwips:
sl@0
  2982
	case EWsSdOpPixelSize:
sl@0
  2983
	case EWsSdOpTwipsSize:
sl@0
  2984
		AppendPoint(aText,aReplyDes8);
sl@0
  2985
		break;
sl@0
  2986
	case EWsSdOpPointerRect:
sl@0
  2987
		AppendRect(aText,aReplyDes8);
sl@0
  2988
		break;
sl@0
  2989
	case EWsSdOpGetDefaultScreenSizeAndRotation:
sl@0
  2990
	case EWsSdOpGetScreenModeSizeAndRotation:
sl@0
  2991
		{
sl@0
  2992
		_LIT(LogScreenDeviceReplyBufPTR,"%S %S %d");
sl@0
  2993
		const TPixelsTwipsAndRotation *sar=(TPixelsTwipsAndRotation *)aReplyDes8->Ptr();
sl@0
  2994
		TShortBuf buf1(TDebugLogTextHandler::FormatSize(sar->iPixelSize));
sl@0
  2995
		TShortBuf buf2(TDebugLogTextHandler::FormatSize(sar->iTwipsSize));
sl@0
  2996
		aText.AppendFormat(LogScreenDeviceReplyBufPTR,&buf1,&buf2,sar->iRotation);
sl@0
  2997
		}
sl@0
  2998
		break;
sl@0
  2999
	case EWsSdOpGetDefaultScreenSizeAndRotation2:
sl@0
  3000
	case EWsSdOpGetScreenModeSizeAndRotation2:
sl@0
  3001
		{
sl@0
  3002
		_LIT(LogScreenDeviceReplyBufPR,"%S %d");
sl@0
  3003
		const TPixelsAndRotation *sar=(TPixelsAndRotation *)aReplyDes8->Ptr();
sl@0
  3004
		TShortBuf buf(TDebugLogTextHandler::FormatSize(sar->iPixelSize));
sl@0
  3005
		aText.AppendFormat(LogScreenDeviceReplyBufPR,&buf,sar->iRotation);
sl@0
  3006
		}
sl@0
  3007
		break;
sl@0
  3008
	case EWsSdOpGetPalette:
sl@0
  3009
		{
sl@0
  3010
		_LIT(LogScreenDeviceReplyBufGetPalette,"Palette returned ...");
sl@0
  3011
		aText.Append(LogScreenDeviceReplyBufGetPalette);
sl@0
  3012
		}
sl@0
  3013
		break;
sl@0
  3014
	case EWsSdOpGetDefaultScreenModeOrigin:	
sl@0
  3015
		{
sl@0
  3016
		const TPoint *point = reinterpret_cast<const TPoint*>(aReplyDes8->Ptr());
sl@0
  3017
		TShortBuf buf1(TDebugLogTextHandler::FormatPoint(*point));
sl@0
  3018
		_LIT(LogScreenDeviceReplyBufGetDefaultScreenModeOrigin,"Default screen mode origin=%S");
sl@0
  3019
		aText.AppendFormat(LogScreenDeviceReplyBufGetDefaultScreenModeOrigin, &buf1);
sl@0
  3020
		}
sl@0
  3021
		break;
sl@0
  3022
	case EWsSdOpGetScreenModeOrigin:	
sl@0
  3023
		{
sl@0
  3024
		const TPoint *point = reinterpret_cast<const TPoint*>(aReplyDes8->Ptr());
sl@0
  3025
		TShortBuf buf1(TDebugLogTextHandler::FormatPoint(*point));
sl@0
  3026
		_LIT(LogScreenDeviceReplyBufGetScreenModeOrigin,"Screen mode origin=%S");
sl@0
  3027
		aText.AppendFormat(LogScreenDeviceReplyBufGetScreenModeOrigin, &buf1);
sl@0
  3028
		}
sl@0
  3029
		break;
sl@0
  3030
	case EWsSdOpGetScreenModeScale: 	
sl@0
  3031
	case EWsSdOpGetCurrentScreenModeScale:	
sl@0
  3032
		{
sl@0
  3033
		const TSize *size = reinterpret_cast<const TSize*>(aReplyDes8->Ptr());
sl@0
  3034
		TShortBuf buf1(TDebugLogTextHandler::FormatSize(*size));
sl@0
  3035
		_LIT(LogScreenDeviceReplyBufGetScreenScale,"Screen scale=%S");
sl@0
  3036
		aText.AppendFormat(LogScreenDeviceReplyBufGetScreenScale, &buf1);
sl@0
  3037
		}
sl@0
  3038
		break;
sl@0
  3039
	case EWsSdOpGetScreenModeScaledOrigin: 
sl@0
  3040
		{
sl@0
  3041
		const TPoint *point = reinterpret_cast<const TPoint*>(aReplyDes8->Ptr());
sl@0
  3042
		TShortBuf buf1(TDebugLogTextHandler::FormatPoint(*point));
sl@0
  3043
		_LIT(LogScreenDeviceReplyBufGetScreenModeScaledOrigin,"Screen mode scaled origin=%S");
sl@0
  3044
		aText.AppendFormat(LogScreenDeviceReplyBufGetScreenModeScaledOrigin, &buf1);
sl@0
  3045
		}
sl@0
  3046
		break;
sl@0
  3047
	case EWsSdOpGetCurrentScreenModeAttributes:	
sl@0
  3048
		{
sl@0
  3049
		TSizeMode *settings=(TSizeMode*)aReplyDes8->Ptr();
sl@0
  3050
		TShortBuf origin(TDebugLogTextHandler ::FormatPoint(settings->iOrigin));
sl@0
  3051
		TShortBuf size(TDebugLogTextHandler ::FormatSize(settings->iScreenSize));
sl@0
  3052
		TShortBuf area(TDebugLogTextHandler ::FormatRect(settings->iPointerCursorArea));
sl@0
  3053
		aText.AppendFormat(_L("Screen attribute: origin=%S, size=%s, rotation=%d, area=$s, display mode = %d"), 
sl@0
  3054
							   &origin, &size, settings->iAlternativeRotations, &area, settings->iDefaultDisplayMode);
sl@0
  3055
		}
sl@0
  3056
		break;
sl@0
  3057
	case EWsSdOpGetScreenSizeModeList:	
sl@0
  3058
		AppendDesc(aText, aReplyDes8);
sl@0
  3059
		break;	
sl@0
  3060
	default:
sl@0
  3061
		UnKnownReplyBuf(aText, aOpcode);
sl@0
  3062
		break;
sl@0
  3063
		}
sl@0
  3064
	}