sl@0: sl@0: // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @test sl@0: @internalComponent - Internal Symbian test code sl@0: */ sl@0: sl@0: #ifndef __TGWHANDLE_H__ sl@0: #define __TGWHANDLE_H__ sl@0: sl@0: #include sl@0: #include sl@0: #include "../tlib/testbase.h" sl@0: #include "AUTO.H" sl@0: #include "TGraphicsHarness.h" sl@0: sl@0: class CTGwHandle : public CTWsGraphicsBase sl@0: { sl@0: public: sl@0: CTGwHandle(CTestStep* aStep); sl@0: ~CTGwHandle(); sl@0: void ConstructL(); sl@0: TInt NumberOfWndGroupsWithZeroPriority(TInt aScreenNumber); sl@0: void GetGwListL(CArrayFixFlat *aWindowHandles); sl@0: void GetGwListL(CArrayFixFlat *aWindowHandles, TInt aScreenNumber); sl@0: void GetGwListL(TInt aPriority, CArrayFixFlat *aWindowHandles); sl@0: void GetGwListL(RArray* aWindowHandles); sl@0: void GetGwListL(TInt aPriority, RArray* aWindowHandles); sl@0: void GwNamesL(); sl@0: void GwIdentifierTestL(); sl@0: void OwnerToForegroundL(); sl@0: void FindWindowGroupIdentifierTestL(); sl@0: void IdentifierWrapAroundTestL(); sl@0: void DefaultOwningWindowL(); sl@0: void DefaultOwningWindow2L(); sl@0: void WindowGroupChaining(); sl@0: void WindowGroupChaining2(); sl@0: void UnchainWindowGroupsL(); sl@0: void TestclosingclientL(); sl@0: void TestClearingAndSettingChildGroupsL(); sl@0: protected: sl@0: //from CTGraphicsStep sl@0: virtual void RunTestCaseL(TInt aCurTestCase); sl@0: private: sl@0: enum {ENumGroups=10,ENumChained=5}; sl@0: private: sl@0: RWindowGroup* CreateWindowGroupLC(RWsSession& aWs,TUint32 aClientHandle,TInt aParentId=0); sl@0: void CreateGroupWindowsLC(RWsSession& aWs); sl@0: void CreateChainedGroupWindowsLC(RWsSession& aWs,TBool aSecondChain = EFalse); sl@0: void TestAgainstLoopsWhenAddingChildGroupsL(); sl@0: void MoveGroups(RWindowGroup** aGroups,TInt aGp,TInt aNum,TInt aPos,TInt aInc=2); sl@0: void TestGroups(TInt aPos); sl@0: void TestGroupsBefore(TInt aPos); sl@0: void TestOrdinalPositionL(); sl@0: void TestOrdinalPositionNoDebugL(); sl@0: void TestOrdinalPos(TInt awndPos); sl@0: void TestOrdinalPosNoDebug(TInt awndPos); sl@0: TInt ChainedWindowCount(RArray*); sl@0: private: sl@0: TFullName iFullName; sl@0: TSize iWinSize; sl@0: RWindowGroup* iGroups[ENumGroups]; sl@0: RWindowGroup* iChained[ENumChained]; sl@0: RWindowGroup* iChained2[ENumChained]; sl@0: }; sl@0: sl@0: class CTGwHandleStep : public CTGraphicsStep sl@0: { sl@0: public: sl@0: CTGwHandleStep(); sl@0: protected: sl@0: //from CTGraphicsStep sl@0: virtual CTGraphicsBase* CreateTestL(); sl@0: }; sl@0: sl@0: _LIT(KTGwHandleStep,"TGwHandle"); sl@0: sl@0: sl@0: #endif