graphicsdeviceinterface/bitgdi/tbit/textendedbitmap.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 2008-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 TEXTENDEDBITMAP_H
       
    23 #define TEXTENDEDBITMAP_H
       
    24 
       
    25 #include <test/tgraphicsharness.h>
       
    26 #include <test/testharnesscallback.h>
       
    27 #include <test/textendedbitmapgc.h>
       
    28 #include <s32mem.h>
       
    29 #include <w32std.h>
       
    30 
       
    31 /** Defines whether the tests will write their results to a screen device or
       
    32 to a bitmap device (if not defined). Comment out to write to a bitmap device. 
       
    33  */
       
    34 #define USE_SCREEN_DEVICE
       
    35 
       
    36 /** Test class for testing the operation of extended bitmaps when used with BitGdi methods.
       
    37 This class creates a graphics context that is passed to a separate DLL that draws the tests
       
    38 to the passed graphics context (textendedbitmapgc.dll). textendedbitmapgc.dll is built as a
       
    39 test component by FbServ.
       
    40  */
       
    41 class CTExtendedBitmap : public CTGraphicsBase, public MTestHarnessCallBack
       
    42 	{
       
    43 public:
       
    44 	CTExtendedBitmap(CTestStep* aStep);
       
    45 	~CTExtendedBitmap();
       
    46 
       
    47 	//from MTestHarnessCallBack
       
    48 	virtual CTestExecuteLogger& Logger();
       
    49 	virtual void TestTrue(TBool aCondition);
       
    50 	virtual void TestComplete();
       
    51 
       
    52 protected:	
       
    53 	//from CTGraphicsBase
       
    54 	virtual void ConstructL();
       
    55 	//from MTestCases (via CTGraphicsBase)
       
    56 	virtual void RunTestCaseL(TInt aCurTestCase);
       
    57 
       
    58 private:
       
    59 #ifndef USE_SCREEN_DEVICE
       
    60 	CFbsBitmap* iBitmap;
       
    61 #endif
       
    62 	CFbsDevice* iDevice;
       
    63 	CFbsBitGc* iBitGc;
       
    64 	CTExtendedBitmapGc* iExtendedBitmapGcTests;
       
    65 	};
       
    66 
       
    67 class CTExtendedBitmapStep : public CTGraphicsStep
       
    68 	{
       
    69 public:
       
    70 	CTExtendedBitmapStep();
       
    71 	
       
    72 protected:
       
    73 	//from CTGraphicsStep
       
    74 	virtual CTGraphicsBase* CreateTestL();
       
    75 	};
       
    76 
       
    77 _LIT(KTExtendedBitmapStep,"TExtendedBitmap");
       
    78 
       
    79 
       
    80 
       
    81 class CTExtendedBitmapNegative : public CTGraphicsBase
       
    82 	{
       
    83 public:
       
    84 	CTExtendedBitmapNegative(CTestStep* aStep);
       
    85 
       
    86 protected:	
       
    87 	//from MTestCases (via CTGraphicsBase)
       
    88 	virtual void RunTestCaseL(TInt aCurTestCase);
       
    89 
       
    90 private:
       
    91 	// Test cases
       
    92 	void TestCFbsBitmapDeviceNewLLeavesL();
       
    93 	};
       
    94 
       
    95 class CTExtendedBitmapNegativeStep : public CTGraphicsStep
       
    96 	{
       
    97 public:
       
    98 	CTExtendedBitmapNegativeStep();
       
    99 	
       
   100 protected:
       
   101 	//from CTGraphicsStep
       
   102 	virtual CTGraphicsBase* CreateTestL();
       
   103 	};
       
   104 
       
   105 _LIT(KTExtendedBitmapNegativeStep,"TExtendedBitmapNegative");
       
   106 
       
   107 #endif // TEXTENDEDBITMAP_H