os/graphics/windowing/windowserver/test/tauto/TMulTran.CPP
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/windowing/windowserver/test/tauto/TMulTran.CPP	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,1111 @@
     1.4 +// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// Test multiple level transparent window
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +/**
    1.22 + @file
    1.23 + @test
    1.24 + @internalComponent - Internal Symbian test code
    1.25 +*/
    1.26 +
    1.27 +#include "TMulTran.H"
    1.28 +
    1.29 +
    1.30 +LOCAL_D TDisplayMode DisplayMode=EColor64K;
    1.31 +LOCAL_D TSize WinSize;
    1.32 +
    1.33 +static const TRgb KRed=TRgb(255, 0, 0, 128);
    1.34 +static const TRgb KGreen=TRgb(0, 255, 0, 128);
    1.35 +static const TRgb KYellow=TRgb(255, 255, 0, 128);
    1.36 +static const TRgb KBlue=TRgb(0, 0, 255, 128);
    1.37 +static const TRgb KCyan=TRgb(0, 255, 255, 128);
    1.38 +
    1.39 +/*CTransWindow*/
    1.40 +
    1.41 +CTransWindow* CTransWindow::NewL(RPointerArray<CTransWindow>& aWindows,TRgb aColor,TRect aPos)
    1.42 +	{
    1.43 +	CTransWindow* self=NewL(TheClient->iGroup,aColor,aPos,&DisplayMode);
    1.44 +	aWindows.Insert(self,0);
    1.45 +	return self;
    1.46 +	}
    1.47 +
    1.48 +CTransWindow* CTransWindow::NewL(CTWinBase* aParent,TRgb aColor,TRect aPos, TDisplayMode* aDisplayMode)
    1.49 +	{
    1.50 +	CTransWindow* self=new(ELeave) CTransWindow(aColor);
    1.51 +	CleanupStack::PushL(self);
    1.52 +	self->SetUpL(aPos.iTl,aPos.Size(),aParent,*TheClient->iGc,aDisplayMode);
    1.53 +	User::LeaveIfError(self->iError);
    1.54 +	CleanupStack::Pop(self);
    1.55 +	return self;
    1.56 +	}
    1.57 +
    1.58 +//the following function doesn't activate a window
    1.59 +CTransWindow* CTransWindow::NewL(CTWinBase* aParent,TRgb aColor,TDisplayMode* aDisplayMode)
    1.60 +	{
    1.61 +	CTransWindow* self=new(ELeave) CTransWindow(aColor);
    1.62 +	CleanupStack::PushL(self);
    1.63 +	self->ConstructL(*aParent);
    1.64 +	if (aDisplayMode)
    1.65 +		{
    1.66 +		self->BaseWin()->SetRequiredDisplayMode(*aDisplayMode);
    1.67 +		}
    1.68 +	User::LeaveIfError((self->iError) && (self->iError != KErrNotSupported));
    1.69 +	CleanupStack::Pop(self);
    1.70 +	return self;
    1.71 +	}
    1.72 +
    1.73 +void CTransWindow::InitWin()
    1.74 +	{
    1.75 +	AdjustShadow(-1);
    1.76 +	iShadowHight=0;
    1.77 +	iWin.SetShadowDisabled(ETrue);
    1.78 +	iShadowing=EFalse;
    1.79 +	iError = iWin.SetTransparencyAlphaChannel();
    1.80 +	iWin.SetBackgroundColor(iCol);
    1.81 +	iDrawOpaque=EFalse;
    1.82 +	}
    1.83 +
    1.84 +void CTransWindow::ToggleVisibility()
    1.85 +	{
    1.86 +	iVisible=!iVisible;
    1.87 +	SetVisible(iVisible);
    1.88 +	}
    1.89 +
    1.90 +void CTransWindow::SetOrdinal(RPointerArray<CTransWindow>& aWindows,TInt aOldPos,TInt aNewPos)
    1.91 +	{
    1.92 +	CTransWindow* win=aWindows[aOldPos];
    1.93 +	aWindows.Remove(aOldPos);
    1.94 +	aWindows.Insert(win,aNewPos);
    1.95 +	win->iWin.SetOrdinalPosition(aNewPos);
    1.96 +	}
    1.97 +
    1.98 +void CTransWindow::SetShadowDisabled(TBool aState)
    1.99 +	{
   1.100 +	iWin.SetShadowDisabled(aState);
   1.101 +	iShadowing=!aState;
   1.102 +	}
   1.103 +
   1.104 +void CTransWindow::AdjustShadow(TInt aAdjust)
   1.105 +	{
   1.106 +	CBlankWindow::AdjustShadow(aAdjust);
   1.107 +	iShadowHight+=aAdjust;
   1.108 +	}
   1.109 +
   1.110 +TPoint CTransWindow::Position() const
   1.111 +	{
   1.112 +	return CBlankWindow::Position()+iPosOffset;
   1.113 +	}
   1.114 +
   1.115 +void CTransWindow::Draw()
   1.116 +	{
   1.117 +	//don't call CBlankWindow::Draw() since the background is already drawn
   1.118 +
   1.119 +	if(iDrawOpaque)
   1.120 +		{
   1.121 +		iGc->SetPenStyle(CGraphicsContext::ESolidPen);
   1.122 +		iGc->SetPenSize(TSize(4,4));
   1.123 +		iGc->SetBrushStyle(CGraphicsContext::ENullBrush);
   1.124 +		iGc->SetPenColor(~iCol);
   1.125 +		iGc->SetOpaque(ETrue);
   1.126 +		iGc->DrawLine(TPoint(0,0),TPoint(1000,1000));
   1.127 +		iGc->SetOpaque(EFalse);
   1.128 +		}
   1.129 +	}
   1.130 +
   1.131 +/*CTMultipleTrans*/
   1.132 +
   1.133 +CTMultipleTrans::CTMultipleTrans(CTestStep* aStep) : CTWsGraphicsBase(aStep), iWindows(5), iShadows(EFalse)
   1.134 +	{
   1.135 +	}
   1.136 +
   1.137 +CTMultipleTrans::~CTMultipleTrans()
   1.138 +	{
   1.139 +	((CTMultipleTransStep*)iStep)->CloseTMSGraphicsStep();
   1.140 +	delete iBackgroundWin;
   1.141 +	delete iCheckWin;
   1.142 +	delete iCheckBitmap;
   1.143 +	iWindows.ResetAndDestroy();
   1.144 +	iBlankWin.Close();
   1.145 +	}
   1.146 +
   1.147 +void CTMultipleTrans::ConstructL()
   1.148 +	{
   1.149 +	if(TransparencySupportedL() == KErrNotSupported)
   1.150 +		return;
   1.151 +	iMajorTest=0;
   1.152 +	const TSize scrSize(TheClient->iScreen->SizeInPixels());
   1.153 +	WinSize.SetSize(scrSize.iWidth/2,scrSize.iHeight);
   1.154 +	iBackgroundWin=new(ELeave) CTBlankWindow();
   1.155 +	iBackgroundWin->SetUpL(TPoint(),WinSize,TheClient->iGroup,*TheClient->iGc);
   1.156 +	TheClient->WaitForRedrawsToFinish();
   1.157 +	CTBackedUpWin* checkWin=new(ELeave) CTBackedUpWin(DisplayMode);
   1.158 +	checkWin->ConstructExtLD(*TheClient->iGroup,TPoint(WinSize.iWidth,0),WinSize);
   1.159 +	iCheckWin=checkWin;
   1.160 +	RBackedUpWindow& backWin=*iCheckWin->BackedUpWin();
   1.161 +	backWin.SetShadowHeight(0);
   1.162 +	iCheckWin->Activate();
   1.163 +	backWin.MaintainBackup();
   1.164 +	iCheckBitmap=CBitmap::NewL(backWin.BitmapHandle());
   1.165 +	iCheckBitmap->Gc().SetPenStyle(CGraphicsContext::ENullPen);
   1.166 +	iCheckBitmap->Gc().SetBrushStyle(CGraphicsContext::ESolidBrush);
   1.167 +	TheClient->Flush();
   1.168 +	TheClient->WaitForRedrawsToFinish();
   1.169 +	RecreateWindowsL();
   1.170 +	iBlankWin=RBlankWindow(TheClient->iWs);
   1.171 +	User::LeaveIfError(iBlankWin.Construct(*TheClient->iGroup->WinTreeNode(),ENullWsHandle));
   1.172 +	iBlankWinVis=EFalse;
   1.173 +	iBlankWin.SetVisible(iBlankWinVis);
   1.174 +	User::LeaveIfError(iBlankWin.SetRequiredDisplayMode(EColor256));
   1.175 +	iBlankWinCol=TRgb(170,170,170);		//Grey
   1.176 +	iBlankWin.SetColor(iBlankWinCol);
   1.177 +	iBlankWin.SetOrdinalPosition(0,1);		//Set the priority to 1 so that the 4 main windows are the first 4 with priory 0
   1.178 +	iBlankWin.Activate();
   1.179 +	iOpacitySupported=EFalse;
   1.180 +	}
   1.181 +
   1.182 +void CTMultipleTrans::ShadowRegion(TRegion& aRegion,TInt aWin)
   1.183 +	{
   1.184 +	TRect rect;
   1.185 +	TInt height;
   1.186 +	TInt window;
   1.187 +	aRegion.Clear();
   1.188 +	RRegion single;
   1.189 +	RRegion noShadow1;
   1.190 +	RRegion noShadow2;
   1.191 +	RRegion temp;
   1.192 +	RRegion temp2;
   1.193 +	for (window=0;window<aWin;++window)
   1.194 +		{
   1.195 +		CTransWindow& win=*iWindows[window];
   1.196 +		if (win.IsVisible())
   1.197 +			{
   1.198 +			rect.SetRect(win.Position(),win.Size());
   1.199 +			height=win.ShadowHeight();
   1.200 +			temp.Copy(single);
   1.201 +			temp.ClipRect(rect);
   1.202 +			noShadow1.Union(temp);
   1.203 +			temp.Clear();
   1.204 +			temp.AddRect(rect);
   1.205 +			temp.SubRegion(noShadow1);
   1.206 +			temp.SubRegion(noShadow2);
   1.207 +			temp.SubRegion(aRegion,&temp2);
   1.208 +			noShadow2.Union(temp2);
   1.209 +			temp2.Clear();
   1.210 +			single.Union(temp);
   1.211 +			if (win.IsShadowing())
   1.212 +				aRegion.AddRect(rect);
   1.213 +			aRegion.Offset(2*height,2*height);
   1.214 +			aRegion.Tidy();
   1.215 +			noShadow1.Tidy();
   1.216 +			noShadow2.Tidy();
   1.217 +			single.Tidy();
   1.218 +			}
   1.219 +		}
   1.220 +	if (window<iWindows.Count())
   1.221 +		{
   1.222 +		CTransWindow& win=*iWindows[window];
   1.223 +		rect.SetRect(win.Position(),win.Size());
   1.224 +		aRegion.ClipRect(rect);
   1.225 +		}
   1.226 +	aRegion.SubRegion(noShadow1);
   1.227 +	aRegion.SubRegion(noShadow2);
   1.228 +	aRegion.Tidy();
   1.229 +	noShadow1.Close();
   1.230 +	noShadow2.Close();
   1.231 +	single.Close();
   1.232 +	temp.Close();
   1.233 +	temp2.Close();
   1.234 +	}
   1.235 +
   1.236 +void CTMultipleTrans::CheckDisplay()
   1.237 +	{
   1.238 +	RRegion shadowRegion;
   1.239 +	CFbsBitGc& gc=iCheckBitmap->Gc();
   1.240 +	gc.SetBrushColor(KRgbWhite);
   1.241 +	gc.DrawRect(TRect(WinSize));
   1.242 +	TInt windows=iWindows.Count();
   1.243 +	if (iShadows)
   1.244 +		{
   1.245 +		ShadowRegion(shadowRegion,windows);
   1.246 +		gc.ShadowArea(&shadowRegion);
   1.247 +		}
   1.248 +	TInt window;
   1.249 +	for (window=windows;window>0;)
   1.250 +		{
   1.251 +		CTransWindow& win=*iWindows[--window];
   1.252 +		if (win.IsVisible())
   1.253 +			{
   1.254 +			gc.SetBrushColor(win.Color());
   1.255 +			const TPoint& winTopLeft=win.Position();
   1.256 +			gc.DrawRect(TRect(winTopLeft, win.Size()));
   1.257 +
   1.258 +			if(win.DrawOpaque())
   1.259 +				{
   1.260 +				gc.SetPenColor(~(win.Color()));
   1.261 +				gc.SetPenSize(TSize(4,4));
   1.262 +				gc.SetPenStyle(CGraphicsContext::ESolidPen);
   1.263 +				gc.SetClippingRect(TRect(TPoint(winTopLeft.iX,winTopLeft.iY),TPoint(winTopLeft.iX + win.Size().iWidth, winTopLeft.iY + win.Size().iHeight)));
   1.264 +				gc.DrawLine(TPoint(winTopLeft.iX,winTopLeft.iY),TPoint(winTopLeft.iX+1000, winTopLeft.iY+1000));
   1.265 +				gc.SetPenStyle(CGraphicsContext::ENullPen);
   1.266 +				gc.SetClippingRect(TRect(WinSize));
   1.267 +				}
   1.268 +			
   1.269 +			if (iShadows)
   1.270 +				{
   1.271 +				ShadowRegion(shadowRegion,window);
   1.272 +				gc.ShadowArea(&shadowRegion);
   1.273 +				}
   1.274 +			}
   1.275 +		}
   1.276 +	iCheckWin->BackedUpWin()->UpdateScreen();
   1.277 +	TheClient->Flush();
   1.278 +	if (windows>=4)
   1.279 +		{
   1.280 +		AdvancedCheckRect();
   1.281 +		}
   1.282 +	_LIT(KTest,"Multiple Transparent Test, SubTest %d, OpacityOn=%d");
   1.283 +	TBuf<128> buf;
   1.284 +	buf.Format(KTest,iTest->iState,iMajorTest);
   1.285 +	CheckRect(iBackgroundWin,iCheckWin,TRect(WinSize),buf);
   1.286 +	shadowRegion.Close();
   1.287 +	}
   1.288 +
   1.289 +#define OFFSET 2
   1.290 +void CTMultipleTrans::AdvancedCheckRect()
   1.291 +	{
   1.292 +	const TSize compareSize(5,5);
   1.293 +	const TInt OFFSET2=OFFSET+compareSize.iWidth;
   1.294 +	TPoint comparePos=iCheckWin->Position();
   1.295 +	TPoint checkPos;
   1.296 +	//Check Single Level for Top Left Win
   1.297 +	checkPos=iTopLeft->Position()+TPoint(OFFSET,OFFSET);
   1.298 +	CheckRect(checkPos,checkPos+comparePos,compareSize);
   1.299 +	//Check Single Level for Top Right Win
   1.300 +	checkPos=iTopRight->Position()+TPoint(iTopRight->Size().iWidth-OFFSET2,OFFSET);
   1.301 +	CheckRect(checkPos,checkPos+comparePos,compareSize);
   1.302 +	//Check Single Level for Bottom Left Win
   1.303 +	checkPos=iBotLeft->Position()+TPoint(OFFSET,iBotLeft->Size().iHeight-OFFSET2);
   1.304 +	CheckRect(checkPos,checkPos+comparePos,compareSize);
   1.305 +	//Check Single Level for Bottom Right Win
   1.306 +	checkPos=iBotRight->Position()+TPoint(iBotRight->Size().iWidth-OFFSET2,iBotRight->Size().iHeight-OFFSET2);
   1.307 +	CheckRect(checkPos,checkPos+comparePos,compareSize);
   1.308 +	//Double level top 2 windows
   1.309 +	checkPos=iTopRight->Position()+TPoint(OFFSET,OFFSET);
   1.310 +	CheckRect(checkPos,checkPos+comparePos,compareSize);
   1.311 +	//Double level left 2 windows
   1.312 +	checkPos=iBotLeft->Position()+TPoint(OFFSET,OFFSET);
   1.313 +	CheckRect(checkPos,checkPos+comparePos,compareSize);
   1.314 +	//Double level bot 2 windows
   1.315 +	checkPos=iBotRight->Position()+TPoint(OFFSET,iBotRight->Size().iHeight-OFFSET2);
   1.316 +	CheckRect(checkPos,checkPos+comparePos,compareSize);
   1.317 +	//Double level right 2 windows
   1.318 +	checkPos=iBotRight->Position()+TPoint(iBotRight->Size().iWidth-OFFSET2,OFFSET);
   1.319 +	CheckRect(checkPos,checkPos+comparePos,compareSize);
   1.320 +	//Triple level all but bot right
   1.321 +	checkPos=iTopRight->Position()+TPoint(OFFSET,iTopRight->Size().iHeight-OFFSET2);
   1.322 +	CheckRect(checkPos,checkPos+comparePos,compareSize);
   1.323 +	//Triple level all but bot left
   1.324 +	checkPos=iBotRight->Position()+TPoint(OFFSET,OFFSET);
   1.325 +	CheckRect(checkPos,checkPos+comparePos,compareSize);
   1.326 +	//Triple level all but top right
   1.327 +	checkPos=iTopLeft->Position()+TPoint(iTopLeft->Size().iWidth-OFFSET2,iTopLeft->Size().iHeight-OFFSET2);
   1.328 +	CheckRect(checkPos,checkPos+comparePos,compareSize);
   1.329 +	//Triple level all but top left
   1.330 +	checkPos=iBotLeft->Position()+TPoint(iBotLeft->Size().iWidth-OFFSET2,OFFSET);
   1.331 +	CheckRect(checkPos,checkPos+comparePos,compareSize);
   1.332 +	//Quad level
   1.333 +	checkPos=TPoint(iBotRight->Position().iX,iBotLeft->Position().iY)+TPoint(OFFSET,OFFSET);
   1.334 +	CheckRect(checkPos,checkPos+comparePos,compareSize);
   1.335 +	}
   1.336 +
   1.337 +void CTMultipleTrans::SimpleTest()
   1.338 +	{
   1.339 +	CheckDisplay();
   1.340 +	}
   1.341 +
   1.342 +void CTMultipleTrans::ChangeVisibility()
   1.343 +	{
   1.344 +	TUint toggle;
   1.345 +	TUint toggle2;
   1.346 +	TInt win;
   1.347 +	TInt ii=0;
   1.348 +	for (ii=2;ii>0;--ii)
   1.349 +		{
   1.350 +		for (toggle=1;toggle<16;++toggle)
   1.351 +			{
   1.352 +			win=0;
   1.353 +			toggle2=toggle;
   1.354 +			while ((toggle2&0x1)==0)
   1.355 +				{
   1.356 +				++win;
   1.357 +				toggle2/=2;
   1.358 +				}
   1.359 +			iWindows[win]->ToggleVisibility();
   1.360 +			CheckDisplay();
   1.361 +			}
   1.362 +		}
   1.363 +	}
   1.364 +
   1.365 +void CTMultipleTrans::ChangeVisibility2()
   1.366 +	{
   1.367 +	iBlankWin.SetOrdinalPosition(0,0);
   1.368 +	iBlankWin.SetVisible(ETrue);
   1.369 +	iBlankWin.SetVisible(EFalse);
   1.370 +	CheckDisplay();
   1.371 +	const TInt xSteps=4;
   1.372 +	const TInt ySteps=3;
   1.373 +	iBlankWinSize.SetSize(WinSize.iWidth/xSteps,WinSize.iHeight/ySteps);
   1.374 +	iBlankWin.SetSize(iBlankWinSize);
   1.375 +	TInt ordPos,xx,yy;
   1.376 +	for (ordPos=0;ordPos<=4;++ordPos)
   1.377 +		{
   1.378 +		iBlankWin.SetOrdinalPosition(ordPos);
   1.379 +		for (xx=0;xx<xSteps;++xx)
   1.380 +			{
   1.381 +			TInt xPos=xx*WinSize.iWidth/xSteps;
   1.382 +			for (yy=0;yy<ySteps;++yy)
   1.383 +				{
   1.384 +				iBlankWin.SetPosition(TPoint(xPos,yy*WinSize.iHeight/ySteps));
   1.385 +				iBlankWin.SetVisible(ETrue);
   1.386 +				iBlankWin.SetVisible(EFalse);
   1.387 +				CheckDisplay();
   1.388 +				}
   1.389 +			}
   1.390 +		}
   1.391 +	iBlankWin.SetOrdinalPosition(0,1);
   1.392 +	}
   1.393 +
   1.394 +void CTMultipleTrans::OrdinalPos()
   1.395 +	{
   1.396 +	TInt ii,jj,kk;
   1.397 +	for (kk=2;kk>=0;--kk)
   1.398 +		{
   1.399 +		for (jj=3;jj>kk;--jj)
   1.400 +			{
   1.401 +			for (ii=jj;ii>=kk;--ii)
   1.402 +				{
   1.403 +				CTransWindow::SetOrdinal(iWindows,jj,kk);
   1.404 +				CheckDisplay();
   1.405 +				}
   1.406 +			}
   1.407 +		}
   1.408 +	for (kk=2;kk>=0;--kk)
   1.409 +		{
   1.410 +		for (jj=3;jj>kk;--jj)
   1.411 +			{
   1.412 +			for (ii=jj;ii>=kk;--ii)
   1.413 +				{
   1.414 +				CTransWindow::SetOrdinal(iWindows,kk,jj);
   1.415 +				CheckDisplay();
   1.416 +				}
   1.417 +			}
   1.418 +		}
   1.419 +	}
   1.420 +
   1.421 +TSize CTMultipleTrans::GetSize(TInt aPos)
   1.422 +	{		//Comments show values for 640x240 screen
   1.423 +	const TInt halfSize=40;
   1.424 +	const TPoint topLeft=iTopLeft->Position();	//10,10
   1.425 +	const TInt xLeft=WinSize.iWidth/2-topLeft.iX-halfSize;		//110
   1.426 +	const TInt xRight=xLeft+2*halfSize;		//190
   1.427 +	const TInt yTop=WinSize.iHeight/2-topLeft.iY-halfSize;		//70
   1.428 +	const TInt yBot=yTop+2*halfSize;		//150
   1.429 +	if (aPos<6)
   1.430 +		return TSize(xLeft+16*aPos-8,yTop);		//1->118, 5->182
   1.431 +	if (aPos<11)
   1.432 +		return TSize(xRight,yTop+16*aPos-88);		//6->78, 10->142
   1.433 +	if (aPos<16)
   1.434 +		return TSize(xRight-16*aPos+168,yBot);		//11->182, 15->118
   1.435 +	return TSize(xLeft,yBot-16*aPos+248);			//16->142, 20->78
   1.436 +	}
   1.437 +
   1.438 +void CTMultipleTrans::SizeChange(TInt aJump)
   1.439 +	{
   1.440 +	TInt ii=aJump;
   1.441 +	TSize size;
   1.442 +	while (ii<20)
   1.443 +		{
   1.444 +		size=GetSize(ii);
   1.445 +		iTopLeft->SetSize(size);
   1.446 +		if(iTopLeft->DrawOpaque())
   1.447 +			{
   1.448 +			iTopLeft->CTWin::DrawNow();
   1.449 +			TheClient->Flush();
   1.450 +			}
   1.451 +		CheckDisplay();
   1.452 +		ii+=aJump;
   1.453 +		if (ii>20)
   1.454 +			ii-=20;	
   1.455 +		}
   1.456 +	}
   1.457 +
   1.458 +void CTMultipleTrans::SizeChange()
   1.459 +	{
   1.460 +	CTransWindow::SetOrdinal(iWindows,2,1);
   1.461 +	TSize size=iBotLeft->Size();
   1.462 +	TInt change;
   1.463 +	for (change=70;change>=0;change-=14)
   1.464 +		{
   1.465 +		iBotLeft->SetSize(TSize(size.iWidth-change,size.iHeight));
   1.466 +		if(iBotLeft->DrawOpaque())
   1.467 +			{
   1.468 +			iBotLeft->CTWin::DrawNow();
   1.469 +			TheClient->Flush();
   1.470 +			}
   1.471 +		CheckDisplay();
   1.472 +		}
   1.473 +	size=iTopRight->Size();
   1.474 +	for (change=25;change>-50;change-=14)
   1.475 +		{
   1.476 +		iTopRight->SetSize(TSize(size.iWidth,size.iHeight+change));
   1.477 +		if(iTopRight->DrawOpaque())
   1.478 +			{
   1.479 +			iTopRight->CTWin::DrawNow();
   1.480 +			TheClient->Flush();
   1.481 +			}
   1.482 +		CheckDisplay();
   1.483 +		}
   1.484 +	iTopRight->SetSize(size);
   1.485 +	if(iTopRight->DrawOpaque())
   1.486 +		{
   1.487 +		iTopRight->CTWin::DrawNow();
   1.488 +		TheClient->Flush();
   1.489 +		}
   1.490 +	CTransWindow::SetOrdinal(iWindows,1,0);
   1.491 +	CheckDisplay();
   1.492 +	size=iTopLeft->Size();
   1.493 +	SizeChange(3);
   1.494 +	iTopLeft->SetSize(size);
   1.495 +	if(iTopLeft->DrawOpaque())
   1.496 +		{
   1.497 +		iTopLeft->CTWin::DrawNow();
   1.498 +		TheClient->Flush();
   1.499 +		}
   1.500 +	CheckDisplay();
   1.501 +	CTransWindow::SetOrdinal(iWindows,0,2);
   1.502 +	CheckDisplay();
   1.503 +	SizeChange(7);
   1.504 +	iTopLeft->SetSize(size);
   1.505 +	if(iTopLeft->DrawOpaque())
   1.506 +		{
   1.507 +		iTopLeft->CTWin::DrawNow();
   1.508 +		TheClient->Flush();
   1.509 +		}
   1.510 +	CheckDisplay();
   1.511 +	}
   1.512 +
   1.513 +void CTMultipleTrans::MoveWin()
   1.514 +	{
   1.515 +	const TPoint topLeftPos=iTopLeft->Position();
   1.516 +	const TPoint topRightPos=iTopRight->Position();
   1.517 +	const TPoint botLeftPos=iBotLeft->Position();
   1.518 +	const TPoint botRightPos=iBotRight->Position();
   1.519 +	const TInt maxMove=Min(topRightPos.iX,botRightPos.iY)-10;
   1.520 +	TInt steps,move;
   1.521 +	for (steps=2;steps>=0;--steps)
   1.522 +		{
   1.523 +		move=maxMove*(3-steps)/3;
   1.524 +		iTopLeft->SetPos(TPoint(topLeftPos.iX+move,topLeftPos.iY+move));
   1.525 +		CheckDisplay();
   1.526 +		iTopRight->SetPos(TPoint(topRightPos.iX-move,topRightPos.iY+move));
   1.527 +		CheckDisplay();
   1.528 +		iBotRight->SetPos(TPoint(botRightPos.iX-move,botRightPos.iY-move));
   1.529 +		CheckDisplay();
   1.530 +		iBotLeft->SetPos(TPoint(botLeftPos.iX+move,botLeftPos.iY-move));
   1.531 +		CheckDisplay();
   1.532 +		}
   1.533 +	for (steps=4;steps>=0;--steps)
   1.534 +		{
   1.535 +		move=maxMove*steps/5;
   1.536 +		iBotLeft->SetPos(TPoint(botLeftPos.iX+move,botLeftPos.iY-move));
   1.537 +		CheckDisplay();
   1.538 +		iTopLeft->SetPos(TPoint(topLeftPos.iX+move,topLeftPos.iY+move));
   1.539 +		CheckDisplay();
   1.540 +		iBotRight->SetPos(TPoint(botRightPos.iX-move,botRightPos.iY-move));
   1.541 +		CheckDisplay();
   1.542 +		iTopRight->SetPos(TPoint(topRightPos.iX-move,topRightPos.iY+move));
   1.543 +		CheckDisplay();
   1.544 +		}
   1.545 +	}
   1.546 +
   1.547 +void CTMultipleTrans::GroupWinL()
   1.548 +	{
   1.549 +	CTWindowGroup* group=new(ELeave) CTWindowGroup(TheClient);
   1.550 +	CleanupStack::PushL(group);
   1.551 +	group->ConstructL();
   1.552 +	CTransWindow* win=CTransWindow::NewL(group,KCyan,TRect(40,40,WinSize.iWidth-40,WinSize.iHeight-40),&DisplayMode);
   1.553 +	win->CTWin::DrawNow();
   1.554 +	if(iMajorTest==1)
   1.555 +		{
   1.556 +		win->SetDrawOpaque(ETrue);
   1.557 +		win->Invalidate();
   1.558 +		TheClient->WaitForRedrawsToFinish();
   1.559 +		}
   1.560 +	iWindows.Insert(win,0);
   1.561 +	CheckDisplay();
   1.562 +	group->GroupWin()->SetOrdinalPosition(1);
   1.563 +	iWindows.Remove(0);
   1.564 +	CheckDisplay();
   1.565 +	group->GroupWin()->SetOrdinalPosition(0);
   1.566 +	iWindows.Insert(win,0);
   1.567 +	CheckDisplay();
   1.568 +	iWindows.Remove(0);
   1.569 +	delete win;		//Would be better to delete this after the group window but the test window don't support this behaviour currently.
   1.570 +	CleanupStack::PopAndDestroy(group);
   1.571 +	CheckDisplay();
   1.572 +	}
   1.573 +
   1.574 +void CTMultipleTrans::FadeTranWin()
   1.575 +	{
   1.576 +	// system fade on
   1.577 +	TheClient->iWs.SetSystemFaded(ETrue);
   1.578 +	// system fade off
   1.579 +	TheClient->iWs.SetSystemFaded(EFalse);
   1.580 +	CheckDisplay();
   1.581 +	}
   1.582 +
   1.583 +void CTMultipleTrans::StartShadows()
   1.584 +	{
   1.585 +	iShadows=ETrue;
   1.586 +	iTopLeft->SetShadowDisabled(EFalse);
   1.587 +	iTopLeft->AdjustShadow(1);
   1.588 +	iTopRight->SetShadowDisabled(EFalse);
   1.589 +	iTopRight->AdjustShadow(1);
   1.590 +	iBotLeft->SetShadowDisabled(EFalse);
   1.591 +	iBotLeft->AdjustShadow(1);
   1.592 +	iBotRight->SetShadowDisabled(EFalse);
   1.593 +	iBotRight->AdjustShadow(1);
   1.594 +	if(!iOpacitySupported)
   1.595 +		{
   1.596 +		iTopRight->ToggleVisibility();		// In 8.1 this isn't needed.
   1.597 +		iTopRight->ToggleVisibility();
   1.598 +		}
   1.599 +	CheckDisplay();
   1.600 +	}
   1.601 +
   1.602 +void CTMultipleTrans::ShadowsOnOff()
   1.603 +	{
   1.604 +	if(!iOpacitySupported)
   1.605 +		return;								// In 8.1 this isn't needed.
   1.606 +	iBotRight->SetShadowDisabled(EFalse);
   1.607 +	iBotRight->AdjustShadow(1);
   1.608 +	CheckDisplay();
   1.609 +	iBotRight->SetShadowDisabled(ETrue);
   1.610 +	CheckDisplay();
   1.611 +	iTopLeft->SetShadowDisabled(EFalse);
   1.612 +	iTopLeft->AdjustShadow(1);
   1.613 +	CheckDisplay();
   1.614 +	iTopLeft->SetShadowDisabled(ETrue);
   1.615 +	CheckDisplay();
   1.616 +	iTopRight->SetShadowDisabled(ETrue);
   1.617 +	CheckDisplay();
   1.618 +	iBotLeft->SetShadowDisabled(EFalse);
   1.619 +	iBotLeft->AdjustShadow(1);
   1.620 +	CheckDisplay();
   1.621 +	iBotLeft->SetShadowDisabled(ETrue);
   1.622 +	CheckDisplay();
   1.623 +	iTopLeft->SetShadowDisabled(EFalse);
   1.624 +	iTopRight->SetShadowDisabled(EFalse);
   1.625 +	iBotLeft->SetShadowDisabled(EFalse);
   1.626 +	iBotRight->SetShadowDisabled(EFalse);
   1.627 +	iTopLeft->ToggleVisibility();
   1.628 +	CheckDisplay();
   1.629 +	iTopLeft->ToggleVisibility();
   1.630 +	CheckDisplay();
   1.631 +	iTopRight->ToggleVisibility();
   1.632 +	CheckDisplay();
   1.633 +	iTopRight->ToggleVisibility();
   1.634 +	CheckDisplay();
   1.635 +	iBotLeft->ToggleVisibility();
   1.636 +	CheckDisplay();
   1.637 +	iBotLeft->ToggleVisibility();
   1.638 +	CheckDisplay();
   1.639 +	iBotRight->ToggleVisibility();
   1.640 +	CheckDisplay();
   1.641 +	iBotRight->ToggleVisibility();
   1.642 +	CheckDisplay();
   1.643 +	}
   1.644 +
   1.645 +void CTMultipleTrans::StartChildL()
   1.646 +	{
   1.647 +	CTransWindow* win;
   1.648 +	TInt windows=iWindows.Count();
   1.649 +	TInt window;
   1.650 +	//Delete the first 4 windows from the array, could use ResetAndDestroy but would be broken by other uses of the array
   1.651 +	for (window=windows;window>0;--window)
   1.652 +		{
   1.653 +		win=iWindows[0];
   1.654 +		iWindows.Remove(0);
   1.655 +		delete win;
   1.656 +		}
   1.657 +	RecreateWindowsL(iBackgroundWin);
   1.658 +	CheckDisplay();	
   1.659 +	}
   1.660 +
   1.661 +void CTMultipleTrans::StartChild2L()
   1.662 +	{
   1.663 +	CTransWindow* win;
   1.664 +	TInt windows=iWindows.Count();
   1.665 +	TInt window;
   1.666 +	//Delete the first 4 windows from the array, could use ResetAndDestroy but would be broken by other uses of the array
   1.667 +	for (window=windows;window>0;--window)
   1.668 +		{
   1.669 +		win=iWindows[0];
   1.670 +		iWindows.Remove(0);
   1.671 +		delete win;
   1.672 +		}
   1.673 +	iShadows=EFalse;
   1.674 +	TRect rect=WinSize;
   1.675 +	rect.Shrink(10,10);
   1.676 +	iBotRight=CTransWindow::NewL(iBackgroundWin,KBlue,rect,&DisplayMode);
   1.677 +	iBotRight->CTWin::DrawNow();
   1.678 +	iWindows.Insert(iBotRight,0);
   1.679 +	CheckDisplay();	
   1.680 +	rect.Resize(-20,-20);
   1.681 +	iTopLeft=CTransWindow::NewL(iBotRight,KRed,rect,&DisplayMode);
   1.682 +	iTopLeft->CTWin::DrawNow();
   1.683 +	iTopLeft->SetPosOffset(TPoint(10,10));
   1.684 +	iWindows.Insert(iTopLeft,0);
   1.685 +	CheckDisplay();	
   1.686 +	rect.Resize(-20,-20);
   1.687 +	iTopRight=CTransWindow::NewL(iTopLeft,KGreen,rect,&DisplayMode);
   1.688 +	iTopRight->CTWin::DrawNow();
   1.689 +	iTopRight->SetPosOffset(TPoint(20,20));
   1.690 +	iWindows.Insert(iTopRight,0);
   1.691 +	CheckDisplay();	
   1.692 +	rect.Resize(-20,-20);
   1.693 +	iBotLeft=CTransWindow::NewL(iTopRight,KYellow,rect,&DisplayMode);
   1.694 +	iBotLeft->CTWin::DrawNow();
   1.695 +	iBotLeft->SetPosOffset(TPoint(30,30));
   1.696 +	iWindows.Insert(iBotLeft,0);
   1.697 +	if(iMajorTest==1)
   1.698 +		{
   1.699 +		for (TInt window = 0; window < iWindows.Count(); ++window)
   1.700 +			{
   1.701 +			iWindows[window]->SetDrawOpaque(ETrue);
   1.702 +			iWindows[window]->Invalidate();
   1.703 +			}
   1.704 +		TheClient->WaitForRedrawsToFinish();
   1.705 +		}
   1.706 +	CheckDisplay();	
   1.707 +	}
   1.708 +	
   1.709 +void CTMultipleTrans::RecreateWindowsL(CTWinBase *aParent)
   1.710 +	{
   1.711 +	CTransWindow* win;
   1.712 +	TInt windows=iWindows.Count();
   1.713 +	TInt window;
   1.714 +	//Delete existing windows:
   1.715 +	for (window=windows;window>0;--window)
   1.716 +		{
   1.717 +		win=iWindows[0];
   1.718 +		iWindows.Remove(0);
   1.719 +		delete win;
   1.720 +		}
   1.721 +
   1.722 +	if(!aParent)
   1.723 +		aParent = TheClient->iGroup;
   1.724 +		
   1.725 +	iBotRight=CTransWindow::NewL(aParent,KBlue,TRect(WinSize.iWidth/2-10,WinSize.iHeight/2-30,WinSize.iWidth-20,WinSize.iHeight-20),&DisplayMode);
   1.726 +	iBotRight->CTWin::DrawNow();
   1.727 +	iWindows.Insert(iBotRight,0);
   1.728 +	iTopLeft=CTransWindow::NewL(aParent,KRed,TRect(10,10,WinSize.iWidth/2+10,WinSize.iHeight/2+30),&DisplayMode);
   1.729 +	iTopLeft->CTWin::DrawNow();
   1.730 +	iWindows.Insert(iTopLeft,0);
   1.731 +	iTopRight=CTransWindow::NewL(aParent,KGreen,TRect(WinSize.iWidth/2-30,20,WinSize.iWidth-10,WinSize.iHeight/2+10),&DisplayMode);
   1.732 +	iTopRight->CTWin::DrawNow();
   1.733 +	iWindows.Insert(iTopRight,0);
   1.734 +	iBotLeft=CTransWindow::NewL(aParent,KYellow,TRect(20,WinSize.iHeight/2-10,WinSize.iWidth/2+30,WinSize.iHeight-10),&DisplayMode);
   1.735 +	iBotLeft->CTWin::DrawNow();
   1.736 +	iWindows.Insert(iBotLeft,0);
   1.737 +	iShadows=EFalse;
   1.738 +
   1.739 +	if(iMajorTest==1)
   1.740 +		{
   1.741 +		for (TInt window=0;window<iWindows.Count();++window)
   1.742 +			{
   1.743 +			iWindows[window]->SetDrawOpaque(ETrue);
   1.744 +			iWindows[window]->Invalidate();
   1.745 +			}
   1.746 +		TheClient->WaitForRedrawsToFinish();
   1.747 +		}
   1.748 +	}
   1.749 +
   1.750 +void CTMultipleTrans::RunTestCaseL(TInt /*aCurTestCase*/)
   1.751 +	{
   1.752 +	_LIT(KCheck,"Check");
   1.753 +	_LIT(KSimple,"Simple Test");
   1.754 +	_LIT(KVisibility,"Change Visibility");
   1.755 +	_LIT(KVisibility2,"Change Visibility 2");
   1.756 +	_LIT(KOrdinal,"Ordinal Position");
   1.757 +	_LIT(KSizeChange,"Size Change");
   1.758 +	_LIT(KMoveWin,"Move Window");
   1.759 +	_LIT(KGroupWin,"Group Window Ordinal");
   1.760 +	_LIT(KBackground,"Background Color Changes");
   1.761 +	_LIT(KShadowsOnOff,"Shadows On Off");
   1.762 +	_LIT(KChild1,"Child 1");
   1.763 +	_LIT(KChild2,"Child 2");
   1.764 +	_LIT(KOpacity,"Opaque Drawing");
   1.765 +	_LIT(KTranWinFade,"Fading Transparent Windows");
   1.766 +	((CTMultipleTransStep*)iStep)->SetTestStepID(KUnknownSYMTestCaseIDName);
   1.767 +
   1.768 +	switch(iTest->iState)
   1.769 +		{
   1.770 +		case 0:
   1.771 +/**
   1.772 +@SYMTestCaseID		GRAPHICS-WSERV-0500
   1.773 +*/
   1.774 +			((CTMultipleTransStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0500"));
   1.775 +			// Check to see if Transparency is enabled before running tests
   1.776 +			iTest->LogSubTest(KCheck);
   1.777 +			if (TransparencySupportedL()==KErrNotSupported)
   1.778 +				{
   1.779 +				LOG_MESSAGE(_L("Transparency is not supported\n"));
   1.780 +				TestComplete();
   1.781 +				return;
   1.782 +				}
   1.783 +			++iTest->iState;		//Fall Through
   1.784 +/**
   1.785 +@SYMTestCaseID		GRAPHICS-WSERV-0111
   1.786 +
   1.787 +@SYMDEF             DEF081259
   1.788 +
   1.789 +@SYMTestCaseDesc    Simple transparent windows test.
   1.790 +
   1.791 +@SYMTestPriority    High
   1.792 +
   1.793 +@SYMTestStatus      Implemented
   1.794 +
   1.795 +@SYMTestActions     Four overlapping transparent windows (RWindow) are created before the test on the screen's left side.
   1.796 +					The test draws the windows on the screen's right side using FBS bitmaps direcly.
   1.797 +					The test does nothing if transparency is not enabled on the screen.
   1.798 +
   1.799 +@SYMTestExpectedResults Expects that left and rightside bitmaps are identical
   1.800 +*/		
   1.801 +		case 1:
   1.802 +			((CTMultipleTransStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0111"));
   1.803 +			iTest->LogSubTest(KSimple);
   1.804 +			SimpleTest();
   1.805 +			break;
   1.806 +/**
   1.807 +@SYMTestCaseID		GRAPHICS-WSERV-0112
   1.808 +
   1.809 +@SYMDEF             DEF081259
   1.810 +
   1.811 +@SYMTestCaseDesc    On/off switching of visibility of transparent windows
   1.812 +
   1.813 +@SYMTestPriority    High
   1.814 +
   1.815 +@SYMTestStatus      Implemented
   1.816 +
   1.817 +@SYMTestActions     Four overlapping transparent windows (RWindow) are created before the test on the screen's left side.
   1.818 +					The test toggles visibility of those four windows going through all
   1.819 +					combinations. For each combination it draws visible windows on the screen's right side using FBS bitmaps direcly.
   1.820 +					The test does nothing if transparency is not enabled on the screen.
   1.821 +
   1.822 +@SYMTestExpectedResults Expects that left and rightside bitmaps are identical
   1.823 +*/		
   1.824 +		case 2:
   1.825 +		case 23:
   1.826 +		case 42:
   1.827 +			((CTMultipleTransStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0112"));
   1.828 +			iTest->LogSubTest(KVisibility);
   1.829 +			ChangeVisibility();
   1.830 +			break;
   1.831 +/**
   1.832 +@SYMTestCaseID		GRAPHICS-WSERV-0113
   1.833 +
   1.834 +@SYMDEF             DEF081259
   1.835 +
   1.836 +@SYMTestCaseDesc    On/off switching of visibility of a small transparent window on top of existing transparent windows
   1.837 +
   1.838 +@SYMTestPriority    High
   1.839 +
   1.840 +@SYMTestStatus      Implemented
   1.841 +
   1.842 +@SYMTestActions     Four overlapping transparent windows (RWindow) are created before the test on the screen's left side.
   1.843 +					Toggles visibility of 5th blank little window making this appear in different places 
   1.844 +					with different ordinal position. Draws visible windows on the screen's right side using FBS bitmaps direcly
   1.845 +					each time when the 5th window becomes invisible.
   1.846 +					The test does nothing if transparency is not enabled on the screen.
   1.847 +
   1.848 +@SYMTestExpectedResults Expects that left and rightside bitmaps are identical
   1.849 +*/		
   1.850 +		case 3:
   1.851 +			((CTMultipleTransStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0113"));
   1.852 +			iTest->LogSubTest(KVisibility2);
   1.853 +			ChangeVisibility2();
   1.854 +			break;
   1.855 +/**
   1.856 +@SYMTestCaseID		GRAPHICS-WSERV-0114
   1.857 +
   1.858 +@SYMDEF             DEF081259
   1.859 +
   1.860 +@SYMTestCaseDesc    Ordinal positions' switches of intersecting transparent windows
   1.861 +
   1.862 +@SYMTestPriority    High
   1.863 +
   1.864 +@SYMTestStatus      Implemented
   1.865 +
   1.866 +@SYMTestActions     Four overlapping transparent windows (RWindow) are created before the test on the screen's left side.
   1.867 +					Switches ordinal positions of the four windows trying all combinations. Draws visible windows on the screen's right side
   1.868 +					using FBS bitmaps direcly each time when a new combination is applied.
   1.869 +					The test does nothing if transparency is not enabled on the screen.
   1.870 +
   1.871 +
   1.872 +@SYMTestExpectedResults Expects that left and rightside bitmaps are identical
   1.873 +*/		
   1.874 +		case 4:
   1.875 +		case 43:
   1.876 +			((CTMultipleTransStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0114"));
   1.877 +			iTest->LogSubTest(KOrdinal);
   1.878 +			OrdinalPos();
   1.879 +			break;
   1.880 +/**
   1.881 +@SYMTestCaseID		GRAPHICS-WSERV-0115
   1.882 +
   1.883 +@SYMDEF             DEF081259
   1.884 +
   1.885 +@SYMTestCaseDesc    Changing sizes of intersecting transparent windows
   1.886 +
   1.887 +@SYMTestPriority    High
   1.888 +
   1.889 +@SYMTestStatus      Implemented
   1.890 +
   1.891 +@SYMTestActions     Four overlapping transparent windows (RWindow) are created before the test on the screen's left side.
   1.892 +					Plays with sizes of each of the four windows to affect overlapping. 
   1.893 +					Draws visible windows on the screen's right side using FBS bitmaps direcly
   1.894 +					each time when a new size for a particular window is applied.
   1.895 +					The test does nothing if transparency is not enabled on the screen.
   1.896 +
   1.897 +
   1.898 +@SYMTestExpectedResults Expects that left and rightside bitmaps are identical
   1.899 +*/		
   1.900 +		case 5:
   1.901 +		case 24:
   1.902 +			((CTMultipleTransStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0115"));
   1.903 +			iTest->LogSubTest(KSizeChange);
   1.904 +			SizeChange();
   1.905 +			break;
   1.906 +/**
   1.907 +@SYMTestCaseID		GRAPHICS-WSERV-0116
   1.908 +
   1.909 +@SYMDEF             DEF081259
   1.910 +
   1.911 +@SYMTestCaseDesc    Moving intersecting transparent windows
   1.912 +
   1.913 +@SYMTestPriority    High
   1.914 +
   1.915 +@SYMTestStatus      Implemented
   1.916 +
   1.917 +@SYMTestActions     Four overlapping transparent windows (RWindow) are created before the test on the screen's left side.
   1.918 +					Performs moves of those windows one by one making little steps in direction of the center of intersection and backwards.
   1.919 +					Draws visible windows on the screen's right side using FBS bitmaps direcly
   1.920 +					each time when a position of a particular window changes.
   1.921 +					The test does nothing if transparency is not enabled on the screen.
   1.922 +
   1.923 +@SYMTestExpectedResults Expects that left and rightside bitmaps are identical
   1.924 +*/		
   1.925 +		case 6:
   1.926 +			((CTMultipleTransStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0116"));
   1.927 +			iTest->LogSubTest(KMoveWin);
   1.928 +			MoveWin();
   1.929 +			break;
   1.930 +/**
   1.931 +@SYMTestCaseID		GRAPHICS-WSERV-0117
   1.932 +
   1.933 +@SYMDEF             DEF081259
   1.934 +
   1.935 +@SYMTestCaseDesc    Test with a second window group
   1.936 +
   1.937 +@SYMTestPriority    High
   1.938 +
   1.939 +@SYMTestStatus      Implemented
   1.940 +
   1.941 +@SYMTestActions     Four overlapping transparent windows (RWindow, within the same group) are created before the test on the screen's left side.
   1.942 +					Creates a 5th transparent window in a separate window group
   1.943 +					on top of existing windows which covers the intersection area of initial 4 windows. 
   1.944 +					Changes the ordinal position of the group to 1, changes ordinal position 
   1.945 +					back to 0, removes the new group.
   1.946 +					Redraws visible windows on the screen's right side using FBS bitmaps direcly
   1.947 +					each time when any change on the screen's left side is performed.
   1.948 +					The test does nothing if transparency is not enabled on the screen.
   1.949 +
   1.950 +@SYMTestExpectedResults Expects that left and rightside bitmaps are identical
   1.951 +*/		
   1.952 +		case 7:
   1.953 +			((CTMultipleTransStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0117"));
   1.954 +			iTest->LogSubTest(KGroupWin);
   1.955 +			GroupWinL();
   1.956 +			break;
   1.957 +		case 8:
   1.958 +			((CTMultipleTransStep*)iStep)->SetTestStepID(KNotATestSYMTestCaseIDName);
   1.959 +			iTest->LogSubTest(KBackground);
   1.960 +			//Change the background color of the 4 test windows and the window behind them
   1.961 +			break;
   1.962 +/**
   1.963 +@SYMTestCaseID		GRAPHICS-WSERV-0118
   1.964 +
   1.965 +@SYMDEF             DEF081259
   1.966 +
   1.967 +@SYMTestCaseDesc    On/off switching of fading
   1.968 +
   1.969 +@SYMTestPriority    High
   1.970 +
   1.971 +@SYMTestStatus      Implemented
   1.972 +
   1.973 +@SYMTestActions     Four overlapping transparent windows (RWindow) are created before the test on the screen's left side.
   1.974 +					Switches system fading on and right after that back to off.
   1.975 +					Draws visible windows on the screen's right side using FBS bitmaps direcly
   1.976 +					after that.
   1.977 +					The test does nothing if transparency is not enabled on the screen.
   1.978 +
   1.979 +@SYMTestExpectedResults Expects that left and rightside bitmaps are identical
   1.980 +*/		
   1.981 +		case 9:
   1.982 +			((CTMultipleTransStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0118"));
   1.983 +			iTest->LogSubTest(KTranWinFade);
   1.984 +			FadeTranWin();
   1.985 +			break;
   1.986 +		case 10:
   1.987 +			((CTMultipleTransStep*)iStep)->SetTestStepID(KNotATestSYMTestCaseIDName);
   1.988 +			iTest->iState=21-1;
   1.989 +			break;
   1.990 +/**
   1.991 +@SYMTestCaseID		GRAPHICS-WSERV-0120
   1.992 +
   1.993 +@SYMDEF             DEF081259
   1.994 +
   1.995 +@SYMTestCaseDesc    Shadows' on/off test.
   1.996 +
   1.997 +@SYMTestPriority    High
   1.998 +
   1.999 +@SYMTestStatus      Implemented
  1.1000 +
  1.1001 +@SYMTestActions     Four overlapping transparent windows (RWindow) with shadowing enabled are created before the test on the screen's left side.
  1.1002 +					The test plays with on/off-switching of shadowing and visibility for the windows.
  1.1003 +					The test redraws visible windows on the screen's right side using FBS bitmaps direcly
  1.1004 +					each time when state of ony window changes.
  1.1005 +					The test does nothing if transparency is not enabled on the screen.
  1.1006 +					The test also repeats GRAPHICS-WSERV-0111 - GRAPHICS-WSERV-015 foor the shadowed windows.
  1.1007 +
  1.1008 +@SYMTestExpectedResults Expects that left and rightside bitmaps are identical
  1.1009 +*/		
  1.1010 +		case 22:
  1.1011 +			((CTMultipleTransStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0120"));
  1.1012 +			iTest->LogSubTest(KShadowsOnOff);
  1.1013 +			ShadowsOnOff();
  1.1014 +			break;
  1.1015 +		case 25:
  1.1016 +			((CTMultipleTransStep*)iStep)->SetTestStepID(KNotATestSYMTestCaseIDName);
  1.1017 +			iTest->iState=41-1;
  1.1018 +			break;
  1.1019 +/**
  1.1020 +@SYMTestCaseID		GRAPHICS-WSERV-0121
  1.1021 +
  1.1022 +@SYMDEF             DEF081259
  1.1023 +
  1.1024 +@SYMTestCaseDesc    Transparent child-windows of a bacground window 
  1.1025 +
  1.1026 +@SYMTestPriority    High
  1.1027 +
  1.1028 +@SYMTestStatus      Implemented
  1.1029 +
  1.1030 +@SYMTestActions     Four overlapping transparent windows (RWindow) with shadowing enabled are created before the test on the screen's left side.
  1.1031 +					The test removes those windows and creates new four overlapping transparent windows 
  1.1032 +					but as children of existing background window. After that the test redraws visible windows on the screen's right side using FBS bitmaps direcly.
  1.1033 +					The test does nothing if transparency is not enabled on the screen.
  1.1034 +					The test also repeats GRAPHICS-WSERV-0111 - GRAPHICS-WSERV-014 foor the shadowed windows.
  1.1035 +
  1.1036 +@SYMTestExpectedResults Expects that left and rightside bitmaps are identical
  1.1037 +*/		
  1.1038 +		case 41:
  1.1039 +			((CTMultipleTransStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0121"));
  1.1040 +			iTest->LogSubTest(KChild1);
  1.1041 +			StartChildL();
  1.1042 +			break;
  1.1043 +		case 44:
  1.1044 +			((CTMultipleTransStep*)iStep)->SetTestStepID(KNotATestSYMTestCaseIDName);
  1.1045 +			iTest->iState=61-1;
  1.1046 +			break;
  1.1047 +/**
  1.1048 +@SYMTestCaseID		GRAPHICS-WSERV-0122
  1.1049 +
  1.1050 +@SYMDEF             DEF081259
  1.1051 +
  1.1052 +@SYMTestCaseDesc    
  1.1053 +
  1.1054 +@SYMTestPriority    High
  1.1055 +
  1.1056 +@SYMTestStatus      Implemented
  1.1057 +
  1.1058 +@SYMTestActions     Four overlapping transparent windows (RWindow) with shadowing enabled are created before the test on the screen's left side.
  1.1059 +					The test removes those windows and creates new four transparent windows 
  1.1060 +					so that each one (except first) is a child of prevoiusly created window. 
  1.1061 +					The test redraws visible windows on the screen's right side using FBS bitmaps direcly
  1.1062 +					after each window's creation.
  1.1063 +					The test does nothing if transparency is not enabled on the screen.
  1.1064 +
  1.1065 +@SYMTestExpectedResults Expects that left and rightside bitmaps are identical
  1.1066 +*/		
  1.1067 +		case 61:
  1.1068 +			((CTMultipleTransStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0122"));
  1.1069 +			iTest->LogSubTest(KChild2);
  1.1070 +			StartChild2L();
  1.1071 +			break;
  1.1072 +		default:
  1.1073 +				((CTMultipleTransStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0123"));
  1.1074 +/**
  1.1075 +@SYMTestCaseID		GRAPHICS-WSERV-0123
  1.1076 +
  1.1077 +@SYMDEF             DEF081259
  1.1078 +
  1.1079 +@SYMTestCaseDesc    
  1.1080 +
  1.1081 +@SYMTestPriority    High
  1.1082 +
  1.1083 +@SYMTestStatus      Implemented
  1.1084 +
  1.1085 +@SYMTestActions     The test draws four overlapping transparent windows (RWindow) on the screen's left side.
  1.1086 +					Each window has an opaque diagonal line (\) which goes from the top-left corner of each window.
  1.1087 +					The test repeats all tests from GRAPHICS-WSERV-0111 to GRAPHICS-WSERV-0122 
  1.1088 +					with those four windows and diagonaly lines on them.
  1.1089 +
  1.1090 +@SYMTestExpectedResults Expects that all tests will obtain results they expected. 
  1.1091 +*/		
  1.1092 +			if (iMajorTest==1 || !iOpacitySupported)
  1.1093 +				{
  1.1094 +				if (!iOpacitySupported)
  1.1095 +					{
  1.1096 +					_LIT(KNoOpacity,"Opacity is not supported");
  1.1097 +					LOG_MESSAGE(KNoOpacity);
  1.1098 +					}
  1.1099 +                		((CTMultipleTransStep*)iStep)->SetTestStepID(KNotATestSYMTestCaseIDName);
  1.1100 +				TestComplete();
  1.1101 +				return;
  1.1102 +				}
  1.1103 +			LOG_MESSAGE(KOpacity);
  1.1104 +			iTest->iState=0;
  1.1105 +			iMajorTest=1;
  1.1106 +			RecreateWindowsL();
  1.1107 +			break;
  1.1108 +		}
  1.1109 +	((CTMultipleTransStep*)iStep)->RecordTestResultL();
  1.1110 +	++iTest->iState;
  1.1111 +	}
  1.1112 +
  1.1113 +
  1.1114 +__WS_CONSTRUCT_STEP__(MultipleTrans)