graphicstest/graphicstestharness/inc/graphicsscreencomparison.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 2007-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  @test
       
    19  @internalComponent - Internal Symbian test code
       
    20 */
       
    21 
       
    22 #ifndef __GRAPHICSSCREENCOMPARISON_H__
       
    23 #define __GRAPHICSSCREENCOMPARISON_H__
       
    24 
       
    25 #include <e32std.h>
       
    26 #include <w32std.h>
       
    27 #include <graphics/testscreencapture.h>
       
    28 
       
    29 _LIT(KDir,"c:\\logs\\testexecute\\screencomparison\\");
       
    30 _LIT(KMbmSuffix, ".mbm");
       
    31 const TInt KFixedNumWidth = 3;
       
    32 
       
    33 class CTGraphicsScreenComparison : public CBase
       
    34 	{
       
    35 public:
       
    36     IMPORT_C static CTGraphicsScreenComparison* NewL(CWsScreenDevice& aScreenDevice);
       
    37 	IMPORT_C TInt CompareScreenImageL(const TSize& aCompareSize,
       
    38                                       const TPoint& aScreenPoint,
       
    39                                       const TPoint& aBitmapPoint,
       
    40                                       const CFbsBitmap& aRefBitmap,
       
    41                                       const TDesC& aTestStepName = KNullDesC);
       
    42 	IMPORT_C TInt CompareScreenImageL(const TSize& aCompareSize,
       
    43                                       const TPoint& aScreenPoint,
       
    44                                       const TRgb& aColor,
       
    45                                       const TDesC& aTestStepName = KNullDesC);
       
    46 	IMPORT_C MTestScreenCapture* GetMTestScreenCapture()  const;
       
    47 	IMPORT_C ~CTGraphicsScreenComparison();
       
    48 
       
    49 private:
       
    50 	CTGraphicsScreenComparison();
       
    51 	void ConstructL(CWsScreenDevice& aScreenDevice);
       
    52 	void SaveBitmapL(CFbsBitmap& aBitmap, const TDesC& aTestStepName);
       
    53 
       
    54 private:
       
    55 	TSize iScreenSize;
       
    56 	CFbsBitmap* iBmp;
       
    57 	MTestScreenCapture* iCsc;
       
    58     TInt iSavedBitmapCounter;
       
    59 	};
       
    60 
       
    61 #endif //__GRAPHICSSCREENCOMPARISON_H___