os/graphics/windowing/windowserver/test/tauto/TDERIVED.H
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 1996-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 __TDERIVED_H__
    23 #define __TDERIVED_H__
    24 
    25 #include <e32std.h>
    26 #include <w32std.h>
    27 #include "../tlib/testbase.h"
    28 #include "AUTO.H"
    29 #include "TGraphicsHarness.h"
    30 
    31 class CDerivedWindowGc : public CWindowGc
    32 	{
    33 public:
    34 	CDerivedWindowGc(CWsScreenDevice *aDevice);
    35 	~CDerivedWindowGc();
    36 	void DrawLine(const TPoint &aPoint1,const TPoint &aPoint2);
    37 	};
    38 
    39 class RDerivedSession : public RWsSession
    40 	{
    41 public:
    42 	TInt ResourceCount();
    43 	void EnableAutoFlush();
    44 	};
    45 
    46 class RDerivedBlankWindow : public RBlankWindow
    47 	{
    48 public:
    49 	RDerivedBlankWindow();
    50 	RDerivedBlankWindow(RWsSession &aWs);
    51 	void SetColor(TRgb aColor);
    52 	void SetColorGray();
    53 	};
    54 
    55 class RDerivedWindow : public RWindow
    56 	{
    57 public:
    58 	RDerivedWindow();
    59 	RDerivedWindow(RWsSession &aWs);
    60 	void SetBackgroundColor(TRgb aColor);
    61 	void SetBackgroundColorGray();
    62 	};
    63 
    64 class RDerivedBackedUpWindow : public RBackedUpWindow
    65 	{
    66 public:
    67 	RDerivedBackedUpWindow();
    68 	RDerivedBackedUpWindow(RWsSession &aWs);
    69 	TInt BitmapHandle();
    70 	};
    71 
    72 class RDerivedWindowGroup : public RWindowGroup
    73 	{
    74 public:
    75 	RDerivedWindowGroup();
    76 	RDerivedWindowGroup(RWsSession &aWs);
    77 	TName Name() const;
    78 	};
    79 
    80 class CDerivedScreenDevice : public CWsScreenDevice
    81 	{
    82 public:
    83 	CDerivedScreenDevice(RWsSession &aWs);
    84 	CDerivedScreenDevice();
    85 	TSize SizeInPixels() const;
    86 	};
    87 
    88 class RDerivedSprite : public RWsSprite
    89 	{
    90 public:
    91 	RDerivedSprite();
    92 	RDerivedSprite(RWsSession &aWs);
    93 	};
    94 
    95 class RDerivedPointerCursor : public RWsPointerCursor
    96 	{
    97 public:
    98 	RDerivedPointerCursor();
    99 	RDerivedPointerCursor(RWsSession &aWs);
   100 	};
   101 
   102 class CTDerived : public CTWsGraphicsBase
   103 	{
   104 public:
   105 	CTDerived(CTestStep* aStep);
   106 	void ConstructL();
   107 	void DerivedWindowGcL();
   108 	void DerivedSession();
   109 	void DerivedWindows();
   110 	void DerivedScreenDeviceL();
   111 	void DerivedSprite();
   112 	~CTDerived();
   113 protected:
   114 //from 	CTGraphicsStep
   115 	virtual void RunTestCaseL(TInt aCurTestCase);
   116 private:
   117 	TSize iWinSize;
   118 	RDerivedSession iDSession;
   119 	RDerivedWindow iDRedraw;
   120 	RDerivedBlankWindow iDBlank;
   121 	RDerivedBackedUpWindow iDBackedUp;
   122 	RDerivedWindowGroup iDGroup;
   123 	RDerivedSprite iDSprite;
   124 	RDerivedPointerCursor iDPCursor;
   125 	};
   126 
   127 class CTDerivedStep : public CTGraphicsStep
   128 	{
   129 public:
   130 	CTDerivedStep();
   131 protected:	
   132 	//from CTGraphicsStep
   133 	virtual CTGraphicsBase* CreateTestL();
   134 	};
   135 
   136 _LIT(KTDerivedStep,"TDerived");
   137 
   138 
   139 #endif