lafagnosticuifoundation/animation/tef/TBasic.h
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalComponent - Internal Symbian test code  
       
    19 */
       
    20 
       
    21 
       
    22 #ifndef __TBASIC_H__
       
    23 #define __TBASIC_H__
       
    24 
       
    25 #include "AnimationTestStep.h"
       
    26 
       
    27 #include <f32file.h>
       
    28 #include <test/testexecutestepbase.h>
       
    29 
       
    30 #include "TestWindows.h"
       
    31 #include "BasicAnimation.h"
       
    32 #include "SpriteAnimation.h"
       
    33 #include "AnimationGroup.h"
       
    34 #include "ICLAnimationDataProvider.h"
       
    35 
       
    36 _LIT(KBasicStep, "Basic");
       
    37 
       
    38 //
       
    39 // Windows:
       
    40 //
       
    41 class CBasicAnimationWindow : public CTestWindow
       
    42 	{
       
    43 public:
       
    44 	CBasicAnimationWindow(RWsSession& aWs, CTestWindowGroup& aGroup, CWindowGc& aGc);
       
    45 	void DrawL();
       
    46 	void SetAnimation(CBasicAnimation* aAnimation);
       
    47 protected:
       
    48 	CBasicAnimation* iAnimation;
       
    49 	};
       
    50 
       
    51 class CSpriteAnimationWindow : public CTestWindow
       
    52 	{
       
    53 public:
       
    54 	CSpriteAnimationWindow(RWsSession& aWs, CTestWindowGroup& aGroup, CWindowGc& aGc);
       
    55 	};
       
    56 
       
    57 //
       
    58 // The test:
       
    59 // This test does not perform any tests on the visual output.  It is useful
       
    60 // for other issues, but it is also a good base for manual testing.
       
    61 //
       
    62 class CAnimationTestServer;
       
    63 
       
    64 class CBasic : public CAnimationTestStep, public MAnimationObserver
       
    65 	{
       
    66 public:
       
    67 	CBasic();
       
    68 	~CBasic();
       
    69 	// From CActiveTestStep:
       
    70 	virtual TVerdict doActiveTestStepL();
       
    71 protected:
       
    72 	void InitialiseL();
       
    73 	void StartStopL(const TAnimationConfig& aConfig);
       
    74 	void TestLoopsForeverL();
       
    75 	void TestLoopsNumberedL();
       
    76 	void TestNotLoopedL();
       
    77 	void TestControlL();
       
    78 	void TestMovingL();
       
    79 	void TestDataChangeL();
       
    80 	// from MAnimationObserver:
       
    81 	void AnimationEvent(CAnimation& aSender, TInt aEvent, TAny * aData);
       
    82 protected:
       
    83 	CBasicAnimation* iBasicAnimation;
       
    84 	CSpriteAnimation* iSpriteAnimation;
       
    85 	CAnimationGroup* iAnimationGroup;
       
    86 	
       
    87 	TInt iInitialisedCount;
       
    88 	TSize iWinSize;
       
    89 	TPoint iBasicWinPosition;
       
    90 	TPoint iSpriteWinPosition;
       
    91 	CBasicAnimationWindow* iBasicWin;
       
    92 	CSpriteAnimationWindow* iSpriteWin;
       
    93 	};
       
    94 
       
    95 #endif //__TBASIC_H__