windowing/windowserver/tauto/TGWHANDLE.H
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 
       
     2 // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 // All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 //
       
     9 // Initial Contributors:
       
    10 // Nokia Corporation - initial contribution.
       
    11 //
       
    12 // Contributors:
       
    13 //
       
    14 // Description:
       
    15 //
       
    16 
       
    17 /**
       
    18  @file
       
    19  @test
       
    20  @internalComponent - Internal Symbian test code
       
    21 */
       
    22 
       
    23 #ifndef __TGWHANDLE_H__
       
    24 #define __TGWHANDLE_H__
       
    25 
       
    26 #include <e32std.h>
       
    27 #include <w32std.h>
       
    28 #include "../tlib/testbase.h"
       
    29 #include "AUTO.H"
       
    30 #include "TGraphicsHarness.h"
       
    31 
       
    32 class CTGwHandle : public CTWsGraphicsBase
       
    33 	{
       
    34 public:
       
    35 	CTGwHandle(CTestStep* aStep);
       
    36 	~CTGwHandle();
       
    37 	void ConstructL();
       
    38 	TInt NumberOfWndGroupsWithZeroPriority(TInt aScreenNumber);
       
    39 	void GetGwListL(CArrayFixFlat<TInt> *aWindowHandles);
       
    40 	void GetGwListL(CArrayFixFlat<TInt> *aWindowHandles, TInt aScreenNumber);
       
    41 	void GetGwListL(TInt aPriority, CArrayFixFlat<TInt> *aWindowHandles);
       
    42 	void GetGwListL(RArray<RWsSession::TWindowGroupChainInfo>* aWindowHandles);
       
    43 	void GetGwListL(TInt aPriority, RArray<RWsSession::TWindowGroupChainInfo>* aWindowHandles);
       
    44 	void GwNamesL();
       
    45 	void GwIdentifierTestL();
       
    46 	void OwnerToForegroundL();
       
    47 	void FindWindowGroupIdentifierTestL();
       
    48 	void IdentifierWrapAroundTestL();
       
    49 	void DefaultOwningWindowL();
       
    50 	void DefaultOwningWindow2L();
       
    51 	void WindowGroupChaining();
       
    52 	void WindowGroupChaining2();
       
    53 	void UnchainWindowGroupsL();
       
    54 	void TestclosingclientL();
       
    55 	void TestClearingAndSettingChildGroupsL();
       
    56 protected:
       
    57 //from 	CTGraphicsStep
       
    58 	virtual void RunTestCaseL(TInt aCurTestCase);
       
    59 private:
       
    60 	enum {ENumGroups=10,ENumChained=5};
       
    61 private:
       
    62 	RWindowGroup* CreateWindowGroupLC(RWsSession& aWs,TUint32 aClientHandle,TInt aParentId=0);
       
    63 	void CreateGroupWindowsLC(RWsSession& aWs);
       
    64 	void CreateChainedGroupWindowsLC(RWsSession& aWs,TBool aSecondChain = EFalse);
       
    65 	void TestAgainstLoopsWhenAddingChildGroupsL();
       
    66 	void MoveGroups(RWindowGroup** aGroups,TInt aGp,TInt aNum,TInt aPos,TInt aInc=2);
       
    67 	void TestGroups(TInt aPos);
       
    68 	void TestGroupsBefore(TInt aPos);
       
    69 	void TestOrdinalPositionL();
       
    70 	void TestOrdinalPositionNoDebugL();
       
    71 	void TestOrdinalPos(TInt awndPos);
       
    72 	void TestOrdinalPosNoDebug(TInt awndPos);
       
    73 	TInt ChainedWindowCount(RArray<RWsSession::TWindowGroupChainInfo>*);
       
    74 private:
       
    75 	TFullName iFullName;
       
    76 	TSize iWinSize;
       
    77 	RWindowGroup* iGroups[ENumGroups];
       
    78 	RWindowGroup* iChained[ENumChained];
       
    79 	RWindowGroup* iChained2[ENumChained];
       
    80 	};
       
    81 
       
    82 class CTGwHandleStep : public CTGraphicsStep
       
    83 	{
       
    84 public:
       
    85 	CTGwHandleStep();
       
    86 protected:
       
    87 	//from CTGraphicsStep
       
    88 	virtual CTGraphicsBase* CreateTestL();
       
    89 	};
       
    90 
       
    91 _LIT(KTGwHandleStep,"TGwHandle");
       
    92 
       
    93 
       
    94 #endif